db.printSlaveReplicationInfo requires much higher privileges than necessary

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Security, Shell
    • None
    • Replication
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      db.printSlaveReplicationInfo bases all output on the information obtained via replSetGetStatus (so this is the only privilege it should need) but requires local.system.* access privileges to actually complete.

      RE: https://github.com/mongodb/mongo/blob/r3.2.6/src/mongo/shell/db.js#L1024

      It appears a simple flight check verifies if the member it is run against is in a replica-set. It could just issue the replSetGetStatus command instead and determine action on the result rather than attempting to query a "system" namespace.

            Assignee:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            Andrew Ryder (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: