Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13039

Not able to get collection stats of config db

    XMLWordPrintableJSON

Details

    Description

      Description

      User with the following role :-

       

      db.createUser({user:"user15",pwd:"password", roles:[

      {role:"userAdminAnyDatabase", db:"admin"}

      , {role:"clusterMonitor", db:"admin"}, {role:"readAnyDatabase", db:"admin"}, {role:"read", db:"config"} ]})

       

      Not able to fetch System.sessions.stats() of config db .  Error ->

      db.system.sessions.stats()

      db.system.sessions.stats(){ "ok" : 0, "errmsg" : "not authorized on config to execute command { collStats: \"system.sessions\", scale: undefined, lsid:

      { id: UUID(\"48024901-b14a-4fa9-b645-ab0b24545c66\") }

      , $db: \"config\" }", "code" : 13, "codeName" : "Unauthorized"}

       

       

      From which role of user , I am able to get these stats. In document , This is stated that all db's collection stats is able t fetch through ClusterMonitor role . Here I have given all the necessary roles but not able to fetch the stats of config db.

      Scope of changes

      • Need to clarify whether roles that have demarc between "All collections in <X> database"  and "only the following system collections" should actually be "All non-system collections..."
      • Generally seems like we need better guidance around how built-in roles work against system collections.

      Impact to Other Docs

      • Fixups in 3.6 should be forward-ported if possible. Might make more sense to start with 4.2 and backport more general refinements, making version-specific fixes where possible.

        MVP (Work and Date)

        Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            Unassigned Unassigned
            rmahor06@gmail.com rahul mahor
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              1 year, 14 weeks, 2 days ago