MongoDB RBAC

MongoQUI University

User Management

User List

  • Shows Username and the Roles array applied to each user.
  • Actions column provides ✏️ edit and 🗑️ delete for each entry.

Creating a User

  1. Click Create User (top-right).
  2. Username – Case-sensitive MongoDB username.
  3. Password – Secure password for database authentication.
  4. Roles section:
    • For each assignment choose Database and Role from drop-downs.
    • Click Add Role to append multiple role lines (e.g., read on one DB, write on another).
  5. Press Create to save.

creatinguser

Editing or Deleting Users

  • Edit (✏️) – Update password or adjust role list.
  • Delete (🗑️) – Removes the user from the database after confirmation.

Best-Practice Notes

  • Principle of Least Privilege – Start with minimal actions (find) and broaden only when required.
  • Separate Admin Tasks – Keep administrative roles (dbAdmin, dbOwner) limited to a small roster of users.
  • Audit Regularly – Use the Users tab to review stale accounts and the Roles tab to prune unused custom roles.
  • Naming Convention<env>-<scope>-<access> (e.g., prod-sales-read). Helps quickly identify intent.

Quick Reference

TaskUI PathIcon / Button
Switch database for RBACTop-right Database Context
Create custom roleRoles tab → Create Role
Filter role listRoles tab → Filter dropdown
Create userUsers tab → Create User
Add extra role to userCreate / Edit User modal → Add Role