Lion Cipher Lab

Harden the OAuth authorization request with PAR and JAR (RFC 9126 / 9101)

Why it matters

Most OAuth hardening advice targets the token: PKCE binds the code to the client, DPoP binds the token to a key, refresh rotation limits theft. But before any of that, the authorization REQUEST itself travels through the user-agent as plain front-channel query parameters -- client_id, redirect_uri, scope, state -- and the user-agent is exactly where an attacker sits. Anything in that URL can be inspected, logged into referrer headers and proxies, and rewritten in flight: bump scope from 'read' to 'read admin', swap redirect_uri to exfiltrate the code, or substitute a whole request object. The…

What you'll learn

Steps in this lab

  1. The authorization request, and why its integrity is the gap
  2. How PAR and JAR close the front-channel gap
  3. Set up your local, authorized, disposable lab
  4. Build the mock Authorization Server (PAR + JAR aware)
  5. Build the client and the browser/tamper driver
  6. STAGE 1 -- the hole: tamper the front channel and elevate scope
  7. STAGE 2 -- PAR: push the request; the front channel has nothing to tamper
  8. STAGE 3 -- JAR: sign the request object; the AS rejects a forgery
  9. The judgment: named failure modes, FAPI 2.0, and never hand-roll

Open the full interactive lab →