In the mongo shell:
> with (tmp) self.r = archive.getUser( "archive", {
... showCredentials: true,
... showPrivileges: true,
... showAuthenticationRestrictions: true
... /* no filter */
... } )
{
"_id" : "archive.archive",
"userId" : UUID("774f51d9-1a44-4505-8459-5254c767591d"),
"user" : "archive",
"db" : "archive",
"mechanisms" : [
"SCRAM-SHA-1",
"SCRAM-SHA-256"
],
"credentials" : {
"SCRAM-SHA-1" : {
"iterationCount" : 10000,
"salt" : "ofZDQzZpxlNuIaLZBCgZcA==",
"storedKey" : "bnKjAub+8gK8abOTk2pv1xZCp4c=",
"serverKey" : "2iYaWdHyR5oqpkb8oGxhRcXWgAA="
},
"SCRAM-SHA-256" : {
"iterationCount" : 15000,
"salt" : "tQaoqzDL+7z7Lwm9ueAuqDqMWrMEuoq0n8+KKg==",
"storedKey" : "2E+qP66fRuIdluy+5AV4p+cvo7HhhjMR5H3DASL+258=",
"serverKey" : "cw3hd4SpOJw7QbGYBAWIbB6bKWvP0V/ArSxKXJfd7oY="
}
},
"customData" : {
},
"roles" : [
{
"role" : "readWrite",
"db" : "archive"
}
],
"inheritedRoles" : [
{
"role" : "readWrite",
"db" : "archive"
}
],
"inheritedPrivileges" : [
{
"resource" : {
"db" : "archive",
"collection" : ""
},
"actions" : [
"changeStream",
"collStats",
"convertToCapped",
"createCollection",
"createIndex",
"dbHash",
"dbStats",
"dropCollection",
"dropIndex",
"emptycapped",
"find",
"insert",
"killCursors",
"listCollections",
"listIndexes",
"planCacheRead",
"remove",
"renameCollectionSameDB",
"update"
]
},
{
"resource" : {
"db" : "archive",
"collection" : "system.indexes"
},
"actions" : [
"changeStream",
"collStats",
"dbHash",
"dbStats",
"find",
"killCursors",
"listCollections",
"listIndexes",
"planCacheRead"
]
},
{
"resource" : {
"db" : "archive",
"collection" : "system.js"
},
"actions" : [
"changeStream",
"collStats",
"convertToCapped",
"createCollection",
"createIndex",
"dbHash",
"dbStats",
"dropCollection",
"dropIndex",
"emptycapped",
"find",
"insert",
"killCursors",
"listCollections",
"listIndexes",
"planCacheRead",
"remove",
"renameCollectionSameDB",
"update"
]
},
{
"resource" : {
"db" : "archive",
"collection" : "system.namespaces"
},
"actions" : [
"changeStream",
"collStats",
"dbHash",
"dbStats",
"find",
"killCursors",
"listCollections",
"listIndexes",
"planCacheRead"
]
}
],
"inheritedAuthenticationRestrictions" : [ ],
"authenticationRestrictions" : [ ]
}