`vault kv get secret/app/db` returns `Code: 403. Errors: * permission denied` although the policy allows `secret/app/*`
BeginnerTroubleshootingSecrets management: Vault, External Secrets and SOPS
Answer
Likely causes → The mount is KV v2. The CLI hides it, but the real API paths are secret/data/app/db (read) and secret/metadata/app/db (list). A policy written for secret/app/* matches nothing.
Diagnose →
vault secrets list -detailed | grep '^secret/' # options: map[version:2]
vault token capabilities secret/data/app/db # shows "deny"
Fix →
path "secret/data/app/*" { capabilities = ["read"] }
path "secret/metadata/app/*" { capabilities = ["list", "read"] }
Prevent → Write policies with the data/ and metadata/ prefixes and test each one with vault token capabilities in CI before applying.
More on Secrets management: Vault, External Secrets and SOPS
Vault 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`IntermediateExternalSecret reports `could not get provider client: SecretStore "aws-sm" is not ready` or `SecretStore.external-secrets.io "aws-sm" not found`Beginner