Repository navigation
fix(customer-identity): disarm the administrator's sign-in recovery - #6357
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>
The one-shot recovery has run and recorded its nonce on the client Secret, so the trigger is removed. A rebuilt Secret, which carries no record, can no longer start it again. The recovery step stays in the setup script as break-glass: it does nothing while ADMIN_RECOVERY_NONCE is unset, and a future recovery is a reviewed change setting a new value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅
|
✅
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging main brought the trigger back, because the branch never added it relative to the old base. Remove ADMIN_RECOVERY_NONCE again so this PR's diff is the disarm alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai review |
Action not completed
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
@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. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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". |
Ready at
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

What
This removes
ADMIN_RECOVERY_NONCEfrom the setup CronJob, disarming the one-shot administrator sign-in recovery from #6353.Why
The recovery acts once per nonce and records the nonce on the
customer-dex-zitadel-clientSecret. If the trigger stayed, a rebuilt Secret (one that carries no record) could start it again. Removing the trigger rules that out.The recovery step stays in the script as break-glass. It does nothing while the variable is unset, and a future recovery would be another reviewed change setting a new value.
When to merge
Only after production's setup CronJob has logged
recovery admin-recovery-2026-11-15: unlocked=… removed=…(ordone earlier). Until then this stays a draft. It contains #6355's commits until those merge.Validation
This change only removes five lines: the variable and its comment. The script, which treats an unset variable as "no recovery", was tested in #6353.
Part of devantler-tech/business-site#302.
🤖 Generated with Claude Code