authenticationRestrictions Authentication failed

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      mongodb version :3.6.0
      os version : centos 7.2

      when i create user in 3.6.0 use authenticationRestrictions,but still Authentication failed.
      server ip:172.16.10.115
      client ip:172.16.10.115

      create user scripts:

      > db.createUser(
      ...    {
      ...      user: "restricted",
      ...      pwd: "password",
      ...      roles: [ ],
      ...      authenticationRestrictions: [ {
      ...         clientSource: ["172.16.10.0"],
      ...         serverAddress: ["172.16.10.0"]
      ...      } ]
      ...    }
      ... )
      Successfully added user: {
              "user" : "restricted",
              "roles" : [ ],
              "authenticationRestrictions" : [
                      {
                              "clientSource" : [
                                      "172.16.10.0"
                              ],
                              "serverAddress" : [
                                      "172.16.10.0"
                              ]
                      }
              ]
      }
      

      but auth failed:
      > db.auth("restricted","password")
      Error: Authentication failed.
      0

      is it some wrong?

            Assignee:
            Mark Agarunov (Inactive)
            Reporter:
            SuperSuJJ [X]
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: