Role-Based Access Control (RBAC)
Manage MongoDB users, roles, permissions, and teams from a single dashboard. Create database users with SCRAM, X.509, or external authentication, define custom roles with granular privileges, scope permissions to individual databases, organize users into groups, and audit every administrative action.
Access Control covers the following capabilities:
Note: Admin access to the admin database is required for full RBAC management. Without admin privileges, you'll have limited functionality — the dashboard falls back to read-only views of the users and roles the current session can see.
The Dashboard tab provides a high-level view of your MongoDB security configuration.
The Users tab provides comprehensive user management with filtering, search, and bulk operations.
| Column | Description |
|---|---|
| Principal | Username@authDB for SCRAM, DN for X.509, or principal for External |
| Type | Authentication type badge (SCRAM, X509, EXTERNAL) |
| Roles | Assigned roles in role@database format |
| Status | Active or Disabled indicator |
| Actions | View, Enable/Disable, Delete buttons |
| Field | Description | Required |
|---|---|---|
Username | Unique username for database authentication | Yes |
Password | User password (masked with show/hide toggle) | Yes |
Auth Database | Database where credentials are stored (typically 'admin') | Yes |
Roles | Assign roles with database scope (e.g., readWrite@mydb) | At least one |
| Field | Description | Required |
|---|---|---|
Distinguished Name | Full X.509 certificate subject DN | Yes |
Roles | Assign roles with database scope | At least one |
| Field | Description | Required |
|---|---|---|
Principal | External principal identifier (LDAP DN, Kerberos principal, AWS ARN) | Yes |
Mechanism | Authentication mechanism (LDAP, GSSAPI, MONGODB-AWS) | Yes |
Roles | Assign roles with database scope | At least one |
Manage built-in MongoDB roles and create custom roles for specific security requirements.
| Role | Description |
|---|---|
read | Read-only access to all non-system collections |
readWrite | Read and write access to all non-system collections |
dbAdmin | Database administration (create collections, indexes) |
dbOwner | Full database admin (readWrite + dbAdmin + userAdmin) |
userAdmin | Create and manage users and roles |
| Role | Description |
|---|---|
clusterAdmin | Full cluster administration access |
clusterMonitor | Read-only monitoring access |
backup | Backup operations |
restore | Restore from backups |
root | Superuser with all privileges |
| Field | Description | Required |
|---|---|---|
Role Name | Unique name for the custom role | Yes |
Database | Database where the role is defined | Yes |
Description | Human-readable description of the role | No |
Privileges | Specific actions on resources | At least one |
Inherited Roles | Other roles this role inherits from | No |
| Action | Description |
|---|---|
find | Query documents |
insert | Insert new documents |
update | Modify existing documents |
remove | Delete documents |
createIndex | Create indexes |
dropIndex | Remove indexes |
Every MongoDB role assignment is scoped to a specific database. A user can hold different roles in different databases, which is the primary way you grant least-privilege access in MongoDB.
In VisuaLeaf, the role picker on both the Create User and User Detail views uses the role@database format:
read@reporting — read-only access to the reporting databasereadWrite@orders — full document access to the orders database onlydbAdmin@analytics — administer indexes and collections in analytics, with no data access anywhere elseread@admin paired with readWrite@app — a common pattern for users that need to inspect server-level metadata but only write to a single application databaseadmin)role@database grants; each row is an independent scopeTip: Grants against the special anyResource or cluster resource cannot be limited to a single database — if you see those in the Effective Privileges panel, review which role introduced them.
View the complete set of permissions a user or role has, including inherited privileges and group grants.
Groups let you bundle a set of roles and assign that bundle to many users at once. They are ideal for teams (e.g., "Data Analysts", "Support Engineers", "SREs") where every member should hold the same set of grants.
role@database grants — these apply to every memberEvery RBAC action performed through VisuaLeaf is recorded in the audit log so you can trace who did what, when, and against which target. The log is stored server-side and survives client restarts.
| Field | Description |
|---|---|
| Timestamp | UTC timestamp of the action (millisecond precision) |
| Actor | The VisuaLeaf user and MongoDB principal that initiated the action |
| Action | e.g., user.create, user.grant-role, role.update, group.add-member, user.disable |
| Target | The user, role, group, or database the action applied to |
| Details | Before/after snapshot of the change (roles added, privileges revoked, etc.) |
| Client IP | Source IP of the actor's session |
| Result | Success or failure, with the server error message if applicable |
The audit log can be exported to CSV for compliance reviews, ticket attachments, or downstream SIEM ingestion.
The exported file uses UTF-8 with a BOM (so Excel opens it cleanly), comma delimiters, and RFC 4180 quoting. Each row corresponds to a single audit event; multi-value fields (e.g., "roles added") are JSON-encoded inside their cell so the CSV stays flat.
Tip: Schedule a monthly export against a fixed date range and archive the CSVs alongside your access-review artifacts — this is usually enough evidence to satisfy SOC 2, ISO 27001, and PCI DSS access-review controls.
Monitor active user sessions to track database connections.
| Field | Description |
|---|---|
| Session ID | Unique identifier for the connection |
| Client IP | Source IP address |
| Connection Time | When the session started |
| Last Active | Timestamp of last operation |
| Client App | Driver or application name |
role@database) over cluster-wide rolesread with a Connection Manager read-only toggle to prevent accidental writes from the UIDownload and start managing your MongoDB databases with ease.
Download Free Trial