M3 phase-3 desktop client: pairing UI, unlock ladder, settings completion (tasks 3.1/3.2/3.4) #142
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit#142
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Desktop-client portion of Phase 3 (Key Management & Multi-Device). Server-side contracts all landed (#136/#137/#138 + pairing endpoints /api/keys/authorize/init + approve + /api/keys/wraps, all tested). Gaps verified in clients/desktop 2026-11-10:
Slices:
Pairing UI (task 3.2, KEY-05/IDA-07) — entirely MISSING: no client code references authorize/init or authorize/approve. Build the settings 'Add device' flow: enrolled device renders QR/secret (POST /api/keys/authorize/init → pairing_secret 256-bit, 10-min TTL), new device enters secret + wrapping pubkey, enrolled device sees approval sheet (device name/platform info) → POST approve (signed). Expiry + single-use handling surfaced.
Unlock failure ladder (task 3.1 partial, KEY-04/09) — UnlockScreen has passphrase + biometric re-unlock but no failure ladder: consecutive-failure behavior (progressive delay/lockout hint), no attempt counter display. Server-side KEY-09 lockout exists; client UX needs the ladder.
Devices & keys settings completion (task 3.4, KEY-07) — DevicesList exists with revoke + confirmation; add consequences copy (what revoke does to wraps/sessions), pending pairing approvals surfaced in settings.
Recovery UI trustee-only completion (3.5 tail) — wizard aligned in PR #141 (server_share upload dropped, activation via setup_recovery_trustee_only); remaining: recovery_alert/recovery_cancelled notification actions route to the recovery page; owner cancel button on pending request (server endpoint /requests/{id}/cancel landed in #137).
Out of scope: 3.6 PRF unwrap (capability-gated, post-spike-0.2), 3.7 golden vectors (M7).
Acceptance: pairing works end-to-end on two desktop instances; unlock ladder UX matches F-M7/M8 equivalents; settings screens complete per KEY-07.
SLICE-1 RESTRUCTURED 2026-11-11 — pairing UI has desktop prerequisites that don't exist yet (verified in code, not assumption):
Restructured into three merged-PR steps (each testable/shippable):
Also discovered: failsulit-crypto cargo test was RED before any of this (shamir/ml_kem tests never updated for Zeroizing returns — fixed in PR #147) and symmetric::test_vector_bcrypt_hkdf KAT fails pre-existing (bcrypt 0.15.1 drift; regenerate with #15's KDF-floor work).
SLICE 1 COMPLETE 2026-11-11 — all three PRs merged (each with polled-green CI + evidence comments on the PRs):
e658f2b): per-install device identity — Ed25519 keyring identity, X-SSDID-Device-ID fingerprint headers (mirrors server DeviceFingerprint.Compute, unit-tested), idempotent enrollment at login (409-resolves), REAL sign_data (was always-error placeholder), revived the dead Settings->Devices section (list_devices/revoke_device commands now exist). Bonus: fixed pre-existing failsulit-crypto cargo-test compile breakage (shamir/ml_kem Zeroizing).8e6f7f5): master-key lifecycle — MasterKeyService (KEK-in-keychain at-rest model; create-at-first-unlock / load-at-restart; tamper + missing-KEK fail cleanly), unlock_session command (no silent unlock without key material), pair_wrap_master_key primitive (single-KEM ml-kem-768).1d41fb0+): pairing UI end-to-end — PairingService (ephemeral ml-kem wrapping keypair held in-process, payload codec base64url(json{challenge_id, pairing_secret, kem_algorithm, wrapping_pub_key}), wrap blob = ml_kem_ct||AES-GCM(mk, shared-secret)), initiator surface (QR + copy + fingerprint + countdown + 4s polling, immediate first poll) and approver surface (paste -> Rust-side preview_pairing authoritative fingerprint -> KEY-16-signed approve), MasterKeyService::import adopts the transferred key (fixes the silent second-device fork).CI fallout fixed along the way (all found by real runs): gitleaks benign filter now covers clients/desktop test paths + any /tests/ dir; SharedWithMePage (5 tests) + MySharesPage (file-wide default) moved to the #141 persistent-mock pattern; pairing preview moved out of jsdom (no WebCrypto) into the preview_pairing command.
Suite state: cargo 25/25 src-tauri (+ crypto crate green except the pre-existing bcrypt KAT, tracked with #15); vitest 1287/1skip.
REMAINING #142 slices: 2 (unlock failure ladder — note PR-B already landed the unlock-with-key-material groundwork), 3 (settings completion), 4 (recovery notification routing). One open design item for mobile waves: the desktop approver consumes a copy-paste payload; mobile QR scanning encodes the same payload — no protocol change needed.
SLICE 2 COMPLETE 2026-11-11 — PR #150 merged (squash
186a8f7; PR runs desktop-ci 38438 + security-ci 38437 green, polled before merge).Unlock failure ladder (F-D4/F-M7) shipped:
Bonus: unlock_session + biometric unlock now reset the ladder; verification is the GCM decrypt attempt itself (no verifier at rest to attack).
REMAINING #142: slice 3 (settings completion — devices consequences copy, pending approvals surfacing), slice 4 (recovery notification routing + owner cancel button).
SLICE 3 COMPLETE 2026-11-11 — PR #151 (settings completion + gotcha bundle, spans server + desktop; api-ci + security-ci + desktop-ci all green on the PR head, polled before merge).
Settings completion (task 3.4 / D6, KEY-07):
GOTCHA BUNDLE (bundled per user request):
Suites: server 990/0/39 (twice) + coverage gate 87.15%; cargo 31/31; vitest 1300/1skip; typecheck + lint clean (0 warnings).
REMAINING #142: slice 4 only (recovery notification routing + owner cancel button).
ALL FOUR SLICES SHIPPED — #142 COMPLETE (2026-11-11):
Final suite state on main (
2299391): server 990/0/39 + coverage gate 87.15%, cargo 31/31 src-tauri (+ crypto crate green, KAT re-published), vitest 1301/1skip, typecheck + lint clean. Post-merge runs verified per PR; slices 1/3 deployed to staging via CD.Out of scope (tracked elsewhere): task 3.3 opportunistic wrap upload (MIG-03), PRF (post-spike-0.2), golden vectors (M7), mobile pairing surfaces (mobile waves).