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

Can't run transitionToCatalogShard once you enable auth

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Sharding NYC
    • Fully Compatible
    • ALL

      I've spun up a new sharded cluster with a keyfile, and created my new user (with the "root" role)

      [direct: mongos] admin> db.runCommand({connectionStatus:1})
      {
        authInfo: {
          authenticatedUsers: [ { user: 'admin', db: 'admin' } ],
          authenticatedUserRoles: [ { role: 'root', db: 'admin' } ]
        },
        ok: 1,
        '$clusterTime': {
          clusterTime: Timestamp({ t: 1678422752, i: 1 }),
          signature: {
            hash: Binary(Buffer.from("9e9d31c17820d4cc24055f90e8e715efd1391d4f", "hex"), 0),
            keyId: Long("7208766933166981142")
          }
        },
        operationTime: Timestamp({ t: 1678422752, i: 1 })
      }
      

      But I can't run transitionToCatalogShard

      [direct: mongos] admin> db.adminCommand({ transitionToCatalogShard: 1 });
      MongoServerError: not authorized on admin to execute command { transitionToCatalogShard: 1, lsid: { id: UUID("bce29423-e2fb-4d6c-8190-f88f2c8d9763") }, $clusterTime: { clusterTime: Timestamp(1678422752, 1), signature: { hash: BinData(0, 9E9D31C17820D4CC24055F90E8E715EFD1391D4F), keyId: 7208766933166981142 } }, $db: "admin" }
      

      There's no higher role I can give myself (short of __system which is not recommended)

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            joanna.cheng@mongodb.com Joanna Cheng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: