Skip to content

fix(vault-seed): seed OIDC client/cookie secrets from the SOPS bootstrap source#1989

Merged
devantler merged 2 commits into
mainfrom
claude/repo-assist-oidc-single-source
Jun 11, 2026
Merged

fix(vault-seed): seed OIDC client/cookie secrets from the SOPS bootstrap source#1989
devantler merged 2 commits into
mainfrom
claude/repo-assist-oidc-single-source

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Assistant

Root cause

The same logical secret has two unrelated values:

  • dex (staticClients) and oauth2-proxy consume ${dex_client_secret} / ${flux_web_client_secret} / ${oauth2_proxy_cookie_secret} directly from the variables-cluster SOPS secret via Flux post-build substitution
  • headlamp, actual-budget and the OpenBao OIDC auth method read the same logical secrets from the vault paths infrastructure/oidc/{dex,flux-web,oauth2-proxy} — which were seeded by an independent Password generator

Verified live on prod just now: sha256(variables-cluster.dex_client_secret) ≠ sha256(vault-synced dex-client-secret) → dex rejects every vault-sourced consumer. This predates the 2026-06-10 incident (the generator never knew about the SOPS value), and the post-incident regeneration (#1981) re-rolled the dice.

Fix

Replace the three generator-based pushes with seed-* PushSecrets that mirror the variables-cluster keys into the same vault paths (hourly, like every other SOPS-sourced seed). Drop the now-unused Password generators and cache ExternalSecrets (Flux prunes them; the cache Secrets are GC'd with their owners). The truly generated secrets (umami / fleetdm) keep the #1981 cache pattern — they have no external system of record.

After merge I'll re-run the vault-config Job once so the OpenBao OIDC auth method picks up the corrected oidc_client_secret.

Validation

  • kubectl kustomize local + prod ✅

🤖 Generated with Claude Code

…rap source

dex's staticClients and oauth2-proxy consume ${dex_client_secret} /
${flux_web_client_secret} / ${oauth2_proxy_cookie_secret} straight from
the variables-cluster SOPS secret via Flux post-build substitution —
while headlamp, actual-budget and the OpenBao OIDC auth method read the
SAME logical secrets back from the vault paths, which were seeded by an
INDEPENDENT Password generator. Two unrelated random values for one
client secret: dex rejects every vault-sourced consumer (verified live:
sha256(variables-cluster.dex_client_secret) != sha256(vault-synced
dex-client-secret)).

Replace the three generator-based pushes with seed-* PushSecrets that
mirror the variables-cluster keys into the same vault paths (hourly,
like every other SOPS-sourced seed), and drop their now-unused Password
generators and cache ExternalSecrets. The truly generated secrets
(umami / fleetdm) keep the cache pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Assistant

ℹ️ The 🧪 System Test failure here is the pre-existing repo-wide CI breakage (OpenBao service-registration label updates rejected with HTTP 422 → openbao-active Service never gains endpoints), not caused by this PR — this run also served as the control proving #1985 alone doesn't cure CI. Root-causing continues in #1990, whose diagnostics probe prints the apiserver's full 422 reason. This PR itself is static-validated against both overlays.

@devantler devantler added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit 006b7ba Jun 11, 2026
10 checks passed
@devantler devantler deleted the claude/repo-assist-oidc-single-source branch June 11, 2026 16:06
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jun 11, 2026
@botantler

botantler Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.49.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@botantler botantler Bot added the released label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant