A long-running service gets `permission denied` from Vault exactly 32 days after deployment
IntermediateTroubleshootingSecrets management: Vault, External Secrets and SOPS
Answer
Likely causes → The service authenticated once and kept renewing its token until it reached the default max_lease_ttl of 768h (32 days). Renewal cannot extend past max TTL.
Diagnose →
vault token lookup <accessor-or-token> # look at creation_time, expire_time, explicit_max_ttl
vault read sys/mounts/auth/kubernetes/tune
Fix → Have the client log in again when renewal fails. Vault Agent auto-auth and the official SDK lifetime watchers do this. For services that cannot log in again, use a periodic token (period=24h), which can be renewed indefinitely.
Prevent → Use Vault Agent or a CSI provider instead of hand-written token handling, and alert on Vault 403s per service.
More on Secrets management: Vault, External Secrets and SOPS
`vault kv get secret/app/db` returns `Code: 403. Errors: * permission denied` although the policy allows `secret/app/*`BeginnerVault pod restarted and `vault status` shows `Sealed: true`; every app now fails to fetch secretsBeginnerPod stuck in `Init:0/1`; the `vault-agent-init` container logs `error authenticating: ... Code: 403 ... * permission denied`IntermediateAfter a cluster upgrade, Vault Kubernetes auth fails for every pod with `error validating token: invalid issuer (iss) claim`AdvancedPods annotated with `vault.hashicorp.com/agent-inject: true` start without a Vault sidecar, and the app fails on a missing fileBeginnerExternalSecret shows `SecretSyncedError` with `AccessDeniedException: ... is not authorized to perform: secretsmanager:GetSecretValue`Intermediate