draft-ietf-oauth-jwsreq-04.txt   draft-ietf-oauth-jwsreq-05.txt 
OAuth Working Group N. Sakimura, Ed. OAuth Working Group N. Sakimura, Ed.
Internet-Draft Nomura Research Institute Internet-Draft Nomura Research Institute
Intended status: Standards Track J. Bradley Intended status: Standards Track J. Bradley
Expires: January 7, 2016 Ping Identity Expires: January 23, 2016 Ping Identity
July 06, 2015 July 22, 2015
Request by JWS ver.1.0 for OAuth 2.0 OAuth 2.0 JWT Authorization Request
draft-ietf-oauth-jwsreq-04 draft-ietf-oauth-jwsreq-05
Abstract Abstract
The authorization request in OAuth 2.0 utilizes query parameter The authorization request in OAuth 2.0 utilizes query parameter
serialization. This specification defines the authorization request serialization. This specification defines the authorization request
using JWT serialization. The request is sent through "request" using JWT serialization. The request is sent through "request"
parameter or by reference through "request_uri" parameter that points parameter or by reference through "request_uri" parameter that points
to the JWT, allowing the request to be optionally signed and to the JWT, allowing the request to be optionally signed and
encrypted. encrypted.
skipping to change at page 1, line 36 skipping to change at page 1, line 36
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 7, 2016. This Internet-Draft will expire on January 23, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Request Object . . . . . . . . . . . . . . . . . . . . . 3 2.1. Request Object . . . . . . . . . . . . . . . . . . . . . 4
2.2. Request Object URI . . . . . . . . . . . . . . . . . . . 3 2.2. Request Object URI . . . . . . . . . . . . . . . . . . . 4
3. Request Object . . . . . . . . . . . . . . . . . . . . . . . 4 3. Request Object . . . . . . . . . . . . . . . . . . . . . . . 4
4. Request Object URI . . . . . . . . . . . . . . . . . . . . . 5 4. Authorization Request . . . . . . . . . . . . . . . . . . . . 6
5. Authorization Request . . . . . . . . . . . . . . . . . . . . 6 4.1. Passing a Request Object by Value . . . . . . . . . . . . 7
6. Authorization Server Response . . . . . . . . . . . . . . . . 7 4.2. Passing a Request Object by Reference . . . . . . . . . . 8
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . 7 4.2.1. URL Referencing the Request Object . . . . . . . . . 10
8. Security Considerations . . . . . . . . . . . . . . . . . . . 7 4.2.2. Request using the "request_uri" Request Parameter . . 10
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 4.2.3. Authorization Server Fetches Request Object . . . . . 10
10. Revision History . . . . . . . . . . . . . . . . . . . . . . 8 5. Validating JWT-Based Requests . . . . . . . . . . . . . . . . 11
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 5.1. Encrypted Request Object . . . . . . . . . . . . . . . . 11
11.1. Normative References . . . . . . . . . . . . . . . . . . 8 5.2. Signed Request Object . . . . . . . . . . . . . . . . . . 11
11.2. Informative References . . . . . . . . . . . . . . . . . 9 5.3. Request Parameter Assembly and Validation . . . . . . . . 11
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 6. Authorization Server Response . . . . . . . . . . . . . . . . 11
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . 12
8. Security Considerations . . . . . . . . . . . . . . . . . . . 12
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 12
10. Revision History . . . . . . . . . . . . . . . . . . . . . . 13
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 13
11.1. Normative References . . . . . . . . . . . . . . . . . . 14
11.2. Informative References . . . . . . . . . . . . . . . . . 15
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15
1. Introduction 1. Introduction
The parameters "request" and "request_uri" are introduced as The parameters "request" and "request_uri" are introduced as
additional authorization request parameters for the OAuth 2.0 additional authorization request parameters for the OAuth 2.0
[RFC6749] flows. The "request" parameter is a JSON Web Token (JWT) [RFC6749] flows. The "request" parameter is a JSON Web Token (JWT)
[RFC7519] whose JWT Claims Set holds the JSON encoded OAuth 2.0 [RFC7519] whose JWT Claims Set holds the JSON encoded OAuth 2.0
authorization request parameters. The [RFC7519] can be passed to the authorization request parameters. The JWT [RFC7519] can be passed to
authorization endpoint by reference, in which case the parameter the authorization endpoint by reference, in which case the parameter
"request_uri" is used instead of the "request". "request_uri" is used instead of the "request".
Using [RFC7519] as the request encoding instead of query parameters Using JWT [RFC7519] as the request encoding instead of query
has several advantages: parameters has several advantages:
1. The request may be signed so that integrity check may be 1. The request can be signed so that an integrity check can be
implemented. If a suitable algorithm is used for the signing, implemented. If a suitable algorithm is used for the signing,
then non-repudiation property may be obtained in addition. then it will provide a good evidence of the approver.
2. The request may be encrypted so that end-to-end confidentiality 2. The request may be encrypted so that end-to-end confidentiality
may be obtained even if in the case TLS connection is terminated may be obtained even if in the case TLS connection is terminated
at a gateway or a similar device. at a gateway or a similar device.
3. The request may be signed by a third party attesting that the
authorization request is compliant to certain policy. For
example, a request can be pre-examined by a third party that all
the personal data requested is strictly necessary to perform the
process that the end-user asked for, and statically signed by
that third party. The client would then send the request along
with dynamic parameters such as state. The authorization server
then examines the signature and show the end-user 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: There are a few cases that request by reference are useful such as:
1. When it is detected that the User Agent does not support long 1. When it is detected that the User Agent does not support long
URLs: Some extensions may extend the URL. For example, the URLs: Some extensions may extend the URL. For example, the
client might want to send a public key with the request. client might want to send a public key with the request.
2. Static signature: The client may make a signed Request Object and 2. Static signature: The client can make a signed Request Object and
put it at the place where the Authorization Server can access. put it at a place that the Authorization Server can access. This
This may just be done by a client utility or other process, so may just be done by a client utility or other process, so that
that the private key does not have to reside on the client, the private key does not have to reside on the client,
simplifying programming. simplifying programming.
3. When the server wants the requests to be cache-able: The 3. When the server wants the requests to be cacheable: The
request_uri may include a sha256 hash of the file, as defined in request_uri may include a SHA-256 hash of the file, as defined in
FIPS180-2 [FIPS180-2], the server knows if the file has changed FIPS180-2 [FIPS180-2], the server knows if the file has changed
without fetching it, so it does not have to re-fetch a same file, without fetching it, so it does not have to re-fetch a same file,
which is a win as well. which is a win as well.
4. When the client wants to simplify the implementation without 4. When the client wants to simplify the implementation without
compromising the security. If the request parameters go through compromising the security. If the request parameters go through
the Browser, they may be tampered in the browser even if TLS was the browser, they may be tampered in the browser even if TLS was
used. This implies we need to have signature on the request as used. This implies we need to have signature on the request as
well. However, if HTTPS "request_uri" was used, it is not going well. However, if HTTPS "request_uri" was used, it is not going
to be tampered, thus we now do not have to sign the request. to be tampered, thus we now do not have to sign the request.
This simplifies the implementation. This simplifies the implementation.
This capability is in use by OpenID Connect [openid_ab]. This capability is in use by OpenID Connect [OpenID.Core].
1.1. Requirements Language 1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
2. Terminology 2. Terminology
For the purposes of this specification, the following terms and For the purposes of this specification, the following terms and
definitions apply. definitions apply.
2.1. Request Object 2.1. Request Object
JWT [RFC7519] that holds OAuth 2.0 authorization requests as JWT JWT [RFC7519] that holds an OAuth 2.0 authorization request as JWT
Claims Set Claims Set
2.2. Request Object URI 2.2. Request Object URI
Absolute URI from which the Request Object (Section 2.1) can be Absolute URI from which the Request Object (Section 2.1) can be
obtained obtained
3. Request Object 3. Request Object
A Request Object (Section 2.1) is used to provide authorization A Request Object (Section 2.1) is used to provide authorization
request parameters for OAuth 2.0 authorization request. It contains request parameters for an OAuth 2.0 authorization request. It
OAuth 2.0 [RFC6749] authorization request parameters including contains OAuth 2.0 [RFC6749] authorization request parameters
extension parameters. It is a JSON Web Signature (JWS) [RFC7515] including extension parameters. It is a JSON Web Signature (JWS)
signed JWT [RFC7519] . The parameters are included as the top-level [RFC7515] signed JWT [RFC7519] . The parameters are represented as
members of JSON [RFC7159]. Parameter names and string values MUST be the JWT claims. Parameter names and string values MUST be included
included as JSON strings. Numerical values MUST be included as JSON as JSON strings. Numerical values MUST be included as JSON numbers.
numbers. It MAY include any extension parameters. This JSON It MAY include any extension parameters. This JSON [RFC7159]
[RFC7159] constitutes the JWT [RFC7519] Claims Set. constitutes the JWT [RFC7519] Claims Set.
The Request Object MAY be signed or unsigned (plaintext). When it is The Request Object MAY be signed or be an Unsecured JWS. When it is
plaintext, this is indicated by use of the "none" algorithm JWA an unsecured JWS, this is indicated by use of the "none" algorithm
[RFC7518] in the JWS header. If signed, the Authorization Request JWA [RFC7518] in the JWS header. If signed, the Authorization
Object SHOULD contain the Claims "iss" (issuer) and "aud" (audience) Request Object SHOULD contain the Claims "iss" (issuer) and "aud"
as members, with their semantics being the same as defined in the JWT (audience) as members, with their semantics being the same as defined
[RFC7519] specification. in the JWT [RFC7519] specification.
The Request Object MAY also be encrypted using JWE [RFC7516] after The Request Object MAY also be encrypted using JWE [RFC7516] and MAY
signing, with nesting performed in the same manner as specified for be encrypted without also being signed. If both signing and
JWT [RFC7519]. The Authorization Request Object MAY alternatively be encryption are performed, it MUST be signed then encrypted, with the
sent by reference using "request_uri" parameter. result being a Nested JWT, as defined in JWT [RFC7519].
The Authorization Request Object MAY alternatively be sent by
reference using the "request_uri" parameter.
REQUIRED OAuth 2.0 Authorization Request parameters that are not REQUIRED OAuth 2.0 Authorization Request parameters that are not
included in the Request Object MUST be sent as a query parameter. If included in the Request Object MUST be sent as a query parameter. If
a required parameter is not present in neither the query parameter a required parameter is not present in neither the query parameter
nor the Request Object, it forms a malformed request. nor the Request Object, it forms a malformed request.
"request" and "request_uri" parameters MUST NOT be included in
Request Objects.
If the parameter exists in both the query string and the If the parameter exists in both the query string and the
Authorization Request Object, the values in the Request Object takes Authorization Request Object, the values in the Request Object takes
precedence. This means that if it intends to use a cached request precedence. This means that if it intends to use a cached request
object, it cannot include such parameters like "state" that is object, it cannot include such parameters like "state" that is
expected to differ in every request. It is fine to include them in expected to differ in every request. It is fine to include them in
the request object if it is going to be prepared afresh every time. the request object if it is going to be prepared afresh every time.
Following is the example of the JSON that constitutes the [RFC7519] The following is a non-normative example of the Claims in a Request
Claims Set. Object before base64url encoding and signing. Note that it includes
extension variables such as "nonce", "userinfo", and "id_token".
{
"redirect_url":"https://example.com/rp/endpoint_url",
"cliend_id":"http://example.com/rp/"
}
The following is a non-normative example of a [RFC7519] encoded
authorization request object. It includes extension variables such
as "nonce", "userinfo", and "id_token". Note that the line wraps
within the values are for display purpose only:
JWT algorithm = HS256
HMAC HASH Key = 'aaa'
JSON Encoded Header = "{"alg":"HS256","typ":"JWT"}"
JSON Encoded Payload = "{"response_type":"code id_token",
"client_id":"s6BhdRkqt3",
"redirect_uri":"https://client.example.com/cb",
"scope":"openid profile",
"state":"af0ifjsldkj",
"nonce":"n-0S6_WzA2Mj",
"userinfo":{"claims":{"name":null,"nickname":{"optional":true},
"email":null,"verified":null,
"picture":{"optional":true}},"format":"signed"},
"id_token":{"max_age":86400,"iso29115":"2"}}"
JWT = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNwb25zZV90eXBlIjoiY29kZ
SBpZF90b2tlbiIsImNsaWVudF9pZCI6InM2QmhkUmtxdDMiLCJyZWRpcmVjdF91cmkiO
iJodHRwczpcL1wvY2xpZW50LmV4YW1wbGUuY29tXC9jYiIsInNjb3BlIjoib3BlbmlkI
HByb2ZpbGUiLCJzdGF0ZSI6ImFmMGlmanNsZGtqIiwidXNlcmluZm8iOnsiY2xhaW1zI
jp7Im5hbWUiOm51bGwsIm5pY2tuYW1lIjp7Im9wdGlvbmFsIjp0cnVlfSwiZW1haWwiO
m51bGwsInZlcmlmaWVkIjpudWxsLCJwaWN0dXJlIjp7Im9wdGlvbmFsIjp0cnVlfX0sI
mZvcm1hdCI6InNpZ25lZCJ9LCJpZF90b2tlbiI6eyJtYXhfYWdlIjo4NjQwMCwiaXNvM
jkxMTUiOiIyIn19.2OiqRgrbrHkA1FZ5p_7bc_RSdTbH-wo_Agk-ZRpD3wY
4. Request Object URI
Instead of sending the Request Object in an OAuth 2.0 authorization {
request directly, this specification allows it to be obtained from "iss": "s6BhdRkqt3",
the Request Object URI. Using this method has an advantage of "aud": "https://server.example.com",
reducing the request size, enabling the caching of the Request "response_type": "code id_token",
Object, and generally not requiring integrity protection through a "client_id": "s6BhdRkqt3",
cryptographic operation on the Request Object if the channel itself "redirect_uri": "https://client.example.org/cb",
is protected. "scope": "openid",
"state": "af0ifjsldkj",
"nonce": "n-0S6_WzA2Mj",
"max_age": 86400,
"claims":
{
"userinfo":
{
"given_name": {"essential": true},
"nickname": null,
"email": {"essential": true},
"email_verified": {"essential": true},
"picture": null
},
"id_token":
{
"gender": null,
"birthdate": {"essential": true},
"acr": {"values": ["urn:mace:incommon:iap:silver"]}
}
}
}
The Request Object URI is sent as a part of the OAuth Authorization Signing it with the "RS256" algorithm results in this Request Object
Request as the value for the parameter called "request_uri". How the value (with line wraps within values for display purposes only):
Request Object is registered at Request Object URI is out of scope of
this specification, but it MUST be done in a protected channel.
NOTE: the Request Object MAY be registered at the Authorization eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ew0KICJpc3MiOiAiczZCaGRSa3
Server at the client registration time. F0MyIsDQogImF1ZCI6ICJodHRwczovL3NlcnZlci5leGFtcGxlLmNvbSIsDQogInJl
c3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsDQogImNsaWVudF9pZCI6ICJzNk
JoZFJrcXQzIiwNCiAicmVkaXJlY3RfdXJpIjogImh0dHBzOi8vY2xpZW50LmV4YW1w
bGUub3JnL2NiIiwNCiAic2NvcGUiOiAib3BlbmlkIiwNCiAic3RhdGUiOiAiYWYwaW
Zqc2xka2oiLA0KICJub25jZSI6ICJuLTBTNl9XekEyTWoiLA0KICJtYXhfYWdlIjog
ODY0MDAsDQogImNsYWltcyI6IA0KICB7DQogICAidXNlcmluZm8iOiANCiAgICB7DQ
ogICAgICJnaXZlbl9uYW1lIjogeyJlc3NlbnRpYWwiOiB0cnVlfSwNCiAgICAgIm5p
Y2tuYW1lIjogbnVsbCwNCiAgICAgImVtYWlsIjogeyJlc3NlbnRpYWwiOiB0cnVlfS
wNCiAgICAgImVtYWlsX3ZlcmlmaWVkIjogeyJlc3NlbnRpYWwiOiB0cnVlfSwNCiAg
ICAgInBpY3R1cmUiOiBudWxsDQogICAgfSwNCiAgICJpZF90b2tlbiI6IA0KICAgIH
sNCiAgICAgImdlbmRlciI6IG51bGwsDQogICAgICJiaXJ0aGRhdGUiOiB7ImVzc2Vu
dGlhbCI6IHRydWV9LA0KICAgICAiYWNyIjogeyJ2YWx1ZXMiOiBbInVybjptYWNlOm
luY29tbW9uOmlhcDpzaWx2ZXIiXX0NCiAgICB9DQogIH0NCn0.nwwnNsk1-Zkbmnvs
F6zTHm8CHERFMGQPhos-EJcaH4Hh-sMgk8ePrGhw_trPYs8KQxsn6R9Emo_wHwajyF
KzuMXZFSZ3p6Mb8dkxtVyjoy2GIzvuJT_u7PkY2t8QU9hjBcHs68PkgjDVTrG1uRTx
0GxFbuPbj96tVuj11pTnmFCUR6IEOXKYr7iGOCRB3btfJhM0_AKQUfqKnRlrRscc8K
ol-cSLWoYE9l5QqholImzjT_cMnNIznW9E7CDyWXTsO70xnB4SkG6pXfLSjLLlxmPG
iyon_-Te111V8uE83IlzCYIb_NMXvtTIVc1jpspnTSD7xMbpL-2QgwUsAlMGzw
When the Authorization Server obtains the Request Object from Request The following RSA public key, represented in JWK format, can be used
Object URI, it MUST do so over a protected channel. If it is to validate the Request Object signature in this and subsequent
obtained from a remote server, it SHOULD use either HTTP over TLS 1.2 Request Object examples (with line wraps within values for display
as defined in [RFC5246] AND/OR [RFC7515] with the algorithm purposes only):
considered appropriate at the time.
When sending the request by "request_uri", the client MAY provide the {
sha256 hash as defined in FIPS180-2 [FIPS180-2]of the Request Object "kty":"RSA",
as the fragment to it to assist the cache utilization decision of the "kid":"k2bdc",
Authorization Server. "n":"y9Lqv4fCp6Ei-u2-ZCKq83YvbFEk6JMs_pSj76eMkddWRuWX2aBKGHAtKlE5P
7_vn__PCKZWePt3vGkB6ePgzAFu08NmKemwE5bQI0e6kIChtt_6KzT5OaaXDF
I6qCLJmk51Cc4VYFaxgqevMncYrzaW_50mZ1yGSFIQzLYP8bijAHGVjdEFgZa
ZEN9lsn_GdWLaJpHrB3ROlS50E45wxrlg9xMncVb8qDPuXZarvghLL0HzOuYR
adBJVoWZowDNTpKpk2RklZ7QaBO7XDv3uR7s_sf2g-bAjSYxYUGsqkNA9b3xV
W53am_UZZ3tZbFTIh557JICWKHlWj5uzeJXaw",
"e":"AQAB"
}
5. Authorization Request 4. Authorization Request
The client constructs the authorization request URI by adding the The client constructs the authorization request URI by adding the
following parameters to the query component of the authorization following parameters to the query component of the authorization
endpoint URI using the "application/x-www-form-urlencoded" format: endpoint URI using the "application/x-www-form-urlencoded" format:
request REQUIRED unless "request_uri" is specified. The Request request REQUIRED unless "request_uri" is specified. The Request
Object (Section 3) that holds authorization request parameters Object (Section 3) that holds authorization request parameters
stated in the section 4 of OAuth 2.0 [RFC6749]. stated in the section 4 of OAuth 2.0 [RFC6749].
request_uri REQUIRED unless "request" is specified. The absolute request_uri REQUIRED unless "request" is specified. The absolute
skipping to change at page 6, line 39 skipping to change at page 7, line 28
user-agent. user-agent.
For example, the client directs the end-user's user-agent to make the For example, the client directs the end-user's user-agent to make the
following HTTPS request (line breaks are for display purposes only): following HTTPS request (line breaks are for display purposes only):
GET /authorize?request_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 GET /authorize?request_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1
Host: server.example.com Host: server.example.com
The authorization request object MAY be signed AND/OR encrypted. The authorization request object MAY be signed AND/OR encrypted.
Upon receipt of "request_uri" in the request, the authorization When the "request" parameter is used, the OAuth 2.0 request parameter
server MUST send a GET request to the "request_uri" to retrieve the values contained in the JWT supersede those passed using the OAuth
authorization request object unless it is already cached at the 2.0 request syntax. However, parameters MAY also be passed using the
Authorization Server. OAuth 2.0 request syntax even when a Request Object is used; this
would typically be done to enable a cached, pre-signed (and possibly
pre-encrypted) Request Object value to be used containing the fixed
request parameters, while parameters that can vary with each request,
such as state and nonce, are passed as OAuth 2.0 parameters.
If the response was signed AND/OR encrypted, it has to be decoded 4.1. Passing a Request Object by Value
accordingly before being processed.
Then, the Authorization Server MUST reconstruct the complete client The Client sends the Authorization Request as a Request Object to the
request from the original HTTP request and the content of the request Authorization Endpoint as the "request" parameter value.
object. Then, the process continues as described in Section 3 of
OAuth 2.0 [RFC6749] . The following is a non-normative example of an Authorization Request
using the "request" parameter (with line wraps within values for
display purposes only):
https://server.example.com/authorize?
response_type=code%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&scope=openid
&state=af0ifjsldkj
&nonce=n-0S6_WzA2Mj
&request=eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ew0KICJpc3MiOiA
iczZCaGRSa3F0MyIsDQogImF1ZCI6ICJodHRwczovL3NlcnZlci5leGFtcGxlLmN
vbSIsDQogInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsDQogImNsaWV
udF9pZCI6ICJzNkJoZFJrcXQzIiwNCiAicmVkaXJlY3RfdXJpIjogImh0dHBzOi8
vY2xpZW50LmV4YW1wbGUub3JnL2NiIiwNCiAic2NvcGUiOiAib3BlbmlkIiwNCiA
ic3RhdGUiOiAiYWYwaWZqc2xka2oiLA0KICJub25jZSI6ICJuLTBTNl9XekEyTWo
iLA0KICJtYXhfYWdlIjogODY0MDAsDQogImNsYWltcyI6IA0KICB7DQogICAidXN
lcmluZm8iOiANCiAgICB7DQogICAgICJnaXZlbl9uYW1lIjogeyJlc3NlbnRpYWw
iOiB0cnVlfSwNCiAgICAgIm5pY2tuYW1lIjogbnVsbCwNCiAgICAgImVtYWlsIjo
geyJlc3NlbnRpYWwiOiB0cnVlfSwNCiAgICAgImVtYWlsX3ZlcmlmaWVkIjogeyJ
lc3NlbnRpYWwiOiB0cnVlfSwNCiAgICAgInBpY3R1cmUiOiBudWxsDQogICAgfSw
NCiAgICJpZF90b2tlbiI6IA0KICAgIHsNCiAgICAgImdlbmRlciI6IG51bGwsDQo
gICAgICJiaXJ0aGRhdGUiOiB7ImVzc2VudGlhbCI6IHRydWV9LA0KICAgICAiYWN
yIjogeyJ2YWx1ZXMiOiBbInVybjptYWNlOmluY29tbW9uOmlhcDpzaWx2ZXIiXX0
NCiAgICB9DQogIH0NCn0.nwwnNsk1-ZkbmnvsF6zTHm8CHERFMGQPhos-EJcaH4H
h-sMgk8ePrGhw_trPYs8KQxsn6R9Emo_wHwajyFKzuMXZFSZ3p6Mb8dkxtVyjoy2
GIzvuJT_u7PkY2t8QU9hjBcHs68PkgjDVTrG1uRTx0GxFbuPbj96tVuj11pTnmFC
UR6IEOXKYr7iGOCRB3btfJhM0_AKQUfqKnRlrRscc8Kol-cSLWoYE9l5QqholImz
jT_cMnNIznW9E7CDyWXTsO70xnB4SkG6pXfLSjLLlxmPGiyon_-Te111V8uE83Il
zCYIb_NMXvtTIVc1jpspnTSD7xMbpL-2QgwUsAlMGzw
4.2. Passing a Request Object by Reference
The "request_uri" Authorization Request parameter enables OAuth
authorization requests to be passed by reference, rather than by
value. This parameter is used identically to the "request"
parameter, other than that the Request Object value is retrieved from
the resource at the specified URL, rather than passed by value.
When the "request_uri" parameter is used, the OAuth 2.0 authorization
request parameter values contained in the referenced JWT supersede
those passed using the OAuth 2.0 request syntax. However, parameters
MAY also be passed using the OAuth 2.0 request syntax even when a
"request_uri" is used; this would typically be done to enable a
cached, pre-signed (and possibly pre-encrypted) Request Object value
to be used containing the fixed request parameters, while parameters
that can vary with each request, such as "state" and "nonce", are
passed as OAuth 2.0 parameters.
Servers MAY cache the contents of the resources referenced by Request
URIs. If the contents of the referenced resource could ever change,
the URI SHOULD include the base64url encoded SHA-256 hash as defined
in FIPS180-2 [FIPS180-2] of the referenced resource contents as the
fragment component of the URI. If the fragment value used for a URI
changes, that signals the server that any cached value for that URI
with the old fragment value is no longer valid.
The entire Request URI MUST NOT exceed 512 ASCII characters.
The contents of the resource referenced by the URL MUST be a Request
Object. The scheme used in the "request_uri" value MUST be "https",
unless the target Request Object is signed in a way that is
verifiable by the Authorization Server. The "request_uri" value MUST
be reachable by the Authorization Server, and SHOULD be reachable by
the Client.
The following is a non-normative example of the contents of a Request
Object resource that can be referenced by a "request_uri" (with line
wraps within values for display purposes only):
eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ew0KICJpc3MiOiAiczZCaGRSa3
F0MyIsDQogImF1ZCI6ICJodHRwczovL3NlcnZlci5leGFtcGxlLmNvbSIsDQogInJl
c3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsDQogImNsaWVudF9pZCI6ICJzNk
JoZFJrcXQzIiwNCiAicmVkaXJlY3RfdXJpIjogImh0dHBzOi8vY2xpZW50LmV4YW1w
bGUub3JnL2NiIiwNCiAic2NvcGUiOiAib3BlbmlkIiwNCiAic3RhdGUiOiAiYWYwaW
Zqc2xka2oiLA0KICJub25jZSI6ICJuLTBTNl9XekEyTWoiLA0KICJtYXhfYWdlIjog
ODY0MDAsDQogImNsYWltcyI6IA0KICB7DQogICAidXNlcmluZm8iOiANCiAgICB7DQ
ogICAgICJnaXZlbl9uYW1lIjogeyJlc3NlbnRpYWwiOiB0cnVlfSwNCiAgICAgIm5p
Y2tuYW1lIjogbnVsbCwNCiAgICAgImVtYWlsIjogeyJlc3NlbnRpYWwiOiB0cnVlfS
wNCiAgICAgImVtYWlsX3ZlcmlmaWVkIjogeyJlc3NlbnRpYWwiOiB0cnVlfSwNCiAg
ICAgInBpY3R1cmUiOiBudWxsDQogICAgfSwNCiAgICJpZF90b2tlbiI6IA0KICAgIH
sNCiAgICAgImdlbmRlciI6IG51bGwsDQogICAgICJiaXJ0aGRhdGUiOiB7ImVzc2Vu
dGlhbCI6IHRydWV9LA0KICAgICAiYWNyIjogeyJ2YWx1ZXMiOiBbInVybjptYWNlOm
luY29tbW9uOmlhcDpzaWx2ZXIiXX0NCiAgICB9DQogIH0NCn0.nwwnNsk1-Zkbmnvs
F6zTHm8CHERFMGQPhos-EJcaH4Hh-sMgk8ePrGhw_trPYs8KQxsn6R9Emo_wHwajyF
KzuMXZFSZ3p6Mb8dkxtVyjoy2GIzvuJT_u7PkY2t8QU9hjBcHs68PkgjDVTrG1uRTx
0GxFbuPbj96tVuj11pTnmFCUR6IEOXKYr7iGOCRB3btfJhM0_AKQUfqKnRlrRscc8K
ol-cSLWoYE9l5QqholImzjT_cMnNIznW9E7CDyWXTsO70xnB4SkG6pXfLSjLLlxmPG
iyon_-Te111V8uE83IlzCYIb_NMXvtTIVc1jpspnTSD7xMbpL-2QgwUsAlMGzw
4.2.1. URL Referencing the Request Object
The Client stores the Request Object resource either locally or
remotely at a URL the Server can access. This URL is the Request
URI, "request_uri".
If the Request Object includes requested values for Claims, it MUST
NOT be revealed to anybody but the Authorization Server. As such,
the "request_uri" MUST have appropriate entropy for its lifetime. It
is RECOMMENDED that it be removed if it is known that it will not be
used again or after a reasonable timeout unless access control
measures are taken.
The following is a non-normative example of a Request URI value (with
line wraps within values for display purposes only):
https://client.example.org/request.jwt#
GkurKxf5T0Y-mnPFCHqWOMiZi4VS138cQO_V7PZHAdM
4.2.2. Request using the "request_uri" Request Parameter
The Client sends the Authorization Request to the Authorization
Endpoint.
The following is a non-normative example of an Authorization Request
using the "request_uri" parameter (with line wraps within values for
display purposes only):
https://server.example.com/authorize?
response_type=code%20id_token
&client_id=s6BhdRkqt3
&request_uri=https%3A%2F%2Fclient.example.org%2Frequest.jwt
%23GkurKxf5T0Y-mnPFCHqWOMiZi4VS138cQO_V7PZHAdM
&state=af0ifjsldkj
4.2.3. Authorization Server Fetches Request Object
Upon receipt of the Request, the Authorization Server MUST send an
HTTP "GET" request to the "request_uri" to retrieve the referenced
Request Object, unless it is already cached, and parse it to recreate
the Authorization Request parameters.
Note that the client SHOULD use a unique URI for each request
utilizing distinct parameters, or otherwise prevent the Authorization
Server from caching the "request_uri".
The following is a non-normative example of this fetch process:
GET /request.jwt HTTP/1.1
Host: client.example.org
5. Validating JWT-Based Requests
5.1. Encrypted Request Object
The Authorization Server MUST decrypt the JWT in accordance with the
JSON Web Encryption [RFC7516] specification. The result MAY be
either a signed or unsigned (plaintext) Request Object. In the
former case, signature validation MUST be performed as defined in
Section 5.2.
The Authorization Server MUST return an error if decryption fails.
5.2. Signed Request Object
To perform Signature Validation, the "alg" Header Parameter in the
JOSE Header MUST match the value of the "request_object_signing_alg"
set during Client Registration or a value that was pre-registered by
other means. The signature MUST be validated against the appropriate
key for that "client_id" and algorithm.
The Authorization Server MUST return an error if signature validation
fails.
5.3. Request Parameter Assembly and Validation
The Authorization Server MUST assemble the set of Authorization
Request parameters to be used from the Request Object value and the
OAuth 2.0 Authorization Request parameters (minus the "request" or
"request_uri" parameters). If the same parameter exists both in the
Request Object and the OAuth Authorization Request parameters, the
parameter in the Request Object is used. Using the assembled set of
Authorization Request parameters, the Authorization Server then
validates the request as specified in OAuth 2.0 [RFC6749].
6. Authorization Server Response 6. Authorization Server Response
Authorization Server Response is created and sent to the client as in Authorization Server Response is created and sent to the client as in
Section 4 of OAuth 2.0 [RFC6749] . Section 4 of OAuth 2.0 [RFC6749] .
In addition, this document defines additional 'error' values as In addition, this document defines additional error values as
follows: follows:
invalid_request_uri The provided request_uri was not available. invalid_request_uri The "request_uri" in the Authorization Request
returns an error or contains invalid data.
invalid_request_object The Request Object was invalid. invalid_request_object The request parameter contains an invalid
Request Object.
request_not_supported The Authorization Server does not support the
use of the "request" parameter.
request_uri_not_supported The Authorization Server does not support
use of the "request_uri" parameter.
7. IANA Considerations 7. IANA Considerations
None. The request_object_signing_alg OAuth Dynamic Client Registration
Metadata is pending registration by OpenID Connect Dynamic
Registration specification.
8. Security Considerations 8. Security Considerations
In addition to the all the security considerations discussed in OAuth In addition to the all the security considerations discussed in OAuth
2.0 [RFC6819], the following security considerations SHOULD be taken 2.0 [RFC6819], the following security considerations SHOULD be taken
into account. into account.
When sending the authorization request object through "request" When sending the authorization request object through "request"
parameter, it SHOULD be signed with then considered appropriate parameter, it SHOULD be signed with then considered appropriate
algorithm using [RFC7515]. The "alg=none" SHOULD NOT be used in such algorithm using [RFC7515]. The "alg=none" SHOULD NOT be used in such
a case. a case.
If the request object contains personally identifiable or sensitive If the request object contains personally identifiable or sensitive
information, the "request_uri" MUST be of one-time use and MUST have information, the "request_uri" MUST be of one-time use and MUST have
large enough entropy deemed necessary with applicable security large enough entropy deemed necessary with applicable security
policy. For higher security requirement, using [RFC7516] is strongly policy. For higher security requirement, using [RFC7516] is strongly
recommended. recommended.
9. Acknowledgements 9. Acknowledgements
Follwoing people contributed to the creation of this document in
OAuth WG.
John Bradley (Ping Identity), Michael B. Jones (Microsoft), Nat
Sakimura (NRI), (add yourself).
Following people contributed to creating this document through the Following people contributed to creating this document through the
OpenID Connect 1.0 [openid_ab]. OpenID Connect 1.0 [OpenID.Core].
Breno de Medeiros (Google), Hideki Nara (TACT), John Bradley ( Ping Breno de Medeiros (Google), Hideki Nara (TACT), John Bradley ( Ping
Identity) <author>, Nat Sakimura (NRI) <author/editor>, Ryo Itou Identity) <author>, Nat Sakimura (NRI) <author/editor>, Ryo Itou
(Yahoo! Japan), George Fletcher (AOL), Justin Richer (MITRE), Edmund (Yahoo! Japan), George Fletcher (AOL), Justin Richer (MITRE), Edmund
Jay (Illumila), Michael B. Jones (Microsoft), (add yourself). Jay (Illumila), Michael B. Jones (Microsoft), (add yourself).
In addition following people contributed to this and previous In addition following people contributed to this and previous
versions through The OAuth Working Group. versions through The OAuth Working Group.
David Recordon (Facebook), Luke Shepard (Facebook), James H. Manger David Recordon (Facebook), Luke Shepard (Facebook), James H. Manger
(Telstra), Marius Scurtescu (Google), John Panzer (Google), Dirk (Telstra), Marius Scurtescu (Google), John Panzer (Google), Dirk
Balfanz (Google), (add yourself). Balfanz (Google), (add yourself).
10. Revision History 10. Revision History
-05
o More alignment with OpenID Connect.
-04 -04
o Changed invalid_request_* to align with OpenID Connect. o Fixed typos in examples. (request_url -> request_uri, cliend_id ->
client_id)
o Removed entry in the IANA considerations. o Aligned the error messages with the OAuth IANA registry.
o Added another rationale for having request object.
-03 -03
o Fixed the non-normative description about the advantage of static o Fixed the non-normative description about the advantage of static
signature. signature.
o Changed the requement for the parameter values in the request o Changed the requirement for the parameter values in the request
iteself and the request object from 'MUST MATCH" to 'Req Obj takes itself and the request object from 'MUST MATCH" to 'Req Obj takes
precedence. precedence.
-02 -02
o Now that they are RFCs, replaced JWS, JWE, etc. with RFC numbers. o Now that they are RFCs, replaced JWS, JWE, etc. with RFC numbers.
-01 -01
o Copy Edits. o Copy Edits.
skipping to change at page 8, line 46 skipping to change at page 14, line 14
11.1. Normative References 11.1. Normative References
[FIPS180-2] [FIPS180-2]
U.S. Department of Commerce and National Institute of U.S. Department of Commerce and National Institute of
Standards and Technology, "Secure Hash Signature Standards and Technology, "Secure Hash Signature
Standard", FIPS 180-2, August 2002. Standard", FIPS 180-2, August 2002.
Defines Secure Hash Algorithm 256 (SHA256) Defines Secure Hash Algorithm 256 (SHA256)
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008. (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008,
<http://www.rfc-editor.org/info/rfc5246>.
[RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
6749, October 2012. RFC 6749, DOI 10.17487/RFC6749, October 2012,
<http://www.rfc-editor.org/info/rfc6749>.
[RFC6819] Lodderstedt, T., McGloin, M., and P. Hunt, "OAuth 2.0 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0
Threat Model and Security Considerations", RFC 6819, Threat Model and Security Considerations", RFC 6819,
January 2013. DOI 10.17487/RFC6819, January 2013,
<http://www.rfc-editor.org/info/rfc6819>.
[RFC7159] Bray, T., "The JavaScript Object Notation (JSON) Data [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", RFC 7159, March 2014. Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
2014, <http://www.rfc-editor.org/info/rfc7159>.
[RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web
Signature (JWS)", RFC 7515, May 2015. Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May
2015, <http://www.rfc-editor.org/info/rfc7515>.
[RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)",
RFC 7516, May 2015. RFC 7516, DOI 10.17487/RFC7516, May 2015,
<http://www.rfc-editor.org/info/rfc7516>.
[RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, May [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518,
2015. DOI 10.17487/RFC7518, May 2015,
<http://www.rfc-editor.org/info/rfc7518>.
[RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", RFC 7519, May 2015. (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
<http://www.rfc-editor.org/info/rfc7519>.
11.2. Informative References 11.2. Informative References
[openid_ab] [OpenID.Core]
Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and
C. Mortimore, "OpenID Connect Core 1.0", February 2014. C. Mortimore, "OpenID Connect Core 1.0", February 2014.
Authors' Addresses Authors' Addresses
Nat Sakimura (editor) Nat Sakimura (editor)
Nomura Research Institute Nomura Research Institute
1-6-5 Marunouchi, Marunouchi Kitaguchi Bldg. 1-6-5 Marunouchi, Marunouchi Kitaguchi Bldg.
Chiyoda-ku, Tokyo 100-0005 Chiyoda-ku, Tokyo 100-0005
Japan Japan
 End of changes. 50 change blocks. 
147 lines changed or deleted 392 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/