panel-unlock 6/7 — sign out of the control panel everywhere (#1929) #1935

Closed
opened 2026-09-27 19:09:48 +00:00 by matou-build-agent · 2 comments

Parent

What to build

The phone's take-back. One signed request from the steward's wallet ends every
control-panel session that identity holds
, and each unlocked tab drops the
passcode when its next request finds the session gone.

Why this needs new state. The community SSO session is a stateless
HMAC-signed cookie
over {identity, expiry} — there is nothing server-side to
delete. So the take-back is a panel session epoch: a per-identity "panel
sessions minted before this instant are dead"
timestamp the control plane
persists, set by the signed request and consulted by the session resolver for
panel-host requests only
(whatever host serves the panel, including the apex
under ADR 0247). Every other service the steward is signed in to is untouched —
which is exactly what control panel everywhere promises.

The request is verified as a signed act of that identity, over a bound
message, by the same door verifier the sign-in uses. A bad or missing signature
is refused and changes nothing. One identity's epoch never touches another's.

The panel's side: a tab whose next request finds the session gone drops the
passcode from memory and returns to sign-in — not to a locked Members tab.
The session ended, not just the seat, and that is the one place this differs from
Lock and from a reload.

Acceptance criteria

  • Given a validly signed sign-out-everywhere request, when it is accepted, then that identity's panel epoch advances and every panel session minted before it resolves to no session.
  • Given the epoch advanced, when the same steward's cookie is presented to a non-panel service, then it still resolves — other services are untouched.
  • Given the epoch advanced for one identity, when another identity's cookie is presented to the panel, then it still resolves.
  • Given a request with a bad, missing or replayed signature, when it arrives, then it is refused and no epoch changes.
  • Given the epoch advanced, when a steward signs in to the panel again, then the new session works (the epoch kills only what predates it).
  • Given a tab with an unlocked seat, when its next request finds the session gone, then it drops the passcode from memory and returns to sign-in — not to PU-M0.
  • Given a control-plane restart, when a pre-epoch cookie is presented, then it is still dead (the epoch survives a restart; a stateless cookie must not outlive the take-back).
  • Proven at the control plane's session/forward_auth seam plus the dashboard's unit seam for the tab's reaction.

Blocked by

  • 2/7 (the seat the tab drops, and the sign-in the tab returns to).

Task manifest

task: sign-out-of-the-panel-everywhere
implements_flow: panel-unlock
implements_edge: W5->W5d, W5d->S1 ("each open tab finds its session gone, drops the passcode and returns to sign-in")
wireframe: docs/ux/wireframes/panel-unlock/pu-w5-sign-out-everywhere.html
interface: |
  # signed act of the steward's identity, verified by the door verifier:
  POST <bridge>/panel/signout-everywhere  { aid, signature over a bound message }
  # control plane: panelEpoch[identity] = now, durable
  # session resolver: for PANEL-HOST requests only, a cookie minted before the epoch = no session
seam: internal/controlapi session + forward_auth seam; dashboard/tests/unit for the tab's reaction
acceptance:
  - given: a validly signed request
    when: it is accepted
    then: every panel session of that identity minted earlier resolves to no session
  - given: the epoch advanced
    when: the same cookie is presented to a non-panel service
    then: it still resolves
  - given: a tab with an unlocked seat
    when: its next request finds the session gone
    then: it drops the passcode and returns to sign-in, not to PU-M0
depends_on: [members-from-the-ledger]
out_of_scope:
  - a session list, device names or a sign-in log in the wallet (ADR 0282 d.4, DDR 0246 d.11)
  - the wallet's row itself (matou-app)
  - rotating KERI signing keys (that is #1914's re-key screen)
needs_human_decision: []

Ticketed by /to-tickets from spec #1929; granularity, blocking edges and cross-repo filing confirmed with Ben 2026-09-27.

🤖 Generated with Claude Code

https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY

## Parent - **Spec:** [#1929 — panel unlock](https://git.matou.nz/Matou/idss/issues/1929) (story 34–36) - **Symptom ticket:** #1886 · **Wayfinder map:** #1293 - **Design:** ADR 0282 d.4 · flow `docs/ux/flows/panel-unlock.mermaid` ## What to build The phone's take-back. One signed request from the steward's wallet ends **every control-panel session that identity holds**, and each unlocked tab drops the passcode when its next request finds the session gone. **Why this needs new state.** The community SSO session is a **stateless HMAC-signed cookie** over `{identity, expiry}` — there is nothing server-side to delete. So the take-back is a **panel session epoch**: a per-identity *"panel sessions minted before this instant are dead"* timestamp the control plane persists, set by the signed request and consulted by the session resolver **for panel-host requests only** (whatever host serves the panel, including the apex under ADR 0247). Every other service the steward is signed in to is untouched — which is exactly what *control panel everywhere* promises. The request is verified as a **signed act of that identity**, over a bound message, by the same door verifier the sign-in uses. A bad or missing signature is refused and changes nothing. One identity's epoch never touches another's. **The panel's side:** a tab whose next request finds the session gone drops the passcode from memory and returns to **sign-in** — not to a locked Members tab. The session ended, not just the seat, and that is the one place this differs from Lock and from a reload. ## Acceptance criteria - [ ] **Given** a validly signed sign-out-everywhere request, **when** it is accepted, **then** that identity's panel epoch advances and every panel session minted before it resolves to **no session**. - [ ] **Given** the epoch advanced, **when** the same steward's cookie is presented to a **non-panel** service, **then** it still resolves — other services are untouched. - [ ] **Given** the epoch advanced for one identity, **when** another identity's cookie is presented to the panel, **then** it still resolves. - [ ] **Given** a request with a bad, missing or replayed signature, **when** it arrives, **then** it is refused and **no** epoch changes. - [ ] **Given** the epoch advanced, **when** a steward signs in to the panel again, **then** the new session works (the epoch kills only what predates it). - [ ] **Given** a tab with an unlocked seat, **when** its next request finds the session gone, **then** it drops the passcode from memory and returns to **sign-in** — not to PU-M0. - [ ] **Given** a control-plane restart, **when** a pre-epoch cookie is presented, **then** it is still dead (the epoch survives a restart; a stateless cookie must not outlive the take-back). - [ ] Proven at the control plane's session/forward_auth seam plus the dashboard's unit seam for the tab's reaction. ## Blocked by - 2/7 (the seat the tab drops, and the sign-in the tab returns to). ## Task manifest ```yaml task: sign-out-of-the-panel-everywhere implements_flow: panel-unlock implements_edge: W5->W5d, W5d->S1 ("each open tab finds its session gone, drops the passcode and returns to sign-in") wireframe: docs/ux/wireframes/panel-unlock/pu-w5-sign-out-everywhere.html interface: | # signed act of the steward's identity, verified by the door verifier: POST <bridge>/panel/signout-everywhere { aid, signature over a bound message } # control plane: panelEpoch[identity] = now, durable # session resolver: for PANEL-HOST requests only, a cookie minted before the epoch = no session seam: internal/controlapi session + forward_auth seam; dashboard/tests/unit for the tab's reaction acceptance: - given: a validly signed request when: it is accepted then: every panel session of that identity minted earlier resolves to no session - given: the epoch advanced when: the same cookie is presented to a non-panel service then: it still resolves - given: a tab with an unlocked seat when: its next request finds the session gone then: it drops the passcode and returns to sign-in, not to PU-M0 depends_on: [members-from-the-ledger] out_of_scope: - a session list, device names or a sign-in log in the wallet (ADR 0282 d.4, DDR 0246 d.11) - the wallet's row itself (matou-app) - rotating KERI signing keys (that is #1914's re-key screen) needs_human_decision: [] ``` --- *Ticketed by `/to-tickets` from spec [#1929](https://git.matou.nz/Matou/idss/issues/1929); granularity, blocking edges and cross-repo filing confirmed with Ben 2026-09-27.* 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=34408
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=34408 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1935 — status success

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

envelope
{
  "issue": 1935,
  "status": "success",
  "commits": [
    "941f5d2a4f5b2af02327ec3a10daa6776f5cedc5"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "dashboard/src/components/members/IdipRosterPanel.vue",
    "dashboard/src/lib/panelSession.ts",
    "dashboard/tests/unit/idipRosterPanel.test.ts",
    "dashboard/tests/unit/panelSession.test.ts",
    "internal/controlapi/panelepoch.go",
    "internal/controlapi/panelepoch_internal_test.go",
    "internal/controlapi/session.go"
  ],
  "tests": [
    {
      "command": "go build ./... && go vet ./... && go test ./... (full repo, via pre-push gate)",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run",
      "exit_code": 0
    },
    {
      "command": "npx vitest run tests/unit/panelSession.test.ts tests/unit/idipRosterPanel.test.ts",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "pnpm run lint (eslint ., via pre-push gate)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Given a validly signed sign-out-everywhere request, when accepted, that identity's panel epoch advances and every panel session minted before it resolves to no session": "internal/controlapi/panelepoch.go (WithPanelSignoutEverywhere advances the epoch on a verified act; PanelEpochResolver reads a pre-epoch session as no session) proven by panelepoch_internal_test.go TestWithPanelSignoutEverywhere_Endpoint (204 then the earlier session is gone) and TestPanelEpochResolver_KillsPreEpochKeepsPostEpoch",
    "Given the epoch advanced, when the same cookie is presented to a non-panel service, it still resolves": "panelepoch_internal_test.go TestPanelEpoch_LeavesOtherServicesAndIdentitiesAlone (the plain CookieSessionResolver the forward_auth gate holds still resolves mere at files.<apex>); main.go keeps gateResolver for WithAuthGate",
    "Given the epoch advanced for one identity, when another identity's cookie is presented to the panel, it still resolves": "panelepoch_internal_test.go TestPanelEpoch_LeavesOtherServicesAndIdentitiesAlone (boss's panel session untouched by mere's take-back — epoch is per-identity)",
    "Given a request with a bad, missing or replayed signature, when it arrives, it is refused and no epoch changes": "internal/controlapi/panelepoch.go (verify before advance; Advance atomic+monotonic on signed_at) proven by TestWithPanelSignoutEverywhere_Endpoint (missing=400, bad=401, replay=409, epoch unchanged each) and TestPanelEpochStore_MonotonicAndDurable",
    "Given the epoch advanced, when a steward signs in to the panel again, the new session works": "panelepoch_internal_test.go TestPanelEpochResolver_KillsPreEpochKeepsPostEpoch (a session minted after the epoch resolves; epoch uses Unix-ns iat so a fresh sign-in outlives it)",
    "Given a tab with an unlocked seat, when its next request finds the session gone, it drops the passcode from memory and returns to sign-in, not to PU-M0": "dashboard/src/lib/panelSession.ts (reactToSessionGone: lock() then navigate to /authz/signin) + IdipRosterPanel.vue (a 401 roster reload stops the poll, drops the seat, renders data-status=session-gone) proven by dashboard/tests/unit/panelSession.test.ts and idipRosterPanel.test.ts 'a gone session drops the passcode and returns to sign-in — NOT to PU-M0'",
    "Given a control-plane restart, when a pre-epoch cookie is presented, it is still dead": "internal/controlapi/panelepoch.go (file-backed PanelEpochStore under the state dir, jsonstore) proven by TestPanelEpochStore_MonotonicAndDurable (a fresh store over the same file carries the epoch and the persisted replay guard)",
    "Proven at the control plane's session/forward_auth seam plus the dashboard's unit seam for the tab's reaction": "internal/controlapi/panelepoch_internal_test.go (session + resolver + endpoint seam) and dashboard/tests/unit/panelSession.test.ts + idipRosterPanel.test.ts (the tab's reaction)"
  },
  "summary": "Panel-unlock 6/7: a steward's signed take-back advances a durable per-identity panel session epoch that the panel resolver consults to kill their earlier control-panel sessions, and each unlocked tab drops the passcode and returns to sign-in on the next 401.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1935 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1935, "status": "success", "commits": [ "941f5d2a4f5b2af02327ec3a10daa6776f5cedc5" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "dashboard/src/components/members/IdipRosterPanel.vue", "dashboard/src/lib/panelSession.ts", "dashboard/tests/unit/idipRosterPanel.test.ts", "dashboard/tests/unit/panelSession.test.ts", "internal/controlapi/panelepoch.go", "internal/controlapi/panelepoch_internal_test.go", "internal/controlapi/session.go" ], "tests": [ { "command": "go build ./... && go vet ./... && go test ./... (full repo, via pre-push gate)", "exit_code": 0 }, { "command": "golangci-lint run", "exit_code": 0 }, { "command": "npx vitest run tests/unit/panelSession.test.ts tests/unit/idipRosterPanel.test.ts", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "pnpm run lint (eslint ., via pre-push gate)", "exit_code": 0 } ], "criteria": { "Given a validly signed sign-out-everywhere request, when accepted, that identity's panel epoch advances and every panel session minted before it resolves to no session": "internal/controlapi/panelepoch.go (WithPanelSignoutEverywhere advances the epoch on a verified act; PanelEpochResolver reads a pre-epoch session as no session) proven by panelepoch_internal_test.go TestWithPanelSignoutEverywhere_Endpoint (204 then the earlier session is gone) and TestPanelEpochResolver_KillsPreEpochKeepsPostEpoch", "Given the epoch advanced, when the same cookie is presented to a non-panel service, it still resolves": "panelepoch_internal_test.go TestPanelEpoch_LeavesOtherServicesAndIdentitiesAlone (the plain CookieSessionResolver the forward_auth gate holds still resolves mere at files.<apex>); main.go keeps gateResolver for WithAuthGate", "Given the epoch advanced for one identity, when another identity's cookie is presented to the panel, it still resolves": "panelepoch_internal_test.go TestPanelEpoch_LeavesOtherServicesAndIdentitiesAlone (boss's panel session untouched by mere's take-back — epoch is per-identity)", "Given a request with a bad, missing or replayed signature, when it arrives, it is refused and no epoch changes": "internal/controlapi/panelepoch.go (verify before advance; Advance atomic+monotonic on signed_at) proven by TestWithPanelSignoutEverywhere_Endpoint (missing=400, bad=401, replay=409, epoch unchanged each) and TestPanelEpochStore_MonotonicAndDurable", "Given the epoch advanced, when a steward signs in to the panel again, the new session works": "panelepoch_internal_test.go TestPanelEpochResolver_KillsPreEpochKeepsPostEpoch (a session minted after the epoch resolves; epoch uses Unix-ns iat so a fresh sign-in outlives it)", "Given a tab with an unlocked seat, when its next request finds the session gone, it drops the passcode from memory and returns to sign-in, not to PU-M0": "dashboard/src/lib/panelSession.ts (reactToSessionGone: lock() then navigate to /authz/signin) + IdipRosterPanel.vue (a 401 roster reload stops the poll, drops the seat, renders data-status=session-gone) proven by dashboard/tests/unit/panelSession.test.ts and idipRosterPanel.test.ts 'a gone session drops the passcode and returns to sign-in — NOT to PU-M0'", "Given a control-plane restart, when a pre-epoch cookie is presented, it is still dead": "internal/controlapi/panelepoch.go (file-backed PanelEpochStore under the state dir, jsonstore) proven by TestPanelEpochStore_MonotonicAndDurable (a fresh store over the same file carries the epoch and the persisted replay guard)", "Proven at the control plane's session/forward_auth seam plus the dashboard's unit seam for the tab's reaction": "internal/controlapi/panelepoch_internal_test.go (session + resolver + endpoint seam) and dashboard/tests/unit/panelSession.test.ts + idipRosterPanel.test.ts (the tab's reaction)" }, "summary": "Panel-unlock 6/7: a steward's signed take-back advances a durable per-identity panel session epoch that the panel resolver consults to kill their earlier control-panel sessions, and each unlocked tab drops the passcode and returns to sign-in on the next 401.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
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.

Reference
Matou/idss#1935
No description provided.