Repository navigation
feat(auth): no default Dex issuer; unset DEX_ISSUER_URL turns Dex off - #521
Conversation
Dex is being retired (mctl-gitops#1500 phase 4). The plan is to stop setting DEX_ISSUER_URL in the deployment and then remove Dex, but an unset variable fell back to https://ops.mctl.ai/api/dex, so the Dex verifier, the legacy "dex" federation shim and the Dex /readyz check would all keep pointing at an issuer that is about to disappear. With /readyz failing on it, every pod would go unready: the shape of the 2026-10-09 outage. Unset now means Dex off. Production is unaffected until gitops drops the variable, because it sets DEX_ISSUER_URL explicitly today. Refs mctlhq/mctl-gitops#1500 Claude-Session: https://claude.ai/code/session_012TfVcukEh7ry8MiLNN89N4
|
Claude finished @mashkovd's task in 1m 8s —— View job Review complete
Findings: none (0 P1, 0 P2, 0 P3). The change removes the hardcoded
New test No logic gaps found. Approved via |
Antigravity (agy) review — informationalModel: gemini-3.8-flash-medium · commit No significant issues found. |
There was a problem hiding this comment.
No P1/P2/P3 findings. Default removal is gated correctly everywhere it's consumed: dexVerifier/dexReady in cmd/api/main.go (lines 120, 848) and the dexIssuer == "" branch already in internal/auth/federation_config.go:230. Regression test cmd/api/dex_default_test.go covers both unset and set cases.
Summary
Phase 4 of mctlhq/mctl-gitops#1500 (retire Dex), step 1 of 3.
DEX_ISSUER_URLdefaulted tohttps://ops.mctl.ai/api/dex, so the only way to turn Dex off was a code change: removing the variable from the deployment would silently bring the default back. With the default in place, the Dex verifier, the legacydexfederation shim and the Dex/readyzcheck (cmd/api/main.go,dexReady) keep pointing at Dex. If Dex were removed first,/readyzwould fail and every pod would go unready, as in the 2026-10-09 outage.DexIssuerURLreadsDEX_ISSUER_URLwith no default. Unset means: noDexVerifier, nodexshim (BuildFederationRegistryalready handlesdexIssuer == ""), no Dex readiness check.TestDexIssuerURLHasNoDefault; mutation-checked (the oldenvOr(..., "https://ops.mctl.ai/api/dex")fails it).No production change on merge: gitops sets
DEX_ISSUER_URLexplicitly today (mctl-api.yaml).Order
DEX_ISSUER_URL/DEX_CLIENT_IDfrommctl-api.yaml; confirm/readyzno longer lists Dex.argocd/templates/dex.yaml,dex-config.yaml, the/api/dexproxy) and the Dex rollback clients of Argo Workflows and Grafana.Before step 2: confirm no Dex-issued token is still in use (
provider="dex"verifications; 0 in 30 days as of 2026-10-04).Prepared as part of the loop; merge only with the owner's explicit OK.
🤖 Generated with Claude Code
https://claude.ai/code/session_012TfVcukEh7ry8MiLNN89N4