RFC 9126 — OAuth 2.0 Pushed Authorization Requests (PAR)

Gap (candidate for FAPI track / /authorize hardening)

RFC 9126 — OAuth 2.0 Pushed Authorization Requests (PAR)

Status: Standards Track
Published: 2021-09
L-tier / T-tier: L6 · T1 (prepare)
OneAuth coverage: Implemented (apiauth.PARHandler via MountAuthorize; in-memory + GORM stores)
See also: RFC_9101.md · LANDSCAPE.md

In one sentence

PAR moves the authorization request off the browser URL and into a
back-channel POST — the AS returns a short request_uri that the browser
carries instead of all the request parameters, integrity-protecting and
shrinking the redirect.

What problem does it solve?

Without PAR With PAR
Authorization request parameters travel as query string — readable by anyone in the URL chain (browser history, server logs, Referer headers) Parameters POSTed back-channel; browser only carries request_uri=urn:ietf:params:oauth:request_uri:...
Request integrity protection means signing the request (JAR / RFC 9101) and sending a huge JWT in the URL PAR returns a tiny URN; the AS holds the (signed) request server-side
Long URLs break browser limits, mobile keyboards, QR codes Short request_uri always fits
Authorization details (RAR — RFC 9396) can carry rich JSON; query string is the wrong shape POST body is the natural carrier; RAR + PAR is a clean pairing

PAR is the transport improvement for /authorize requests. It pairs
naturally with JAR (signed requests) and RAR (rich authorization data).
The FAPI 2.0 Security Profile requires PAR; signing the request with JAR
belongs to FAPI 2.0 Message Signing and FAPI 1.0 Advanced.

Relatable example

An EU open-banking payment initiation: the third-party app wants to
authorize a transfer of €500 from a customer’s account A to merchant B.
The request is large (account numbers, amount, currency, beneficiary
details) and must be integrity-protected (regulators say so).

Without PAR, the third-party would either build a giant URL stuffed
with details (broken on real browsers) or use JAR (signing) and put a
huge signed-JWT in the URL (slightly less broken but still ugly).

With PAR, the third-party POSTs the entire request to
https://bank.example/par server-side. The bank validates and stores it,
returns request_uri=urn:ietf:params:oauth:request_uri:9faf... with an
expiry. The third-party redirects the customer’s browser to:

https://bank.example/authorize?client_id=tpp-1
                              &request_uri=urn:ietf:params:oauth:request_uri:9faf...

The browser-borne URL is short, opaque, and carries no payment details in
its history. Regulators get integrity. UX gets clean URLs. Everybody wins.

Key concepts

  1. One endpoint: POST /par (typically /par or
    /oauth/par). Returns {request_uri, expires_in}.
  2. request_uri is opaque to the client — typically of form
    urn:ietf:params:oauth:request_uri:<random> with short expiry (60s
    default in 9126).
  3. PAR is a back-channel call. It uses the same client authentication
    the AS does at /token (client_secret_basic, private_key_jwt,
    mTLS, etc.). This lets the AS know who is pushing what request.
  4. Composes cleanly with JAR. The request body POSTed to /par can
    itself be a request=<signed-JWT> in the JAR style. The AS verifies
    the signature once at /par; the subsequent /authorize call just
    dereferences request_uri to find the validated request.
  5. 2.1’s require_pushed_authorization_requests AS-level config (and
    per-client metadata field) lets an AS require PAR — refuse any
    direct /authorize request that isn’t via request_uri. FAPI 2.0
    mandates this.

Wire example

Step 1 — client POSTs request to /par:

POST /par HTTP/1.1
Host: as.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic <client-creds>

response_type=code
&client_id=tpp-1
&redirect_uri=https%3A%2F%2Ftpp.example.com%2Fcb
&scope=openid+payments
&state=xyz
&code_challenge=E9Mel...
&code_challenge_method=S256
&authorization_details=%5B%7B%22type%22%3A%22payment_initiation%22%2C%22actions%22%3A%5B%22initiate%22%5D%2C%22instructedAmount%22%3A%7B%22currency%22%3A%22EUR%22%2C%22amount%22%3A%22500.00%22%7D%7D%5D
HTTP/1.1 201 Created
Content-Type: application/json
Cache-Control: no-store

{
  "request_uri": "urn:ietf:params:oauth:request_uri:9faf...zJ8",
  "expires_in":  90
}

Step 2 — browser redirect uses the opaque request_uri:

HTTP/1.1 302 Found
Location: https://as.example.com/authorize?client_id=tpp-1&request_uri=urn:ietf:params:oauth:request_uri:9faf...zJ8

The AS dereferences request_uri, recovers the full validated request,
and continues with the auth-code flow as if the original query-string
had been used.

With JAR layered in (signed request body):

POST /par HTTP/1.1
Host: as.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic <client-creds>

request=eyJhbGciOiJSUzI1NiIs...long-signed-JWT-with-all-params...

AS verifies the signature once, stores the validated request, returns the
same request_uri. The browser side is unchanged.

Where it lands on the OAuth abstraction

  • L6 request integrity. PAR is the transport improvement; JAR is the
    signature improvement; together they harden the request side.
  • T1 (request prep). Before T2’s redirect.
  • AS metadata advertisement:
    pushed_authorization_request_endpoint (the URL), and optionally
    require_pushed_authorization_requests per-deployment / per-client.

OAuth 2.0 status

Published 2021. Adopted in FAPI deployments today; broader adoption is
climbing slowly. Most consumer-grade OAuth deployments don’t (yet) ship
PAR because the wire UX wins don’t justify the implementation cost
without a regulatory mandate.

OAuth 2.1 status

Not mandated by 2.1. OAuth 2.1 §4 references PAR as the recommended
way to deliver complex authorization requests but does not require it.

FAPI 2.0 does mandate PAR. If your deployment trajectory includes
FAPI 2.0 conformance, PAR is on the critical path.

Migration path (query-only → PAR-supported → PAR-required)

This is a three-phase ramp:

  1. Phase 1 — stand up /par endpoint that accepts the same parameters
    /authorize does. Validate and store; return request_uri. Allow both
    forms (/authorize direct, or via request_uri). Update AS metadata
    with pushed_authorization_request_endpoint.
  2. Phase 2 — enable PAR for clients that opt in via DCR metadata
    (require_pushed_authorization_requests: true per-client). Audit log
    any direct /authorize calls from those clients.
  3. Phase 3 — toggle global enforcement for FAPI-track deployments.
    Reject any direct /authorize request lacking request_uri.

Phase 1 is cheap (small endpoint, in-memory or short-TTL store). Phase 2
adds a flag check. Phase 3 is a policy decision, not a code change.

When NOT to use it

  • Simple OAuth deployments without integrity-sensitive requests —
    PAR adds operational surface (a new endpoint, a TTL’d store) without
    much benefit. The plain query-string form is fine for vanilla
    authorization-code flows.
  • Internal services with controlled networks — the browser-history /
    log-leak threat model often doesn’t apply.

OneAuth status

9126 surface Status Where Notes
POST /par endpoint Implemented apiauth/par.go PARHandler; mounted by MountAuthorize when PushedStore is set 201 + request_uri + expires_in, errors in the token-endpoint format (§2.3)
request_uri lookup at /authorize Implemented apiauth/authorize.go AuthorizationHandler.ParseAndValidate → resolvePushedRequest The stored payload is authoritative; posted parameters are ignored rather than merged. Since 0.1.49 client_id is required alongside request_uri (§4) and must match the client that pushed it
pushed_authorization_request_endpoint AS metadata Implemented ASServerMetadata.PushedAuthorizationRequestEndpoint Advertise only where /par is mounted
require_pushed_authorization_requests, AS-wide Implemented ASServerMetadata.RequirePushedAuthorizationRequests (advertisement) + AuthorizeMountConfig.RequirePushedRequests (enforcement) Refuses any /authorize request without request_uri
require_pushed_authorization_requests, per client (§6) Implemented core.AppRegistration.RequirePushedAuthorizationRequests; DCR; FS / GORM / GAE app stores; client.ClientRegistrationRequest in the SDK; enforced in AuthorizationHandler.ParseAndValidate Since 0.1.50. A client registered with it gets invalid_request on a direct /authorize request
One code per pushed request Implemented apiauth/authorize.go AuthorizationHandler.IssueCode; core.ConsumePushedAuthorizationRequestResponse.Consumed Since 0.1.49. IssueCode spends the reference before minting, and Consumed is true for exactly one caller, so of two approvals racing on one push only one gets a code. A custom PushedAuthorizationRequestStore must set Consumed
Consent screen round-trips request_uri Implemented apiauth/authorize_verification_handler.go authorizeConsentData.RequestURI Since 0.1.49. Approve resolves the stored payload. A custom consent template must post request_uri back, or Approve treats the hidden inputs as a fresh request and fails under RequirePushedRequests
PAR store with TTL’d request_uri records Implemented core.PushedAuthorizationRequestStore, in-memory + GORM (stores/gorm/par.go), shared contract suite in partest/ FS and GAE backends are follow-ups
Caller authentication on /par Implemented Reuses ClientAuthenticator through the shared confidential-client gate Same methods as the token endpoint
dpop_jkt / DPoP header on the push (RFC 9449 §10.1) Implemented PARHandler.resolveDPoPBinding Both forms accepted, a mismatch between them rejected
FAPI 2.0 PAR-only mode Implemented apiauth/authorize_mount.go MountAuthorize under OneAuthConfig.FAPI2 Since 0.1.52. Sets RequirePushedRequests, caps the code lifetime at 60 seconds and the request_uri lifetime under 600 seconds, and panics without a PushedStore
Reference server Implemented cmd/oneauth-server code_flow.par.enabled / code_flow.par.required; buildPushedStore; serverASMetadata Since 0.1.54. enabled mounts POST /par on the code store’s backend (memory or gorm) and advertises pushed_authorization_request_endpoint. required, or fapi2: true, refuses direct /authorize and advertises require_pushed_authorization_requests

Single-use, precisely. §4 wants a request_uri used once and explicitly
tolerates a repeat caused by a browser reload. OneAuth spends the reference
in IssueCode, when an authorization code is issued, not when it is read.
The built-in consent screen reads it twice (render, then approve), and a user
who reloads before approving has done nothing wrong. Before 0.1.49 this
held only for requests that never reached the consent form: Approve re-read
the hidden inputs as a fresh request and never spent the reference.

A side effect worth knowing. Once a request arrives by reference, the
consent screen’s hidden inputs stop mattering: the handler reads the stored
payload and ignores what was posted. The form carries request_uri back, and
Approve resolves the stored payload from it.

What exists. The endpoint is apiauth/par.go PARHandler. It validates a
push with the same AuthorizationHandler.ValidateValues that /authorize
runs, so the two cannot drift (§4). Storage is core.PushedAuthorizationRequestStore,
with in-memory and GORM implementations and the partest contract suite.
MountAuthorize wires the endpoint next to /authorize when
AuthorizeMountConfig.PushedStore is set.

  • RFC 9101 — JAR; the signature-side companion. FAPI 2.0 Message Signing and FAPI 1.0 Advanced pair it with PAR.
  • RFC 9396 — RAR; PAR is the cleanest carrier for RAR’s authorization_details JSON
  • RFC 6749 — the framework whose /authorize PAR augments
  • RFC 9700 — §4.18 motivates PAR for request integrity
  • FAPI 2.0 — mandates PAR
  • OAuth 2.1 draft — recommends but doesn’t mandate