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

Auth doesn't work on SyncClusterConnections

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: Security, Shell
    • Labels:
      None
    • Operating System:
      ALL

      Description

      mongo --nodb
      MongoDB shell version: 2.0.1
      > hosts = 'localhost:10001,localhost:10002,localhost:10003'
      localhost:10001,localhost:10002,localhost:10003

      > conn = new Mongo(hosts)
      Thu Nov 10 17:53:24 SyncClusterConnection connecting to [localhost:10001]
      Thu Nov 10 17:53:24 SyncClusterConnection connecting to [localhost:10002]
      Thu Nov 10 17:53:24 SyncClusterConnection connecting to [localhost:10003]
      connection to localhost:10001,localhost:10002,localhost:10003

      > db = conn.getDB('admin')
      admin
      admin[17:53:34]> db.foo.insert(

      {a:1}

      )
      Thu Nov 10 17:53:39 Error: error doing insert:SyncClusterConnection::insert prepare failed: localhost:10001:

      { assertion: "unauthorized db:admin lock type:1 client:127.0.0.1", assertionCode: 10057, errmsg: "db assertion failure", ok: 0.0 }

      localhost:10002:

      { assertion: "unauthorized db:admin lock type:1 client:127.0.0.1", assertionCode: 10057, errmsg: "db assertion failure", ok: 0.0 }

      localhost:10003:

      { assertion: "unauthorized db:admin lock type:1 client:127.0.0.1", assertionCode: 10057, errmsg: "db assertion failure", ok: 0.0 }

      shell/collection.js:173

      admin[17:53:39]> db.auth('admin','password')
      1

      admin[17:53:47]> db.foo.insert(

      {a:1}

      )
      Thu Nov 10 17:53:50 Error: error doing insert:SyncClusterConnection::insert prepare failed: localhost:10002:

      { assertion: "unauthorized db:admin lock type:1 client:127.0.0.1", assertionCode: 10057, errmsg: "db assertion failure", ok: 0.0 }

      localhost:10003:

      { assertion: "unauthorized db:admin lock type:1 client:127.0.0.1", assertionCode: 10057, errmsg: "db assertion failure", ok: 0.0 }

      shell/collection.js:173

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: