The OAuth 2.0 Authorization Framework: JWT Pop Token UsageNomura Research InstituteOtemachi Financial City Grand Cube, 1-9-2 OtemachiChiyoda-ku100-0004TokyoJapan+81-3-5533-2111n-sakimura@nri.co.jphttps://nat.sakimura.org/Alibaba Groupkepeng.lkp@alibaba-inc.comPing Identityve7jtb@ve7jtb.comhttp://www.thread-safe.com/
Security Area
OAuth Working GroupJWTPoPHoKOAuthDraft
This specification describes how to use JWT POP (Jpop) tokens
that were obtained through
in HTTP requests to access OAuth 2.0 protected resources.
Only the party in possession of a corresponding
cryptographic key with the Jpop token can use it to get access to
the associated resources unlike in the case of the bearer token
described in where any party
in posession of the access token can access the resource.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119.This document specifies the method for the client to use a proof-of-possestion
token against a protected resource. The format of such token is
defined in section 3 of .
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in RFC
2119 [RFC2119]. Unless otherwise noted, all the protocol parameter names and values
are case sensitive.For the purpose of this document, the terms defined in and
are used.
JWT PoP token is a JWS signed JWT whose payload is a JWT Claims Set.
The JWT claims set MUST include the following:
The issuer identifier of the auhtorization server. The identifier of the resource server.The issuance time of this token.The expiry time of this token.The confirmation method.
Their semantics are defined in and
.
There are several varieties of
sender constrained token. Namely: CN Constrained TokenClient ID Constrained TokenCN constrained token is typically used when
X.509 client certificate authentication
is used at the token endpoint.
In this case, the constraint is expressed
by including the following member at
the top level of cnf claim. The Common Name of the client certificate
that the client used in the authorization request.
The authorization server finds the relevant CN
from the X.509 client certificate authentication
that is performed at the token endpoint.
The constraint in the Client ID constrained token
is expressed by including the following member at
the top level of cnf claim.
The client_id of the client
that the client used in the authorization request.
The combination of the "iss" of the access token
and this value forms
a globally unique identifier for the client.
The authorization server finds the client ID
from the client ID used in the client authentication
at the token endpoint.
Methods to express key constraints
are extensively described in the section 3 of
. Such cnf claim is
used in the access token described in section 3
to form a key constrained token.
defines 4
confirmation methods.
JSON Web Key Representing Public KeyEncrypted JSON Web KeyKey IdentifierJWK Set URLFollowing is an example of such JWT payload. The resource server that supports this specification MUST authenticate the
Client by having it demonstrate that it is the holder of the key associated
with the access token being used. The confirmation method
can be broadly categorized in two forms. A method leveraging on the X.509 client certificate authenticationA method leveraging the signature on the nonce.
Cases with confirmation methods equal to one of
cid, jwk, jwe, kid, and jku falls into this category.
Under this method, X.509 client certificate authentication
at the resource endpoint is being leveraged.
The resource endpoint MUST obtain the CN of the client certificate
used for the authentication and MUST verify that the value of the
cn member in the cnf member matches with it.
If it does not match,
the process stops here and the resource access MUST be denied.If it was valid, then the resource server
MUST verify the access token. If it is valid,
the resource SHOULD be returned as HTTP response.For this, the following steps are taken: 1. The client prepares a nonce. 2. The client creates JWS compact serialization over the nonce.
To obtain it, first create a JSON with a name "nonce" and
the value being what was received in the previous step. e.g.,
Then,
jws-on-nonce is obtained by creating a
compact serialization of JWS on this JSON.
3. The client sends the request to the resource server, this time with
Authorization Request Header as defined in section 4.2
of with the credential as follows:
In the following example, the access token and the jws-on-nonce
are represented as access.token.jwt and jws.of.nonce for the sake
of brevity.
4. The resource server finds the client's public key form the
access token through the methods described in . 5. The resource server MUST verify
the value of s of the Authorization
header. If it fails, the process stops here and the resource access MUST
be denied.6. The resource server MUST verify the access token. If it is valid,
the resource SHOULD be returned as HTTP response.If the client requests the resource without the proper authoization header,
the resource server returns a HTTP 401 response with WWW-Authenticate
header as defined in section 4.1 of with the challenge as follows:
Following example depicts what the response would look like.
A new scheme has been registered in the HTTP Authentication Scheme
Registry as follows:
Authentication Scheme Name: JpopReference: Section 3 of this specificationNotes (optional): The Named Authentication scheme is
intended to be used only with OAuth Resource Access,
and thus does not support proxy authentication.
Confirmation Method Value: "cn"Confirmation Method Description: CN match with the TLS client auth. Change Controller: IESGSpecification Document(s): This document. Confirmation Method Value: "cid"Confirmation Method Description: Client ID ConfirmationChange Controller: IESGSpecification Document(s): This document. The "cn" JWT confirmation method relies
its security property on the X.509 client
certificate authentication. In particular,
the validity of the certificate needs to be
verified properly. It involves the traversal of
all the certificate chain and the certificate
validation (e.g., with OCSP). The client's secret key must be kept securely.
Otherwise, the notion of PoP breaks down.
It should be noted that JWE confirmation
method is significantly weaker form of the
PoP, as the resource server and the
authorization server can masquerade
as the client.
The authors thank the following people for
providing valuable feedback to this document.
Nov Matake (YAuth). OAuth 2.0 Proof-of-Possession: Authorization Server to Client Key
DistributionPing Identityve7jtb@ve7jtb.comhttp://www.thread-safe.com/Oracle Corporationphil.hunt@yahoo.comhttp://www.indepdentid.comMicrosoftmbj@microsoft.comhttp://self-issued.info/ARM LimitedAustriaHannes.Tschofenig@gmx.nethttp://www.tschofenig.priv.atOAuth 2.0 Proof-of-Possession (PoP) Security
ArchitectureOralce CorporationProof Key for Code Exchange by OAuth Public ClientsNomura Research InstituteOAuth 2.0 Token IntrospectionInitial Version.