T14: Vault Kubernetes auth backend + per-app VSO roles #30
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/iac!30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t14-vault-k8s-auth"
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?
Closes #29
T14: Vault Kubernetes auth backend + per-app VSO roles
Implements the next step of the ADR-0004 read path: Vault's Kubernetes auth method mounted per cluster, with per-app
VaultAuthroles so the Vault Secrets Operator can authenticate as each app's own ServiceAccount.Deliverables
vault/kubernetes-auth.tf— avault_auth_backend(type=kubernetes, pathkubernetes/<cluster>) +vault_kubernetes_auth_backend_configper cluster invar.kubernetes_auth. The token-reviewer JWTs come fromvar.kubernetes_token_reviewer_jwts(sensitive; populated from thevault-config-varsSecret via varsFrom — never code). Defaults empty, so the vault-config auto-apply on mini is a no-op until bootstrapped.vault/modules/app_secretsfor every configured cluster backend:<app>-vso→ token policy<app>_reader, bound to SA<app>-vsoin the app namespace (VSO read path)<app>-esopush→ token policy<app>_generated-secret-manager, bound to SA<app>-esopushinflux-system(ESO PushSecret, generated tier)<app>-break-glass→ token policy<app>_root, bound to SA<app>-break-glassinflux-system(emergency admin)<app>_readerpolicy — read/list over the app's owngenerated/+manual/paths (ADR-0004A-reader); the app's runtime read path through VSO.k8s/modules/tenant:<app>-vsoin the app namespace;<app>-esopushand<app>-break-glassinflux-system.vault/modules/app_secretsidentity groups referenced policy names with a trailing-policythat don't exist (policies are${app}_${capability}). Dropped the suffix.Bootstrap (per cluster, before enabling)
vault-authServiceAccount + ClusterRoleBinding tosystem:auth-delegatorin the cluster.kubernetes_auth/kubernetes_token_reviewer_jwtskeys in thevault-config-varsSecret (mini Terraform object varsFrom).Bootstrap values for mini
kubernetes_host:https://10.15.1.170:6443kubernetes_ca_cert: base64 of mini's apiserver CA (~/.kube/mini)token_reviewer_jwt: from the to-be-createdvault-authSAOut of scope
lab/clustersPR #1525)VaultAuth/VaultStaticSecretCRs in the app repostofu-controllersync for thek8s/root (T10, #25)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.