OAuth 2.0 JWT Secured Authorization Request

Overview#

OAuth 2.0 JWT Secured Authorization Request (JAR) RFC 9101

Introduction#

The Authorization Request in OAuth 2.0 RFC 6749 utilizes query parameter serialization and typically sent through user-agents such as web browsers.

For example, the parameters 'response_type', 'client_id', 'state', and 'redirect_uri' are encoded in the URI of the request:

GET /authorize?response_type=code&client_id=s6BhdRkqt3&state=xyz&redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 
Host: server.example.com

While this is easy to implement, the encoding in the URI does not allow Application Layer Security with confidentiality and integrity protection to be used. While TLS is used to offer communication security between the OAuth Client and the user-agent and the user-agent and the Authorization Server, TLS sessions are terminated in the user-agent.

In addition, TLS sessions may be terminated prematurely at some middlebox (such as a load balancer).

As the result, the Authorization Request of RFC 6749 has a property that

Because of these weaknesses, several attacks to the protocol such as Redirection URI rewrite has been put forward by now.

The use of Application Layer security mitigates these issues.

In addition, it allows requests to be prepared by a third party so that a OAuth Client application cannot request more permissions than previously agreed. This offers an additional degree of privacy protection.

Further, the Authorization Request by-reference allows the reduction of over-the-wire overhead.

There are other potential formats that could be used for this purpose instead of JWT RFC 7519. The JWT was chosen because of:

The parameters "request" and "request_uri" are introduced as additional Authorization Request parameters for the OAuth 2.0 (RFC 6749) flows. The "request" parameter is a JSON Web Token (JWT) RFC 7519 whose JWT Claims Set holds the JSON encoded OAuth 2.0 Authorization Request parameters. This JWT is integrity protected and source authenticated using JWS.

The JWT RFC 7519 can be passed to the authorization_endpoint by-reference, in which case the parameter "request_uri" is used instead of the "request".

Using JWT RFC 7519 as the request encoding instead of query parameters has several advantages:

The OAuth Client would then send the request along with dynamic parameters such as state. The Authorization Server then examines the signature and shows the conformance status to the end-user, who would have some assurance as to the legitimacy of the request when authorizing it. In some cases, it may even be desirable to skip the authorization dialogue under such circumstances.

There are a few cases that request by reference are useful such as:

This capability is in use by OpenID Connect OpenID Connect Core 1.0.

OAuth 2.0 JWT Secured Authorization Request also discusses Explicit Endpoints

More Information#

There might be more information for this subject on one of the following: