|
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)
|