Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11527

Inconsistent arguments in grant/revoke roles/privileges to/from role

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.4
    • Component/s: Security
    • Labels:
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL

      Description

      grantRolesToRole takes a grantedRoles argument, thusly:

      { grantRolesToRole: "productsReaderWriter",
        grantedRoles: [
          { role: "productsReader", db: "products"}
        ],
        writeConcern: { w: "majority" , wtimeout: 5000 }
      }

      But for 'grantPrivilegesToRole, the argument is not 'grantedPrivileges', but simply 'privileges'.

      { grantPrivilegesToRole: "<role>",
        privileges: [
          { resource: { <resource> }, actions: [ "<action>", ... ] },
          ...
        ],
        writeConcern: <write concern document>
      }

      Similarly, revokeRolesFromRole has 'revokedRoles', but revokePrivelegesFromRole has just 'privileges'

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: