SidClaw

Role-Based Access Control

Three roles control access to the SidClaw dashboard and API — admin, reviewer, and viewer.

Role-Based Access Control

SidClaw uses role-based access control (RBAC) to manage who can do what in the dashboard. Every authenticated user is assigned one of three roles, and API endpoints enforce access based on that role.

Roles

Admin

Full access. Admins can manage all resources, configure tenant settings, create and rotate API keys, manage webhook endpoints, and perform all reviewer and viewer actions.

Reviewer

Operational access. Reviewers can approve or deny pending approval requests, view all agents, policies, traces, and approvals, and export audit data. Reviewers cannot modify configuration (API keys, webhooks, tenant settings).

Viewer

Read-only access. Viewers can see agents, policies, traces, and approvals but cannot take any actions. This role is appropriate for auditors and observers who need visibility without the ability to modify anything.

Permission Matrix

The following table shows which API operations are accessible to each role. Dashboard pages enforce the same permissions through the API.

OperationAdminReviewerViewer
Agents
List agentsYesYesYes
View agent detailsYesYesYes
Create / update / delete agentsYesNoNo
Suspend / revoke agentsYesNoNo
Policies
List policiesYesYesYes
View policy detailsYesYesYes
Create / update / delete policiesYesNoNo
Dry-run policy testYesYesNo
Approvals
List approval requestsYesYesYes
View approval detailsYesYesYes
Approve / deny requestsYesYesNo
Traces
List tracesYesYesYes
View trace detailsYesYesYes
Export single trace (JSON)YesYesNo
Bulk export traces (CSV)YesYesNo
Audit event export (SIEM)YesYesNo
Verify trace integrityYesYesYes
API Keys
List API keysYesNoNo
Create API keysYesNoNo
Rotate API keysYesNoNo
Delete API keysYesNoNo
Webhooks
List webhook endpointsYesNoNo
Create / update / delete endpointsYesNoNo
View delivery historyYesNoNo
Send test eventYesNoNo
Settings
View tenant settingsYesNoNo
Update tenant settingsYesNoNo
Configure SSOYesNoNo
Manage users and rolesYesNoNo

How Roles Are Assigned

Roles can be assigned in two ways:

Manual assignment — An admin assigns a role to a user in the dashboard under Settings > Users. This is the default for tenants without SSO.

IdP claim mapping — When SSO is configured, roles are mapped from a claim in the OIDC token. The claim name defaults to sidclaw_role and can be customized. Users without the claim default to the viewer role.

API Key Auth vs. Session Auth

RBAC applies to session-authenticated users (dashboard users). API keys use a separate scope-based authorization model:

  • Session auth (dashboard): Role is checked on every request. The requireRole() middleware returns 403 Forbidden if the user's role is insufficient.
  • API key auth (SDK calls): Scopes on the API key determine access. Role checks are skipped. See API Key Management for available scopes.

This means an API key with the evaluate scope can call POST /api/v1/evaluate regardless of RBAC roles. The two authorization models are independent.

Error Responses

When a user attempts an action their role does not permit, SidClaw returns:

{
  "error": "ForbiddenError",
  "message": "This action requires one of these roles: admin. Your role: viewer",
  "status": 403
}

The error message indicates which roles are required and the user's current role.