Repository navigation
feat(customer-identity): let customers sign in with GitHub too - #6356
Conversation
…nistrator The setup CronJob gains a recovery step that runs only when ADMIN_RECOVERY_NONCE holds a value no run has recorded yet. For the administrator alone it unlocks the account, removes every second factor and passkey, keeps the password and sends ZITADEL's own password-reset email. It records the value on the client Secret once the factors are gone, so later runs do nothing, even after a new factor is enrolled. The login policy still forces MFA, so the next sign-in enrols one. Nothing the reset creates is printed. This change sets the trigger once; a follow-up removes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The administrator will sign in with GitHub instead of a password, so the recovery no longer sends ZITADEL's password-reset email. It now also removes recovery codes, and its final check reads the sign-in method types, which include them, so the nonce is recorded only when nothing but the password is left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintainer's ZITADEL login collided with his mail login in Apple Passwords, so he signs in with GitHub through the platform Dex instead of a ZITADEL password and passkey. - The platform Dex's shared client accepts ZITADEL's Login V1 callback. - The setup CronJob keeps that Dex configured as a generic OIDC identity provider of his organization, which neither creates nor links accounts. It sets that organization's login policy to external sign-in only, with MFA forced for local sign-in alone, and links his account to his GitHub identity as Dex presents it. - Customers get a "Customers" organization, which keeps the instance's password and MFA policy. The customer Dex requests it, so they are not sent to GitHub and no one else signs in there. - ZITADEL may reach dex.platform.devantler.tech. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rface The platform Dex gains ZITADEL's callback and the customer Dex requests the Customers organization, so both HelmReleases render differently. Their ledger entries take the hashes the authorization contract reports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The recovery compared the recorded nonce inside a test, where a failed Secret read is not an error under set -e: it read as "not recorded", and a later run removed whatever the administrator had enrolled since. The read is now its own assignment, so a failure stops the run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Customers may sign in with GitHub, through the devantler-tech org's "Devantler Tech" OAuth App, which the maintainer stores in OpenBao apps/customer-identity/github-oauth. The setup CronJob registers ZITADEL's native GitHub provider in the Customers organization only: - invite-only: the provider never creates an account; a GitHub login links to an existing customer when both verified emails match, or after one sign-in with password and MFA; - password and MFA stay available, and MFA is not forced for GitHub logins (forceMfaLocalOnly); - scopes read:user and user:email; ZITADEL may reach github.com and api.github.com. The provider and the administrator's Dex provider now share one ensure_idp/ensure_login_policy pair. Each declared value is computed in its own assignment and refused when empty. Until the OAuth App is stored, the optional mount is empty and the run leaves customer GitHub sign-in off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintainer chose a GitHub App over an OAuth App: fine-grained permissions (Email addresses: read only) and expiring user tokens. ZITADEL's GitHub provider uses the same authorize, token and /user endpoints for either. It keeps user:email in its own scope list because it reads /user/emails only when that scope is listed; GitHub ignores the scopes of a GitHub App. The app must be public, since GitHub lets only members of the owning organization authorize a private one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅
|
@coderabbitai review |
Action not completed
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63272ef954
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…witch Codex: credentials alone turned the new customer sign-in path on. A CUSTOMER_GITHUB_SIGNIN setting, "off" here, now decides it, and a reviewed change turns it on once the github-oauth ExternalSecret has synced. While it is off, the run refuses a GitHub provider left in the Customers organization. While it is on, it refuses missing credentials. Any other value stops the run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
✅
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai review |
Action performed
|
Ready at
|

What
Customers can sign in to ZITADEL (accounts.devantler.tech) with GitHub, alongside their password and MFA. The maintainer asked for this for customers straight away.
https://accounts.devantler.tech/ui/login/login/externalidp/callback. It has no webhook and no repository or organization permissions. Its one account permission is "Email addresses: read-only", and its user tokens expire. The maintainer created it and stored its client ID and secret in OpenBao atapps/customer-identity/github-oauth(keysclient-idandclient-secret). The newgithub-oauthExternalSecret syncs them, and they are mounted as optional files.read:useranduser:email. GitHub ignores scopes for a GitHub App, but ZITADEL reads the primary verified address from/user/emailsonly whenuser:emailis in its own list. The provider uses the same authorize, token and/userendpoints for a GitHub App as for an OAuth App:forceMfaLocalOnly). Password and MFA stay available.github.comandapi.github.comon 443.CUSTOMER_GITHUB_SIGNIN, set to"off"in this PR, so customer GitHub sign-in lands off. A follow-up turns it on once thegithub-oauthExternalSecret has synced in production. While it is off, a GitHub provider left in the Customers organization stops the run. While it is on, missing credentials stop it.ensure_idp/ensure_login_policypair. Each declared value is computed in its own assignment and refused when empty.The administrator's sign-in is unchanged: GitHub through the platform Dex, from #6355, whose commits this branch contains.
Why a public app
GitHub lets only members of the owning organization authorize a private GitHub App ("Only on this account"), and customers are not members. A public app requests no repository or organization permissions, so installing it grants nothing.
The stored credentials
The maintainer reports the credentials are stored. The apps layer waits for resource health, so a missing OpenBao key would fail this deploy and be healed. After the deploy, the
github-oauthExternalSecret'sReadycondition is checked (status only, no values). If the Secret later disappears, the script itself stays safe: with nothing mounted, it logscustomer GitHub sign-in is offand leaves the provider off.Validation
Ran against a local ZITADEL v4.20.3:
customer_github=off, and the administrator's setup is unchanged.created the GitHub identity provider in the Customers organization, set the login policy of the Customers organization. The next run:no changes.allowUsernamePasswordon,allowExternalIdpon, andforceMfaandforceMfaLocalOnlyon. Its GitHub provider has linking allowed, creation off and email auto-linking.Other checks:
ksail --config ksail.prod.yaml workload validate: 973 files validated.yamllint,shellcheckand the Coroot scrape-policy test.Not proven offline: the real GitHub round trip, which runs against the live GitHub App after deploy.
Part of devantler-tech/business-site#302.
🤖 Generated with Claude Code