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
| Attacker | Can do | Must not be able to | Defence |
|---|---|---|---|
| Phisher with a look-alike page | Show any page, relay messages live | Log in as the user | Passkeys are bound to the RP ID and origin |
| Thief of a database copy | Read every row | Log in, or call an API | Public keys and hashes only; no reusable secret at rest |
| Thief of a log | Read metadata | Log in | The library writes no logs; tokens are never in URLs, except single-use links |
| Thief of a first-party token | Replay it | Use it | DPoP with server nonces |
| Thief of a session cookie | Use it until it ends | Change credentials, stay forever | Short life, hashed, fresh proof for sensitive actions |
| Thief of a connected-app token | Use its scopes at one audience until it ends | Change the account, use another API, renew after reuse | Audience, scope, one-use refresh tokens |
| Thief of an API key | Use its scopes until it ends or the owner ends it | Change the account, reach a first-party route | Off by default, own level, hashed, at most 90 days, last use and address shown |
| Malicious connected app | Ask for consent | Get more than the consent, pose as another app | Verified client identity, exact redirect URIs, consent page |
| Owner of a mailbox | Receive links | Log in silently, remove the owner’s passkeys | Delay, notices, cancel, frozen credential removal |
| Malicious identity provider | Claim any identity | Log in without the passkey | Rule 3 |
| Tenant administrator | Set rules, remove members | Log in as a member, weaken a rule, see another tenant | Policies tighten only; tenant in every key |
| Network attacker | Read and change traffic | Anything | TLS; iss checks (RFC 9207); exact origins |
| Cross-site page | Send requests with cookies | Change state | Origin and Sec-Fetch-Site checks, SameSite |
| Bot | Send many requests | Lock out users, enumerate accounts at scale | Rate 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
e2eepart 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.
Weakest links, in order
- Recovery by email, where an application enables it.
- Device approval by a careless user.
- API keys, where an application turns them on.
- Session cookies.
- The passkey provider’s account recovery.
A change that adds a weaker link than these needs a change to the thesis first.