ADRs
ADR-0074 Provider Credential Storage
Org-scoped provider API keys sealed with AES-256-GCM envelope encryption in Auth
ADR-0074 — Provider Credential Storage and Proxy Retrieval Path
Status
Accepted (Milestone 4.A.5)
Context
Platform LLM keys are process env vars on the proxy. Multi-tenant BYO keys need org-scoped storage, encryption at rest, validate-before-store, and a fail-closed retrieval path that does not mutate shared provider clients.
Discovery found no in-repo AES/envelope helper (ADR-0010 deferred crypto) and no KMS/Vault application integration. Sketch ADR-0046 was already assigned to the embedder.
Decision
- Stdlib AES-256-GCM envelope in
packages/cryptoonly (Go). KEK fromIBEX_CREDENTIALS_MASTER_KEY(base64 32 bytes), Auth-only. - Column layout:
ciphertext,wrapped_dek,encryption_key_id,key_hint(each sealed blob isnonce||GCM ciphertext+tag). - Auth owns plaintext at rest: Create/Get/List/Delete gRPC; Management API never persists ciphertext or returns secrets.
- Validate-before-store in Management API (Python httpx probe) →
INVALID_CREDENTIAL(422). - Proxy: per-request
GetProviderCredential+ 30s cache; optionalprovider.Request.APIKeyOverride; no-row → platform default; row + Auth error → fail closed. - Separate
POST .../validatedeferred to a follow-up.
Consequences
- Production Auth requires
IBEX_CREDENTIALS_MASTER_KEY. - Proxy boot path for platform keys unchanged when no credential rows exist.
- Multi-key rotation / Vault / Bedrock IAM remain out of scope.
Was this page helpful?
Edit on GitHub
Last updated on