Advanced OAuth
OAuth extensions for higher-security and larger deployments, grouped by the problem they solve. Assumes the core OAuth lessons.
Start with Pushing an authorization request
Protecting requests and responses
Protecting the authorization request and response: pushed requests (PAR), signed requests (JAR), signed responses (JARM) and issuer identification.
- Pushing an authorization requestSee why a browser-carried authorization request can be read, changed or forged, then push it straight to the PAR endpoint with client authentication and read the request URI it returns.
- Using the request URI and handling failuresSend the browser with only a client ID and a single-use request URI, handle errors from the push and the authorization endpoint, and require PAR so the ordinary route is closed.
- Building a request objectSee why some requests need a signature that travels with them and lasts as evidence, then build a signed request object with protective claims, send it by value or by reference, and encrypt it.
- Validating a request objectFollow the authorization server's checks on a request object, see why only its own parameters count, fetch references safely, and stop downgrades to unsigned requests.
- Using JAR with PARPush a signed request object to the PAR endpoint, keep it distinct from the client assertion beside it, and see why high-assurance profiles combine the two mechanisms.
- Protecting an authorization responseSee why an ordinary authorization response cannot prove where it came from, ask for a signed JARM response, read it claim by claim, choose a response mode, and see which checks a signature cannot replace.
- Response validation and failuresValidate a JARM response in the right order before using its code, handle signed and unsigned errors, and reconcile the iss claim with the iss parameter.
- Checking the response issuerLearn how the iss response parameter names the authorization server, how a client compares it exactly with the issuer it asked, and what to do when the check fails.
Sender-constrained tokens
Binding tokens to a key or certificate so a stolen token is useless on its own: DPoP and mutual TLS.
- Binding a token to a keySee how DPoP binds an access token to a key pair the client holds, so a copied token is useless without the private key that never leaves the device.
- Creating a DPoP proofBuild the signed proofs a client sends to the token endpoint and to an API, and compute the JWK thumbprint and access token hash they rely on.
- Validating proofs at the serverFollow the checks an authorization server and an API make on DPoP proofs, how refresh tokens and pushed requests stay bound, and why a bound token sent as Bearer must fail.
- Nonces and replay handlingLimit what a captured DPoP proof allows with time windows, identifier tracking, and server-provided nonces, and see what DPoP cannot protect against, especially in a browser.
- Authenticating a client with a certificateAuthenticate a confidential client with a TLS client certificate, compare the PKI and self-signed methods, and see why mutual TLS gets separate endpoint addresses.
- Certificate-bound access tokensBind an access token to the client certificate used to obtain it, check the binding at the API, bind a public client's tokens, forward certificates safely through proxies, and compare with DPoP.
- Certificate rotation and validationRenew client certificates without breaking authentication or bound tokens, monitor expiry and leaks, see what an authorization server validates, and choose a sender constraint for each kind of client.
Token exchange
Exchanging one token for another to call further services, act on someone's behalf, or cross trust boundaries.
- The problem token exchange solvesSee why an API calling another service on a person's behalf needs a new token, and how an authorization server acting as a token service issues one.
- Delegation, impersonation, and actor tokensLabel the token being exchanged, compare tokens that make their holder indistinguishable from the person with tokens that name who acts, and see how may_act and an actor token bring in a support agent.
- Following a token exchangeFollow the photo API as it exchanges the printer's token for a storage token, read every field of the request, response and new token, then follow storage's own exchange and its nested act chain.
- Scopes, resources, and audiencesName the target of an exchange with resource or audience, ask for one target at a time, and narrow scope so an exchange never adds access.
- Trust and validationWork through what an authorization server checks before exchanging a token, from client permission to lifetime, and what the downstream API checks afterwards.
- Errors and failure casesRead token exchange errors, handle subject tokens that expire mid-operation, decide which failures to retry and which service in a chain can recover, and trace a chain without logging tokens.
Discovery and registration
Authorization server and protected resource metadata, registering and managing clients dynamically, and client ID metadata documents.
- Authorization server metadataFind and read an OAuth authorization server's RFC 8414 metadata: the well-known address for issuers with a path, the members an OAuth client relies on, the issuer check and signed metadata.
- Protected resource metadataFind an API's RFC 9728 metadata from its address or a 401 challenge, follow it to an authorization server, request a token for that API, and check the resource value and the server before trusting either.
- Registering a client dynamicallyRegister a client through an API, compare open and protected registration, and see what per-installation registration gives a native app and what it cannot prove.
- Client metadata and software statementsSee which client metadata a registration request can carry, how servers treat self-asserted values, and what a signed software statement does and does not prove.
- Registration responses and errorsRead a successful registration response, check what was actually registered, plan for an expiring secret, and handle the four registration error codes.
- Managing a registrationRead and replace a client registration at its configuration endpoint, protect and rotate its registration access token, and delete it, knowing which issued tokens stop working.
- Client ID metadata documentsUse an HTTPS URL as a client ID that points at the client's own metadata, see what the authorization server checks and fetches safely, and put discovery together from an API's 401 to a token.
Security profiles (FAPI)
FAPI security profiles: how high-assurance deployments combine the OAuth extensions, and how conformance is tested.
- The purpose of a security profileSee why open banking ecosystems need OAuth choices made once for everyone, what a security profile like FAPI does, and how its attacker model frames it.
- How FAPI combines OAuth mechanismsFollow a bank payment through FAPI 2.0, trace each requirement to the OAuth mechanism behind it, and see where the profile deliberately departs from habit.
- Interoperability and conformance testingLearn why implementations of the same profile still disagree, how conformance testing and certification work, and what a passing test run does and does not prove.