Per-app ESO SecretStores: app ServiceAccount login and reader-tier OpenBao policies #186
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/iac#186
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
ADR-0004 wanted each app to read only its own secrets, logged in as its own ServiceAccount. It chose VSO for that, and VSO was never deployed (lab/clusters#1525 closed unmerged, lab/clusters#1524 closed). ADR-0012 makes ESO the read path. This issue delivers the per-app isolation that ADR-0004 asked for, using ESO.
Today
Each cluster has one ESO identity in OpenBao:
<cluster>-external-secrets(vault/modules/openbao-platform) on c1, andmini-external-secrets(vault/eso-mini.tf) on mini. Every app reads through a ClusterSecretStore logged in as that identity. Policies are scoped per cluster (c1:infra/apps/c1/*; mini: an explicit key list), so a namespace that can create an ExternalSecret can read every secret its cluster's ESO can read. The cheap interim guard is lab/clusters#1784 (namespace lists on the stores).Target
auth.kubernetes.serviceAccountRefon c1,auth.jwt.kubernetesServiceAccountToken.serviceAccountRefon mini (kubernetes-mini, ADR-0010). A namespaced SecretStore can only reference a ServiceAccount in its own namespace, which gives the same-namespace binding ADR-0004 credited to VSO.bound_subject = system:serviceaccount:<ns>:<sa>). The role carries a reader-tier policy for that app's paths and nothing else.generated/tier (ADR-0002) stays on the cluster store. Per-app writer roles can come later if they turn out to be worth it.Open questions
secret/<key>on mini,infra/apps/<cluster>/...on c1). Decide that in #26 first, or pilot on c1, where the layout is already per app.vault/for the pilot, or generated by the catalog (#103, paused).Done when
Related: #184 (mini Vault retirement), lab/clusters#1669, #26, #103.
ADR: #188