Summary
Define the secrets.Store interface in pkg/security/secrets/ per doc 13 §5.2 and ship five adapters: EnvStore (dev only), VaultStore (Vault KV v2 with Watch via KV subscriptions), AWSSMStore (Secrets Manager, polled with TTL), K8sSecretStore (projected volume + file watcher), and DopplerStore (REST API). Backend selection is config-driven (secrets.backend = "vault" | "aws-sm" | "k8s" | "doppler" | "env"). The interface exposes Get, GetBinary, and optional Watch.
Design reference
- docs/13-security-baseline.md §5.2 (system secret adapter), §5.7 (tradeoffs)
Acceptance criteria
Dependencies
none
Complexity
L
Summary
Define the
secrets.Storeinterface inpkg/security/secrets/per doc 13 §5.2 and ship five adapters:EnvStore(dev only),VaultStore(Vault KV v2 with Watch via KV subscriptions),AWSSMStore(Secrets Manager, polled with TTL),K8sSecretStore(projected volume + file watcher), andDopplerStore(REST API). Backend selection is config-driven (secrets.backend = "vault" | "aws-sm" | "k8s" | "doppler" | "env"). The interface exposesGet,GetBinary, and optionalWatch.Design reference
Acceptance criteria
pkg/security/secrets/store.godefines theStoreinterface (Get,GetBinary,Watch) andErrNotFoundsentinelEnvStoreadapter for development backed by environment variablesVaultStoreadapter against Vault KV v2 with rotation notifications via WatchAWSSMStoreadapter against AWS Secrets Manager with TTL pollingK8sSecretStoreadapter against projected volume with file watcherDopplerStoreadapter against Doppler REST APIsecrets.backendconfig keyerrors.RedactedWrap)Dependencies
none
Complexity
L