MongoDB RBAC

MongoQUI University

Role Management

Role List & Filters

  • Filter dropdown (upper-right of the list) lets you choose:
    • All roles (default)
    • Built-in roles only
    • Custom roles only
  • Built-in roles are tagged Built-in and cannot be edited or removed.
  • Custom roles display ✏️ (edit) and 🗑️ (delete) icons in the Actions column.

Creating a Custom Role

  1. Click Create Role. A modal titled Create New Role appears.
  2. Role Name – Provide a descriptive identifier (e.g., analyticsRead).
  3. Privileges – One or more privilege blocks; each block defines:
    • Resource Type:
      • Database, Collection, Cluster, or Any Resource.
    • Database / Collection selectors (contextual to the resource type).
    • Actions:
      • Common choices include find, insert, update, remove, createIndex, listIndexes.
      • Click Show All Actions to reveal the full list of MongoDB actions.
  4. Click Add Privilege to define additional blocks (e.g., grant read on one DB, write on another).
  5. Inherited Roles – Optionally click Add Inherited Role and select existing roles to inherit their privileges.
  6. Press Create to save the role.

createrole

Editing or Deleting Roles

  • Edit (✏️) – Re-opens the role modal pre-populated so you can adjust privileges or inherited roles.
  • Delete (🗑️) – Permanently removes a custom role after confirmation. Any users solely dependent on that role will lose privileges.