Ticket exchange security (/api/auth/pk-ticket)
- Validate
publishable_keyformat - Hash key and look up active key record
- Resolve org context from key
- Enforce per-key
allowed_origins(required, no org-level fallback) - If
id_tokenprovided: validate signature/issuer/audience using org IDP config - Issue short-lived ticket with org + user identity
Publishable key controls
Token validation controls
Algorithms are limited to asymmetric signatures (no
none, no shared-secret algorithm bypasses).
Runtime isolation
Recommended operational practices
- Scope keys by environment (dev/staging/prod)
- Restrict key origins tightly
- Revoke keys during incident response
- Keep IDP issuer/audience config in sync with auth provider
- Monitor auth failures (
INVALID_KEY, origin failures, token failures)

