Revoke all operator sessions from a lost-device safety action #287

Closed
opened 2026-08-08 09:49:48 +00:00 by timmy · 0 comments
Owner

Problem

The dashboard can revoke only the session on the current device. If an operator loses a phone or suspects a copied session cookie, every other active device remains authorized until expiry. The durable SQLite registry is already shared across workers but exposes no all-session revocation operation.

Scope

Add a separately confirmed Sign out all devices flow: an authenticated, same-origin CSRF-protected endpoint atomically revokes all sessions, clears the initiating device cookies only after success, and directs the browser to clear Stackchain private state and return to login.

Acceptance criteria

  • Two independently signed-in clients are both rejected immediately after one invokes global sign-out.
  • Missing CSRF or foreign origin cannot revoke sessions.
  • Registry failure returns sanitized 503, sets no deletion cookies, and does not claim success.
  • Revocation is durable across registry reconstruction and cross-worker access.
  • Browser requires explicit confirmation, uses the subpath-safe endpoint, and clears only Stackchain device data after acknowledged success.
  • Existing single-device sign-out behavior remains unchanged.
  • Behavioral tests cover backend, store, and browser flow; full suite and CI pass.

Non-duplication evidence

Current origin/main is 94cbde3. Historical issue/PR titles through #286 and recent commits were reviewed: #268 deliberately added current-session-only revocation and no issue or commit adds global/all-device session revocation. There are no open PRs; existing open issues are assigned to other humans/agents and unrelated.

## Problem The dashboard can revoke only the session on the current device. If an operator loses a phone or suspects a copied session cookie, every other active device remains authorized until expiry. The durable SQLite registry is already shared across workers but exposes no all-session revocation operation. ## Scope Add a separately confirmed **Sign out all devices** flow: an authenticated, same-origin CSRF-protected endpoint atomically revokes all sessions, clears the initiating device cookies only after success, and directs the browser to clear Stackchain private state and return to login. ## Acceptance criteria - Two independently signed-in clients are both rejected immediately after one invokes global sign-out. - Missing CSRF or foreign origin cannot revoke sessions. - Registry failure returns sanitized 503, sets no deletion cookies, and does not claim success. - Revocation is durable across registry reconstruction and cross-worker access. - Browser requires explicit confirmation, uses the subpath-safe endpoint, and clears only Stackchain device data after acknowledged success. - Existing single-device sign-out behavior remains unchanged. - Behavioral tests cover backend, store, and browser flow; full suite and CI pass. ## Non-duplication evidence Current `origin/main` is `94cbde3`. Historical issue/PR titles through #286 and recent commits were reviewed: #268 deliberately added current-session-only revocation and no issue or commit adds global/all-device session revocation. There are no open PRs; existing open issues are assigned to other humans/agents and unrelated.
timmy self-assigned this 2026-08-08 09:49:48 +00:00
timmy closed this issue 2026-08-08 09:56:46 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#287
No description provided.