Brand the Authelia login portal with the SUS 🤨 logo - #94
Conversation
Replaces Authelia's default person icon on the login card with the SUS 🤨 (Noto Emoji, Apache-2.0, bundled at charts/sus/assets/logo.png) via a server asset override (server.asset_path). Configurable under auth.authelia.branding (enabled, theme, logoPngBase64 to supply your own logo). The rest of the portal, including the "Sign in" text, is left as Authelia ships it. New templates/authelia/assets-configmap.yaml carries the logo (binaryData via .Files.Get); the deployment subPath-mounts it into the asset tree and rolls on change via a checksum annotation. Gated by branding.enabled (default true), so it's off when auth is off. Verified live on k3d: Authelia boots with asset_path and serves the bundled 🤨 at /static/media/logo.png (data-logooverride="true"). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @dev-dull's task in 4m 11s —— View job Review: Authelia login-portal branding
Solid, well-scoped change — the mechanics are right and the tricky parts are handled deliberately: the What I verified locally (
I couldn't byte-compare the rendered base64 against the PNG (the Findings (3 inline, none blocking):
No security concerns: the ConfigMap holds a public image, the mount is Nothing was committed; the working tree is clean (all render artifacts removed). |
| {{- include "sus.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: authelia | ||
| binaryData: | ||
| logo.png: {{ .Values.auth.authelia.branding.logoPngBase64 | default (.Files.Get "assets/logo.png" | b64enc) }} |
There was a problem hiding this comment.
A line-wrapped logoPngBase64 breaks the render with an opaque error. The value is interpolated unquoted, so any newline in it corrupts the YAML. This is easy to hit because the guidance in values.yaml is base64 -i logo.png, and on GNU coreutils -i is --ignore-garbage (not "input file"), so encoding still wraps at 76 columns. Reproduced locally with a two-line value:
Error: YAML parse error on sus/templates/authelia/assets-configmap.yaml:
error converting YAML to JSON: yaml: line 19: could not find expected ':'
The error points at the template, not at the operator's value, so it's a rough debugging experience.
Separately, if assets/logo.png ever goes missing (or gets .helmignored), .Files.Get returns "" and this renders logo.png: — a null value that applies cleanly and mounts a 0-byte logo.png, i.e. a silently broken image on the login page rather than a loud failure.
Both are covered by normalizing whitespace, quoting, and requiring a non-empty result:
| logo.png: {{ .Values.auth.authelia.branding.logoPngBase64 | default (.Files.Get "assets/logo.png" | b64enc) }} | |
| logo.png: {{ .Values.auth.authelia.branding.logoPngBase64 | default (.Files.Get "assets/logo.png" | b64enc) | nospace | required "auth.authelia.branding: no logo available — set auth.authelia.branding.logoPngBase64 or restore charts/sus/assets/logo.png" | quote }} |
Worth updating the values.yaml hint to base64 -w0 logo.png too (or base64 < logo.png | tr -d '\n' for portability across GNU/BSD).
| server: | ||
| address: 'tcp://:9091' | ||
| {{- if .Values.auth.authelia.branding.enabled }} | ||
| # Override the portal logo/favicon and text (see the -assets ConfigMap). |
There was a problem hiding this comment.
Stale comment from the earlier draft: the assets ConfigMap carries only logo.png, so neither the favicon nor the portal text is overridden here (the PR body says the text override was intentionally dropped). As written this sends a future reader looking for a locales/ entry that doesn't exist.
| # Override the portal logo/favicon and text (see the -assets ConfigMap). | |
| # Override the portal logo (see the -assets ConfigMap). |
| branding: | ||
| enabled: true | ||
| # Portal color scheme: light | dark | grey | auto. | ||
| theme: light |
There was a problem hiding this comment.
Minor wiring surprise: theme sits under branding but is consumed unconditionally in configmap.yaml, so it still takes effect with branding.enabled: false. Confirmed via helm template --set auth.authelia.branding.enabled=false — the render drops the assets ConfigMap, the volume, and asset_path, but keeps theme. Either hoist theme up a level next to image, or note in the comment that it applies regardless of enabled (which reads as "logo override on/off").
Also worth a one-line note that Authelia only accepts light | dark | grey | auto — an invalid value passes helm template/helm lint and only fails at container startup with a config-validation error.
Replaces Authelia's default person icon on the login card with the SUS 🤨, and otherwise leaves the portal as Authelia ships it (including the "Sign in" text).
What it does
charts/sus/assets/logo.png— the SUS 🤨 (Noto Emoji, Apache-2.0, safe to redistribute) — and serves it as the login-portal logo via Authelia'sserver.asset_path.auth.authelia.brandingvalues:enabled(default true),theme(light/dark/grey/auto), andlogoPngBase64for operators to drop in their own logo.templates/authelia/assets-configmap.yamlcarries the logo (binaryData); the Authelia deployment subPath-mounts it and rolls on change via a checksum annotation. All gated bybranding.enabled, so nothing renders when auth is off.Scope note
An earlier draft also retitled the login text to "Single Use Software Login", but Authelia uses one translation key for both the form header and the submit button, so that made the button read "SINGLE USE SOFTWARE LOGIN" too. Dropped the text override — this PR is logo-only.
Verification (live on k3d)
asset_path;/static/media/logo.pngserves the bundled 🤨 byte-for-byte withdata-logooverride="true".logo.png(no locale override);/locales/en/portal.jsonreturns Authelia's defaults, so "Sign in" is unchanged.helm lint/helm templateclean; auth-off renders no branding resources.🤖 Generated with Claude Code