Child spec: dashboard auth — the control panel sits behind the community door (DDR 0172) #511
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#511
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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.
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.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.
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.As a community, I want a LAN neighbour who reaches the guest to meet the gate, so that network position grants nothing.
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.
refusal-line,signed-in-identity,where-to-go,open-portal,sign-out,data-status="refused").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.
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).As an operator, I want the brand bar to name the real signed-in me, so the chrome never lies.
signed-in-operatorlabel carries the identity the gate echoed on the request, and the static prop default is retired.As an operator, I want Sign out to actually complete, so a shared or walked-away-from browser holds nothing.
sign-outintent fires, then the gate clears the community session, chains kanidm's session end, and returns the browser toadmin.<apex>— which, having no session, redirects to the community sign-in. The landing is the proof.As an operator whose session expired mid-session, I want the loaded panel to say so honestly, so I never act on stale numbers.
data-status="session-ended", headline,what-it-means, one actionsign-in-again) — the DDR 0096 posture; nothing greyed, nothing stale.As a community, I want a suspended operator's session to die with the suspend, so suspension is instant at the panel too.
sign-outthe only action, Sign in again absent).As an operator, I want service routes and sync clients unaffected, so gating the panel breaks nothing else.
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.
As a member denied at a service's front door, I want the same honest refusal surface, so no browser anywhere sees raw JSON.
As an operator, I want the refused and session-ended surfaces to wear the community's brand, so even the closed door is ours.
Implementation Decisions
rdreturn 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).forward_authblock + 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.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:
forward_authin 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).rdhonoured); 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).sign-in-again/sign-outintent wiring. Prior art: the existing serve-entry suite (DDR 0155's sign-out tests).A good test asserts the behaviour a person or browser observes (redirects, served pages, rendered states), never the gate's internals.
Out of Scope
any; passkeys offered-not-required (ADR 0170).Further Notes
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 literaldata-field/data-action/data-statuscontract.swarm-claim host=matou-dev-server-01 run=5966
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #511 — status
blocked✅ close-report gates passed — every claim verified against main; closing.
envelope