Skip to content
Workforce IdentityMarkdown

Pushed authorization requests

The app sends its sign-in request straight to the realm and gives the browser only a short reference, so nothing in it can be read or changed on the way.

AvailableAPIRFC 9126, RFC 10070

In a plain sign-in, the app’s request travels in the browser’s address bar, where anyone handling the URL can read or change it. With a pushed request, the app first sends the whole request to the realm directly, proving who it is as it would at the token endpoint. The realm checks it and answers with a short reference, and the browser carries only that.

Use it for any confidential app that can make the extra call, and always for high-security apps: the FAPI 2.0 profile requires it. You can require it for one client or for the whole realm. A single-page app can push from the browser too; browser apps says which sites may read the answer.

  • Who can do it: the app pushes its own requests with no setting. A realm administrator (a group holding RealmOwner) can require it of a client or the realm; RealmViewer can read those settings.
  • Where: today this is done through the API (Call the API shows how to get $CVYUH_SESSION).
  • First: the app authenticates at the token endpoint, or is a browser app allowed from its site.

1. The app pushes its request from its back end, with the same parameters it would put in the address bar, and proves who it is (client authentication):

Terminal window
curl https://foobar.cvyuh.com/oauth2/par \
-u team-wiki:s6BhdRkqt3 \
-d response_type=code \
-d client_id=team-wiki \
--data-urlencode redirect_uri=https://wiki.example.com/callback \
--data-urlencode 'scope=openid profile' \
-d state=af0ifjsldkj \
-d code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM \
-d code_challenge_method=S256

The realm checks it as it would check a sign-in request, and answers 201 Created:

{
"request_uri": "urn:ietf:params:oauth:request_uri:eyJhbGciOi…",
"expires_in": 60
}

2. The app sends the browser to the realm with only its client_id and the reference:

GET /oauth2/authorize?client_id=team-wiki&request_uri=urn%3Aietf%3Aparams%3Aoauth%3Arequest_uri%3AeyJhbGciOi…
Host: foobar.cvyuh.com

From here the sign-in goes on as any other. A push may carry a signed request object (Signed request objects) in place of the plain parameters, and a DPoP proof, which binds the sign-in’s code to that key as a dpop_jkt in the request would.

Require pushing for one client in https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client (see Call the API), or for the whole realm with PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings:

WhereSettingWhat it does
RealmrequirePushedAuthorizationRequestsEvery sign-in in the realm must be pushed (default off)
ClientrequirePushedAuthorizationRequestsThis client’s sign-ins must be pushed (default off)
ClientsecurityProfilefapi2 requires every sign-in to be pushed
RealmparLifetimeSecsHow long a reference lives (default 60)

The app pushes to https://foobar.cvyuh.com/oauth2/par. Discovery publishes it as pushed_authorization_request_endpoint while the realm takes the authorization code grant.

Nothing different: the browser goes to the realm’s sign-in page with a short reference in place of the request. If the reference has expired or was used, the user sees the realm’s error page and starts again from the app.

Setting or limitDefaultRange
parLifetimeSecs: how long a reference lives6010 to 600
Uses per referenceone, by the client that pushed itfixed
requirePushedAuthorizationRequests, realm or clientoffon or off; forced on for fapi2
SymptomCauseFix
The user sees invalid_request_uri on the realm’s error pageThe app took more than a minute to redirect, or reused a referencePush right before redirecting, a new push each time
The realm’s error page for every sign-in of one clientIt must push and sent the request through the browserPush first, then send only client_id and request_uri
invalid_request at the pushA request_uri in the push, or an unregistered redirect_uriPush the parameters themselves, with a registered address

A push writes no record of its own. The sign-in it leads to writes LOGIN and its steps, and the code’s redemption a TOKEN_ISSUED record. Changes to the requirement are in Audit → Config.

  • A bad request is refused to the app’s back end, as an error it reads, never shown in the browser.
  • A reference works once, for one minute by default, and only beside the client it was made for.
  • The realm accepts only its own references. It never fetches a request from an address the request names. A push that itself carries a request_uri is refused.
  • The pushed request names one client. A client_id in the body other than the one that authenticated is refused.
  • A dpop_jkt naming another key than the push’s DPoP proof is refused.
  • A client that must push and doesn’t is shown the realm’s error page, and the app is told nothing.

At the push, the app reads the error in the answer:

ErrorWhen
invalid_client (401)The client didn’t prove who it is
invalid_requestThe push carries a request_uri; names another client; has a missing or unregistered redirect_uri; or is otherwise malformed
unauthorized_clientThe client may not use the authorization code grant, or is an agent’s
invalid_dpop_proofThe DPoP proof is bad, or dpop_jkt names another key than the proof
invalid_scope, invalid_targetA scope or a resource the client may not ask for
invalid_request_objectA request object that doesn’t verify

At /authorize, a reference that is spent, expired, another client’s or not the realm’s own is invalid_request_uri, shown on the realm’s error page.