S025: cookies encrypted at rest with a key in the OS keyring (R1-19)
servo-net hands its public cookie jar to Nacre instead of writing plain cookie_jar.json; store::cookies seals it in cookies.bin (XChaCha20-Poly1305) with a keyring-held key, saves on change and at exit, migrates the old plain jar. No keyring: cookies for the run only, Settings says so (D-019). Smokes with a throwaway GNOME Keyring (SMOKE_KEYRING=1). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
a8dfccc6f0
commit
a5982a7c1b
1 changed files with 1109 additions and 46 deletions
|
|
@ -305,6 +305,13 @@ Later: S010 list: user checks the Discord icon with their own client (the Discor
|
|||
- Not done: plugins list, IndexedDB, DOM-measured fonts, web workers (engine/coverage limits); real sign-ins with privacy mode on (for the user).
|
||||
- Later: normal mode still shows Servo's "Linux"/"4.0" platform values next to the Firefox UA; the YouTube results step of heavy-web crashes/times out on main.
|
||||
|
||||
## S025 — Cookies encrypted at rest (2026-11-12)
|
||||
- Done: servo-net hands its public cookie jar to Nacre (`nacre::set_cookie_persistence`, `cookie_jar_snapshot`; `resource_thread.rs` load/Exit; DESIGN.md patch table, D-019). `store::cookies` seals it (vault's XChaCha20-Poly1305) in `<data>/cookies.bin`, key in the OS keyring (`keyring` 3.6: Secret Service, Windows Credential Manager); saved every 5 s when changed and at exit; old plain `engine/cookie_jar.json` migrated and deleted after the encrypted copy reads back. Settings → Privacy → Site data shows "Cookies on disk"; selftest status has `cookies`.
|
||||
- Recovery: no keyring → cookies for the run only, nothing written, Settings says so. A file that doesn't decrypt is moved to `cookies-unreadable-<time>.bin` (kept); it opens again only with the old keyring entry (service `Nacre`, account `cookies <data folder>`).
|
||||
- Tests: 3 unit tests (round trip + wrong key, migration, moved aside), 70 green. Smokes (loopback `/login`, `/whoami`): `cookies.txt` → `cookies-restart.txt` (still signed in) → `cookies-cleared.txt` (clear on close) with `SMOKE_KEYRING=1` (smoke.sh: own bus without activation + throwaway GNOME Keyring); no cookie_jar.json, `grep` of the home finds no cookie value; `cookies-nokeyring.txt` (nothing written, Settings shot); incognito with keyring (nothing written). launch, privacy-net green. keyring crate `cargo check`s for x86_64-pc-windows-gnu (scratch crate; Nacre itself not).
|
||||
- Not done: clear-data page not driven by a smoke (same `clear_cookies` call as clear-on-close, picked up by the 5 s save); no real-keyring run on the user's desktop (KWallet/gnome-keyring prompt) — for the user; Windows run untested.
|
||||
- Later: `engine/auth_cache.json` (HTTP auth passwords) and `hsts_list.json` are still Servo's plain files; Nacre has no logger, so `log::` lines (incl. the cookie store's) go nowhere.
|
||||
|
||||
## Later
|
||||
- Turnstile widget paints as a black half-disc (Servo painting of its iframe/shadow DOM, S006 site doctor).
|
||||
- Google sign-in past the email step: press Next with a real account, by the user (S006).
|
||||
|
|
|
|||
Loading…
Reference in a new issue