vault: ESO may write generated credentials under infra/apps/<cluster>/generated/ #161
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/iac#161
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?
c1 apps need credentials that are generated once and survive a rebuild or a restore onto another cluster: the PowerDNS API key (lab/clusters#1673) and the UniFi admin and mongo passwords (#81). Pattern: an ESO ClusterGenerator mints the value, a PushSecret with
updatePolicy: IfNotExistsstores it in OpenBao, and an ExternalSecret reads it back. OpenBao is the source of truth, so a second cluster reads the existing value instead of making a new one.Today
<cluster>-external-secretsis read-only oninfra/apps/<cluster>/*. Needed: create/update underinfra/apps/<cluster>/generated/*, and never delete or destroy.Policy-level write-once (create without update) breaks ESO: it writes the key's
custom_metadatabefore the data, so its first data write already counts as an update. Tested on a throwaway OpenBao dev server (call order from ESO v2.14providers/v1/vault/client_push.go):Write-once therefore comes from
IfNotExistson the PushSecret. The policy guarantees nothing is ever lost: KV v2 keeps 10 versions and no delete or destroy is granted.