8001 and handles token lifecycle management. It is not called on the hot path — only for management operations.
Base URL: http://localhost:8001 (dev) / AUTH_SERVICE_URL (production)
Health
GET /health
Health check endpoint.
Response 200 OK:
Tokens
POST /tokens/app
Create an app token (management-plane root).
- Request
- Response 200
POST /tokens/bearer
Derive a bearer token from an app token.
- Request
- Response 200
POST /tokens/agent
Derive an agent token from a bearer token with RBAC policy.
- Request
- Response 200
POST /tokens/subagent
Derive a subagent token from an agent token with permission narrowing.
- Request
- Response 200
- Error 400
POST /tokens/session
Create a session token bound to an agent or subagent.
- Request
- Response 200
POST /tokens/override
Create an ephemeral override token for a held high-risk event.
- Request
- Response 200
Revocation
DELETE /tokens/{jti}
Revoke a single token by JTI. Adds it to the bloom filter and revocation log.
Response 200 OK:
POST /revoke/cascade/{jti}
Revoke a token and all tokens derived from it (children, grandchildren, etc.).
Response 200 OK:
POST /bloom/rebuild
Rebuild the bloom filter from the auth.revocation_log table. Used after Redis data loss or for periodic maintenance.
Response 200 OK:
Signing Keys
POST /keys/signing
Generate a new ES256 signing key pair for a customer.
- Request
- Response 200
POST /keys/{key_id}/rotate
Rotate a signing key — generates a new key and deactivates the old one.
Request:
200 OK: Same as POST /keys/signing.
GET /keys/public/{customer_id}
Get the active public key for a customer. Used by the API service to populate its in-memory key cache.
Response 200 OK:
Webhooks
POST /webhooks/register
Register a webhook endpoint for a customer.
- Request
- Response 200
Overrides
POST /overrides/{event_id}/decide
Submit an approve/reject decision for a held event using an override token.
- Request
- Response 200
Error Responses
All error responses follow a consistent format:| Status | Meaning |
|---|---|
| 400 | Bad request (invalid payload, permission escalation) |
| 401 | Authentication failed (expired, invalid, revoked token) |
| 403 | Authorization denied (RBAC violation) |
| 404 | Token or resource not found |
| 429 | Rate limit exceeded |
| 503 | Service unavailable (validator not initialized) |