feat(duress): #159 task 9.4 — self-service wipe + admin member kill (DUR-05/06) #166

Merged
amiryahaya merged 4 commits from feat/wipe-and-admin-kill into main 2026-11-11 20:40:54 +01:00
Owner

Summary

Implements task 9.4 — the final DUR milestone task.

DUR-05 self-service wipe (server + desktop)

  • Setup/arm/cancel endpoints: typed acknowledgment, hashed wipe token, 24 h cancel window (idempotent arm)
  • WipeExecutorService: background sweep executing armed wipes past deadline — deletes ciphertext (blobs + rows), key wraps, sessions; suspends account; audited
  • Desktop wipe passphrase layer: third Argon2id wrap holding a dummy key; matching loads NO key and stamps a flag; uniqueness enforced across real/decoy/wipe
  • UnlockScreen arming panel (F-DUR6): countdown + cancel; Settings SelfServiceWipeSection (F-DUR5)

DUR-06 admin member kill (server + admin portal)

  • KillMember: SuperAdmin platform-wide revocation (sessions + wraps + memberships → Suspended); optional ?delete_content=true as separate confirmed step; retention default
  • Authz matrix row added
  • Admin KillMemberDialog (F-DUR7): step 1 kill (retention), step 2 typed-confirm content deletion

Threat-model disclosure shipped separately in 3a83e45 (§11, EoP-DUR-1).

Tests

  • API: 11 new integration tests (WipeAndKillTests); suite 1013/0/39; coverage 87.66% ≥ 80%
  • Desktop Rust: 4 new layer tests (44 total)
  • Desktop UI: 3 arming tests + 4 settings-section tests; suite 1313/0/1
  • Admin: 6 dialog tests; suite 245/0/0
## Summary Implements task 9.4 — the final DUR milestone task. **DUR-05 self-service wipe (server + desktop)** - Setup/arm/cancel endpoints: typed acknowledgment, hashed wipe token, 24 h cancel window (idempotent arm) - `WipeExecutorService`: background sweep executing armed wipes past deadline — deletes ciphertext (blobs + rows), key wraps, sessions; suspends account; audited - Desktop wipe passphrase layer: third Argon2id wrap holding a dummy key; matching loads NO key and stamps a flag; uniqueness enforced across real/decoy/wipe - UnlockScreen arming panel (F-DUR6): countdown + cancel; Settings `SelfServiceWipeSection` (F-DUR5) **DUR-06 admin member kill (server + admin portal)** - `KillMember`: SuperAdmin platform-wide revocation (sessions + wraps + memberships → Suspended); optional `?delete_content=true` as separate confirmed step; retention default - Authz matrix row added - Admin `KillMemberDialog` (F-DUR7): step 1 kill (retention), step 2 typed-confirm content deletion Threat-model disclosure shipped separately in 3a83e45 (§11, EoP-DUR-1). ## Tests - API: 11 new integration tests (`WipeAndKillTests`); suite 1013/0/39; coverage 87.66% ≥ 80% - Desktop Rust: 4 new layer tests (44 total) - Desktop UI: 3 arming tests + 4 settings-section tests; suite 1313/0/1 - Admin: 6 dialog tests; suite 245/0/0
Server:
- SelfServiceWipe endpoints: setup (typed acknowledgment, hashed wipe
  token), arm (24 h cancel window, idempotent), cancel (any session)
- WipeSetup entity + migration; wipe passphrase stays device-local
- WipeExecutorService (BackgroundService, 10 min sweep): executes armed
  wipes past their cancel deadline — deletes ciphertext (blobs + rows),
  key wraps, sessions; suspends the account; audited
- KillMember (DUR-06): SuperAdmin platform-wide access revocation
  (sessions + wraps + memberships, status → Suspended); optional
  ?delete_content=true as separate confirmed step; retention default
- Authz matrix row for the kill route

Desktop:
- Wipe passphrase layer (DUR-05): third Argon2id wrap holding a DUMMY
  key (never loaded) — matching it loads no key, stamps a flag; ladder
  order real → decoy → wipe; uniqueness enforced across all three layers
- UnlockScreen wipe mode: arm via API, arming panel with 24 h window +
  cancel (F-DUR6); store returns outcome mode (real|decoy|wipe)
- Settings SelfServiceWipeSection: typed acknowledgment + wipe
  passphrase setup, disable flow (F-DUR5)
- self_service_wipe commands: setup/arm/cancel via api_client

Admin portal:
- KillMemberDialog (F-DUR7): step 1 kill (retention default), step 2
  optional delete-content with typed confirmation

Tests: 11 API integration tests (wipe cycle, executor sweep, kill
gates), 4 Rust layer tests, 4 settings-section + 3 arming-screen tests,
6 admin dialog tests. Threat-model disclosure shipped in 3a83e45 (§11).
fix(admin): drop unused killed state in KillMemberDialog (noUnusedLocals)
Some checks failed
API CI / build-and-test (pull_request) Has been cancelled
Security CI / security-scan (pull_request) Has been cancelled
904022e520
docs(tracker): mark Phase 9 tasks 9.1–9.4 done (9.4 → PR #166)
All checks were successful
API CI / build-and-test (pull_request) Successful in 4m54s
Security CI / security-scan (pull_request) Successful in 2m48s
64c7c6c1d3
fix(desktop): remove duplicate panic_lock case in tauri mock dispatcher (eslint no-duplicate-case)
All checks were successful
Security CI / security-scan (pull_request) Successful in 2m12s
API CI / build-and-test (pull_request) Successful in 6m15s
83673ed581
Sign in to join this conversation.
No description provided.