Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32215

authenticationRestrictions Authentication failed

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      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?

      Attachments

        Activity

          People

            mark.agarunov Mark Agarunov
            Su SuperSuJJ [X]
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: