IDIP sign-in page: no logo — the kit on the gateway carries a logo PATH but no bytes, and #1705 inlines only bytes; the served /brand/logo door is never used #1716

Closed
opened 2026-09-22 03:57:12 +00:00 by ben · 3 comments
Owner

What Ben saw

After release cef28743 (carries #1705) the sign-in page still shows the "W" letter-mark. Ben: "why isn't the logo showing yet?"

Cause (read on the gateway)

  • /srv/idss/config/idss/brand-kit.json: Logo.Source = "brand/whakatohea-logo.jpeg", Logo.Bytes = null (same for LogoCircle). No such path exists under /srv/idss/config/.
  • #1705's fix (internal/idp/brand.go:167-177) inlines the logo as a data URL only when the kit carries bytes (logoDataURL(kit)); a path-only kit "keeps the letter-mark, unchanged". So it fixed the seam test's byte-carrying kit and not the kit founding actually writes.
  • Meanwhile the logo IS on the gateway and IS served: https://<apex>/brand/logo answers 200 image/jpeg 20,959 B (the control plane's brand doorway, off idss/brand/idp-login/logo in the config repo). The bridge just never points at it.

Fix (either, decide in the ticket)

  1. The bridge binds --oc-logo-full: url("https://<apex>/brand/logo") when the kit has no bytes — the apex origin is already known to it (issuer/apex facts) and the door already exists; or
  2. Founding + the panel's brand apply write the logo bytes INTO the kit file the bridge reads (Logo.Bytes), so the data-URL path fires. (1) is one line and keeps one source of truth; (2) duplicates 20 kB into JSON.
  • Either way: the page's .logo tile must render the image on a WHITE tile when the kit sets no logo background (the current tile paints the accent behind a transparent PNG).
  • Test with the kit founding actually writes (path, no bytes), not a hand-made byte-carrying one — the gap that let #1705 close without fixing this.

Found on the hand re-founding of Whakatōhea Demo 2026-09-22, release cef28743. Relates to #1705.

## What Ben saw After release `cef28743` (carries #1705) the sign-in page still shows the "W" letter-mark. Ben: "why isn't the logo showing yet?" ## Cause (read on the gateway) - `/srv/idss/config/idss/brand-kit.json`: `Logo.Source = "brand/whakatohea-logo.jpeg"`, `Logo.Bytes = null` (same for `LogoCircle`). No such path exists under `/srv/idss/config/`. - #1705's fix (`internal/idp/brand.go:167-177`) inlines the logo as a data URL **only when the kit carries bytes** (`logoDataURL(kit)`); a path-only kit "keeps the letter-mark, unchanged". So it fixed the seam test's byte-carrying kit and not the kit founding actually writes. - Meanwhile the logo IS on the gateway and IS served: `https://<apex>/brand/logo` answers 200 `image/jpeg` 20,959 B (the control plane's brand doorway, off `idss/brand/idp-login/logo` in the config repo). The bridge just never points at it. ## Fix (either, decide in the ticket) 1. The bridge binds `--oc-logo-full: url("https://<apex>/brand/logo")` when the kit has no bytes — the apex origin is already known to it (issuer/apex facts) and the door already exists; or 2. Founding + the panel's brand apply write the logo bytes INTO the kit file the bridge reads (`Logo.Bytes`), so the data-URL path fires. (1) is one line and keeps one source of truth; (2) duplicates 20 kB into JSON. - Either way: the page's `.logo` tile must render the image on a WHITE tile when the kit sets no logo background (the current tile paints the accent behind a transparent PNG). - Test with the kit founding actually writes (path, no bytes), not a hand-made byte-carrying one — the gap that let #1705 close without fixing this. Found on the hand re-founding of Whakatōhea Demo 2026-09-22, release `cef28743`. Relates to #1705.

swarm-claim host=matou-dev-server-01 run=29782
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=29782 (automated multi-host claim — lowest live claim id works this ticket)

Ruled by agent under ADR 0174 — veto anytime.

Decision: take Option 1 (the ticket's preferred one-source-of-truth fix). When the community kit carries a logo path but no bytes (the kit founding actually writes), the bridge binds --oc-logo-full: url("https://<apex>/brand/logo") — the served control-plane brand door that already answers 200 image/jpeg. The apex is the bridge's own apexFromIssuer(cfg.Issuer) fact; inlined kit bytes still win when present (#1705 path unchanged). The .logo tile also gains --oc-logo-bg (white when the kit sets no logo background) so the mark no longer sits on the accent.

Why two-way door: pure render-time change in internal/idp/brand.go, revertible by a later commit, proved by a seam test that uses the path-only kit founding writes (no bytes) — not a one-way door (no credentials, no security widening, no data destruction, no spend). Option 2 (duplicating 20 kB into JSON) is rejected as it forks the source of truth.

Ruled by agent under ADR 0174 — veto anytime. **Decision:** take **Option 1** (the ticket's preferred one-source-of-truth fix). When the community kit carries a logo **path but no bytes** (the kit founding actually writes), the bridge binds `--oc-logo-full: url("https://<apex>/brand/logo")` — the served control-plane brand door that already answers 200 image/jpeg. The apex is the bridge's own `apexFromIssuer(cfg.Issuer)` fact; inlined kit bytes still win when present (#1705 path unchanged). The `.logo` tile also gains `--oc-logo-bg` (white when the kit sets no logo background) so the mark no longer sits on the accent. **Why two-way door:** pure render-time change in `internal/idp/brand.go`, revertible by a later commit, proved by a seam test that uses the path-only kit founding writes (no bytes) — not a one-way door (no credentials, no security widening, no data destruction, no spend). Option 2 (duplicating 20 kB into JSON) is rejected as it forks the source of truth.

close-report for #1716 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1716,
  "status": "success",
  "commits": [
    "d608c80a"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/idp/brand.go",
    "internal/idp/brand_latebind_seam_test.go",
    "internal/idp/deviceapprove.go",
    "internal/idp/provider.go",
    "internal/idp/seam_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go vet ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go build ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Fix option 1: bridge binds --oc-logo-full to https://<apex>/brand/logo when the kit has no bytes": "internal/idp/brand.go logoURL() points a path-only kit at the served door using apexFromIssuer(cfg.Issuer); proven by TestSignInPage_PathOnlyKitPointsAtServedDoor and TestBrandSource_ServesLogoDoorForFoundingKit",
    "The .logo tile renders the image on a WHITE tile when the kit sets no logo background": "internal/idp/brand.go binds --oc-logo-bg (LogoCircle.Background if valid hex, else #ffffff); .logo CSS reads var(--oc-logo-bg, var(--oc-accent,...)); asserted in TestSignInPage_PathOnlyKitPointsAtServedDoor (--oc-logo-bg: #ffffff)",
    "Tested with the kit founding actually writes (path, no bytes), not a byte-carrying one": "TestSignInPage_PathOnlyKitPointsAtServedDoor and TestBrandSource_ServesLogoDoorForFoundingKit use brandkit.AssetRef{Source: \"brand/whakatohea-logo.jpeg\"} with nil Bytes"
  },
  "summary": "The IDIP sign-in page now points --oc-logo-full at the served https://<apex>/brand/logo door for a path-only kit, showing the community logo on a white tile instead of the letter-mark.",
  "reason": "",
  "blockers": []
}
**close-report** for #1716 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1716, "status": "success", "commits": [ "d608c80a" ], "changed_files": [ "STATUS.md", "internal/idp/brand.go", "internal/idp/brand_latebind_seam_test.go", "internal/idp/deviceapprove.go", "internal/idp/provider.go", "internal/idp/seam_test.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/idp/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go vet ./internal/idp/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go build ./...", "exit_code": 0 } ], "criteria": { "Fix option 1: bridge binds --oc-logo-full to https://<apex>/brand/logo when the kit has no bytes": "internal/idp/brand.go logoURL() points a path-only kit at the served door using apexFromIssuer(cfg.Issuer); proven by TestSignInPage_PathOnlyKitPointsAtServedDoor and TestBrandSource_ServesLogoDoorForFoundingKit", "The .logo tile renders the image on a WHITE tile when the kit sets no logo background": "internal/idp/brand.go binds --oc-logo-bg (LogoCircle.Background if valid hex, else #ffffff); .logo CSS reads var(--oc-logo-bg, var(--oc-accent,...)); asserted in TestSignInPage_PathOnlyKitPointsAtServedDoor (--oc-logo-bg: #ffffff)", "Tested with the kit founding actually writes (path, no bytes), not a byte-carrying one": "TestSignInPage_PathOnlyKitPointsAtServedDoor and TestBrandSource_ServesLogoDoorForFoundingKit use brandkit.AssetRef{Source: \"brand/whakatohea-logo.jpeg\"} with nil Bytes" }, "summary": "The IDIP sign-in page now points --oc-logo-full at the served https://<apex>/brand/logo door for a path-only kit, showing the community logo on a white tile instead of the letter-mark.", "reason": "", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#1716
No description provided.