Files
pruefwerk/docs/guide
Sharang ParnerkarandClaude Opus 5.5 f8f3a0c974 feat(api): the customer API accepts portal-issued API keys (bp_…)
Step 5 of tenant-registry ADR 0001. A `Bearer bp_…` token is verified
with the registry (pruefwerk-svc) and becomes a tenant context carrying
the key; every other bearer goes through the JWT path unchanged.

- Verdicts, valid and invalid, are cached for 60 s by the key's SHA-256;
  an unreachable registry with no fresh verdict means 503. The Werkbank
  runner shares the same cached verify.
- Tenant, scopes and ladder status come only from the verify answer; the
  support header is never read for a key, and a key holds no org role.
- role_gate gets a method + route -> scope table; every other route
  answers 403 scope_missing. x.write implies x.read. Legacy keys (no
  scopes) get the read scopes only.
- The entitlement check is skipped for keys (verify already intersects
  scopes with entitlements). Key writes are audited like support writes,
  as apikey:<key_id> with the holder and X-BP-Actor as on_behalf_of.
- Guide page docs/guide/api-keys.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-10-13 23:26:05 +02:00
..