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

01 Model

Realm and tenant

  • A realm is one set of users, one WebAuthn RP ID and one login origin.
  • A tenant belongs to one realm and has a 16-byte ID. An application without tenants uses the root tenant: 16 zero bytes.
  • A passkey belongs to a realm, because it is bound to the RP ID. Tenants on other domains use the provider (08) and send the user to the login origin. Implementations MUST NOT use related origins to share passkeys between tenants.

Isolation

  • Every tenant-scoped storage operation takes the tenant as an argument. A form without one MUST NOT exist.
  • Every tenant-scoped MAC, derivation and token includes the tenant.
  • Each tenant has its own issuer, and its own provider keys.
  • An identifier from one tenant that is used in another gives the same refusal as an unknown one.

User

A user has an ID (16 bytes, random by default; an application maps its own IDs to 16 bytes), a state (active or disabled) and credentials. Names, addresses and profile data belong to the application. An identifier such as a handle or an email address is optional, and unique in the realm if used.

Disabling a user ends sessions, tokens and device keys in the same commit.

Entering a tenant

A user may enter a tenant with an active membership (14). A session is for one tenant. Entering another tenant creates another session, and can need another login if that tenant’s policy is stricter. The library stores no roles: the application adds its own columns to the memberships table.

Credentials

KindHeld byProves
PasskeyA personThe person
Device keyA CLI, native app or machineThe device, and the user that approved it
Session key (DPoP)A browser or appThe session
API key (13)Whoever has itThe scopes that its user gave it
External identityA person at another providerA claim, never a login
Recovery methodA personPermission to create a passkey

Proof

A successful check gives an Authenticated value:

FieldContent
subjectUser or device
tenantTenant
levelfirst_party, connected(client, scopes) or api_key(id, scopes)
methodsWhat was proved, for example passkey with user verification
proved_atTime of the last passkey assertion
bindingKey thumbprint, or cookie, or bearer

Only the library can create it. A handler states what it needs in its type: level, maximum age, binding. A request that does not have it never reaches the handler.

Policy

A policy is a set of requirements. Policies from the profile, instance, tenant and route combine to the strictest:

RequirementCombine
LifetimesMinimum
Maximum age of a passkey assertionMinimum
Passkey must not sync (BE flag clear)Or
External identity required: list of providersBoth lists must be satisfied
Signup modes, recovery methodsIntersection
Binding requiredOr

Combination MUST be associative, commutative and idempotent. An empty signup set means that nobody can sign up.

A requirement that the current login does not meet gives the refusal step_up_required, with the requirement.