Repository navigation
feat(web): the browser signs in with a non-extractable device key, or pairs for this session only - #27552
Merged
Conversation
OrcaWin
force-pushed
the
np/d2b-web-session-host
branch
from
October 11, 2026 19:58
8ef0f37 to
b2dff1a
Compare
OrcaWin
force-pushed
the
np/d2b-web-keys
branch
from
October 11, 2026 19:58
fd8f17c to
42dec6a
Compare
7 tasks done
OrcaWin
force-pushed
the
np/d2b-web-session-host
branch
from
October 11, 2026 21:03
b2dff1a to
e3e9fb9
Compare
OrcaWin
force-pushed
the
np/d2b-web-keys
branch
from
October 11, 2026 21:03
e6a3ace to
82d0701
Compare
added 3 commits
October 11, 2026 14:41
… pairs for this session only - On a secure page with WebCrypto Ed25519, the browser registers a non-extractable key (stored in IndexedDB, create-exclusive across tabs) over a v2 token socket, then reconnects with key auth and replaces its stored pairing code with a placeholder. Requests on a keyed socket carry no token. - On a plain-http page on another machine, or without Ed25519, existing stored pairings keep working unchanged (with a warning); new pairings stay in memory and, when the host supports it, register a session-only key. - Only a sealed device_revoked naming this browser's key deletes it; a downgraded host, a bad proof or host storage trouble keep it. - The shared handshake core gains an async device-key credential (v2 only).
…ken key store - Every web socket carries ?orca-client=web so hosts gate only the web bundle. - A key record belongs to one pairing revision: a re-pair uses its fresh code. - A code that never migrated connects without reading IndexedDB; a migrated pairing whose key store fails retries instead of going dead. - A tab that finds the key already active forgets its code, and saving a stale copy of the same pairing never puts the code back over a placeholder.
A key record from a newer pairing revision is left alone (the tab stays on its code), and saving an older revision never replaces a newer stored pairing.
OrcaWin
force-pushed
the
np/d2b-web-keys
branch
from
October 11, 2026 21:58
82d0701 to
4be29a4
Compare
OrcaWin
marked this pull request as ready for review
October 11, 2026 22:16
7 tasks done
9 tasks done
nwparker
added a commit
that referenced
this pull request
Oct 17, 2026
…s again (#29984) Partially reverts #27540 and the plain-http part of #27552, which broke web pairing on upgrade for 1.4.227 users who open Orca at a LAN or Tailscale address: - The host no longer refuses a first pairing from a plain-http page on another machine (insecure_origin, ORCA_ALLOW_INSECURE_WEB_PAIRING). - Such a page keeps its pairing code in local storage and signs in with it, as in 1.4.227, so reloads, new tabs and bookmarks stay paired; no notice. - Session-only browser keys (pairing.device-key-ephemeral.v1, the idle sweep) stay for browsers without Ed25519. - A web client whose credentials are refused shows the host's reason instead of an empty workspace and "Session restore failed".
4 tasks done
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.
ELI5
The Orca web client used to remember its pairing code in the browser's
localStorage. Any script running on that page could read the code and reuse it from anywhere. Now the browser makes its own sign-in key, one that even the page itself cannot read out, and it forgets the code.Where the browser cannot keep such a key safely, it now pairs for the current tab only:
http://on another machine, orBrowsers that are already paired keep working, and nobody has to pair again.
What Changed
Before: the pairing code sat in
localStorageand was sent on every connection, forever (#17399).After:
CryptoKeycan sign but can never be exported.add(), so two open tabs end up with the same key.pairing.device-key.v1, the browser:registerproof over that session's transcript and callspairing.registerDeviceKey;migrated:<deviceId>);localhost, or an SSH tunnel.localStorage. If the host supports session keys (feat(runtime): session-only browser keys and opt-in for pairing from plain-http pages (host) #27540), the browser registers an in-memory key withephemeral: trueand forgets the code.device_revokedthat names this browser's key deletes the key and the pairing.bad_authafter key auth means the host was downgraded. The browser keeps the key and says so.registry_unavailableretries with backoff, and the key is kept.insecure_originshows the host's refusal with the opt-in instructions and the LAN-attacker warning.?orca-client=web, so the host can tell the web client from a phone (feat(runtime): session-only browser keys and opt-in for pairing from plain-http pages (host) #27540).migrated:placeholder.device-keycredential, v2 only. Legacy framing refuses it, and it signsencodeDeviceProofMessage('auth', transcriptHash).web-runtime-connection-auth.ts, and its timers intoweb-runtime-connection-timers.ts.Why
localStorageor IndexedDB that is plain data. A non-extractable key can be used by such script, but it cannot be taken to another machine.Linked Issue
Fixes #17399 for browsers with Ed25519 on secure pages. Session-only elsewhere, as decided.
Visual Proof
No screenshot (no browser automation available here). What the user sees:
ORCA_ALLOW_INSECURE_WEB_PAIRING=1.Testing
tests/e2e/cross-version-wire/cross-version-web-device-key.unit.test.tsruns the real web transport against the real host socket wiring, registry and key registration:src/renderer/src/web/web-runtime-credential-source.test.ts:src/renderer/src/web/web-runtime-environment-token.test.ts: a stale save keeps the placeholder, and a re-pair stores its fresh code.src/renderer/src/web/web-device-key.test.ts:src/renderer/src/web/web-runtime-auth-verdict.test.ts: the I8 verdict table.src/shared/paired-e2ee-device-key-auth.test.ts:authand carries capabilities;The existing web client, preload and runtime suites pass.
pnpm tc, oxlint,check:code-quality:changed,pnpm lint(including localization) pass.Automated tests added/updated
Agent skill upstream boundary
Notes
localhost, so it is a secure context and gets a persistent key.