Quick Start
Single-operator (no scopes — unchanged)
Today’s setup keeps working. Authenticated clients receive all scopes when no policy is configured.
When no
auth_scopes policy is configured, every successfully authenticated client is granted all scopes — identical to today’s binary auth behaviour. Single-operator setups need no changes.How It Works
- Client connects with a bearer token.
- Gateway resolves scopes via
GatewayConfig.resolve_scopes(token). - Each HTTP route and WebSocket action checks the required scope.
- Outbound events are filtered — approval events only reach clients with the
approvalsscope.
Scope Reference
| Scope | Value | Grants |
|---|---|---|
| Read | read | View dashboard, session transcripts, and status events |
| Write | write | Send messages as the agent (WebSocket message) |
| Approvals | approvals | Resolve tool-execution approvals and manage allowlist |
| Pairing | pairing | Approve or revoke device pairing |
| Admin | admin | Channel pause/resume/reconnect — implies all scopes |
Which scope should this operator have?
| Role | Recommended scopes |
|---|---|
| Read-only stakeholder | [read] |
| Junior support (send, not approve) | [read, write] |
| On-call approver | [read, approvals] |
| SRE / platform admin | [admin] |
Configuration
YAML — structured (recommended)
YAML — flat mapping
Python
Scope-Gated Routes
| Route | Method | Required scope |
|---|---|---|
/api/channels/{name}/pause | POST | admin |
/api/channels/{name}/resume | POST | admin |
/api/channels/{name}/reconnect | POST | admin |
/api/approval/resolve | POST | approvals |
/api/approval/allowlist | GET | any authenticated |
/api/approval/allowlist | POST/DELETE | approvals |
/api/pairing/approve | POST | pairing |
/api/pairing/revoke | POST | pairing |
WebSocket message | — | write |
Common Patterns
Read-only dashboard viewer —[read] for status and transcripts without send or approve rights.
Send but not approve — [read, write] for operators who reply to users but cannot resolve tool approvals.
Approvals-only on-call — [read, approvals] for security-sensitive approval resolution without channel admin rights.
Full admin — [admin] for SREs who need pause/resume/reconnect plus all other capabilities.
Error Handling
HTTP 403 when scope check fails:message without write scope:
Best Practices
Default to read and add scopes as needed
Default to read and add scopes as needed
Start every operator with
[read] and expand only when their role requires it.Rotate per-token secrets independently
Rotate per-token secrets independently
Issue separate tokens per operator so you can revoke one role without rotating everyone.
Pair approvals with the allowlist
Pair approvals with the allowlist
Combine
approvals scope with /api/approval/allowlist for defence-in-depth on tool execution.Use admin sparingly
Use admin sparingly
Prefer explicit scope lists over
[admin] unless the operator truly needs channel control.Related
Bind-Aware Auth
Token requirements when binding to external interfaces
Gateway Overview
Multi-channel gateway architecture and setup

