RBAC

Role-based access control with tenant roles, team roles, resource policies, and permission checking.

Enterprise RBAC provides multi-level permission checking: tenant-level roles, team-level roles, resource-level policies, and a middleware helper for API routes.

Core RBAC Guard

ts

Tenant Roles

RolePermissions
ownerAll permissions including billing and tenant deletion
adminPolicy management, kill switch, audit export, RBAC, agent management
operatorRegister agents, enforce policies, view audit, score agents
memberRead-only access to agents, scores, and audit trail
viewerMinimal read-only access

Permission Checking

ts

Team-Level Roles

Teams have their own role hierarchy within a tenant:

ts
Team RolePermissions
leadFull team management, all team operations
memberAgent management, enforcement, audit viewing
viewerRead-only team access

Resource Policies

Per-resource access control for fine-grained authorization:

ts

API Middleware

ts

Error Handling

ts