Skip to main content

agentrouter.secret.v1.SecretService

SecretService provides secure key management for LLM provider keys, BYOK (Bring Your Own Key) scenarios, and other sensitive configuration.

Security model:

  • All secrets are encrypted at rest using envelope encryption (KEK + DEK)
  • KEK (Key Encryption Key) is stored in external KMS (GCP Secret Manager or local file)
  • DEK (Data Encryption Key) is generated per secret and encrypted with KEK
  • Secrets are scoped to user_id and realm for multi-tenancy