vault: add ghp k8s auth role + kv read policy #120
Reference in New Issue
Block a user
Delete Branch "benvin/ghp-vault"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
ghp (a GitHub proxy) deploys to k8s namespace
ghp(ServiceAccountghp) and must read its GitHub App credentials and encryption key from Vault kv atkv/kubernetes/ghp/*(.../github-app,.../app), delivered to the pod by VSO. ghp uses the postgres storage backend, so it needs Vault only to read those kv secrets — no storage-backend CRUD. Values are populated separately by Ben via runbook; this PR adds structure only.How
Mirrors the existing per-app pattern (reference apps: artifactapi, logging_logarchiver):
ghp(config/auth_kubernetes_role/k8s/au/syd1/ghp.yaml) bound to ServiceAccountghpin namespaceghp,token_ttl/token_max_ttl600s,audience: vault— same shape as other apps; the differing SA-name case follows logging_logarchiver.policies/kv/kubernetes/ghp/read.yaml):readonkv/data/kubernetes/ghp/*,read+listonkv/metadata/kubernetes/ghp/*; assigns tok8s/au/syd1roleghp. No create/update/delete.No DB/CNPG role added: the estate mints app DB access via CNPG-generated k8s Secrets (postgres storage backend), not a Vault database engine — consistent with other apps.
terraform fmtclean; yamllint + pre-commit hooks pass.terragrunt validateexercises HCL/YAML parsing successfully (new YAML decodes fine) and only fails at Vault provider init in the sandbox (missing CA bundle) — not applied.Closing as redundant. The templated
policies/kv/kubernetes/default.yamlalready grants thedefaultk8s role (bound to SAdefaultin all namespaces) read onkv/kubernetes/namespace/<namespace>/default/*. ghp will follow the estate convention (SAdefault, VaultAuth roledefault, secrets underkv/kubernetes/namespace/ghp/default/*) — same as artifactapi — so no bespoke ghp role or policy is needed.Pull request closed