Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Threat model

Assets

Accounts, sessions, credentials, the link between a person and an account, tenant boundaries, and (with the e2ee part) the users’ identity keys.

Attackers

AttackerCan doMust not be able toDefence
Phisher with a look-alike pageShow any page, relay messages liveLog in as the userPasskeys are bound to the RP ID and origin
Thief of a database copyRead every rowLog in, or call an APIPublic keys and hashes only; no reusable secret at rest
Thief of a logRead metadataLog inThe library writes no logs; tokens are never in URLs, except single-use links
Thief of a first-party tokenReplay itUse itDPoP with server nonces
Thief of a session cookieUse it until it endsChange credentials, stay foreverShort life, hashed, fresh proof for sensitive actions
Thief of a connected-app tokenUse its scopes at one audience until it endsChange the account, use another API, renew after reuseAudience, scope, one-use refresh tokens
Thief of an API keyUse its scopes until it ends or the owner ends itChange the account, reach a first-party routeOff by default, own level, hashed, at most 90 days, last use and address shown
Malicious connected appAsk for consentGet more than the consent, pose as another appVerified client identity, exact redirect URIs, consent page
Owner of a mailboxReceive linksLog in silently, remove the owner’s passkeysDelay, notices, cancel, frozen credential removal
Malicious identity providerClaim any identityLog in without the passkeyRule 3
Tenant administratorSet rules, remove membersLog in as a member, weaken a rule, see another tenantPolicies tighten only; tenant in every key
Network attackerRead and change trafficAnythingTLS; iss checks (RFC 9207); exact origins
Cross-site pageSend requests with cookiesChange stateOrigin and Sec-Fetch-Site checks, SameSite
BotSend many requestsLock out users, enumerate accounts at scaleRate limits; discoverable login needs no identifier

What the design does not protect against

  • Code on the application’s own origin. A script there can act as the user, and can read keys that the page can read. The defence is a strict CSP and no third-party code.
  • A compromised user device, while it is unlocked.
  • A malicious server operator. The operator can log in anyone, except that the e2ee part keeps content keys from the operator. A malicious page can still steal those keys when the user unlocks them.
  • A compromised passkey provider. A synced passkey is as strong as the account that syncs it. A policy can require passkeys that do not sync.
  • A user who approves a device that is not theirs. RFC 8628 can be phished. The approval page shows the device key’s fingerprint and where the request came from, and the user must compare it.
  • Denial of service beyond rate limits.
  1. Recovery by email, where an application enables it.
  2. Device approval by a careless user.
  3. API keys, where an application turns them on.
  4. Session cookies.
  5. The passkey provider’s account recovery.

A change that adds a weaker link than these needs a change to the thesis first.