[DOCS-7631] Document the showPrivileges option to the connectionStatus command Created: 13/Apr/16  Updated: 30/Oct/23  Resolved: 23/Aug/16

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: Allison Reinheimer Moore
Resolution: Done Votes: 0
Labels: bite-sized
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-25735 connectionStatus only returns info fo... Closed
Participants:
Days since reply: 7 years, 25 weeks, 1 day ago
Story Points: 0.25

 Description   

The page for the connectionStatus command (https://docs.mongodb.org/manual/reference/command/connectionStatus/) does not mention the showPrivileges: true option. This option provides valuable extra information about the privileges that are associated with the roles of logged-in users.

> db.runCommand({ connectionStatus:1})
{
        "authInfo" : {
                "authenticatedUsers" : [
                        {
                                "user" : "onlyFind",
                                "db" : "test"
                        }
                ],
                "authenticatedUserRoles" : [
                        {
                                "role" : "onlyFind",
                                "db" : "test"
                        }
                ]
        },
        "ok" : 1
}
> db.runCommand({ connectionStatus:1, showPrivileges: true})
{
        "authInfo" : {
                "authenticatedUsers" : [
                        {
                                "user" : "onlyFind",
                                "db" : "test"
                        }
                ],
                "authenticatedUserRoles" : [
                        {
                                "role" : "onlyFind",
                                "db" : "test"
                        }
                ],
                "authenticatedUserPrivileges" : [
                        {
                                "resource" : {
                                        "db" : "test",
                                        "collection" : "test"
                                },
                                "actions" : [
                                        "find"
                                ]
                        }
                ]
        },
        "ok" : 1
}



 Comments   
Comment by Githook User [ 23/Aug/16 ]

Author:

{u'username': u'schmalliso', u'name': u'Allison Moore', u'email': u'allison.moore@10gen.com'}

Message: DOCS-7631: adds showPrivileges to cmds/methods where it was missing

  • db.getUser()
  • db.getRole()
  • connectionStatus

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/2628ca927443c18bd4a6ee5ad95a9e139e33b9bd

Generated at Thu Feb 08 07:54:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.