Child spec: dashboard auth — the control panel sits behind the community door (DDR 0172) #511

Closed
opened 2026-08-14 05:21:51 +00:00 by ben · 2 comments
Owner

Parent

Wayfinder map #7 (OurCloud v1 program scope) — feature: dashboard-auth (DA). Child spec for #388's ruling ("Implement auth with kanidm. Non-admin users should not be able to access the control panel" — Ben, 2026-08-10, DDR 0155 batch), carried through the accepted design tier: DDR 0172 (the control panel sits behind the community door). The mechanism was decided long before the design tier: the identity-aware ingress's auth gate (ADR 0074/0076), kanidm as the IdP (ADR 0038/0105), the sign-in surface kanidm's own branded UI (DDRs 0145/0147/0148).

Design contract: docs/ux/flows/dashboard-auth.mermaid + docs/ux/wireframes/dashboard-auth/ (DA-S1 … DA-S3x, five frames; DA-S1 is a depiction of kanidm's surface, never a build contract) — flow, seams, and wireframes each confirmed by Ben (2026-08-13/14). CONTEXT.md holds the vocabulary: community session, and the DA door states (signed out / refused — operators only / in / session ended / signed out (completed)).

Problem Statement

The control panel carries no session at all. Anyone who can reach the dashboard's host — a browser on the public path, or a LAN neighbour who can reach the guest on the private path — sees the whole administration surface: fleet, members, backups, settings. The brand bar's "signed-in operator" is a hard-coded prop, and the chrome's Sign out (DDR 0155) routes to the IdP without any dashboard session to end. A community's most powerful surface is its least protected one.

Solution

Opening the control panel demands the community sign-in, on both paths. admin.<apex> sits behind the same auth gate that fronts service routes; kanidm's branded page is the one sign-in surface; a completed sign-in returns the browser where it was headed. Only operators get in: a plain member gets a small branded gate-served refusal page (never the panel's assets, never raw JSON), a suspended identity the same surface with its own copy. The brand bar names the real signed-in operator. Sign out ends the community session and kanidm's cookie and lands back at the panel's sign-in — the landing is the proof. A session dying under a loaded page (expiry, or a suspend's per-request rederive) rests in one honest full-screen frame. On the private path the app opens the panel through the CA-pinned app window so the OIDC ceremony completes with no cert warnings and no hosts-file surgery.

User Stories

  1. As an operator, I want opening any control-panel URL without a session to land me on the community sign-in, so that the panel is never served to an anonymous browser.

    • Given no community session, when a browser requests any admin.<apex> URL on the public path, then the auth gate answers 401 and the route redirects to the community IdP carrying the original URL as the return destination (rd), and no panel asset or control-plane fact is served.
    • Given the kanidm sign-in completes for an operator, when the gate establishes the community session, then the browser lands back at the exact URL it was headed to.
  2. As an operator on the private path, I want "open the dashboard" to go through the CA-pinned app window, so that the sign-in ceremony completes with no TLS interstitial and no printed ports.

    • Given a private-path community, when the operator opens the dashboard from Operator home, then an app window opens admin.<apex> with the community/gateway CA pinned and the apex labels resolved to the forwarded web port (the DDR 0163/0165 machinery, third tenant), and the kanidm sign-in renders inside it.
    • Given the ceremony completes inside the window, then the operator rests in the panel chrome in that window; the visible/copyable URL stays canonical (no port shown — DDR 0165's rule).
  3. As a community, I want a LAN neighbour who reaches the guest to meet the gate, so that network position grants nothing.

    • Given a browser that can reach the guest's front door but holds no community session, when it requests the admin route, then it is redirected to sign-in exactly as on the public path; the private front door's admin route carries the gate (amending ADR 0150 for this route only).
  4. As a plain member, I want an honest refusal instead of the panel or a blank, so that I know where I stand and where to go.

    • Given a signed-in plain member, when they request any admin URL, then the gate answers 403 and the front door serves the gate's branded refusal page: their identity named, "The control panel is for operators." stated plainly, two doors — the community portal and Sign out (wireframe DA-S2: refusal-line, signed-in-identity, where-to-go, open-portal, sign-out, data-status="refused").
    • Then the panel's SPA assets are never served to a non-operator, and raw JSON is never rendered to a browser.
    • Re-sign-in is not offered: a 403 is not redirected to the IdP (the gate's existing rule — signing in again cannot clear a deny).
  5. As a suspended person, I want the refusal to say my access is paused without stranding or shaming me, so the one-switch promise is honest.

    • Given a signed-in identity whose suspension has landed in the deny projection, when they request any admin URL, then the same refusal surface renders with the paused copy and a single door, Sign out (DA-S2x; data-status="refused-suspended"); no portal door (it would open onto another refusal) and no reason on screen (the P6-S5x ruling — the reason lives in the audit log).
  6. As an operator, I want the brand bar to name the real signed-in me, so the chrome never lies.

    • Given a signed-in operator, when any dashboard page renders, then the chrome's signed-in-operator label carries the identity the gate echoed on the request, and the static prop default is retired.
  7. As an operator, I want Sign out to actually complete, so a shared or walked-away-from browser holds nothing.

    • Given a signed-in operator, when the chrome's sign-out intent fires, then the gate clears the community session, chains kanidm's session end, and returns the browser to admin.<apex> — which, having no session, redirects to the community sign-in. The landing is the proof.
    • Given the signed-out browser, when it requests any admin URL or service route, then no residual session admits it.
    • This works identically inside the private path's app window.
  8. As an operator whose session expired mid-session, I want the loaded panel to say so honestly, so I never act on stale numbers.

    • Given a loaded panel whose session has expired, when the next control-plane call answers 401, then the panel replaces everything with the session-ended frame (DA-S3: data-status="session-ended", headline, what-it-means, one action sign-in-again) — the DDR 0096 posture; nothing greyed, nothing stale.
    • Given the operator chooses Sign in again, when the round trip completes, then they land back on the page they were on.
  9. As a community, I want a suspended operator's session to die with the suspend, so suspension is instant at the panel too.

    • Given a signed-in operator suspended from member detail, when their panel makes its next request, then the gate's per-request rederive (ADR 0078 §5) answers 403 and the loaded panel rests in the suspended variant (DA-S3x: refusal copy, sign-out the only action, Sign in again absent).
  10. As an operator, I want service routes and sync clients unaffected, so gating the panel breaks nothing else.

    • Given the private front door, when the render lands, then service routes remain ungated there (ADR 0150 stands outside the admin route) and client-protocol exempt paths (ADR 0074) are untouched on the public path.
  11. As a founding operator, I want the gate's OIDC client provisioned at founding, so the panel is gated from the community's first breath.

    • Given a fresh founding (either path), when the seed lands, then kanidm holds the auth gate's OAuth2 client (ADR 0074's seed) and the gated admin route is live before the hand-off; first-open of the dashboard demands sign-in.
  12. As a member denied at a service's front door, I want the same honest refusal surface, so no browser anywhere sees raw JSON.

    • Given a signed-in member denied a matrix-restricted service (ADR 0076), when the gate answers 403, then the front door serves the same branded refusal surface with service-appropriate copy in place of the copied-through JSON verdict.
  13. As an operator, I want the refused and session-ended surfaces to wear the community's brand, so even the closed door is ours.

    • Given any DA surface renders, then it carries the community logo (uploaded mark, letter-mark fallback — DDR 0151) and the kit's voice; the sign-in surface itself stays kanidm's branded page (CSS/logo/name ours; HTML/copy kanidm's — never a second login screen).

Implementation Decisions

  • One gate, one place. The existing auth gate (the control plane's forward-auth endpoint) is the sole enforcement point; the panel performs no auth of its own. The gate's brain answers operators-only for the admin target — the operator role is a kanidm group, never shown among komiti (ADR 0076).
  • The gate grows the named substrate ADR 0074 promised: the gate-as-OIDC-client leg (PKCE against loopback kanidm) that establishes the community session and consumes the rd return destination; a sign-out endpoint that clears the session and chains kanidm's session end; and the branded refusal page render. Session state is the gate's alone (CONTEXT.md: community session).
  • Both front-door renders change (the dual-render hazard): the public render's admin route gains the forward_auth block + 401 redirect (the service-route template applied to the dashboard's host); the private render gains the admin route's gate while its service routes stay ungated. The 403 handling becomes the refusal surface on both, replacing copied-through JSON.
  • Identity flows one way: the gate echoes the resolved identity on the established header; the route copies it onto the backend request; the served dashboard read carries it to the SPA for the chrome's label. The control plane trusts that header only from its own front door.
  • The app shell's "open the dashboard" becomes the CA-pinned window's third tenant (ceremony → service doors → panel) on the private path; the public path keeps the OS browser.
  • Founding's seed declares the OAuth2 clients (auth gate; per ADR 0074's founding consequence) so the gate works from first stand-up on both paths.
  • No second login screen: all sign-in UI is kanidm's branded page; the panel and gate only redirect to it and consume its outcome.
  • kanidm session-end mechanics: the behavioural contract is fixed (a signed-out browser lands at sign-in; no residual session); whether that is OIDC RP-initiated logout or kanidm's own logout route is the implementer's to verify against the pinned kanidm — the contract, not the mechanism, is the acceptance bar.

Testing Decisions

Test external behaviour at the four seams Ben confirmed (2026-08-13); prefer extending each seam's existing suite, no new test infrastructure:

  • Front-door render seam (the clan render tests): byte-pin the admin route behind forward_auth in BOTH renders; pin the private render's service routes staying ungated; pin the 403 → refusal-surface wiring. Prior art: the existing front-door route/gate-redirect render tests (#363's suite).
  • Auth gate seam (the control-api gate tests): the OIDC-client leg against an httptest fake IdP (session established, rd honoured); 401 vs 403 discipline; operators-only decision via the injected gate-brain fake; sign-out clearing the session and chaining the IdP end; refusal page served with identity named. Prior art: the existing auth-gate seam tests with fakes (ADR 0100 — fakes are strictly a testing seam).
  • Served-entry unit seam (the dashboard serve-entry tests): the chrome label fed from the served identity (prop retired); first-401 → session-ended frame; 403 → suspended variant; sign-in-again / sign-out intent wiring. Prior art: the existing serve-entry suite (DDR 0155's sign-out tests).
  • The live e2e drive carries the whole-journey proof: the drive reaches the panel by activating the door the app actually shows (CDP through the CA-pinned window), asserts sign-in is demanded first, signs in, asserts the real identity in the chrome, signs out, asserts the landing — the DDR 0165 drive-hardening posture (never rebuild URLs the app didn't show).

A good test asserts the behaviour a person or browser observes (redirects, served pages, rendered states), never the gate's internals.

Out of Scope

  • Session-lifetime knobs — the gate session and kanidm cookie ride their defaults; no settings surface (Ben, 2026-08-13).
  • Panel-specific credential policy — the founding floor stays any; passkeys offered-not-required (ADR 0170).
  • Sign-in history / audit surface — sign-ins land in the cross-cutting logs (ADR 0027) only.
  • The refused member's onward journey — the refusal page's portal door is a link; where a member lands and lives is #366's slice.
  • #425's first-contact cert warning — designed against, not re-solved: the CA-pinned window pattern is consumed here, its live sign-off rides the rehearsal drives.

Further Notes

  • The suspend gate on this surface is the panel-facing half of ADR 0074's instant-kill promise; nothing here adds a new suspension mechanism.
  • DA-S1 (da-s1-community-sign-in.html) is a depiction: design-verify must not match built-UI elements against it (the page is kanidm's). The other four frames are the literal data-field/data-action/data-status contract.
  • Beware the auto-close hazard: never write "closes #388" in commit prose; the spec's landing is not the feature's landing.
## Parent Wayfinder map #7 (OurCloud v1 program scope) — feature: **dashboard-auth** (DA). Child spec for #388's ruling ("Implement auth with kanidm. Non-admin users should not be able to access the control panel" — Ben, 2026-08-10, DDR 0155 batch), carried through the accepted design tier: **DDR 0172** (the control panel sits behind the community door). The mechanism was decided long before the design tier: the identity-aware ingress's auth gate (ADR 0074/0076), kanidm as the IdP (ADR 0038/0105), the sign-in surface kanidm's own branded UI (DDRs 0145/0147/0148). Design contract: `docs/ux/flows/dashboard-auth.mermaid` + `docs/ux/wireframes/dashboard-auth/` (DA-S1 … DA-S3x, five frames; DA-S1 is a **depiction** of kanidm's surface, never a build contract) — flow, seams, and wireframes each confirmed by Ben (2026-08-13/14). CONTEXT.md holds the vocabulary: **community session**, and the DA door states (signed out / refused — operators only / in / session ended / signed out (completed)). ## Problem Statement The control panel carries no session at all. Anyone who can reach the dashboard's host — a browser on the public path, or a LAN neighbour who can reach the guest on the private path — sees the whole administration surface: fleet, members, backups, settings. The brand bar's "signed-in operator" is a hard-coded prop, and the chrome's Sign out (DDR 0155) routes to the IdP without any dashboard session to end. A community's most powerful surface is its least protected one. ## Solution Opening the control panel demands the community sign-in, on both paths. `admin.<apex>` sits behind the same auth gate that fronts service routes; kanidm's branded page is the one sign-in surface; a completed sign-in returns the browser where it was headed. Only operators get in: a plain member gets a small branded gate-served refusal page (never the panel's assets, never raw JSON), a suspended identity the same surface with its own copy. The brand bar names the real signed-in operator. Sign out ends the community session and kanidm's cookie and lands back at the panel's sign-in — the landing is the proof. A session dying under a loaded page (expiry, or a suspend's per-request rederive) rests in one honest full-screen frame. On the private path the app opens the panel through the CA-pinned app window so the OIDC ceremony completes with no cert warnings and no hosts-file surgery. ## User Stories 1. **As an operator, I want opening any control-panel URL without a session to land me on the community sign-in**, so that the panel is never served to an anonymous browser. - Given no community session, when a browser requests any `admin.<apex>` URL on the public path, then the auth gate answers 401 and the route redirects to the community IdP carrying the original URL as the return destination (`rd`), and no panel asset or control-plane fact is served. - Given the kanidm sign-in completes for an operator, when the gate establishes the community session, then the browser lands back at the exact URL it was headed to. 2. **As an operator on the private path, I want "open the dashboard" to go through the CA-pinned app window**, so that the sign-in ceremony completes with no TLS interstitial and no printed ports. - Given a private-path community, when the operator opens the dashboard from Operator home, then an app window opens `admin.<apex>` with the community/gateway CA pinned and the apex labels resolved to the forwarded web port (the DDR 0163/0165 machinery, third tenant), and the kanidm sign-in renders inside it. - Given the ceremony completes inside the window, then the operator rests in the panel chrome in that window; the visible/copyable URL stays canonical (no port shown — DDR 0165's rule). 3. **As a community, I want a LAN neighbour who reaches the guest to meet the gate**, so that network position grants nothing. - Given a browser that can reach the guest's front door but holds no community session, when it requests the admin route, then it is redirected to sign-in exactly as on the public path; the private front door's admin route carries the gate (amending ADR 0150 for this route only). 4. **As a plain member, I want an honest refusal instead of the panel or a blank**, so that I know where I stand and where to go. - Given a signed-in plain member, when they request any admin URL, then the gate answers 403 and the front door serves the gate's branded refusal page: their identity named, "The control panel is for operators." stated plainly, two doors — the community portal and Sign out (wireframe DA-S2: `refusal-line`, `signed-in-identity`, `where-to-go`, `open-portal`, `sign-out`, `data-status="refused"`). - Then the panel's SPA assets are never served to a non-operator, and raw JSON is never rendered to a browser. - Re-sign-in is not offered: a 403 is not redirected to the IdP (the gate's existing rule — signing in again cannot clear a deny). 5. **As a suspended person, I want the refusal to say my access is paused without stranding or shaming me**, so the one-switch promise is honest. - Given a signed-in identity whose suspension has landed in the deny projection, when they request any admin URL, then the same refusal surface renders with the paused copy and a single door, Sign out (DA-S2x; `data-status="refused-suspended"`); no portal door (it would open onto another refusal) and no reason on screen (the P6-S5x ruling — the reason lives in the audit log). 6. **As an operator, I want the brand bar to name the real signed-in me**, so the chrome never lies. - Given a signed-in operator, when any dashboard page renders, then the chrome's `signed-in-operator` label carries the identity the gate echoed on the request, and the static prop default is retired. 7. **As an operator, I want Sign out to actually complete**, so a shared or walked-away-from browser holds nothing. - Given a signed-in operator, when the chrome's `sign-out` intent fires, then the gate clears the community session, chains kanidm's session end, and returns the browser to `admin.<apex>` — which, having no session, redirects to the community sign-in. The landing is the proof. - Given the signed-out browser, when it requests any admin URL or service route, then no residual session admits it. - This works identically inside the private path's app window. 8. **As an operator whose session expired mid-session, I want the loaded panel to say so honestly**, so I never act on stale numbers. - Given a loaded panel whose session has expired, when the next control-plane call answers 401, then the panel replaces everything with the session-ended frame (DA-S3: `data-status="session-ended"`, headline, `what-it-means`, one action `sign-in-again`) — the DDR 0096 posture; nothing greyed, nothing stale. - Given the operator chooses Sign in again, when the round trip completes, then they land back on the page they were on. 9. **As a community, I want a suspended operator's session to die with the suspend**, so suspension is instant at the panel too. - Given a signed-in operator suspended from member detail, when their panel makes its next request, then the gate's per-request rederive (ADR 0078 §5) answers 403 and the loaded panel rests in the suspended variant (DA-S3x: refusal copy, `sign-out` the only action, Sign in again absent). 10. **As an operator, I want service routes and sync clients unaffected**, so gating the panel breaks nothing else. - Given the private front door, when the render lands, then service routes remain ungated there (ADR 0150 stands outside the admin route) and client-protocol exempt paths (ADR 0074) are untouched on the public path. 11. **As a founding operator, I want the gate's OIDC client provisioned at founding**, so the panel is gated from the community's first breath. - Given a fresh founding (either path), when the seed lands, then kanidm holds the auth gate's OAuth2 client (ADR 0074's seed) and the gated admin route is live before the hand-off; first-open of the dashboard demands sign-in. 12. **As a member denied at a service's front door, I want the same honest refusal surface**, so no browser anywhere sees raw JSON. - Given a signed-in member denied a matrix-restricted service (ADR 0076), when the gate answers 403, then the front door serves the same branded refusal surface with service-appropriate copy in place of the copied-through JSON verdict. 13. **As an operator, I want the refused and session-ended surfaces to wear the community's brand**, so even the closed door is ours. - Given any DA surface renders, then it carries the community logo (uploaded mark, letter-mark fallback — DDR 0151) and the kit's voice; the sign-in surface itself stays kanidm's branded page (CSS/logo/name ours; HTML/copy kanidm's — never a second login screen). ## Implementation Decisions - **One gate, one place.** The existing auth gate (the control plane's forward-auth endpoint) is the sole enforcement point; the panel performs no auth of its own. The gate's brain answers operators-only for the admin target — the operator role is a kanidm group, never shown among komiti (ADR 0076). - **The gate grows the named substrate ADR 0074 promised**: the gate-as-OIDC-client leg (PKCE against loopback kanidm) that establishes the community session and consumes the `rd` return destination; a sign-out endpoint that clears the session and chains kanidm's session end; and the branded refusal page render. Session state is the gate's alone (CONTEXT.md: community session). - **Both front-door renders change (the dual-render hazard):** the public render's admin route gains the `forward_auth` block + 401 redirect (the service-route template applied to the dashboard's host); the private render gains the admin route's gate while its service routes stay ungated. The 403 handling becomes the refusal surface on both, replacing copied-through JSON. - **Identity flows one way**: the gate echoes the resolved identity on the established header; the route copies it onto the backend request; the served dashboard read carries it to the SPA for the chrome's label. The control plane trusts that header only from its own front door. - **The app shell's "open the dashboard" becomes the CA-pinned window's third tenant** (ceremony → service doors → panel) on the private path; the public path keeps the OS browser. - **Founding's seed declares the OAuth2 clients** (auth gate; per ADR 0074's founding consequence) so the gate works from first stand-up on both paths. - **No second login screen**: all sign-in UI is kanidm's branded page; the panel and gate only redirect to it and consume its outcome. - **kanidm session-end mechanics**: the behavioural contract is fixed (a signed-out browser lands at sign-in; no residual session); whether that is OIDC RP-initiated logout or kanidm's own logout route is the implementer's to verify against the pinned kanidm — the contract, not the mechanism, is the acceptance bar. ## Testing Decisions Test external behaviour at the four seams Ben confirmed (2026-08-13); prefer extending each seam's existing suite, no new test infrastructure: - **Front-door render seam** (the clan render tests): byte-pin the admin route behind `forward_auth` in BOTH renders; pin the private render's service routes staying ungated; pin the 403 → refusal-surface wiring. Prior art: the existing front-door route/gate-redirect render tests (#363's suite). - **Auth gate seam** (the control-api gate tests): the OIDC-client leg against an httptest fake IdP (session established, `rd` honoured); 401 vs 403 discipline; operators-only decision via the injected gate-brain fake; sign-out clearing the session and chaining the IdP end; refusal page served with identity named. Prior art: the existing auth-gate seam tests with fakes (ADR 0100 — fakes are strictly a testing seam). - **Served-entry unit seam** (the dashboard serve-entry tests): the chrome label fed from the served identity (prop retired); first-401 → session-ended frame; 403 → suspended variant; `sign-in-again` / `sign-out` intent wiring. Prior art: the existing serve-entry suite (DDR 0155's sign-out tests). - **The live e2e drive carries the whole-journey proof**: the drive reaches the panel by activating the door the app actually shows (CDP through the CA-pinned window), asserts sign-in is demanded first, signs in, asserts the real identity in the chrome, signs out, asserts the landing — the DDR 0165 drive-hardening posture (never rebuild URLs the app didn't show). A good test asserts the behaviour a person or browser observes (redirects, served pages, rendered states), never the gate's internals. ## Out of Scope - **Session-lifetime knobs** — the gate session and kanidm cookie ride their defaults; no settings surface (Ben, 2026-08-13). - **Panel-specific credential policy** — the founding floor stays `any`; passkeys offered-not-required (ADR 0170). - **Sign-in history / audit surface** — sign-ins land in the cross-cutting logs (ADR 0027) only. - **The refused member's onward journey** — the refusal page's portal door is a link; where a member lands and lives is #366's slice. - **#425's first-contact cert warning** — designed against, not re-solved: the CA-pinned window pattern is consumed here, its live sign-off rides the rehearsal drives. ## Further Notes - The suspend gate on this surface is the panel-facing half of ADR 0074's instant-kill promise; nothing here adds a new suspension mechanism. - DA-S1 (`da-s1-community-sign-in.html`) is a depiction: design-verify must not match built-UI elements against it (the page is kanidm's). The other four frames are the literal `data-field`/`data-action`/`data-status` contract. - Beware the auto-close hazard: never write "closes #388" in commit prose; the spec's landing is not the feature's landing.
Author
Owner

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

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

close-report for #511 — status blocked

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

envelope
{
  "issue": 511,
  "status": "blocked",
  "commits": [
    "5f82af1e59acc4768060d109581928040b031329"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/frontdoor.go",
    "internal/clan/frontdoor_private_test.go",
    "internal/clan/frontdoor_test.go",
    "internal/controlapi/authgate_test.go",
    "internal/controlapi/refusal.go",
    "internal/controlapi/refusal_test.go",
    "internal/member/komiti.go",
    "internal/member/komiti_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/member/ ./internal/controlapi/ ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go build ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Story 1 — opening any admin URL without a session lands on the community sign-in (401 redirect carrying rd; no panel asset served)": "PARTIAL (render seam): internal/clan/frontdoor.go renderAdminRoute puts admin.<apex> behind the forward_auth template; on the gate's 401 renderGateRedirect redirects to https://<IDPHost>/?rd={scheme}://{host}{uri} (302) BEFORE the reverse_proxy runs, so no panel asset is served anonymously. Test TestRenderFrontDoor_AdminPanelIsGatedAndOperatorsOnly pins the @unauth 401 handle_response, the IdP redirect, and the rd carriage. DEFERRED: the gate-as-OIDC-client leg that actually ESTABLISHES the community session and consumes rd to land the browser back (blocker 1).",
    "Story 2 — private path opens the dashboard through the CA-pinned app window": "DEFERRED (blocker 3): the app's CA-pinned-window 'open the dashboard' third tenant is app-side (Electron) work not built this run. The render half is present — the private render gates admin.<apex> (below).",
    "Story 3 — a LAN neighbour reaching the guest meets the gate (private path admin route gated)": "internal/clan/frontdoor.go: renderPrivateCaddy now calls renderAdminRoute so admin.<apex> gates on the private path exactly as the public one (forward_auth naming admin, 401->IdP redirect), while service routes stay ungated (ADR 0150). Test TestRenderPrivateFrontDoor_AdminPanelIsGatedWhileServiceRoutesStayUngated.",
    "Story 4 — a plain member gets the branded refusal (DA-S2: refusal-line, signed-in-identity, where-to-go, open-portal, sign-out, data-status=refused); SPA assets never served, no raw JSON; 403 not redirected": "BUILT: member/komiti.go GateDecision answers the AdminService operators-only (plain member -> GateReasonOperatorsOnly); controlapi/refusal.go renders the DA-S2 surface (data-status=refused, 'The control panel is for operators.', where-to-go, portal + sign-out); the auth gate content-negotiates it for a browser deny (403+HTML) and keeps JSON for machines, and a 403 is copied through, never redirected (frontdoor.go renderGateRedirect only matches 401). Tests: TestGateDecision_AdminPanelIsOperatorsOnly, TestRenderRefusalSurface_OperatorsOnlyPanel, TestAuthGate_OperatorsOnlyPanelRendersBrandedRefusal (asserts 403+HTML+identity, operator->204, no raw JSON, no re-sign-in).",
    "Story 5 — a suspended identity gets the paused refusal (DA-S2x, sign-out only, no reason on screen)": "GATE SEAM built (existing + this run): GateDecision refuses a suspended identity ahead of the AdminService check with the suspended reason; refusal.go DA-S2x (built #514) renders one door, no portal, no reason on screen. Test TestGateDecision_AdminPanelIsOperatorsOnly asserts a suspended operator wears the suspended reason, not operators-only.",
    "Story 6 — the brand bar names the real signed-in operator (prop retired)": "PARTIAL: the render carries the identity to the panel — the admin route sets copy_headers X-Ourcloud-Identity so the gate-echoed identity reaches the control plane (frontdoor.go; test asserts it). DEFERRED: the SPA chrome consuming that served identity for the signed-in-operator label and retiring the static prop is dashboard (Vue) work not built this run (blocker 2).",
    "Story 7 — Sign out ends the community session + chains kanidm's session end; landing at sign-in is the proof": "DEFERRED (blocker 1): the gate's sign-out endpoint (clear the community session, chain the IdP end) is part of the gate's OIDC-client/session leg not built this run.",
    "Story 8 — session expired mid-session -> the loaded panel shows the session-ended frame (DA-S3)": "DEFERRED (blocker 2): the SPA session-ended frame (first-401 -> DA-S3, sign-in-again) is dashboard work not built this run.",
    "Story 9 — a suspended operator's loaded session dies with the suspend (DA-S3x)": "DEFERRED (blocker 2): the gate's per-request rederive already answers 403 for a suspended operator (member GateDecision, unchanged); the SPA rendering the DA-S3x suspended variant on that 403 is dashboard work not built this run.",
    "Story 10 — service routes and sync clients unaffected": "internal/clan/frontdoor.go: the admin route is additive — service routes keep their forward_auth/exempt-path template unchanged on the public path, and stay ungated on the private path (ADR 0150). Existing frontdoor tests (service-route gated, exempt-paths-bypass, private files ungated) stay green; the private admin test also asserts @files stays ungated.",
    "Story 11 — the gate's OIDC client provisioned at founding": "DEFERRED (blocker 1): founding's seed declaring the auth gate's OAuth2 client (seedcommunity) is not built this run.",
    "Story 12 — a member denied at a service's front door gets the same branded refusal surface": "BUILT (#514, standing): the service-scoped matrix refusal (FM-S2x refused-service) is the same gate-served branded surface, service-appropriate copy in place of raw JSON; unchanged this run.",
    "Story 13 — the refused/session-ended surfaces wear the community brand; sign-in stays kanidm's page": "PARTIAL: the refusal surface (incl. the new DA-S2) carries the community logo slot (data-field=community-logo) + voice + doors from RefusalBrand; the auth-gate test asserts the community name renders on the DA-S2 surface. The session-ended surfaces (DA-S3/DA-S3x) are the deferred SPA tail (blocker 2). The sign-in surface stays kanidm's page (the render only redirects to the @idp route, unchanged)."
  },
  "summary": "Landed the 'one gate, one place' backbone of dashboard-auth (DDR 0172) across the three unit-testable seams — the gate's operators-only decision for admin.<apex>, the DA-S2 branded refusal, and the dual-render gating of admin.<apex> on both paths — all green on origin/main; full spec completion is blocked on the gate's OIDC-client/session/sign-out leg, the SPA session-ended frames, the app window, and founding's seed.",
  "reason": "The three unit-testable seams named in the spec's Testing Decisions (front-door render + auth gate + refusal render) are delivered, tested, and on origin/main: the control panel is now gated operators-only at admin.<apex> on both renders, refusing plain members with the DA-S2 surface and suspended identities with DA-S2x. Full spec completion needs work this single iteration cannot responsibly land as one slice: (1) the gate must GROW its OIDC-client leg — PKCE against loopback kanidm to establish the community session and consume rd, plus a sign-out endpoint that chains kanidm's session end (stories 1-establish/7) and founding's OAuth2-client seed (story 11); (2) the dashboard SPA must feed the chrome operator label from the served identity and render the session-ended/suspended frames DA-S3/DA-S3x on a mid-session 401/403 (stories 6/8/9); (3) the app's CA-pinned-window 'open the dashboard' third tenant is app-side (story 2); (4) the live e2e whole-journey drive. Handing the OIDC-leg / SPA-frames / app-window / seed tail to a human to split and schedule.",
  "blockers": [
    "The gate's OIDC-client leg is not built: PKCE against loopback kanidm to establish the community session + consume rd (story 1 establish), the sign-out endpoint chaining kanidm's session end (story 7), and founding's OAuth2-client seed (story 11). This is the gate's authentication half; this slice built the ingress redirect + authorization decision it hands off to.",
    "The SPA (dashboard, Vue) tail is not built: the chrome operator label fed from the served X-Ourcloud-Identity (story 6, prop retired) and the session-ended / suspended-by-suspend frames DA-S3 / DA-S3x on a mid-session 401/403 (stories 8/9).",
    "The app's CA-pinned-window 'open the dashboard' third tenant (story 2) and the live e2e whole-journey drive are not built (app-side + live-infra)."
  ]
}
**close-report** for #511 — status `blocked` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 511, "status": "blocked", "commits": [ "5f82af1e59acc4768060d109581928040b031329" ], "changed_files": [ "STATUS.md", "internal/clan/frontdoor.go", "internal/clan/frontdoor_private_test.go", "internal/clan/frontdoor_test.go", "internal/controlapi/authgate_test.go", "internal/controlapi/refusal.go", "internal/controlapi/refusal_test.go", "internal/member/komiti.go", "internal/member/komiti_test.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/member/ ./internal/controlapi/ ./internal/clan/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go build ./...", "exit_code": 0 } ], "criteria": { "Story 1 — opening any admin URL without a session lands on the community sign-in (401 redirect carrying rd; no panel asset served)": "PARTIAL (render seam): internal/clan/frontdoor.go renderAdminRoute puts admin.<apex> behind the forward_auth template; on the gate's 401 renderGateRedirect redirects to https://<IDPHost>/?rd={scheme}://{host}{uri} (302) BEFORE the reverse_proxy runs, so no panel asset is served anonymously. Test TestRenderFrontDoor_AdminPanelIsGatedAndOperatorsOnly pins the @unauth 401 handle_response, the IdP redirect, and the rd carriage. DEFERRED: the gate-as-OIDC-client leg that actually ESTABLISHES the community session and consumes rd to land the browser back (blocker 1).", "Story 2 — private path opens the dashboard through the CA-pinned app window": "DEFERRED (blocker 3): the app's CA-pinned-window 'open the dashboard' third tenant is app-side (Electron) work not built this run. The render half is present — the private render gates admin.<apex> (below).", "Story 3 — a LAN neighbour reaching the guest meets the gate (private path admin route gated)": "internal/clan/frontdoor.go: renderPrivateCaddy now calls renderAdminRoute so admin.<apex> gates on the private path exactly as the public one (forward_auth naming admin, 401->IdP redirect), while service routes stay ungated (ADR 0150). Test TestRenderPrivateFrontDoor_AdminPanelIsGatedWhileServiceRoutesStayUngated.", "Story 4 — a plain member gets the branded refusal (DA-S2: refusal-line, signed-in-identity, where-to-go, open-portal, sign-out, data-status=refused); SPA assets never served, no raw JSON; 403 not redirected": "BUILT: member/komiti.go GateDecision answers the AdminService operators-only (plain member -> GateReasonOperatorsOnly); controlapi/refusal.go renders the DA-S2 surface (data-status=refused, 'The control panel is for operators.', where-to-go, portal + sign-out); the auth gate content-negotiates it for a browser deny (403+HTML) and keeps JSON for machines, and a 403 is copied through, never redirected (frontdoor.go renderGateRedirect only matches 401). Tests: TestGateDecision_AdminPanelIsOperatorsOnly, TestRenderRefusalSurface_OperatorsOnlyPanel, TestAuthGate_OperatorsOnlyPanelRendersBrandedRefusal (asserts 403+HTML+identity, operator->204, no raw JSON, no re-sign-in).", "Story 5 — a suspended identity gets the paused refusal (DA-S2x, sign-out only, no reason on screen)": "GATE SEAM built (existing + this run): GateDecision refuses a suspended identity ahead of the AdminService check with the suspended reason; refusal.go DA-S2x (built #514) renders one door, no portal, no reason on screen. Test TestGateDecision_AdminPanelIsOperatorsOnly asserts a suspended operator wears the suspended reason, not operators-only.", "Story 6 — the brand bar names the real signed-in operator (prop retired)": "PARTIAL: the render carries the identity to the panel — the admin route sets copy_headers X-Ourcloud-Identity so the gate-echoed identity reaches the control plane (frontdoor.go; test asserts it). DEFERRED: the SPA chrome consuming that served identity for the signed-in-operator label and retiring the static prop is dashboard (Vue) work not built this run (blocker 2).", "Story 7 — Sign out ends the community session + chains kanidm's session end; landing at sign-in is the proof": "DEFERRED (blocker 1): the gate's sign-out endpoint (clear the community session, chain the IdP end) is part of the gate's OIDC-client/session leg not built this run.", "Story 8 — session expired mid-session -> the loaded panel shows the session-ended frame (DA-S3)": "DEFERRED (blocker 2): the SPA session-ended frame (first-401 -> DA-S3, sign-in-again) is dashboard work not built this run.", "Story 9 — a suspended operator's loaded session dies with the suspend (DA-S3x)": "DEFERRED (blocker 2): the gate's per-request rederive already answers 403 for a suspended operator (member GateDecision, unchanged); the SPA rendering the DA-S3x suspended variant on that 403 is dashboard work not built this run.", "Story 10 — service routes and sync clients unaffected": "internal/clan/frontdoor.go: the admin route is additive — service routes keep their forward_auth/exempt-path template unchanged on the public path, and stay ungated on the private path (ADR 0150). Existing frontdoor tests (service-route gated, exempt-paths-bypass, private files ungated) stay green; the private admin test also asserts @files stays ungated.", "Story 11 — the gate's OIDC client provisioned at founding": "DEFERRED (blocker 1): founding's seed declaring the auth gate's OAuth2 client (seedcommunity) is not built this run.", "Story 12 — a member denied at a service's front door gets the same branded refusal surface": "BUILT (#514, standing): the service-scoped matrix refusal (FM-S2x refused-service) is the same gate-served branded surface, service-appropriate copy in place of raw JSON; unchanged this run.", "Story 13 — the refused/session-ended surfaces wear the community brand; sign-in stays kanidm's page": "PARTIAL: the refusal surface (incl. the new DA-S2) carries the community logo slot (data-field=community-logo) + voice + doors from RefusalBrand; the auth-gate test asserts the community name renders on the DA-S2 surface. The session-ended surfaces (DA-S3/DA-S3x) are the deferred SPA tail (blocker 2). The sign-in surface stays kanidm's page (the render only redirects to the @idp route, unchanged)." }, "summary": "Landed the 'one gate, one place' backbone of dashboard-auth (DDR 0172) across the three unit-testable seams — the gate's operators-only decision for admin.<apex>, the DA-S2 branded refusal, and the dual-render gating of admin.<apex> on both paths — all green on origin/main; full spec completion is blocked on the gate's OIDC-client/session/sign-out leg, the SPA session-ended frames, the app window, and founding's seed.", "reason": "The three unit-testable seams named in the spec's Testing Decisions (front-door render + auth gate + refusal render) are delivered, tested, and on origin/main: the control panel is now gated operators-only at admin.<apex> on both renders, refusing plain members with the DA-S2 surface and suspended identities with DA-S2x. Full spec completion needs work this single iteration cannot responsibly land as one slice: (1) the gate must GROW its OIDC-client leg — PKCE against loopback kanidm to establish the community session and consume rd, plus a sign-out endpoint that chains kanidm's session end (stories 1-establish/7) and founding's OAuth2-client seed (story 11); (2) the dashboard SPA must feed the chrome operator label from the served identity and render the session-ended/suspended frames DA-S3/DA-S3x on a mid-session 401/403 (stories 6/8/9); (3) the app's CA-pinned-window 'open the dashboard' third tenant is app-side (story 2); (4) the live e2e whole-journey drive. Handing the OIDC-leg / SPA-frames / app-window / seed tail to a human to split and schedule.", "blockers": [ "The gate's OIDC-client leg is not built: PKCE against loopback kanidm to establish the community session + consume rd (story 1 establish), the sign-out endpoint chaining kanidm's session end (story 7), and founding's OAuth2-client seed (story 11). This is the gate's authentication half; this slice built the ingress redirect + authorization decision it hands off to.", "The SPA (dashboard, Vue) tail is not built: the chrome operator label fed from the served X-Ourcloud-Identity (story 6, prop retired) and the session-ended / suspended-by-suspend frames DA-S3 / DA-S3x on a mid-session 401/403 (stories 8/9).", "The app's CA-pinned-window 'open the dashboard' third tenant (story 2) and the live e2e whole-journey drive are not built (app-side + live-infra)." ] } ``` </details>
ben closed this issue 2026-08-14 07:54:39 +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#511
No description provided.