Repository navigation
fix(openbao): Stage 2 on GCP's OpenBao - #2123
Merged
Merged
Conversation
…ationale, widen its tests
…nted at OpenBao Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xuNsQcGpQPcEH8m1h3rDD
…a foreign-sealed mirror Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xuNsQcGpQPcEH8m1h3rDD
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xuNsQcGpQPcEH8m1h3rDD
Contributor
🔍 Rendered manifest diff — this PR vs
|
… guard shared-policy parity A new-lineage init leaves vault_generic_endpoint.admin_user's disable_read=true hiding the fact that no apply will ever recreate the break-glass user again -- the proceed arm and the failover guide now both name the required tofu apply -replace=module.store_of_record.vault_generic_endpoint.admin_user. Also: drop two citations to a design doc and an ADR that do not apply here (salvage provenance is ac62abf2 instead), and add a cmp guard so the shared module's five policy files can never silently drift from AWS's copies. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xuNsQcGpQPcEH8m1h3rDD
The printed and documented -replace command omitted -var-file, so secret_owning_apps fell back to [] and the apply would destroy every app persona; it also lacked the stack's -parallelism=1. It now runs after the deploy finishes, not mid-deploy. The policy parity gate also treats a copy missing on one side as divergence, so deleting one no longer passes.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
gcp_only_broken_since_stage2: GCP'sgcp/openbao/managementstack only hadlineage+pki, so GCP's OpenBao never got Stage 2's mounts, policies or JWT logins, and anything on gcp-0 readingplatform/orapps/failed. Salvaged fromac62abf2(verified live 2026-09-11) and rebuilt onmain's current semantics.platform/+apps/mounts, five policies, JWT/userpass/OIDC logins, #2078'signore_changesguards), tested offline withtofu testopentofu/shared/modules/openbao-store-of-record/openbao-oidcsecret means OIDC off, never an error or a destroyed mountopentofu/gcp/openbao/management/store-of-record.tftask checkscripts/ci/validate-openbao-policies.shsecret-store.sh migrate --keys: migrate named keys without a cluster, for a cluster already pointed at OpenBaoscripts/provision/secret-store.shOPENBAO_NEW_LINEAGE=true, opt-in, off by defaultscripts/provision/openbao-config.sh, failover guideAWS is untouched: no file under
opentofu/aws/changes, and the module's policies are byte-identical to AWS's. Theagents/mount is not here; it arrives with G-5.flowchart LR M["shared module<br/>openbao-store-of-record"] --> G["gcp/openbao/management<br/>store-of-record.tf"] A["aws/openbao/management<br/>(inline, unchanged)"] -. "byte-identical policies<br/>(parity gate)" .- M S[("Secret Manager<br/>openbao-oidc")] -- "list, then read<br/>(absent → OIDC off)" --> G G --> B["GCP OpenBao<br/>platform/ apps/ · JWT · userpass · OIDC"] R["openbao-config.sh rehydrate"] -->|default: restore lineage| B R -. "OPENBAO_NEW_LINEAGE=true<br/>(refused on any own-seal object)" .-> BThe new-lineage switch. It lets
rehydrateinitialise a new lineage on a node whose seal no top-level snapshot carries. It is refused when an object under the node's own seal exists, when combined with a namedOPENBAO_SNAPSHOT_KEY, or when any top-level snapshot's seal is unknown, and it never overrides the moved-aside refusal (rc=2). After a new-lineage init with surviving tofu state, the break-glass user must be force-recreated (-replace=module.store_of_record.vault_generic_endpoint.admin_user), becausedisable_readhides that it is gone; the switch prints this and the guide states it. The owner chose to restore the existing GCP lineage (GP-22), so the switch is not exercised now.Platform fix: merged when green and reviewed (owner, 2026-09-29; GP-21). No ADR: this is a shared-module code layout, not a technology choice between competing options.
Known gap between this PR and G-3
Until G-3 merges, a ZITADEL client rotation leaves GCP OpenBao's OIDC stale (
App.NotFound) untilzitadel-oidc-clients.sh syncis re-run with--openbao-urlpointed at GCP. Userpass break-glass is unaffected. The comment atscripts/provision/zitadel-oidc-clients.sh:111-113("OpenBao OIDC exists only on AWS") is now false; G-3 rewrites it when it wires the GCP sync.Gates run
tofu testvalidate-openbao-policies.sh(roles → policies, AWS ↔ module byte parity)test-validate-openbao-policies.sh,test-secret-store-migrate-keys.sh(10/10),test-openbao-new-lineage.sh,test-openbao-oidc-lifecycle.shvalidate-manifests.shvalidate-links.sh,verify-doc-paths.shtask check(go-task 3.53.1)ci:test30 passed, 1 skipped (test-vector-vrl, novectorbinary), 0 failedtofu validate+trivy configongcp/openbao/managementLive evidence
To be filled in by Task 8.3 (restore of the existing GCP lineage, Stage 2 mounts present,
migrate --keys, SSO and userpass login).