Skip to content

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

  1. One implementation, in the daemon. core/webmatch decides, using golang.org/x/net/publicsuffix including its private section, so alice.github.io and mallory.github.io are different sites. The daemon recomputes the match on every fill, copy, totp-code, and update from the origin the browser reported, whatever the extension believed when it listed matches; record-social-login and the passkey operations apply the secure-origin, registrable-domain and rp id rules of core/webmatch and core/webauthn to the origins they are given. The list moves with ordinary dependency bumps, and known private suffixes are pinned by shared test vectors.
  2. The rules. The scheme must be https, except loopback, 127.0.0.1, [::1] and .localhost over http (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-entry match field narrows it to host, origin (scheme, host and port) or never. IP hosts match only exactly. A non-default port in the entry's URL must match.
  3. 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.
  4. The fill check runs in a fixed order, before any value is read. Collection allowed by the [agent.browser] collections list; entry type login; 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, needs confirmed (confirm-required otherwise); then the touch policy. A failed earlier check never raises a touch prompt. The browser-facing answer for an entry the session cannot see is denied ("not available to the browser"), for one that does not match it is not-found.
  5. 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.
  6. Collections with touch policy always are 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. matches and search omit such entries and fill and copy answer denied with no prompt. The human uses the CLI for prod. A later design that makes the metadata readable without the key can lift this.
  7. 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_domain in matches). 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 webmatch treats x.surge.sh as one site while tldts does 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.