0049: The daemon is the only origin-matching authority
- Status: accepted (add-browser-extension archived 2026-10-30)
- Date: 2026-10-27
- Change:
add-browser-extension(design.md "Decisions", "Group 4 decisions" and "Group 5 decisions")
Context
Whether a stored login may be offered to a page is the phishing decision. If two components decide it, each with its own public suffix list, they will disagree on some host, and the gap is exactly where a lookalike or a shared-hosting neighbour gets a password. The extension also runs in a context every web page can try to confuse.
Decision
- One implementation, in the daemon.
core/webmatchdecides, usinggolang.org/x/net/publicsuffixincluding its private section, soalice.github.ioandmallory.github.ioare different sites. The daemon recomputes the match on everyfill,copy,totp-code, andupdatefrom the origin the browser reported, whatever the extension believed when it listed matches;record-social-loginand the passkey operations apply the secure-origin, registrable-domain and rp id rules ofcore/webmatchandcore/webauthnto the origins they are given. The list moves with ordinary dependency bumps, and known private suffixes are pinned by shared test vectors. - The rules. The scheme must be
https, except loopback,127.0.0.1,[::1]and.localhostoverhttp(offered with a warning).file:,data:,blob:,about:,javascript:and opaque origins are never served. Hosts compare in A-label form. The default policy is registrable domain, ranked exact host first, then other hosts of that domain, then most recent local use; the per-entrymatchfield narrows it tohost,origin(scheme, host and port) ornever. IP hosts match only exactly. A non-default port in the entry's URL must match. - The origin comes from the browser. The extension sends the origin of the frame as the browser's sender record reports it (frame and document), never a value supplied by page or content-script data, and the top-level origin beside it. Before handing values to a frame it checks the frame still holds the same document and discards them otherwise.
- The fill check runs in a fixed order, before any value is read.
Collection allowed by the
[agent.browser] collectionslist; entry typelogin; the page matches the entry under its policy; a frame or a form action in another registrable domain, or a form posting over a clear channel, needsconfirmed(confirm-requiredotherwise); then the touch policy. A failed earlier check never raises a touch prompt. The browser-facing answer for an entry the session cannot see isdenied("not available to the browser"), for one that does not match it isnot-found. - Values only for logins. A browser session can obtain a password from
a
login, a code from a login's TOTP, and a passkey signature. API keys, SSH keys, certificates and environment bundles are never served, which bounds what a compromised extension or browser can take. - Collections with touch policy
alwaysare not served in protocol version 1. An entry's type and URLs sit under the collection key, which the daemon may use only after a fresh touch, so the match cannot be recomputed before the prompt, and prompting first would let a page raise a prompt naming itself.matchesandsearchomit such entries andfillandcopyanswerdeniedwith no prompt. The human uses the CLI forprod. A later design that makes the metadata readable without the key can lift this. - The extension holds no suffix list that can release a value. Its
ranking and the "Fill anyway" confirmation follow the daemon's answers
(
confirm-required,registrable_domaininmatches). The one place it ships a list (tldts, with the private section) is the social login watcher, which uses it to decide whether to prompt the user about a redirect, never whether to release a value.
Consequences
- A phishing page gets nothing from the daemon even if the extension is confused, because the daemon refuses on its own record.
- The daemon's suffix list is the dependency's, and it can be stale: at the
time of writing
webmatchtreatsx.surge.shas one site whiletldtsdoes not, so one tenant's login matches another's, and the same list backs the passkey rp id check (ticket 01M54MXND3, security). - Entries in
prod-style collections cannot be filled from the browser. - Matching logic lives once and is reusable by the desktop and mobile apps.