Repository navigation
Per-subdomain theme overrides within a single realm #52970
MaykonOliveira
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Use case
A single realm is often served under several hostnames (for example
tenant1.example.comandtenant2.example.com, same realm, same users) and each hostname should have its own branding.Today a realm has exactly one theme per type (login, account, admin, email), so the only options are
creating one realm per tenant, or writing a custom
ThemeSelectorProviderSPI.Proposal
Let an administrator map hostnames to themes, per realm, from the admin console
(Realm settings > Themes > "Subdomain theme overrides"):
tenant1.example.comacmeacme*.partner.example.compartnerRules:
*.example.comdoes not match the bareexample.com.login_themeattribute keeps precedence.Implementation sketch (working prototype exists)
subdomainThemes),the same approach used by client policies / profiles.
DefaultThemeSelectorProvider, the existing single funnel for theme selection.attributes).Open questions for maintainers
--hostname, every request resolves to that single host, so the feature has no effect; it requireshostname-strict=false(and proxy headers behind a reverse proxy). This is the deployment mode our docsalready warn about (Host header injection). The override can only select among themes the admin configured,
never arbitrary content, but is this acceptable, or would you prefer a different signal (e.g. a trusted
forwarded-host header, or per-realm frontend URLs)?
All reactions