Internal Platform — AI platform with compliance audit trails
Use-case: Your engineering or ops team runs an internal AI platform. Multiple agents run workloads on behalf of human users. Compliance requires knowing who authorized what, when, and through which delegation chain.
SharkAuth gives you:
- Every token issuance, exchange, and revocation logged to a queryable audit log
- RFC 8693 token exchange chains — structured proof of who-acted-on-behalf-of-whom
- Webhook events for streaming to your security tooling (SIEM, Slack, PagerDuty)
- Bulk revocation patterns for incident response (v0.2 roadmap — see below)
Architecture
human user (engineer)
└─ authenticates → SharkAuth (issues user token)
└─ agent-A requests token exchange → scoped sub-token with act chain
└─ agent-B requests further exchange → deeper act chain
└─ resource server validates full chain via JWKS
The audit log records every hop. The delegation canvas in the dashboard visualizes the chain.
screenshot: delegation canvas showing a 3-hop chain with audit events per hop
Step 1 — Start the server
For production, configure persistence and SMTP:
See /documentation/cli/serve.md for full options.
Step 2 — Provision platform agents
Register one agent per workload type. Tag them with your internal app ID for filtering.
Step 3 — Token exchange chain
Agent A holds a user-delegated token. It exchanges it for a narrower sub-token before handing work to Agent B. Each exchange records an act claim hop.
See 11 — Delegation Chains for the full 3-hop walkthrough.
Step 4 — Query the audit log
Every event is queryable. Pull a specific agent's history:
Or hit the API directly for cross-agent queries:
Event types relevant to compliance:
| Event | Meaning |
|---|---|
oauth.token_issued | New token minted — includes scope, jkt, audience |
oauth.token_exchanged | RFC 8693 exchange — includes actor_id, subject_id, new scope |
oauth.token_revoked | Individual token revoked |
agent.tokens_revoked_all | All tokens for an agent nuked |
user.agents_revoked | Cascade: all user's agents and tokens revoked |
agent.dpop_key_rotated | DPoP key rotation — old key tokens gone |
See ../sdk/audit-logs.md for the full event schema.
Step 5 — Webhook to security tooling
Subscribe to oauth.token.exchanged (and others) to stream events to your SIEM or Slack channel.
In the dashboard: Settings → Webhooks → Add endpoint. Or via API:
screenshot: webhook configuration panel with event filter checkboxes
Step 6 — Incident response: revoke a specific agent's tokens
If an agent is suspected compromised:
Roadmap: bulk pattern revocation (v0.2)
Layer 4 bulk revocation will let you kill all tokens matching a GLOB pattern — useful for rolling back a compromised agent version across all instances:
The method exists in the SDK today; the backend endpoint ships in v0.2. See 10-five-layer-revocation.md for Layer 4 detail.
Inspecting active tokens per agent
Next steps
- Full revocation model (all 5 layers): 10 — Five-Layer Revocation
- Delegation chains in depth: 11 — Delegation Chains
- Audit log API reference:
../sdk/audit-logs.md - Webhook API reference:
../sdk/webhooks.md