Skip to content

Roles and permissions (RBAC)

Source of truth: src/extractit/api/auth/matrix.py (ADR-018). A test compares this file with the code.

Role → permission

Permission Owner Admin Builder Reviewer Viewer Auditor
project:read ✓ ✓ ✓ ✓ ✓ ✓
project:manage ✓ ✓ — — — —
workflow:read ✓ ✓ ✓ — ✓ —
workflow:write ✓ ✓ ✓ — — —
workflow:publish ✓ ✓ — — — —
run:read ✓ ✓ ✓ ✓ ✓ ✓
run:create ✓ ✓ ✓ — — —
result:read ✓ ✓ ✓ ✓ ✓ —
review:act ✓ ✓ — ✓ — —
dataset:write ✓ ✓ ✓ — — —
eval:run ✓ ✓ ✓ — — —
apikey:manage ✓ ✓ ✓ — — —
member:manage ✓ ✓ — — — —
org:manage ✓ — — — — —
webhook:manage ✓ ✓ — — — —
usage:read ✓ ✓ — — — ✓
audit:read ✓ ✓ — — — ✓

Roles

  • Owner: Everything, including the organization itself.
  • Admin: Everything except managing the organization.
  • Builder: Reads and writes workflows, runs, datasets and evaluations; creates API keys within its role.
  • Reviewer: Reviews results of runs.
  • Viewer: Read-only access to projects, workflows, runs and results.
  • Auditor: Reads projects, runs, usage and the audit log; never document results.

API key scopes

The effective permissions of a key are the union of its scopes' permissions intersected with the permissions of its role_cap (the role of whoever created it). A creator can grant a scope only if it holds every permission the scope requires; otherwise the API answers 403 scope-exceeds-role.

Scope Permissions Required to grant it
read project:read, workflow:read, run:read, result:read same as carried
write project:read, workflow:read, workflow:write, run:read, run:create, result:read same as carried
review run:read, result:read, review:act same as carried
eval project:read, workflow:read, run:read, result:read, dataset:write, eval:run same as carried
admin all (bounded by the role) all except org:manage

Scopes each role can grant

Role Grantable scopes
Owner read, write, review, eval, admin
Admin read, write, review, eval, admin
Builder read, write, eval
Reviewer review (cannot create keys: no apikey:manage)
Viewer read (cannot create keys: no apikey:manage)
Auditor none (cannot create keys: no apikey:manage)