-
Notifications
You must be signed in to change notification settings - Fork 0
Brand the Authelia login portal with the SUS 🤨 logo #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Bundled portal assets | ||
|
|
||
| - `logo.png` — "face with raised eyebrow" (U+1F928), from the | ||
| [Noto Emoji](https://github.com/googlefonts/noto-emoji) project, licensed | ||
| Apache-2.0. Used as the default Authelia login-portal logo. Operators can | ||
| override it via `auth.authelia.branding.logoPngBase64`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| {{- if and .Values.auth.enabled .Values.auth.authelia.branding.enabled }} | ||
| # Authelia server-asset override mounted at server.asset_path (/config/assets): | ||
| # logo.png -> the login-portal logo (replaces Authelia's default icon) | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ include "sus.authelia.fullname" . }}-assets | ||
| namespace: {{ .Values.namespaces.platform }} | ||
| labels: | ||
| {{- 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) }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,9 +12,13 @@ metadata: | |||||
| app.kubernetes.io/component: authelia | ||||||
| data: | ||||||
| configuration.yml: | | ||||||
| theme: light | ||||||
| theme: {{ .Values.auth.authelia.branding.theme | default "light" }} | ||||||
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stale comment from the earlier draft: the assets ConfigMap carries only
Suggested change
|
||||||
| asset_path: /config/assets | ||||||
| {{- end }} | ||||||
| log: | ||||||
| level: info | ||||||
| totp: | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,6 +111,16 @@ auth: | |
| # Pinned minor tag — Authelia's config schema is version-sensitive. | ||
| tag: "4.38" | ||
| pullPolicy: IfNotPresent | ||
| # -- Login-portal branding. Replaces Authelia's default icon with the SUS 🤨 | ||
| # logo by default; the rest of the portal (including the "Sign in" text) is | ||
| # left as Authelia ships it. | ||
| branding: | ||
| enabled: true | ||
| # Portal color scheme: light | dark | grey | auto. | ||
| theme: light | ||
|
Comment on lines
+117
to
+120
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor wiring surprise: Also worth a one-line note that Authelia only accepts |
||
| # -- Override the bundled 🤨 logo with your own PNG (base64-encoded, e.g. | ||
| # `base64 -i logo.png`). Empty = use the bundled SUS logo. | ||
| logoPngBase64: "" | ||
| # Memory limit must accommodate argon2id password verification, which is | ||
| # memory-hard by design (default parameters use 64MiB per concurrent login) | ||
| # on top of Authelia's baseline — too low a limit OOM-kills the container | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A line-wrapped
logoPngBase64breaks 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 invalues.yamlisbase64 -i logo.png, and on GNU coreutils-iis--ignore-garbage(not "input file"), so encoding still wraps at 76 columns. Reproduced locally with a two-line value:The error points at the template, not at the operator's value, so it's a rough debugging experience.
Separately, if
assets/logo.pngever goes missing (or gets.helmignored),.Files.Getreturns""and this renderslogo.png:— a null value that applies cleanly and mounts a 0-bytelogo.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:
Worth updating the
values.yamlhint tobase64 -w0 logo.pngtoo (orbase64 < logo.png | tr -d '\n'for portability across GNU/BSD).