Repository navigation
feat(browser): enable real OS cookie encryption, CefCookieManager, remote cookie mirror, and Rust cookie importer - #286
Merged
Merged
Conversation
…mote cookie mirror, and Rust cookie importer Implements Phase 3b of `UP-095` (`#63002`) across `apps/browser-engine` and `crates/browser-pane` with zero new external crates (reusing locked `ring`, `rusqlite`, `windows`, and `security-framework`): - **Real OS cookie encryption (`apps/browser-engine/src/engine.rs`):** Removes `--use-mock-keychain` so Chromium encrypts profile cookies with the real OS key store (Windows DPAPI, macOS Keychain, Linux Secret Service/KWallet), paired with a short-lived startup persistence probe cookie (`cookie-check.opencode.invalid`) to detect denied Keychain or locked keyring sessions (`probe_disk_cookies`). - **`CefCookieManager` & loop-free remote cookie mirror (`apps/browser-engine/src/cookies.rs`):** Adds additive wire messages (`Ready.cookies`, `ProfileCookiesList`, `ProfileCookiesSet`, `ProfileCookieDelete`, `ProfileProbeCookies`, `ClearProfileData`, `SetShareSignIns`, `SyncRemoteCookies`) with zero-cookie-safe `CefCookieVisitor`, `"Sign out everywhere"` (clears cookies, HTTP auth credentials via completion callback, and site storage/caches across default + remote partitions), and exact `link-machine.ts::reconcileCookie` two-way remote mirroring (off by default; wipes remote partition cookies when turned off; never mirrors `IsolatedPreview` contexts). - **Pure-Rust cookie importer & Choose-sites backend (`crates/browser-pane/src/cookies/*`):** Discovers all 15 Chromium/Firefox/Safari browsers across Windows/macOS/Linux; reads live SQLite DBs from private `0o700` WAL snapshots; decrypts Windows DPAPI + AES-256-GCM and macOS/Linux PBKDF2 + pure-Rust FIPS-197 AES-128-CBC (stripping Chromium DB v24 `SHA256(host)` prefixes and reporting `v20` app-bound cookies as `Protected`); parses Safari `Cookies.binarycookies` and Netscape/Chrome-JSON/Playwright exports (<= 32 MiB); and groups registrable sites (PSL + private hosting tenants + RFC 3492 Punycode) without reading or decrypting cookie values for the Choose-sites list.
|
PR test build retired — merged into |
…ning (unpushed WIP)
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
…18..UP-122 (#295) - Fold verified fleet PRs #278, #285, #287, #288, #289, #290, #291, and #293 (Rune dc8f7f72: #1301, #1302 focus rescue verified Send+Enter -> effort) into docs/upstream-sync/ledger.{json,md} - Close UP-062 packaged-default regression (#278), UP-095-UI / UP-100 / UP-106 / UP-109 / UP-117 (#285, #289), and PRE-08 (#287); reassign UP-115, UP-116, UP-075 to BROWSER-UI - Add separate Reviewed column for browser rows tracking retrospective security reviews on merged PRs (#245, #268, #272, #277, #288, #275, #287, #285, #289) and pre-merge holds (#274, #280, #281, #283, #286, #292, #294, and BROWSER-TOOLS PR 3+) - Audit upstream anomalyco/opencode bfee96a859..2002222d13 (+6 commits: 1 skipped, 5 added: UP-118..UP-122) and refine radar routing
# Conflicts: # apps/browser-engine/src/context.rs # apps/browser-engine/src/engine.rs # apps/browser-engine/src/main.rs # apps/browser-engine/src/wire.rs # crates/browser-pane/src/client.rs # crates/browser-pane/src/lib.rs # crates/browser-pane/src/machine.rs # crates/browser-pane/src/protocol.rs
…-tab dispatch guard
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase 3b of
UP-095(#63002) — real OS cookie encryption,CefCookieManagerprofile operations, loop-free two-way remote cookie mirroring, "Sign out everywhere", and the cross-browser / cookie-file Rust importer & Choose-sites backend (apps/browser-engine,crates/browser-pane) with zero new external crates:apps/browser-engine/src/engine.rs): Removes--use-mock-keychainso Chromium encrypts cookies with Windows DPAPI, macOS Keychain, or Linux Secret Service/KWallet, and adds the startupPROBE_COOKIE(cookie-check.opencode.invalid) flow (ProfileProbeCookies+cookies::database::probe_disk_cookies) so the app can detect denied Keychain / locked keyring sessions.CefCookieManager, Sign out everywhere & remote cookie mirror (apps/browser-engine/src/cookies.rs):wire.rs/protocol.rsmessages gated byReady { cookies: true }:ProfileCookiesList,ProfileCookiesSet,ProfileCookieDelete,ProfileProbeCookies,ClearProfileData,SetShareSignIns,SyncRemoteCookies.CefCookieVisitor,__Host-host-only enforcement, and probe-cookie invisibility.ClearProfileData) clears HTTP auth credentials (with a validCompletionCallback), open-tab origin storage/caches (skippingIsolatedPreview), and wipes cookies on bothDefaultand all activeRemoteServerpartitions.reconcile_cookie, exactlink-machine.tsparity): off by default, never touchesIsolatedPreview, and wipes shared remote partition cookies immediately when turned off.crates/browser-pane/src/cookies/*):ring 0.17,rusqlite 0.41,windows 0.62,security-framework 3.7) plus pure-Rust#![forbid(unsafe_code)]FIPS-197 AES-128-CBC and RFC 3492 Punycode.0o700SQLite + WAL snapshots, in-process Windows DPAPI (CryptUnprotectData), macOS Keychain, Linuxsecret-tool, DB v24SHA256(host)prefix stripping,v20Protectedclassification, CHIPS exclusion, Firefox default-container + 139+ ms expiry, bounds-checked SafariCookies.binarycookies, and Netscape / Chrome JSON / Playwright cookie files (<= 32 MiB).BrowserHost::{engine_cookies, share_sign_ins, set_share_sign_ins, request_profile_cookies, import_profile_cookies, delete_profile_cookie, probe_profile_cookies, clear_profile_data, sync_remote_cookies, take_profile_events}ready forSettings > Browser.Verification
scripts/guardrails.ps1: 5/5 passed (0 errors; 0 new files > 800 lines)cargo clippy -p browser-pane --features engine --no-deps -- -D warnings: 0 warningscargo check -p browser-pane --no-default-features,cargo check --workspace,scripts/web.ps1 -Check,apps/browser-enginebuild: all passed with 0 warningsReady.cookies: true, batch import (__Host-host-only, expired reject), probe write/hide/delete, default isolation, two-wayDefault <-> RemoteServermirroring, disable-sharing remote wipe,ClearProfileDatafull wipe, on-diskLocal State"DPAPI"+ 77-bytev10encrypted cookie with empty plaintextvalue, and cross-restart persistencedpapi_unprotect+read_chromium_cookiesdecrypted the actual live CEF 156 Windows DPAPI cookie DB (dpapi_check=supersecret123), FIPS-197 AES-128-CBC + PBKDF2 +v20, Netscape/Chrome JSON/Playwright files, Choose-sites PSL/private-tenant/Punycode/IPv6 grouping, Firefox default-container/ms-expiry, Safari bounds-checked binarycookies, andprobe_disk_cookieslocked-keyring detection