04 Sessions
Key-bound sessions
For JavaScript clients, native apps and CLIs. The client makes a key pair for the session and proves it with DPoP (RFC 9449).
- When the policy requires key-bound sessions, a login without a proof is refused with
invalid_dpop_proof. - The server requires a nonce in each proof, and accepts each
jtionce in the proof’s window, in all its processes (10). htm,htu,iat,nonceand, with a token,athare checked. The key’s thumbprint (RFC 7638) is in the token record.- The access token is opaque: 256 random bits. The server stores its hash.
- A renewal needs a proof with the session’s key. It gives a new token and does not extend the absolute limit.
- Platform hardware keys SHOULD be used where they exist. That is why the profile has ES256.
Cookie sessions
For page loads, where a browser cannot send a proof.
- Name
__Host-…, withSecure,HttpOnly,Path=/,SameSite=Strict. An application that needs to arrive logged in from a link MAY useLax. - The value is 256 random bits, stored as a hash. It changes at login, at step-up and when the tenant changes.
- A request that can change state MUST have an allowed
Origin, andSec-Fetch-Site: same-originif the header is present.GETchanges nothing. - A cookie session reaches sensitive handlers only with a fresh login.
Fresh login
A fresh login is a new passkey assertion, bound to the session and to the action’s name. It satisfies Fresh<n> for at
most n seconds. Sensitive actions include: credentials, recovery, sessions of others, account deletion, approving a
device, and consent to a connected app with write scopes.
Media and downloads
Some players and download managers send neither a proof nor a safe cookie. The application can create a signed link: one path, one method, one subject, at most 10 minutes†, MAC with a purpose label. It gives no session.
Ending
Logout ends one session, and the sessions in tenants that it is the root session of (14). “Log out everywhere” ends all sessions, tokens, connected-app grants and API keys of the user, and can keep device keys. Both are commits: after them, no token works.
Refused
Tokens in URLs, tokens in localStorage without encryption, sessions without an absolute limit, and “remember me” that
skips the passkey.
View as another user
A person can see the application as another user, for example for support. The application decides who may.
- It needs a fresh login, and is a session of the user with the person (
actor) and the person’s session (parent). - It is valid only with the parent session, for one hour†, and not longer than the parent. It opens no other view.
- It is not a proof of the user: there is no time of a proof, so nothing that needs a fresh login accepts it. Functions that change an account, a session or a credential, or make a link or a grant, refuse it.
- A read-only view allows safe methods only.
- With cookies, it has its own cookie beside the person’s cookie. If it is there and not valid, the request is refused, and not treated as the person’s own.
- Both users have an event that names the other. The user sees it in the list of sessions, and can end it.