kanidm display name + logo runtime push — the half of IdP branding override.css cannot carry #349

Closed
opened 2026-08-09 04:58:22 +00:00 by ben · 1 comment
Owner

DDR 0145 put the full community palette on the kanidm UI via a seam-compiled override.css (bind-mounted over the package's ui/hpkg/override.css, restart-triggered on brand re-apply). CSS cannot carry the display name or the domain image, and the old path for them was dead code, excised in the DDR 0145 commit:

  • frontdoor.go set systemd.services.kanidm-brand.environment on a unit that does not exist anywhere — nothing ever consumed OURCLOUD_IDP_DISPLAYNAME / OURCLOUD_IDP_LOGO.
  • FrontDoorConfig.BrandImport was never set by a production caller (only tests), so the kanidm-brand.nix fragment was compiled and never imported.

What to build: a runtime push that applies, against the RUNNING kanidm (1.10.3 has both hooks):

  • kanidm system domain set-displayname <name> — from the community header (ourcloud/brand-kit.json), so the sign-in <h3> stops reading "Kanidm localhost".
  • kanidm system domain set-image <file> [type] — the community mark (PNG/JPG/GIF/SVG/WebP, max 1024x1024, under 256 KB).

Shape suggestion: follow the nextcloud-brand oneshot pattern (internal/clan/files.go — pathExists-guarded unit, restartTriggers on the artifact path literal, applies via CLI against the live service), fed by a re-added idp-login name/logo artifact or the header doc. When it lands, brand.name/logo.mono grow back into the idp-login surface capability (see the note in internal/brandkit/idp_override.go and the DDR).

Gate: the logo half is blocked on the DDR 0124 logo-bytes gap — uploaded logo bytes (LogoData) never leave the founding draft; no deploy runner materialises brand/<name> objects into the config repo, so there is nothing on the gateway to feed set-image. The display-name half has no such gate and can land alone.

Filed from the DDR 0145 arc (commit 938dffe).

DDR 0145 put the full community palette on the kanidm UI via a seam-compiled `override.css` (bind-mounted over the package's `ui/hpkg/override.css`, restart-triggered on brand re-apply). CSS cannot carry the **display name** or the **domain image**, and the old path for them was dead code, excised in the DDR 0145 commit: - `frontdoor.go` set `systemd.services.kanidm-brand.environment` on a unit that **does not exist anywhere** — nothing ever consumed `OURCLOUD_IDP_DISPLAYNAME` / `OURCLOUD_IDP_LOGO`. - `FrontDoorConfig.BrandImport` was never set by a production caller (only tests), so the `kanidm-brand.nix` fragment was compiled and never imported. What to build: a runtime push that applies, against the RUNNING kanidm (1.10.3 has both hooks): - `kanidm system domain set-displayname <name>` — from the community header (`ourcloud/brand-kit.json`), so the sign-in `<h3>` stops reading "Kanidm localhost". - `kanidm system domain set-image <file> [type]` — the community mark (PNG/JPG/GIF/SVG/WebP, max 1024x1024, under 256 KB). Shape suggestion: follow the `nextcloud-brand` oneshot pattern (`internal/clan/files.go` — `pathExists`-guarded unit, `restartTriggers` on the artifact path literal, applies via CLI against the live service), fed by a re-added `idp-login` name/logo artifact or the header doc. When it lands, `brand.name`/`logo.mono` grow back into the `idp-login` surface capability (see the note in `internal/brandkit/idp_override.go` and the DDR). **Gate:** the logo half is blocked on the DDR 0124 logo-bytes gap — uploaded logo bytes (`LogoData`) never leave the founding draft; no deploy runner materialises `brand/<name>` objects into the config repo, so there is nothing on the gateway to feed `set-image`. The display-name half has no such gate and can land alone. Filed from the DDR 0145 arc (commit 938dffe).
Author
Owner

Landed the display-name half of the runtime push in 75fee8c (origin/main).

A nextcloud-brand-shaped oneshot on the gateway render — kanidmDisplayNamePushBlock in internal/clan/vmguest.go — reads the community name from the header (../../ourcloud/brand-kit.json, the same doc clan.ReadCommunityName reads) and applies kanidm system domain set-displayname against the RUNNING kanidm, so the sign-in <h3> stops reading "Kanidm localhost". It is pathExists-guarded (no header → no unit, mkIf) with restartTriggers on the header path literal, so a Settings re-apply re-pushes.

Decisions:

  • Fed by the community header, not a new brandkit artifact — the header already carries Name, so no Surface-interface surgery (the interface returns one artifact; override.css genuinely cannot carry the name, hence the push).
  • Rides the gateway render (vmguest.go), not the front door: kanidm and its idm_admin credential are provisioned there. Authenticates as idm_admin — the one admin identity the control plane + member adapter already drive kanidm as (ADR 0105) — with the clan-var password over KANIDM_PASSWORD, so the credential never leaves the gateway. Login retries briefly (kanidm settles async after boot/provisioning); the name is passed after -- so hostile operator free text starting with a dash cannot be read as a flag.

Logo half deliberately NOT shipped — still blocked on the DDR 0124 logo-bytes gap (uploaded LogoData never leaves the founding draft, so nothing on the gateway feeds set-image). brand.name/logo.mono regrow the idp-login capability together when that unblocks; the coverage report keeps name/logo Unsupported on the CSS surface honestly.

Test-first at the render seam (internal/clan/vmguest_test.go); the rendered fragment nix-instantiate --parses clean. UNPROVEN LIVE until the next drive — the CLI auth flags (KANIDM_PASSWORD login, idm_admin permission for set-displayname) are verified by the next smoke/private-path drive, as with every gateway render. STATUS.md updated (header + milestone log).

Landed the **display-name half** of the runtime push in `75fee8c` (origin/main). A nextcloud-brand-shaped oneshot on the gateway render — `kanidmDisplayNamePushBlock` in `internal/clan/vmguest.go` — reads the community name from the header (`../../ourcloud/brand-kit.json`, the same doc `clan.ReadCommunityName` reads) and applies `kanidm system domain set-displayname` against the RUNNING kanidm, so the sign-in `<h3>` stops reading "Kanidm localhost". It is `pathExists`-guarded (no header → no unit, mkIf) with `restartTriggers` on the header path literal, so a Settings re-apply re-pushes. Decisions: - **Fed by the community header**, not a new brandkit artifact — the header already carries `Name`, so no Surface-interface surgery (the interface returns one artifact; override.css genuinely cannot carry the name, hence the push). - **Rides the gateway render (vmguest.go), not the front door**: kanidm and its `idm_admin` credential are provisioned there. Authenticates as `idm_admin` — the one admin identity the control plane + member adapter already drive kanidm as (ADR 0105) — with the clan-var password over `KANIDM_PASSWORD`, so the credential never leaves the gateway. Login retries briefly (kanidm settles async after boot/provisioning); the name is passed after `--` so hostile operator free text starting with a dash cannot be read as a flag. **Logo half deliberately NOT shipped** — still blocked on the DDR 0124 logo-bytes gap (uploaded `LogoData` never leaves the founding draft, so nothing on the gateway feeds `set-image`). `brand.name`/`logo.mono` regrow the `idp-login` capability together when that unblocks; the coverage report keeps name/logo Unsupported on the CSS surface honestly. Test-first at the render seam (`internal/clan/vmguest_test.go`); the rendered fragment `nix-instantiate --parse`s clean. UNPROVEN LIVE until the next drive — the CLI auth flags (`KANIDM_PASSWORD` login, `idm_admin` permission for `set-displayname`) are verified by the next smoke/private-path drive, as with every gateway render. STATUS.md updated (header + milestone log).
ben closed this issue 2026-08-09 06:56:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#349
No description provided.