Automate harbor-config-openbao (hand-made SecretID) and keep the node-pull password out of tofu state #23
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/machine-configs#23
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?
Related: #21 (hand-made
openbao-config-vars).Why
The
harbor-configTerraform object on mini logs in to OpenBao with a SecretID forapprole-runners/harbor-config(lab/iacvault/runners.tf). It sits in the Secretharbor-config-openbao(keyopenbao_secret_id) in mini'sflux-system, created by hand on 2026-11-11. That breaks the rule of no hand-applied secrets on clusters. Nothing rotates it, and nothing recreates it if mini is rebuilt.Separately: the
cluster-node-pullrobot password sits in theharborroot's tofu state three times (random_password,harbor_robot_account.secret, and from lab/iac#59vault_kv_secret_v2.data_json). Anyone who can read Secrets in mini'sflux-systemcan read it fromtfstate-default-harbor-config.What
harbor-config-openbaoautomatically, the same mechanism as #21. ESO can't read it from OpenBao, because it is the credential used to reach OpenBao, so this needs the bootstrap answer #21 settles. Candidates: tofu-controller's own OpenBao auth via a k8s service account (auth/kubernetes on mini), or the openbao-config root minting the SecretID and writing the Secret through the kubernetes provider.ephemeral "random_password",harbor_robot_account.secret_wo,vault_kv_secret_v2.data_json_wowith adata_json_wo_versionto bump on rotation.Done when
harbor-config-openbaois created and rotated without a humantfstate-default-harbor-configIntended design (2026-11-11). It removes both hand-made secrets (this one and #21's
openbao-config-vars):auth/kubernetes-minimount validates the tofu-controller runner pod's SA token against mini's API server and issues a scoped token (roleharbor-configgets the same policy asapprole-runners/harbor-config). Nothing to deliver. Same pattern as the existingauth/kubernetes-think. The bootstrap runner (openbao-config) is the special case: it configures OpenBao itself, so its kubernetes mount and role are created once at the ceremony and never managed by that root.ephemeral "vault_kv_secret_v2"for e.g. the Harbor admin password, soharbor-config-varsgoes away too and the value never reaches state.ephemeral "random_password",harbor_robot_account.secret_wo,vault_kv_secret_v2.data_json_wowith a version to bump on rotation.tfstate-*Secrets hold ciphertext. Check first: the tofu-controller runner image must run OpenTofu, not Terraform.