spec: the Portal — the community's page at the apex is the member's home; two faces, my doors by the gate's fact, mail rehomed, the control panel leaves the apex (map #1336, DDR 0232 / ADR 0233) #1361

Closed
opened 2026-09-10 00:53:20 +00:00 by ben · 1 comment
Owner

Parent

Program map: #1336 (the Portal — route clear 2026-09-09; decisions inherited: charting rulings 1–8, #1339 door states, #1340 my doors, #1341 apex cutover, #1342 home shape + Ben's review amendment). Design contract: DDR 0232 (the Portal is the member's home at the apex; two faces of one URL; the control panel leaves the apex), ADR 0233 (the apex allow-list, the member routes, /authz/signout, the host-aware bundle with the apex shell served from the compiled bundle, the ledger retired, the seat carrying both doors), flow docs/ux/flows/portal.mermaid, wireframes docs/ux/wireframes/portal/ (PT-S0, S0r, S1, S1o, S1e, S2, S3 — reviewed by Ben 2026-09-09: door cards = the panel's service card, no identity strip on IDIP). Research grounding: docs/research/2026-09-08-portal-session-substrate.md (#1337), docs/research/2026-09-08-portal-apex-cutover.md (#1338). Defects this spec absorbs: #1344 (/mail unreachable), #1345 (DA-S2's community door loops). Grilled and wireframed in AUTO MODE at Ben's instruction (ADR 0174 — veto anytime); the flow, seam and wireframe gates are owed to Ben and this spec inherits their state.

Problem Statement

A member of an IDSS community has no home. The community's apex — the address on the invite, the address the founder was shown — serves the operator control panel, ungated, to anyone who opens it. A plain member who signs in there is refused ("operators only") and the refusal's "go to your community" door loops them straight back into the refusal. The member-facing surfaces that exist are islands with no roof: the mail claim at /mail answers 401 to every member because it trusts an identity header the apex route strips; the files door is a URL they have to know; there is nothing that tells a member which services are open to them, who the community thinks they are, or how to sign out. On the operator's side, the same host-blind origin means the whole operator API answers anonymous internet callers at the apex today.

Solution

The Portal — the community's page at the apex is the member's home (DDR 0232). One URL, two faces. Signed out: the brand kit and one door, Sign in. Signed in: the doors open to this member (the gate's fact, never the matrix's intent), each wearing the control panel's service card; who they are; Sign out; the mail claim rehomed under the Portal shell; and, on the kanidm tier, one linked door to the IdP's self-service. Operators see the same home plus a Control panel door. The face is chosen by a new gate-backed member identity route; "my doors" comes from a member doors route that asks the tier's own decider for the signed-in identity over the live services. The operator control panel leaves the apex for admin.<apex> only, old panel bookmarks redirect exactly, and the apex proxies an allow-list of member, device and Portal routes — everything else in the operator API answers 404 there (ADR 0233). The Portal's shell is served by the front door from the compiled bundle so its signed-out face survives a dead control plane as an honest resting frame. Both identity tiers, both paths, active members only; phone-first.

User Stories

Acceptance criteria are Given/When/Then, sourced from the flow's nodes and edges (portal.mermaid) and the wireframes' data-field / data-action / data-status contract.

The two faces (PT-S0, PT-S0r)

  1. As a visitor, I want the community's apex to show the community's brand and one Sign in door, so that I know where I am and how to get in.
    • Given no community session, when I open https://<apex>/, then I see the brand kit (community-logo, community-name, greeting) and one sign-in action, and no service list, no Join door, no tier-specific hint (PT-S0).
    • Given I press sign-in, when the browser follows it, then it lands on /authz/signin with rd=/ and the IdP's own surface (DA-S1) is what I see next.
  2. As a member, I want Sign in to take me to my community's own sign-in surface and back to my home, so that there is one way in and no second login screen.
    • Given the kanidm tier, when I sign in as an active member, then the gate mints the community session and the browser returns to / showing PT-S1.
    • Given the IDIP tier (the bridge's twelve-words page, later the wallet approval), when I sign in as an active member, then the same session leg mints the same cookie and I land on PT-S1 — the Portal never learns which door was behind the leg.
  3. As a suspended or removed member, I want the apex to look exactly like it does to a stranger, so that my standing is never announced on a public page.
    • Given a valid cookie whose identity the route reports not live, when the Portal loads, then the session cookie is cleared and PT-S0 renders with no refusal copy and no mention of suspension.
    • Given I press Sign in from there, when the IdP answers, then it refuses without a reason (DDR 0173) and the browser lands back on PT-S0.
  4. As a member on a community whose sign-in is not yet wired, I want the apex to say so honestly instead of showing a dead button, so that I don't blame my account.
    • Given the identity route reports resting, when the Portal loads, then PT-S0r renders the brand and the resting-line (data-status="resting") and no sign-in action.
  5. As a member, I want the community's page to render even when the community's control plane is down, so that a dead service never shows me a blank or a 502.
    • Given the control plane is unreachable, when I open the apex, then the front door serves the Portal shell from the compiled bundle and PT-S0r renders with the unreachable-line (data-status="unreachable") and no sign-in action.
  6. As an awaiting-approval member, I want to be told to wait where I already am told to wait, so that the Portal invents no second waiting screen.
    • Given a not-yet-approved identity, when I sign in from PT-S0, then the IdP refuses until approved and I see P6-S5; the Portal draws nothing for this state.

The home (PT-S1, PT-S1e)

  1. As an active member, I want my home to list only the doors that are open to me, so that every door I see will open.
    • Given the member doors route answers a list, when PT-S1 renders, then my-doors holds one door card per answer and nothing for services the decider refuses me.
    • Given a service with no access-matrix row (the open default), when the route answers, then it is listed as open — the decider's answer, not the matrix's.
    • Given I am an operator outside a service's komiti, when the route answers, then that door is open (the operator exception falls out of the decider).
  2. As an active member, I want each door to wear the same card the control panel uses for a service, so that the community's services look like one thing everywhere.
    • Given an open door, when its card renders, then it carries the service name, an OPEN pill, the product-line ("runs " with the product-link) and the door row with service-url and an open-door action — and no "deployed on" placement.
  3. As an active member, I want a resting door to stay on my home but not be offered, so that I am never sent through a door that cannot open.
    • Given the doors route reports a door resting, when its card renders, then it carries a RESTING pill and a doorless line, and no service-url and no open-door action.
    • Given the service passes its next health check, when the home refreshes, then the same card becomes open with its URL and Open.
  4. As an active member, I want a door click to take me straight to the service at its reachable address, so that the private path's forwarded port and the public path's plain hostname both just work.
    • Given the public path, when I press open-door, then the browser goes to https://<slug>.<apex> in the same tab.
    • Given the private path, when I press open-door, then the browser goes to the port-carrying reachable URL (DDR 0165).
  5. As an active member with nothing open to me, I want my home to say so honestly, so that I know I am in and whom to ask.
    • Given the doors route answers an empty list, when PT-S1e renders, then no-doors-yet (data-status="empty") shows the honest copy, and signed-in-as, the greeting and sign-out remain.
  6. As a member on the private path, I want the same home as on the public path, so that the matrix's intent is what I see, not a list of every service.
    • Given the private path (service routes ungated, ADR 0150), when the doors route answers, then it answers the decider's result exactly as on the public path; the un-enforced matrix is a stated limit in this spec, never copy on the screen.
  7. As an active member, I want to see who the community thinks I am, so that a wrong identity is visible at once.
    • Given a live session, when PT-S1 renders, then signed-in-as carries the display name the identity route returned (kanidm display name / the IDIP roster name), and the greeting is the brand kit's.
  8. As an active member, I want no komiti, credential or operator truth on my home, so that the home is mine and not a control panel.
    • Given any home, when it renders, then there is no komiti list, no credentials-held list, no fleet standing, no approvals, no backups.
  9. As an active member on the kanidm tier, I want a door to manage my sign-in, so that passwords, passkeys and app passwords are one tap away.
    • Given the kanidm tier, when PT-S1 renders, then identity-strip (data-tier="kanidm") carries one manage-sign-in action that opens the IdP's self-service at id.<apex> (MAIL-M4) in the same tab; the Portal redraws none of it.
  10. As an active member on the IDIP tier, I want no dead identity door, so that the home never offers something it cannot do.
    • Given the IDIP tier, when PT-S1 renders, then there is no identity-strip at all (Ben, 2026-09-09).

Mail rehomed (MAIL-M1/M2/M2x under the Portal shell)

  1. As an active member on the kanidm tier without a mailbox, I want my home's Mail card to show the address that would be mine and one Claim action, so that opting in is one tap (DDR 0117).
    • Given the mail status is no-mailbox-yet, when the Mail card renders, then it carries a NO MAILBOX YET pill, the doorless line naming the folded-slug address, and an open-claim action leading to MAIL-M1 under the Portal shell.
  2. As an active member, I want the claim screens to live inside the Portal, so that I can get back to my home without knowing a URL.
    • Given I am on MAIL-M1/M2/M2x at /mail, when the screen renders, then it wears the Portal shell (brand, a way back to the home) and the seam's screens and refusal copy are unchanged.
  3. As an active member, I want a claimed mailbox to turn the Mail card into a door to webmail, so that my home reflects what I now have.
    • Given the mail status is claimed, when the Mail card renders, then it is an open door whose service-url is webmail (MAIL-M3, external) with an open-door action.
  4. As a member, I want the mail claim to actually work at the apex, so that the surface that exists is no longer dead (#1344).
    • Given a cookie-bearing request with no identity header, when /api/v1/mail/status is called, then it answers on the community session (the gate's cookie resolver), never 401 for a live member.
  5. As an IDIP member, I want no mail claim offered, so that I am not shown an AID-shaped address that cannot be mine yet.
    • Given the IDIP tier, when PT-S1 renders, then no Mail card and no /mail route are mounted; this is a stated limit until a mail-on-IDIP design.

Operators on the Portal (PT-S1o)

  1. As an operator, I want my community's page to be my home too, with one door to the control panel, so that I am a member first and there is no second login.
    • Given the identity route reports operator: true, when PT-S1o renders, then control-panel-door with the open-control-panel action is present and everything else is the ordinary home.
    • Given I press open-control-panel, when the browser follows it, then it lands on admin.<apex> on the same session, with no second sign-in.
  2. As an operator with a root bookmark to the old panel, I want the apex to land me on my home with the panel one click away, so that nothing is lost.
    • Given a bookmark to https://<apex>/, when I open it signed in, then I see PT-S1o (the panel's Overview path is the Portal now, by construction).
  3. As a plain member refused at the control panel, I want the refusal's community door to land me on my home, so that the door stops looping (#1345).
    • Given DA-S2, when I press its community door, then it goes to https://<apex>/ and I see PT-S1 (or PT-S0 if signed out).
    • Given the refusal page renders in production, when the apex is configured, then the community name, logo and portal door are wired (RefusalBrand), not zero values.

Endings (PT-S2, sign out)

  1. As an active member whose session expires under the loaded home, I want one honest frame and one action, so that I never act on stale doors.
    • Given the identity route begins answering 401 under a loaded PT-S1, when the next call fails, then PT-S2 replaces the home (data-status="session-ended", headline, what-it-means, one sign-in-again action) and no door remains on screen.
    • Given I press sign-in-again, when the gate round-trips, then I return to PT-S1 (rd).
  2. As a member whose standing changed under the loaded home, I want to be quietly signed out, so that my standing is never announced.
    • Given the identity route answers live: false under a loaded PT-S1, when the Portal reads it, then the cookie is cleared and PT-S0 renders (distinct from PT-S2).
  3. As a member, I want Sign out to actually end my community session and my IdP session and land me on the community's page, so that the landing proves I am out.
    • Given I press sign-out on PT-S1, when /authz/signout runs, then the community session cookie is cleared, the IdP session is ended (kanidm end-session on the kanidm tier; the bridge's own session on IDIP), and the browser lands on PT-S0.
    • Given a following GET /api/v1/me, when it is called with the old cookie, then it answers no session.
  4. As an operator, I want the control panel's Sign out to use the same sign-out and land on the panel's sign-in, so that there is one sign-out (DDR 0172 story 7).
    • Given the panel's sign-out, when it runs /authz/signout with rd = the panel's sign-in landing, then the session ends and the browser lands there.

The member routes (ADR 0233 §3)

  1. As the Portal, I want one route that tells me who holds the session and whether they are live, so that the face is chosen by fact.
    • Given a live active member's cookie, when GET /api/v1/me is called, then it answers {sub, display_name, tier, live: true, operator, first_login, resting: false} computed through the composed decider (kanidm GateDecision / IDIP Standing), not the bare cookie.
    • Given a suspended member's still-valid cookie, when it is called, then it answers live: false and clears the cookie.
    • Given no cookie, when it is called, then it answers 401 with a body the Portal maps to PT-S0.
    • Given the substrate is not wired (no apex / no gate secret), when it is called, then it answers resting: true and never 500.
    • Given a member whose first landing is the Portal, when /me answers live, then the roster's first-sign-in transition fires exactly as it does at the gate.
  2. As the Portal, I want one route that answers the doors open to the signed-in member, so that no second derivation of access exists.
    • Given a live member, when GET /api/v1/me/doors is called, then it iterates the live services (deployed placement × health with the ADR 0157 URL — the same truth the Services tab reads) and asks GateDecision(sub, slug) for each, answering {slug, name, product{name,url}, url, standing} per open door and omitting refused ones; the no-hostname set (front-door, backup-copy) never lists.
    • Given a resting service, when it answers, then that door carries standing: resting and no url.
    • Given a removed service, when it answers, then the door is absent (its placement is gone).
  3. As an operator, I want the write-only portal ledger retired, so that there is one truth for live doors.
    • Given the doors route exists, when provisioning publishes a health-passed service, then no portal-links.json is written and the PortalLinks port is a no-op or removed; nothing reads the ledger.

The apex cutover (ADR 0233 §1–2, §5, §7)

  1. As a member, I want the apex to serve the Portal on both paths, so that the community's page is where the invite says it is.
    • Given the public render, when the front door renders, then the apex handle serves the bundle's shell and assets by file_server and proxies only the allow-list; given the private render, the same, minus the panel redirect.
  2. As an operator with old panel bookmarks, I want them to land on the panel, so that nothing I saved goes dark.
    • Given https://<apex>/fleet?x=1 (any of /overview /fleet /services /members /backups /settings and their subpaths), when I open it, then the front door answers 308 to https://admin.<apex>/fleet?x=1 before the Portal loads.
    • Given https://<apex>/anything-else, when I open it, then PT-S3 renders (not-here, go-home) and no redirect occurs.
  3. As an operator, I want the operator API unreachable at the apex, so that moving the panel's pages also moves its data.
    • Given the public path, when GET https://<apex>/api/v1/members (or any operator family not on the allow-list) is called, then the front door answers 404.
    • Given admin.<apex>, when the same route is called with a community session, then it answers as today behind the gate.
  4. As a device, I want my enrol and report faces to keep working at the apex, so that the cutover never touches the browserless path.
    • Given the device agent, when it calls /api/v1/enroll/{redeem,pair,requests/*} and /api/v1/fleet/report at the apex, then they proxy exactly as before; given /get, /authz/*, /brand/*, /mesh/*, /api/v1/healthz, join (/api/v1/join/*, /haere-mai/*, /idip/join/*) and /api/v1/mail/*, the same.
  5. As a member on the panel's host, I want the panel, and as an operator on the apex I want the home, so that host decides the surface.
    • Given the served bundle, when location.host is the apex, then the portal entry boots; when it is admin.<apex>, then the operator SPA boots — path alone never decides.
  6. As an operator, I want the app's "Open your dashboard" and Operator home to open the control panel, so that the app's door survives the cutover.
    • Given S12's click-completes and Operator home's dashboard button, when pressed, then they open the dashboard hostname (admin.<apex>, portful on the private path); the seat carries both the portal address and the dashboard door.
  7. As an operator, I want the kanidm invite link to be absolute on the community's page, so that a link copied from the roster on admin.<apex> never resolves behind the gate.
    • Given an invite is minted, when its link is rendered, then it is https://<apex>/haere-mai/<token>.
  8. As the harness, I want one panel-address fixture, so that the ~80 sites that used the portal address as the panel base move once.
    • Given the public-path journeys, when they open the panel, then they use panelAddress (admin.<apex>) with the community session; the droplet journey's "portal API is not cookie-gated" assumption is retargeted.
  9. As the drive, I want a cutover leg that proves the split end to end, so that a green means the member and the operator both landed.
    • Given a running community, when the leg runs, then: a member at / sees PT-S0 → signs in → PT-S1 with at least one open door; an operator's /fleet bookmark → 308 → the panel; /api/v1/members at the apex → 404; Sign out → PT-S0; the payload was re-warmed and reseed-publish.yml run before the drive.

Rollout (ADR 0233 §8)

  1. As an operator, I want the first slice to ship the cutover together with the signed-out face, /me and sign-out, so that a redirecting apex never serves nothing.
    • Given the first slice lands, when the apex is opened, then PT-S0/PT-S0r render and old bookmarks redirect; the home and /me/doors follow in later slices.

Implementation Decisions

  • Two faces, one entry. The served dashboard bundle gains a portal entry, chosen by host at boot (apex → Portal; admin.<apex> → operator SPA). The Portal entry composes the identity route, the doors route, the mail client and the brand doorway over the same-origin transport; /mail becomes a route inside it; the join pages keep their own token-addressed entries. No fake in the served path (ADR 0100).
  • The face chooser is the member identity route, GET /api/v1/me, cookie-resolved through the gate's session resolver and answered through the composed decider (authGateDecider: the kanidm orchestrator or the IDIP roster decider). Not-live clears the cookie. resting when the substrate is not wired. It reports first sign-in like the gate does. It never answers a display name from an ungated operator route — the kanidm person lookup and the IDIP roster lookup are called by the route itself.
  • The doors route, GET /api/v1/me/doors: live services from the same per-service health the Services tab reads (deployed placement × health, with the ADR 0157 URL and the catalogue's product line) × GateDecision(sub, slug); the no-hostname set never lists; resting doors carry no URL. The portal ledger and its PortalLinks port are retired.
  • Sign out is a new gate route /authz/signout (clear the session cookie; end the IdP session — kanidm's end-session, the bridge's session on IDIP; 302 to rd, default the apex root). The control panel's Sign out calls it with its own rd.
  • The front door (both renders share the apex helper): the @panel 308 for the closed tab list (public render only); file_server for the bundle's shell and assets at the apex; the allow-list of proxied prefixes; every other /api/v1/* 404 at the apex. Byte-pinned render tests. The brand tokens and logo the shell needs are compiled into the bundle's brand artifacts; /brand/* remains the live override when the control plane is up.
  • Mail: the member mail routes are wired with the gate's cookie resolver, not the header resolver; not mounted on the IDIP tier.
  • The seat and the app: the founding hand-off and the enrolment seat carry both the portal address and the dashboard door; S12, Operator home and deep links open the dashboard door. The refusal page is wired with the community brand and the portal URL. The kanidm invite link is minted absolute on the Portal hostname.
  • Contracts: /me → {sub, display_name, tier: "kanidm"|"idip", live, operator, first_login, resting}; /me/doors → {doors: [{slug, name, product: {name, url}, url?, standing: "open"|"resting"}]}; /authz/signout?rd=. The apex allow-list is a rendered Caddy matcher, not a control-plane host check (the mux stays host-blind).
  • Screens (the wireframes are the component inventory): PT-S0 community-logo/community-name/greeting/sign-in; PT-S0r resting-line|unreachable-line; PT-S1 signed-in-as, my-doors → door cards (product-line, product-link, service-url, open-door|open-claim, doorless), identity-strip(manage-sign-in, kanidm only), sign-out; PT-S1o adds control-panel-door/open-control-panel; PT-S1e no-doors-yet; PT-S2 session-ended/sign-in-again; PT-S3 not-here/go-home.

Testing Decisions

A good test drives the external behaviour through an existing seam with a real request and a fake at the boundary, and asserts the screen state or the wire shape — never the implementation. The seams (ADR 0233 "Test seam"), all existing:

  • Control-plane handler tests over the composed handler with a fake decider, session resolver and service-health source: /me live / not-live (cookie cleared) / no cookie / resting / operator flag / first-login observed; /me/doors cross-product, resting door without URL, removed service absent, no-hostname set excluded; /authz/signout clears and redirects to rd; the mail routes on a cookie-bearing request with no header. Prior art: the mail integration test, the IDIP steward session test, the refusal test, the sign-in tests.
  • Front-door render tests byte-pin the public and private apex renders: the panel redirect matcher, the file_server shell, the allow-list and the 404 fall-through, the private render's missing redirect. Prior art: the existing public/private front-door render tests.
  • Dashboard entry seam tests with injected routing and fetch doubles: host-aware boot; the Portal's face chooser mapping /me answers to PT-S0/S0r/S1/S1o/S1e/S2; /mail as a Portal route; sign-out's landing. Prior art: the served-entry and mail-entry seam tests.
  • Harness: the panelAddress fixture and one cutover leg in the public-path journey (story 40); the private-path journey asserts the Portal at the apex and no redirect.
  • Design axis: design-verify matches the built Portal against docs/ux/wireframes/portal/ by data-field/data-action/data-status. DA-S1 remains a depiction, never matched.

Out of Scope

  • Operator truth on the Portal; operator-authored notices; a per-service "public" switch for the signed-out face (map #1336 fog).
  • The IDIP browser sign-in UX and browser-door retirement (map #1293 ticket #1302); the wallet app embedding or linking the Portal.
  • Any identity door on the IDIP tier (Ben, 2026-09-09); mail on the IDIP tier (stated limit).
  • Redrawing the IdP's self-service, webmail, or any service's home — external doors.
  • Homes for waiting or suspended members (pre-door screens stand).
  • Private-path reach of the apex from a real operator's browser (DDR 0165's window, unbuilt — stated limit, unchanged by this spec).
  • www.<apex> and unrouted labels; a session-length policy; a Portal-side "request access" form.

Further Notes

  • The control panel leaving the apex is a one-way door (DDR 0232 §9); the first slice must ship the signed-out face, /me and sign-out with the cutover (story 41) — never a redirecting apex that serves nothing.
  • The apex API allow-list is a narrowing of exposure (Ben's security-posture ruling); anything that read the operator API at the apex must move to admin.<apex> with a session in the same arc.
  • Served bits vs main: the dashboard bundle and control plane are seeded from the app payload; a proving drive needs the payload re-warmed and the reseed publish run first (GOTCHAS: served bits vs main).
  • The .sub class in the wireframe stylesheet is page chrome, not frame content — the Portal frames define local label classes; design-verify should key on data-* attributes, not classes.
## Parent Program map: **#1336** (the Portal — route clear 2026-09-09; decisions inherited: charting rulings 1–8, #1339 door states, #1340 my doors, #1341 apex cutover, #1342 home shape + Ben's review amendment). Design contract: **DDR 0232** (the Portal is the member's home at the apex; two faces of one URL; the control panel leaves the apex), **ADR 0233** (the apex allow-list, the member routes, `/authz/signout`, the host-aware bundle with the apex shell served from the compiled bundle, the ledger retired, the seat carrying both doors), flow `docs/ux/flows/portal.mermaid`, wireframes `docs/ux/wireframes/portal/` (PT-S0, S0r, S1, S1o, S1e, S2, S3 — reviewed by Ben 2026-09-09: door cards = the panel's service card, no identity strip on IDIP). Research grounding: `docs/research/2026-09-08-portal-session-substrate.md` (#1337), `docs/research/2026-09-08-portal-apex-cutover.md` (#1338). Defects this spec absorbs: **#1344** (`/mail` unreachable), **#1345** (DA-S2's community door loops). Grilled and wireframed in AUTO MODE at Ben's instruction (ADR 0174 — veto anytime); the flow, seam and wireframe gates are owed to Ben and this spec inherits their state. ## Problem Statement A member of an IDSS community has no home. The community's apex — the address on the invite, the address the founder was shown — serves the **operator** control panel, ungated, to anyone who opens it. A plain member who signs in there is refused ("operators only") and the refusal's "go to your community" door loops them straight back into the refusal. The member-facing surfaces that exist are islands with no roof: the mail claim at `/mail` answers 401 to every member because it trusts an identity header the apex route strips; the files door is a URL they have to know; there is nothing that tells a member which services are open to them, who the community thinks they are, or how to sign out. On the operator's side, the same host-blind origin means the whole operator API answers anonymous internet callers at the apex today. ## Solution **The Portal** — the community's page at the apex is the member's home (DDR 0232). One URL, two faces. Signed out: the brand kit and one door, Sign in. Signed in: the doors open to *this* member (the gate's fact, never the matrix's intent), each wearing the control panel's service card; who they are; Sign out; the mail claim rehomed under the Portal shell; and, on the kanidm tier, one linked door to the IdP's self-service. Operators see the same home plus a Control panel door. The face is chosen by a new gate-backed **member identity route**; "my doors" comes from a **member doors route** that asks the tier's own decider for the signed-in identity over the live services. The operator control panel **leaves the apex** for `admin.<apex>` only, old panel bookmarks redirect exactly, and the apex proxies an **allow-list** of member, device and Portal routes — everything else in the operator API answers 404 there (ADR 0233). The Portal's shell is served by the front door from the compiled bundle so its signed-out face survives a dead control plane as an honest resting frame. Both identity tiers, both paths, active members only; phone-first. ## User Stories Acceptance criteria are Given/When/Then, sourced from the flow's nodes and edges (`portal.mermaid`) and the wireframes' `data-field` / `data-action` / `data-status` contract. ### The two faces (PT-S0, PT-S0r) 1. As a visitor, I want the community's apex to show the community's brand and one Sign in door, so that I know where I am and how to get in. - Given no community session, when I open `https://<apex>/`, then I see the brand kit (`community-logo`, `community-name`, `greeting`) and one `sign-in` action, and no service list, no Join door, no tier-specific hint (PT-S0). - Given I press `sign-in`, when the browser follows it, then it lands on `/authz/signin` with `rd=/` and the IdP's own surface (DA-S1) is what I see next. 2. As a member, I want Sign in to take me to my community's own sign-in surface and back to my home, so that there is one way in and no second login screen. - Given the kanidm tier, when I sign in as an active member, then the gate mints the community session and the browser returns to `/` showing PT-S1. - Given the IDIP tier (the bridge's twelve-words page, later the wallet approval), when I sign in as an active member, then the same session leg mints the same cookie and I land on PT-S1 — the Portal never learns which door was behind the leg. 3. As a suspended or removed member, I want the apex to look exactly like it does to a stranger, so that my standing is never announced on a public page. - Given a valid cookie whose identity the route reports not live, when the Portal loads, then the session cookie is cleared and PT-S0 renders with no refusal copy and no mention of suspension. - Given I press Sign in from there, when the IdP answers, then it refuses without a reason (DDR 0173) and the browser lands back on PT-S0. 4. As a member on a community whose sign-in is not yet wired, I want the apex to say so honestly instead of showing a dead button, so that I don't blame my account. - Given the identity route reports `resting`, when the Portal loads, then PT-S0r renders the brand and the `resting-line` (`data-status="resting"`) and no `sign-in` action. 5. As a member, I want the community's page to render even when the community's control plane is down, so that a dead service never shows me a blank or a 502. - Given the control plane is unreachable, when I open the apex, then the front door serves the Portal shell from the compiled bundle and PT-S0r renders with the `unreachable-line` (`data-status="unreachable"`) and no `sign-in` action. 6. As an awaiting-approval member, I want to be told to wait where I already am told to wait, so that the Portal invents no second waiting screen. - Given a not-yet-approved identity, when I sign in from PT-S0, then the IdP refuses until approved and I see P6-S5; the Portal draws nothing for this state. ### The home (PT-S1, PT-S1e) 7. As an active member, I want my home to list only the doors that are open to me, so that every door I see will open. - Given the member doors route answers a list, when PT-S1 renders, then `my-doors` holds one `door` card per answer and nothing for services the decider refuses me. - Given a service with no access-matrix row (the open default), when the route answers, then it is listed as open — the decider's answer, not the matrix's. - Given I am an operator outside a service's komiti, when the route answers, then that door is open (the operator exception falls out of the decider). 8. As an active member, I want each door to wear the same card the control panel uses for a service, so that the community's services look like one thing everywhere. - Given an open door, when its card renders, then it carries the service name, an `OPEN` pill, the `product-line` ("runs <product>" with the `product-link`) and the door row with `service-url` and an `open-door` action — and no "deployed on" placement. 9. As an active member, I want a resting door to stay on my home but not be offered, so that I am never sent through a door that cannot open. - Given the doors route reports a door `resting`, when its card renders, then it carries a `RESTING` pill and a `doorless` line, and no `service-url` and no `open-door` action. - Given the service passes its next health check, when the home refreshes, then the same card becomes open with its URL and Open. 10. As an active member, I want a door click to take me straight to the service at its reachable address, so that the private path's forwarded port and the public path's plain hostname both just work. - Given the public path, when I press `open-door`, then the browser goes to `https://<slug>.<apex>` in the same tab. - Given the private path, when I press `open-door`, then the browser goes to the port-carrying reachable URL (DDR 0165). 11. As an active member with nothing open to me, I want my home to say so honestly, so that I know I am in and whom to ask. - Given the doors route answers an empty list, when PT-S1e renders, then `no-doors-yet` (`data-status="empty"`) shows the honest copy, and `signed-in-as`, the greeting and `sign-out` remain. 12. As a member on the private path, I want the same home as on the public path, so that the matrix's intent is what I see, not a list of every service. - Given the private path (service routes ungated, ADR 0150), when the doors route answers, then it answers the decider's result exactly as on the public path; the un-enforced matrix is a stated limit in this spec, never copy on the screen. 13. As an active member, I want to see who the community thinks I am, so that a wrong identity is visible at once. - Given a live session, when PT-S1 renders, then `signed-in-as` carries the display name the identity route returned (kanidm display name / the IDIP roster name), and the greeting is the brand kit's. 14. As an active member, I want no komiti, credential or operator truth on my home, so that the home is mine and not a control panel. - Given any home, when it renders, then there is no komiti list, no credentials-held list, no fleet standing, no approvals, no backups. 15. As an active member on the kanidm tier, I want a door to manage my sign-in, so that passwords, passkeys and app passwords are one tap away. - Given the kanidm tier, when PT-S1 renders, then `identity-strip` (`data-tier="kanidm"`) carries one `manage-sign-in` action that opens the IdP's self-service at `id.<apex>` (MAIL-M4) in the same tab; the Portal redraws none of it. 16. As an active member on the IDIP tier, I want no dead identity door, so that the home never offers something it cannot do. - Given the IDIP tier, when PT-S1 renders, then there is no `identity-strip` at all (Ben, 2026-09-09). ### Mail rehomed (MAIL-M1/M2/M2x under the Portal shell) 17. As an active member on the kanidm tier without a mailbox, I want my home's Mail card to show the address that would be mine and one Claim action, so that opting in is one tap (DDR 0117). - Given the mail status is `no-mailbox-yet`, when the Mail card renders, then it carries a `NO MAILBOX YET` pill, the `doorless` line naming the folded-slug address, and an `open-claim` action leading to MAIL-M1 under the Portal shell. 18. As an active member, I want the claim screens to live inside the Portal, so that I can get back to my home without knowing a URL. - Given I am on MAIL-M1/M2/M2x at `/mail`, when the screen renders, then it wears the Portal shell (brand, a way back to the home) and the seam's screens and refusal copy are unchanged. 19. As an active member, I want a claimed mailbox to turn the Mail card into a door to webmail, so that my home reflects what I now have. - Given the mail status is `claimed`, when the Mail card renders, then it is an open door whose `service-url` is webmail (MAIL-M3, external) with an `open-door` action. 20. As a member, I want the mail claim to actually work at the apex, so that the surface that exists is no longer dead (#1344). - Given a cookie-bearing request with no identity header, when `/api/v1/mail/status` is called, then it answers on the community session (the gate's cookie resolver), never 401 for a live member. 21. As an IDIP member, I want no mail claim offered, so that I am not shown an AID-shaped address that cannot be mine yet. - Given the IDIP tier, when PT-S1 renders, then no Mail card and no `/mail` route are mounted; this is a stated limit until a mail-on-IDIP design. ### Operators on the Portal (PT-S1o) 22. As an operator, I want my community's page to be my home too, with one door to the control panel, so that I am a member first and there is no second login. - Given the identity route reports `operator: true`, when PT-S1o renders, then `control-panel-door` with the `open-control-panel` action is present and everything else is the ordinary home. - Given I press `open-control-panel`, when the browser follows it, then it lands on `admin.<apex>` on the same session, with no second sign-in. 23. As an operator with a root bookmark to the old panel, I want the apex to land me on my home with the panel one click away, so that nothing is lost. - Given a bookmark to `https://<apex>/`, when I open it signed in, then I see PT-S1o (the panel's Overview path is the Portal now, by construction). 24. As a plain member refused at the control panel, I want the refusal's community door to land me on my home, so that the door stops looping (#1345). - Given DA-S2, when I press its community door, then it goes to `https://<apex>/` and I see PT-S1 (or PT-S0 if signed out). - Given the refusal page renders in production, when the apex is configured, then the community name, logo and portal door are wired (`RefusalBrand`), not zero values. ### Endings (PT-S2, sign out) 25. As an active member whose session expires under the loaded home, I want one honest frame and one action, so that I never act on stale doors. - Given the identity route begins answering 401 under a loaded PT-S1, when the next call fails, then PT-S2 replaces the home (`data-status="session-ended"`, `headline`, `what-it-means`, one `sign-in-again` action) and no door remains on screen. - Given I press `sign-in-again`, when the gate round-trips, then I return to PT-S1 (`rd`). 26. As a member whose standing changed under the loaded home, I want to be quietly signed out, so that my standing is never announced. - Given the identity route answers `live: false` under a loaded PT-S1, when the Portal reads it, then the cookie is cleared and PT-S0 renders (distinct from PT-S2). 27. As a member, I want Sign out to actually end my community session and my IdP session and land me on the community's page, so that the landing proves I am out. - Given I press `sign-out` on PT-S1, when `/authz/signout` runs, then the community session cookie is cleared, the IdP session is ended (kanidm end-session on the kanidm tier; the bridge's own session on IDIP), and the browser lands on PT-S0. - Given a following `GET /api/v1/me`, when it is called with the old cookie, then it answers no session. 28. As an operator, I want the control panel's Sign out to use the same sign-out and land on the panel's sign-in, so that there is one sign-out (DDR 0172 story 7). - Given the panel's `sign-out`, when it runs `/authz/signout` with `rd` = the panel's sign-in landing, then the session ends and the browser lands there. ### The member routes (ADR 0233 §3) 29. As the Portal, I want one route that tells me who holds the session and whether they are live, so that the face is chosen by fact. - Given a live active member's cookie, when `GET /api/v1/me` is called, then it answers `{sub, display_name, tier, live: true, operator, first_login, resting: false}` computed through the composed decider (kanidm `GateDecision` / IDIP `Standing`), not the bare cookie. - Given a suspended member's still-valid cookie, when it is called, then it answers `live: false` and clears the cookie. - Given no cookie, when it is called, then it answers 401 with a body the Portal maps to PT-S0. - Given the substrate is not wired (no apex / no gate secret), when it is called, then it answers `resting: true` and never 500. - Given a member whose first landing is the Portal, when `/me` answers live, then the roster's first-sign-in transition fires exactly as it does at the gate. 30. As the Portal, I want one route that answers the doors open to the signed-in member, so that no second derivation of access exists. - Given a live member, when `GET /api/v1/me/doors` is called, then it iterates the live services (deployed placement × health with the ADR 0157 URL — the same truth the Services tab reads) and asks `GateDecision(sub, slug)` for each, answering `{slug, name, product{name,url}, url, standing}` per open door and omitting refused ones; the no-hostname set (front-door, backup-copy) never lists. - Given a resting service, when it answers, then that door carries `standing: resting` and no `url`. - Given a removed service, when it answers, then the door is absent (its placement is gone). 31. As an operator, I want the write-only portal ledger retired, so that there is one truth for live doors. - Given the doors route exists, when provisioning publishes a health-passed service, then no `portal-links.json` is written and the `PortalLinks` port is a no-op or removed; nothing reads the ledger. ### The apex cutover (ADR 0233 §1–2, §5, §7) 32. As a member, I want the apex to serve the Portal on both paths, so that the community's page is where the invite says it is. - Given the public render, when the front door renders, then the apex handle serves the bundle's shell and assets by `file_server` and proxies only the allow-list; given the private render, the same, minus the panel redirect. 33. As an operator with old panel bookmarks, I want them to land on the panel, so that nothing I saved goes dark. - Given `https://<apex>/fleet?x=1` (any of `/overview /fleet /services /members /backups /settings` and their subpaths), when I open it, then the front door answers `308` to `https://admin.<apex>/fleet?x=1` before the Portal loads. - Given `https://<apex>/anything-else`, when I open it, then PT-S3 renders (`not-here`, `go-home`) and no redirect occurs. 34. As an operator, I want the operator API unreachable at the apex, so that moving the panel's pages also moves its data. - Given the public path, when `GET https://<apex>/api/v1/members` (or any operator family not on the allow-list) is called, then the front door answers 404. - Given `admin.<apex>`, when the same route is called with a community session, then it answers as today behind the gate. 35. As a device, I want my enrol and report faces to keep working at the apex, so that the cutover never touches the browserless path. - Given the device agent, when it calls `/api/v1/enroll/{redeem,pair,requests/*}` and `/api/v1/fleet/report` at the apex, then they proxy exactly as before; given `/get`, `/authz/*`, `/brand/*`, `/mesh/*`, `/api/v1/healthz`, join (`/api/v1/join/*`, `/haere-mai/*`, `/idip/join/*`) and `/api/v1/mail/*`, the same. 36. As a member on the panel's host, I want the panel, and as an operator on the apex I want the home, so that host decides the surface. - Given the served bundle, when `location.host` is the apex, then the `portal` entry boots; when it is `admin.<apex>`, then the operator SPA boots — path alone never decides. 37. As an operator, I want the app's "Open your dashboard" and Operator home to open the control panel, so that the app's door survives the cutover. - Given S12's click-completes and Operator home's dashboard button, when pressed, then they open the dashboard hostname (`admin.<apex>`, portful on the private path); the seat carries both the portal address and the dashboard door. 38. As an operator, I want the kanidm invite link to be absolute on the community's page, so that a link copied from the roster on `admin.<apex>` never resolves behind the gate. - Given an invite is minted, when its link is rendered, then it is `https://<apex>/haere-mai/<token>`. 39. As the harness, I want one panel-address fixture, so that the ~80 sites that used the portal address as the panel base move once. - Given the public-path journeys, when they open the panel, then they use `panelAddress` (`admin.<apex>`) with the community session; the droplet journey's "portal API is not cookie-gated" assumption is retargeted. 40. As the drive, I want a cutover leg that proves the split end to end, so that a green means the member and the operator both landed. - Given a running community, when the leg runs, then: a member at `/` sees PT-S0 → signs in → PT-S1 with at least one open door; an operator's `/fleet` bookmark → 308 → the panel; `/api/v1/members` at the apex → 404; Sign out → PT-S0; the payload was re-warmed and `reseed-publish.yml` run before the drive. ### Rollout (ADR 0233 §8) 41. As an operator, I want the first slice to ship the cutover together with the signed-out face, `/me` and sign-out, so that a redirecting apex never serves nothing. - Given the first slice lands, when the apex is opened, then PT-S0/PT-S0r render and old bookmarks redirect; the home and `/me/doors` follow in later slices. ## Implementation Decisions - **Two faces, one entry.** The served dashboard bundle gains a `portal` entry, chosen by host at boot (apex → Portal; `admin.<apex>` → operator SPA). The Portal entry composes the identity route, the doors route, the mail client and the brand doorway over the same-origin transport; `/mail` becomes a route inside it; the join pages keep their own token-addressed entries. No fake in the served path (ADR 0100). - **The face chooser is the member identity route**, `GET /api/v1/me`, cookie-resolved through the gate's session resolver and answered through the composed decider (`authGateDecider`: the kanidm orchestrator or the IDIP roster decider). Not-live clears the cookie. `resting` when the substrate is not wired. It reports first sign-in like the gate does. It never answers a display name from an ungated operator route — the kanidm person lookup and the IDIP roster lookup are called by the route itself. - **The doors route**, `GET /api/v1/me/doors`: live services from the same per-service health the Services tab reads (deployed placement × health, with the ADR 0157 URL and the catalogue's product line) × `GateDecision(sub, slug)`; the no-hostname set never lists; resting doors carry no URL. The portal ledger and its `PortalLinks` port are retired. - **Sign out** is a new gate route `/authz/signout` (clear the session cookie; end the IdP session — kanidm's end-session, the bridge's session on IDIP; 302 to `rd`, default the apex root). The control panel's Sign out calls it with its own `rd`. - **The front door** (both renders share the apex helper): the `@panel` `308` for the closed tab list (public render only); `file_server` for the bundle's shell and assets at the apex; the allow-list of proxied prefixes; every other `/api/v1/*` 404 at the apex. Byte-pinned render tests. The brand tokens and logo the shell needs are compiled into the bundle's brand artifacts; `/brand/*` remains the live override when the control plane is up. - **Mail**: the member mail routes are wired with the gate's cookie resolver, not the header resolver; not mounted on the IDIP tier. - **The seat and the app**: the founding hand-off and the enrolment seat carry both the portal address and the dashboard door; S12, Operator home and deep links open the dashboard door. The refusal page is wired with the community brand and the portal URL. The kanidm invite link is minted absolute on the Portal hostname. - **Contracts**: `/me` → `{sub, display_name, tier: "kanidm"|"idip", live, operator, first_login, resting}`; `/me/doors` → `{doors: [{slug, name, product: {name, url}, url?, standing: "open"|"resting"}]}`; `/authz/signout?rd=`. The apex allow-list is a rendered Caddy matcher, not a control-plane host check (the mux stays host-blind). - **Screens** (the wireframes are the component inventory): PT-S0 `community-logo`/`community-name`/`greeting`/`sign-in`; PT-S0r `resting-line`|`unreachable-line`; PT-S1 `signed-in-as`, `my-doors` → `door` cards (`product-line`, `product-link`, `service-url`, `open-door`|`open-claim`, `doorless`), `identity-strip`(`manage-sign-in`, kanidm only), `sign-out`; PT-S1o adds `control-panel-door`/`open-control-panel`; PT-S1e `no-doors-yet`; PT-S2 `session-ended`/`sign-in-again`; PT-S3 `not-here`/`go-home`. ## Testing Decisions A good test drives the external behaviour through an existing seam with a real request and a fake at the boundary, and asserts the screen state or the wire shape — never the implementation. The seams (ADR 0233 "Test seam"), all existing: - **Control-plane handler tests** over the composed handler with a fake decider, session resolver and service-health source: `/me` live / not-live (cookie cleared) / no cookie / resting / operator flag / first-login observed; `/me/doors` cross-product, resting door without URL, removed service absent, no-hostname set excluded; `/authz/signout` clears and redirects to `rd`; the mail routes on a cookie-bearing request with no header. Prior art: the mail integration test, the IDIP steward session test, the refusal test, the sign-in tests. - **Front-door render tests** byte-pin the public and private apex renders: the panel redirect matcher, the `file_server` shell, the allow-list and the 404 fall-through, the private render's missing redirect. Prior art: the existing public/private front-door render tests. - **Dashboard entry seam tests** with injected routing and fetch doubles: host-aware boot; the Portal's face chooser mapping `/me` answers to PT-S0/S0r/S1/S1o/S1e/S2; `/mail` as a Portal route; sign-out's landing. Prior art: the served-entry and mail-entry seam tests. - **Harness**: the `panelAddress` fixture and one cutover leg in the public-path journey (story 40); the private-path journey asserts the Portal at the apex and no redirect. - **Design axis**: `design-verify` matches the built Portal against `docs/ux/wireframes/portal/` by `data-field`/`data-action`/`data-status`. DA-S1 remains a depiction, never matched. ## Out of Scope - Operator truth on the Portal; operator-authored notices; a per-service "public" switch for the signed-out face (map #1336 fog). - The IDIP browser sign-in UX and browser-door retirement (map #1293 ticket #1302); the wallet app embedding or linking the Portal. - Any identity door on the IDIP tier (Ben, 2026-09-09); mail on the IDIP tier (stated limit). - Redrawing the IdP's self-service, webmail, or any service's home — external doors. - Homes for waiting or suspended members (pre-door screens stand). - Private-path reach of the apex from a real operator's browser (DDR 0165's window, unbuilt — stated limit, unchanged by this spec). - `www.<apex>` and unrouted labels; a session-length policy; a Portal-side "request access" form. ## Further Notes - The control panel leaving the apex is a **one-way door** (DDR 0232 §9); the first slice must ship the signed-out face, `/me` and sign-out with the cutover (story 41) — never a redirecting apex that serves nothing. - The apex API allow-list is a **narrowing** of exposure (Ben's security-posture ruling); anything that read the operator API at the apex must move to `admin.<apex>` with a session in the same arc. - Served bits vs main: the dashboard bundle and control plane are seeded from the app payload; a proving drive needs the payload re-warmed and the reseed publish run first (GOTCHAS: served bits vs main). - The `.sub` class in the wireframe stylesheet is page chrome, not frame content — the Portal frames define local label classes; `design-verify` should key on `data-*` attributes, not classes.
Author
Owner

Swept closed with its map (#1336), 2026-09-14. Every ticket this spec produced (#1362 through #1373) is closed. The last, #1373, closed GREEN by drive with screenshots checked by eye. The stated limits, the mail claim walk and the IDIP harness retarget, are recorded on the map.

**Swept closed with its map (#1336), 2026-09-14.** Every ticket this spec produced (#1362 through #1373) is closed. The last, #1373, closed GREEN by drive with screenshots checked by eye. The stated limits, the mail claim walk and the IDIP harness retarget, are recorded on the map.
ben closed this issue 2026-09-15 01:34:29 +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#1361
No description provided.