Repository navigation
feat(mctl-api): sign in through ZITADEL only (OAUTH_UPSTREAM=zitadel) - #1694
Conversation
The canary on `both` was proven end to end on 2026-10-06: the owner reconnected an MCP connector through ZITADEL and got the same principal, admin flag and teams as on the GitHub path. Keeping GitHub as a second way in means two sign-in paths to reason about and keeps the GitHub OAuth app in the trust boundary. Nobody is locked out by removing it: an unlinked person is sent to the link flow, which proves the old account with one GitHub sign-in in any mode, and existing sessions refresh without going upstream. Refs #1500
|
Holding this as a draft. Two checks have to pass before it merges (raised by the session running the #1500 migration):
Also for whoever links: sign in to ZITADEL with the login name, not the e-mail (zitadel/zitadel#12852). The description above says nobody is locked out, which is still accurate, but it understates the second point. |
Antigravity (agy) review — informationalModel: gemini-3.8-flash-medium · commit No significant issues found. |
|
Taken over by the |
|
@claude review |
|
Claude finished @mashkovd's task in 2m 17s —— View job Review complete ✅
Diff: one file, +12/-8, all in Verification done:
Per this repo's review policy, a single config/env-var value change with no logic changes is trivial. 0 P1/P2 findings. Submitted: Note for the human gate: this verdict is about the diff only. The operational blockers raised in-thread by @mashkovd (Cloudflare MCP portal path untested, incomplete linking roster for tenants |
Why
Phase 2 of #1500.
OAUTH_UPSTREAMhas beenbothsince #1681 as a canary. The canary was proven end to end on 2026-10-06 18:57Z: the owner reconnected the claude.ai connector tohttps://api.mctl.ai/mcpthrough ZITADEL andwhoamireturned the same principal, admin flag and teams as on the GitHub path. The owner asked to dropboth.What
One value in
bootstrap/templates/mctl-platform/mctl-api.yaml:OAUTH_UPSTREAM: "both"becomes"zitadel", and the comment above it describes the new mode.What changes for people
/oauth/authorizego toauth.mctl.aidirectly. The chooser page and the GitHub option are gone./identity/link/zitadel) is not gated by this setting: its GitHub leg is dispatched before the upstream check inhandleOAuthGitHubCallback. They sign in with GitHub and ZITADEL once, then start the connection again./oauth/authorizeonly.Who is not linked yet
obukhov23andgreirk(tenanterpact) have not confirmed linking. Linking them without their participation is not possible today: a ZITADEL sign-in by an unlinked person creates no principal, so the admin merge endpoint has nothing to merge, and there is no admin "attach identity" endpoint. They link themselves on first use through the page above.In the hours since the current pod started (2026-10-06 06:52Z)
oauth_upstream_signins_totalshows one completed sign-in, through ZITADEL; none through GitHub.Rollback
Set the value back to
both. No data is changed by either direction.After merge
GET https://api.mctl.ai/oauth/authorize?...redirects toauth.mctl.ai, with no chooser....&upstream=githubno longer reachesgithub.com./identity/link/zitadelstill starts the link flow.Draft until the owner confirms the merge.
Refs #1500
🤖 Generated with Claude Code