db.getUsers() doesn't output authenticationRestrictions option

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.6.2
    • Component/s: Admin
    • None
    • ALL
    • Hide

      Command:

      db.createUser(
      {
      user: "user1",
      pwd : "123",
        "roles" : [{
            "role" : "read",
            "db" : "test"
          }],
        "authenticationRestrictions" : [{
            "clientSource" : ["192.0.2.0"],
            "serverAddress" : ["198.51.100.0"]
          }]
      })
      
      Show
      Command: db.createUser( { user: "user1" , pwd : "123" , "roles" : [{ "role" : "read" , "db" : "test" }], "authenticationRestrictions" : [{ "clientSource" : [ "192.0.2.0" ], "serverAddress" : [ "198.51.100.0" ] }] })
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      db.getUsers() doesn't output authenticationRestrictions option.
      Command

      db.getUser("user1")
      

      Output:

      {
          "_id" : "test.user1",
          "user" : "user1",
          "db" : "test",
          "roles" : [
              {
                  "role" : "read",
                  "db" : "test"
              }
          ]
      }
      

      System table:

      {
          "_id" : "test.user1",
          "user" : "user1",
          "db" : "test",
          "credentials" : {
              "SCRAM-SHA-1" : {
                  "iterationCount" : 10000,
                  "salt" : "lzMnQfgicY/TfSRwllZTTQ==",
                  "storedKey" : "q6QviU2ZkYO4CVeRX51oNCsrzdU=",
                  "serverKey" : "D7QX56EUW6f/1+Ent6Kv6tglZAQ="
              }
          },
          "authenticationRestrictions" : [
              {
                  "clientSource" : [
                      "192.0.2.0"
                  ],
                  "serverAddress" : [
                      "198.51.100.0"
                  ]
              }
          ],
          "roles" : [
              {
                  "role" : "read",
                  "db" : "test"
              }
          ]
      }
      

      Server version: 3.6.2
      Platform: Windows x64

            Assignee:
            Kelsey Schubert
            Reporter:
            Alexey Butalov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: