Users & Roles¶
Manage users with admin, editor, and viewer roles.
Overview¶
Dango uses role-based access control (RBAC) with three built-in roles. Every user is assigned exactly one role that determines what they can see and do.
| Role | Description |
|---|---|
| Admin | Full control — all permissions, user management, platform configuration |
| Editor | Data operations — sync sources, run transformations, create dashboards, manage notebooks |
| Viewer | Read-only — view sources, dashboards, models, and health status |
Role Descriptions¶
Admin¶
Admins have a wildcard permission (*) that grants access to everything. This includes:
- All data operations (sync, transform, query)
- User management (create, edit, deactivate, delete users)
- Auth settings (such as requiring 2FA for all users); API keys are created and revoked by each user for their own account
- Platform configuration (start/stop services, manage settings)
- Audit log access
- Credential and secret management
Editor¶
Editors can perform day-to-day data operations but cannot manage users, auth settings, or platform configuration:
- Sync data sources and manage source configuration
- Upload and delete CSV files
- Run dbt transformations and manage models
- View dashboards and create new ones
- Execute ad-hoc queries
- View and execute notebooks
- View schedules and governance reports
- View health status, logs, and project configuration
Viewer¶
Viewers have read-only access to data and status:
- View data sources (but not sync or manage)
- View dbt models and documentation
- View dashboards (but not create or query)
- View health status and logs
- View notebooks (but not execute)
- View schedules and governance reports
Security boundaries¶
Editors can run Python scripts and notebooks and can query the whole warehouse. Dango has no table- or row-level entitlements. Web query results are not PII-masked; MCP query results are masked by output column name only. Code in the shared notebook process cannot be attributed to an individual user.
Cloud script and notebook isolation¶
On an isolated cloud server, scripts and notebooks run as restricted operating-system users. Scripts may read warehouse data, but notebooks cannot read the project data/ directory. Neither runner receives the server's .env or .dlt files. Declare only the environment variable names a script needs in its .dango/scripts.yml env: list; their values are taken from the server's .env. The notebook runner receives none of those declared values. A script defaults to warehouse: read; declaring warehouse: write runs it as the dango service user and is reported as unisolated. Review that choice before enabling writes.
If cloud isolation is missing, script and notebook execution is refused with DANGO-ISO001; run dango remote upgrade to set it up. An administrator can inspect dango remote isolation status, use the audited dango remote isolation disable --yes opt-out, and restore isolation with dango remote isolation enable. With the opt-out, scripts and notebooks run as dango and can access server secrets, backups, the warehouse, and local services. Local projects do not use the cloud restricted-user setup.
The runner network rules restrict access to the server's loopback services and Docker networks, but a notebook needs its own local port and the host's ephemeral port range. On a BYOS host with a widened range, other local services in that range can be reachable. See the BYOS host guidance.
MCP tools and approval¶
An MCP client acts with the permissions of the person running dango mcp. Review tool requests before approving them:
| Tool group | What it can change | Guard |
|---|---|---|
Read-only: list_*, get_*, validate_*, docs_coverage, remote_status, remote_logs, remote_history | Nothing | Log output is redacted |
query, remote_query | Nothing; reads the warehouse | One SELECT only; file and URL access blocked; PII masked by column name; row cap |
create_model, update_model, remove_model | What dbt runs against the warehouse | Model SQL validated: no file or URL access, no COPY/ATTACH/INSTALL/LOAD, restricted Jinja |
create_source, update_source, set_source_enabled, remove_source | Which sources sync and where | Secrets are refused as config values and stay in .env; rest_api is edited only with dango source edit |
run_sync, run_transform, run_doctor, generate_docs, scan_pii | API quota, load, warehouse contents | run_sync accepts dry_run |
accept_schema_drift, update_source_table_docs, add_schedule, update_schedule, set_schedule_enabled, remove_schedule, reload_schedules | Local project configuration | None beyond your client's approval prompt |
set_pii_override, delete_pii_override | Which columns MCP query masks | Tighten-only: an agent can mark a column pii and delete a not_pii override (which re-masks it); it cannot mark a column not_pii or delete a pii override, which takes you (CLI or web UI) |
remote_sync | Runs a real sync on your server | Needs a deployment; no dry run |
remote_push | Replaces models, scripts and sources on your server | Dry run by default; a real push needs dry_run=False and confirm=True |
Do not auto-approve mutation tools: they can change what runs against your warehouse.
Permission Matrix¶
Dango has 29 named permissions organized across 9 domains.
Source Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
source.view — list sources, view status | |||
source.view_credentials — view OAuth tokens / secrets | |||
source.sync — trigger a sync | |||
source.manage — add / remove / configure sources |
CSV Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
csv.upload — upload CSV files | |||
csv.delete — delete uploaded CSVs |
dbt Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
dbt.view — view models, docs | |||
dbt.run — trigger dbt runs | |||
dbt.manage — add / remove models |
Dashboard Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
dashboard.view — view dashboards | |||
dashboard.create — create / edit dashboards | |||
query.execute — run ad-hoc queries | |||
dashboard.manage — manage Metabase settings |
Platform Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
health.view — view health / status | |||
logs.view — view logs | |||
platform.manage — start / stop / configure platform | |||
config.view — view project configuration | |||
config.manage — modify project configuration |
Auth Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
users.view — list users | |||
users.manage — create / edit / deactivate users | |||
auth.manage — manage auth settings | |||
audit.view — view audit logs |
Notebook Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
notebooks.view — view notebooks | |||
notebooks.execute — run notebook cells | |||
notebooks.manage — create / delete notebooks |
Governance Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
governance.view — view PII reports | |||
governance.manage — configure governance rules |
Scheduler Permissions¶
| Permission | Admin | Editor | Viewer |
|---|---|---|---|
scheduler.view — view scheduled jobs | |||
scheduler.manage — create / edit schedules |
Complete Permission Table (All 29 Permissions)
| # | Permission | Admin | Editor | Viewer |
|---|---|---|---|---|
| 1 | source.view | |||
| 2 | source.view_credentials | |||
| 3 | source.sync | |||
| 4 | source.manage | |||
| 5 | csv.upload | |||
| 6 | csv.delete | |||
| 7 | dbt.view | |||
| 8 | dbt.run | |||
| 9 | dbt.manage | |||
| 10 | dashboard.view | |||
| 11 | dashboard.create | |||
| 12 | query.execute | |||
| 13 | dashboard.manage | |||
| 14 | health.view | |||
| 15 | logs.view | |||
| 16 | platform.manage | |||
| 17 | config.view | |||
| 18 | config.manage | |||
| 19 | users.view | |||
| 20 | users.manage | |||
| 21 | auth.manage | |||
| 22 | audit.view | |||
| 23 | notebooks.view | |||
| 24 | notebooks.execute | |||
| 25 | notebooks.manage | |||
| 26 | governance.view | |||
| 27 | governance.manage | |||
| 28 | scheduler.view | |||
| 29 | scheduler.manage |
User Management¶
Adding Users¶
Admins can create new users via CLI or web UI. New users receive an invite link to set their password.
Output:
- Go to Admin → Users (
/settings/users) - Click Add User
- Enter email and select a role
- Copy the invite link and share it with the user
Accepting Invites¶
When a user receives an invite link:
- Open the link in a browser →
/invite/{token} - Set a password on the invite acceptance page
- Automatically logged in after setting password
Invite Expiry
Invite links expire after 72 hours. If expired, an admin can resend the invite from the web UI or create a new user.
Changing Roles¶
# Promote a user to admin
dango auth change-role user@example.com admin
# Demote to viewer
dango auth change-role user@example.com viewer
Role changes take effect on the user's next request (existing sessions are updated). The Metabase role is also synced automatically, and the Metabase sessions Dango bridged for the user are deleted, so the user's next visit to Metabase starts a session with the new role.
The change is reported as successful only when every Metabase step succeeded. If one fails (for example, Metabase is not reachable), the new role is kept in Dango but:
- the admin API answers
502with a message saying the Metabase update did not complete, anddango auth change-roleprints a warning; - the user's Metabase access (the
/metabaseproxy and the Metabase sign-in that Dango performs at login) stays suspended, so a previous, higher Metabase role cannot linger; - re-apply the role when Metabase is reachable: run
dango auth change-role EMAIL ROLEagain with the user's current role, or sendPUT /api/admin/users/{user_id}/rolewith it. When that succeeds, access resumes.
Deactivating Users¶
Deactivating a user immediately invalidates all their sessions:
Deactivated users:
- Cannot log in
- All active sessions are invalidated immediately
- All API keys are revoked
- Account data is preserved (can be reactivated)
To reactivate:
Deleting Users¶
Permanently removes a user account:
Permanent Action
Deletion is permanent and requires confirmation. The user's data, sessions, and API keys are removed.
Listing Users¶
Shows all users with their role, status (active, inactive, locked, invited, invite expired), and last login.
Last-Admin Protection¶
Dango prevents you from accidentally losing all admin access:
- Cannot demote the only active admin to editor or viewer
- Cannot deactivate the only active admin
- Cannot delete the only active admin
If you need to change the admin, first promote another user to admin, then modify the original.
Metabase Role Sync¶
When a user is created or their role changes, Dango automatically syncs the change to Metabase:
| Dango Role | Metabase Role |
|---|---|
| Admin | Superuser |
| Editor | Member of "Dango Editors" group |
| Viewer | "All Users" group only (default read access) |
The "Dango Editors" group is created automatically in Metabase. Editors get the ability to create questions and dashboards. Viewers can only view existing dashboards shared with "All Users."
Next Steps¶
- Authentication — login flows and session management
- Two-Factor Auth — enable 2FA for user accounts
- Audit Logging — track user management events
- Best Practices — security recommendations