Purge private device data after remote session revocation #337

Closed
opened 2026-08-08 20:09:37 +00:00 by timmy · 0 comments
Owner

Problem

Revoking a lost device blocks its server session, but its next dashboard contact is treated like ordinary expiry. Existing frontend recovery deliberately preserves stackchain.* drafts, IndexedDB outboxes, and dashboard caches, leaving private issue and repository data readable on a remotely signed-out device.

Vertical slice

  • Distinguish a valid signed cookie whose active registry entry was revoked from ordinary expiry/invalid authentication without creating a registry oracle.
  • Return a bounded session_revoked API reason and a subpath-safe top-level login reason.
  • On the revoked device's next contact, purge only Stackchain-owned storage, outboxes, and caches before sign-in; keep ordinary expiry recovery unchanged.
  • Cover API, top-level navigation, login bootstrap, and service-worker behavior.

Acceptance tests

  • Selective revocation returns machine-readable session_revoked only for a correctly signed, unexpired cookie missing from the registry.
  • Revoked API and page flows clear Stackchain-owned browser data and show accurate sign-in copy.
  • Ordinary expiry still preserves recoverable drafts/outboxes.
  • Forged/expired cookies remain generic authentication failures.
  • Unrelated origin storage/caches are untouched.

Implementation will follow strict RED-GREEN-REFACTOR and include focused plus full-suite verification.

## Problem Revoking a lost device blocks its server session, but its next dashboard contact is treated like ordinary expiry. Existing frontend recovery deliberately preserves `stackchain.*` drafts, IndexedDB outboxes, and dashboard caches, leaving private issue and repository data readable on a remotely signed-out device. ## Vertical slice - Distinguish a valid signed cookie whose active registry entry was revoked from ordinary expiry/invalid authentication without creating a registry oracle. - Return a bounded `session_revoked` API reason and a subpath-safe top-level login reason. - On the revoked device's next contact, purge only Stackchain-owned storage, outboxes, and caches before sign-in; keep ordinary expiry recovery unchanged. - Cover API, top-level navigation, login bootstrap, and service-worker behavior. ## Acceptance tests - Selective revocation returns machine-readable `session_revoked` only for a correctly signed, unexpired cookie missing from the registry. - Revoked API and page flows clear Stackchain-owned browser data and show accurate sign-in copy. - Ordinary expiry still preserves recoverable drafts/outboxes. - Forged/expired cookies remain generic authentication failures. - Unrelated origin storage/caches are untouched. Implementation will follow strict RED-GREEN-REFACTOR and include focused plus full-suite verification.
timmy self-assigned this 2026-08-08 20:09:37 +00:00
timmy closed this issue 2026-08-08 20:18:40 +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#337
No description provided.