Skip to content

RBAC Configuration Guide 🟑 BETA

Apply roles and groups through the supported surfaces, then prove the effective permissions match the intended least-privilege model.

Admin guide Β· RBAC configuration runbook

When to use Before you start Steps Verify Roll back
Onboarding a user, changing a role, auditing access Admin identity, DB and generated API reference Snapshot, assign, resolve, test Effective set matches the matrix Restore prior assignment from snapshot

When to use

Use this runbook when a user's access must change, when a custom role is introduced, or when a role change appears not to take effect.

Before you start

  • Roles and groups live in the RBAC tables; the resolver derives an effective set from group membership. A role name alone is not a permission.
  • The permissions matrix defines the model and organizations defines the tenant scope. Keep a group per department or function rather than assigning permissions directly to users.
  • Prefer time-limited assignments where the code supports them, and record the reason for any broad grant.
  • Take a database snapshot before changing assignments.

Steps

# 1. Snapshot before the change.
sudo incus snapshot create tables pre-rbac-$(date +%Y%m%d%H%M%S)

# 2. Inspect the current membership and roles.
psql -h localhost -U postgres -d botserver -c \
  "SELECT user_id, group_name FROM rbac_user_groups WHERE user_id = '<user-id>';"

# 3. Apply the role or group change through the documented admin surface
#    (or its generated API route); do not insert rows by hand in production.

# 4. Resolve the effective permissions again and compare with the matrix.
psql -h localhost -U postgres -d botserver -c \
  "SELECT user_id, group_name FROM rbac_user_groups WHERE user_id = '<user-id>';"

# 5. Exercise one allowed and one denied action in a test session.

Verify

Check Surface Pass condition
Membership rbac_user_groups query matches the intended group
Inheritance resolver effective set includes inherited permissions
Wildcards resolver source only declared wildcards are honoured
Least privilege denied-action probe refused
KB scope KB permissions folder grants respected
Audit server log change recorded without secrets

Roll back

πŸ”΄ Restore the previous membership from the snapshot or re-apply the prior assignment through the admin surface, then re-run the table. An accidental broad grant is an incident: follow incident response.