Repository navigation
feat(customer-identity): manage ZITADEL's branding declaratively - #6380
Conversation
The maintainer asked for ZITADEL's look to be declared rather than set in the console (2026-11-15). The setup CronJob now owns the instance label policy on every run, so a console edit is undone: - colours and settings as on devantler.tech: the brand green #39FF14 on the logo's near-black (#0A0D0B) in dark mode, the site's darker #15803D on its light background (#F6FAF7) in light mode, with matching text, ZITADEL's own warning reds, no login-name suffix and no "Powered by ZITADEL"; - the Devantler Tech wordmark for light and dark (logo-light.png, logo-dark.png) and the square icon for both (icon.png), from a new zitadel-branding ConfigMap; PNG, because email clients do not show SVG; - no custom font, and no organization with a label policy of its own: the administrator's and the Customers organization are reset to the instance's, so both use it. Changes land in the policy's preview and are activated once, then verified. ZITADEL keeps no hash of an uploaded asset, so the Secret records the files' sha256 together with the asset URLs: a changed file, or an upload made in the console (a new URL), is uploaded again. The HelmRelease's DefaultInstance.LabelPolicy keeps its values (only its comment changes), so ZITADEL is not upgraded. Tested on a local ZITADEL v4.20.3 with the full setup script: a fresh instance is configured on the first run and the second reports no changes; an activated or preview-only organization policy is reset; a stray logo upload, an activated colour and watermark change and a custom font are each reverted in one run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/brand.md now names the zitadel-branding ConfigMap among the pages that embed the logo, says the setup CronJob owns ZITADEL's label policy, and shows the sign-in page in light and dark mode from a local ZITADEL v4.20.3 run of the setup script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the setup-script changes at Looks right. The asset upload uses the same auth file and One finding (should fix): a failed read inside
Both writes happen to aim at the desired state, so nothing is damaged. It is still a fail-open; Codex flagged the same pattern as P1 in #6353. Read each policy in its own assignment first, for example Optional: the branding files are checked at the top, before the identity reconciliation. A broken Queue: my only open change to this file is #6379, which flips |
…g it Review finding on #6380: a command substitution inside [[ ]] escapes set -e, so a failed read of an organization's label policy (or of the preview before activation) looked like a difference and led to a DELETE or an _activate. Every value the branding block compares is now read into a variable first, so a failed read stops the run. The branding files check moves into the branding block, so a broken ConfigMap no longer stops the identity and SMTP steps before it. Proven on local ZITADEL v4.20.3 with a curl shim that fails the organization label-policy read: the previous script went on to send a DELETE, this one stops at the failed GET with no DELETE. Steady runs still report no changes, and an organization policy is still reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixed in
🤖 Generated with Claude Code |
✅
|
✅
|
@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 35 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. Keep it up! 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". |
Readiness at
🤖 Generated with Claude Code |

Why
The maintainer asked for ZITADEL's branding (accounts.devantler.tech and its emails) to be declared, not set by hand in the console. The ZITADEL setup CronJob now owns ZITADEL's whole label policy, so a console edit is undone on the next run.
What the setup CronJob now keeps
#39FF14on the logo's near-black#0A0D0B, with text#F1F5F1. Light mode: the site's darker#15803Don its light background#F6FAF7, with text#0A0D0B. Warning reds stay ZITADEL's defaults. The login-name suffix is hidden, and there is no "Powered by ZITADEL" watermark. The theme follows the visitor.logo-light.png,logo-dark.png) and the square icon for both modes (icon.png, 512 px). They come from a newzitadel-brandingConfigMap and are byte for byte the approved files. They are PNG because email clients don't show SVG.All changes land in the policy's preview, are activated once, and are then verified. ZITADEL keeps no hash of an uploaded asset, so the client Secret records the files' sha256 together with the asset URLs ZITADEL gave them. That way a changed file, or an upload made in the console (which gets a new URL), is uploaded again. Uploads are multipart, so a small
upload_assethelper sends them besideapi(). A refused upload fails the run with the HTTP status and ZITADEL's one-line message.No new RBAC: the system user already owns the instance, and the Job still writes only
customer-dex-zitadel-client.DefaultInstance.LabelPolicyinhelm-release.yamlkeeps its values; only its comment changes, and the rendered HelmRelease is byte-identical. So ZITADEL is not upgraded, and no authorization-ledger entry moves.docs/brand.mdlists the new copy.Coordinated with the session that owns this Job: based on main after #6355, #6356 and #6357, with the block placed right before
summary=.Checked locally
The real script was extracted from this CronJob and run in its
alpine/k8simage against ZITADEL v4.20.3 (the production version), configured like production (ExternalDomain: accounts.devantler.tech, the same system user and first instance). A stand-inkubectlheld the Secret.Fresh instance: run 1 creates everything and adds "set the label policy colours and settings, uploaded the label policy logos and icon, activated the label policy". Run 2 reports
no changes.Each console-style edit is undone in one run, and the run after it reports
no changes:A refused upload fails with
HTTP 400 invalid content-type…and records no fingerprint; the next run with the right files converges.The sign-in page shows the wordmark at full size in both modes:
ksail --config ksail.prod.yaml workload validatepasses, the Hetzner apps layer builds with the ConfigMap incustomer-identity, the naming validator and the authorization-ledger tests pass, and Trivy finds nothing new.After deploy
The first production run should log
changes: … set the label policy colours and settings, uploaded the label policy logos and icon, activated the label policy, possibly with a reset of the administrator's organization, if the maintainer's console uploads went there. The next run should logno changes. I'll check the CronJob logs and the sign-in page.Part of #5053.
🤖 Generated with Claude Code