One document matched: draft-jones-oauth-jwt-bearer-01.xml
<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
<?xml-stylesheet type='text/xsl' 'rfc2629.xslt ?>
<rfc category="std"
docName="draft-jones-oauth-jwt-bearer-01"
ipr="trust200902">
<!-- category values: std, bcp, info, exp, and historic
ipr values: full3667, noModification3667, noDerivatives3667
you can add the attributes updates="NNNN" and obsoletes="NNNN"
they will automatically be output with "(if approved)" -->
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
(Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
(using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<!-- ***** FRONT MATTER ***** -->
<front>
<!-- The abbreviated title is used in the page header - it is only necessary if the
full title is longer than 39 characters -->
<title abbrev="OAuth JWT Bearer Token Profiles">JSON Web Token (JWT) Bearer Token Profiles for OAuth 2.0</title>
<!-- add 'role="editor"' below for the editors if appropriate -->
<author fullname="Michael B. Jones" surname="Jones" initials="M.B."> <!-- role="editor" -->
<organization>Microsoft</organization>
<address>
<email>mbj@microsoft.com</email>
<uri>http://self-issued.info/</uri>
</address>
</author>
<author fullname="Brian Campbell" initials="B." surname="Campbell">
<organization>Ping Identity Corp.</organization>
<address>
<email>brian.d.campbell@gmail.com</email>
</address>
</author>
<author fullname="Chuck Mortimore" initials="C." surname="Mortimore">
<organization>Salesforce.com</organization>
<address>
<email>cmortimore@salesforce.com</email>
</address>
</author>
<date day="31" month="Oct" year="2011"/>
<!-- If the month and year are both specified and are the current ones, xml2rfc will fill
in the current day for you. If only the current year is specified, xml2rfc will fill
in the current day and month for you. If the year is not the current one, it is
necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
purpose of calculating the expiry date). With drafts it is normally sufficient to
specify just the year. -->
<!-- Meta-data Declarations -->
<!-- <area>Internet</area> -->
<!-- <workgroup> </workgroup> -->
<!-- WG name at the upperleft corner of the doc,
IETF is fine for individual submissions.
If this element is not present, the default is "Network Working Group",
which is used by the RFC Editor as a nod to the history of the IETF. -->
<keyword>OAuth</keyword>
<keyword>JWT</keyword>
<keyword>Assertion</keyword>
<keyword>Token</keyword>
<keyword>Security Token</keyword>
<!-- Keywords will be incorporated into HTML output
files in a meta tag but they have no effect on text or nroff
output. If you submit your draft to the RFC Editor, the
keywords will be used for the search engine. -->
<abstract>
<t>This specification defines the use of a JSON Web Token (JWT) Bearer Token as means for requesting an OAuth 2.0 access
token as well as for use as a means of client authentication.
</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>
JSON Web Token (JWT) <xref target="JWT"
/> is a JSON-based security token encoding that enables
identity and security information to be shared across security
domains. JWTs utilize JSON data structures, as defined in
<xref target="RFC4627">RFC 4627</xref>.
A security token is generally issued by an identity provider
and consumed by a relying party that relies on its content to
identify the token's subject for security related purposes.
</t>
<t>
<xref target="I-D.ietf.oauth-v2">The OAuth 2.0 Authorization Protocol</xref>
provides
a method for making authenticated HTTP requests to a resource using an access token.
Access tokens are issued to third-party clients by an
authorization server (AS) with the (sometimes implicit) approval of the resource owner.
In OAuth, an authorization grant is an abstract term used to describe
intermediate credentials that represent the resource owner
authorization. An authorization grant is used by the client to obtain an access token.
Several authorization grant types are defined to support a wide range
of client types and user experiences.
OAuth also allows for the definition of new extension grant types
to support additional clients or to provide a bridge between OAuth and other trust frameworks.
Finally, OAuth allows the definition of additional authentication mechanisms to be used by clients when interacting with the authorization server.
</t>
<t>The <xref target="I-D.ietf.oauth-assertions">OAuth 2.0 Assertion Profile</xref> is an abstract extension to OAuth 2.0 that provides a general
framework for the use of Assertions (a.k.a. Security Tokens) as client credentials and/or authorization grants with OAuth 2.0.
This specification profiles the <xref target="I-D.ietf.oauth-assertions">OAuth 2.0 Assertion Profile</xref> to define an extension grant type that uses a JSON Web Token (JWT) Bearer Token to
request an OAuth 2.0 access token as well as for use as client credentials.
The format and processing rules for the JWT defined in this specification are intentionally similar,
though not identical, to those in the closely related
SAML 2.0 Bearer Assertion Profiles for OAuth 2.0
<xref target="I-D.ietf-oauth-saml2-bearer" />.
</t>
<t>This document defines how a JSON Web Token (JWT) Bearer Token can be used to request an access token when a client wishes to utilize an existing trust
relationship, expressed through the semantics of (and digital signature calculated over) the JWT,
without a direct user approval step at the authorization server. It also defines how a JWT can be used as a client authentication mechanism.
The use of a security token for client authentication is orthogonal and separable from
using a security token as an authorization grant and the two can be used either in combination or in isolation.
</t>
<t>The process by which the client obtains the JWT, prior to exchanging it with the authorization server or using it for client authentication, is out of scope.</t>
<section title="Notational Conventions">
<t>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 <xref target="RFC2119">RFC 2119</xref>.
</t>
<t>
Unless otherwise noted, all the protocol parameter names and values are case sensitive.
</t>
</section>
<section title='Terminology'>
<t>
All terms are as defined in <xref target="I-D.ietf.oauth-v2"
/>, <xref target="I-D.ietf.oauth-assertions" />, and <xref
target="JWT" />.
</t>
</section>
</section>
<section title="HTTP Parameter Bindings for Transporting Assertions">
<t>
The <xref target="I-D.ietf.oauth-assertions">OAuth 2.0 Assertion Profile</xref> defines generic HTTP parameters for transporting Assertions (a.k.a. Security Tokens) during interactions with a token endpoint.
This section defines the values of those parameters for use with JWT Bearer Tokens.
</t>
<section title="Using JWTs as Authorization Grants">
<t>To use a JWT Bearer Token as an authorization grant, use the following parameter values and encodings.</t>
<t>The value of "grant_type" parameter MUST be "urn:ietf:params:oauth:grant-type:jwt-bearer"</t>
<t>
The value of the "assertion" parameter MUST contain a single JWT. The SAML Assertion XML data MUST be encoded using base64url,
where the encoding adheres to the definition in Section 5 of <xref target="RFC4648">RFC4648</xref>
and where the padding bits are set to zero.
To avoid the need for subsequent encoding steps (by <xref target='W3C.REC-html401-19991224'>"application/x-www-form-urlencoded"</xref>, for example),
the base64url encoded data SHOULD NOT be line wrapped and pad characters ("=") SHOULD NOT be included.
</t>
</section>
<section title="Using JWTs for Client Authentication">
<t>To use a JWT Bearer Token for client authentication grant, use the following parameter values and encodings.</t>
<t>The value of "client_assertion_type" parameter MUST be "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"</t>
<t>
The value of the "client_assertion" parameter MUST contain a single JWT. The SAML Assertion XML data MUST be encoded using base64url,
where the encoding adheres to the definition in Section 5 of <xref target="RFC4648">RFC4648</xref>
and where the padding bits are set to zero.
To avoid the need for subsequent encoding steps (by <xref target='W3C.REC-html401-19991224'>"application/x-www-form-urlencoded"</xref>, for example),
the base64url encoded data SHOULD NOT be line wrapped and pad characters ("=") SHOULD NOT be included.
</t>
</section>
</section>
<section anchor="JWT_reqs" title="JWT Format and Processing Requirements">
<t>
In order to issue an access token response as described in <xref target="I-D.ietf.oauth-v2">The OAuth 2.0 Authorization Protocol</xref>
or to rely on a JWT for client authentication,
the authorization server MUST validate the JWT according to the criteria below.
Application of additional restrictions and policy are at the discretion of the authorization server.
</t>
<t>
<list style="symbols">
<t>
The JWT MUST contain an <spanx style="verb">iss</spanx>
(issuer) claim that contains a unique identifier for the
entity that issued the JWT.
</t>
<t>
The JWT MUST contain a <spanx style="verb">prn</spanx>
(principal) claim identifying the subject of the transaction.
The principal MAY identify the resource owner for
whom the access token is being requested.
For client authentication, the principal MUST be the client_id of the OAuth client. When using
JWTs as an authorization grant, the principal SHOULD identify
an authorized accessor for whom the access token is being requested (typically the resource owner, or an authorized delegate).
</t>
<t>
The JWT MUST contain an <spanx style="verb">aud</spanx>
(audience) claim containing a URI reference that
identifies the
authorization server, or the service provider principal entity of its controlling domain, as an
intended audience. The token endpoint URL of the authorization server MAY be used as an
acceptable value for an <spanx style="verb">aud</spanx> element.
The authorization server MUST verify that it is an intended audience for
the JWT.
</t>
<t>
The JWT MUST contain an <spanx style="verb">exp</spanx>
(expiration) claim that limits the time window during
which the JWT can be used. The authorization server
MUST verify that the expiration time has not passed,
subject to allowable clock skew between systems. The
authorization server MAY reject JWTs with an <spanx
style="verb">exp</spanx> claim value that is
unreasonably far in the future.
</t>
<t>
The JWT MAY contain an <spanx style="verb">nbf</spanx>
(not before) claim that identifies the time before which
the token MUST NOT be accepted for processing.
</t>
<!-- No equivalent to SubjectConfirmation Method "urn:oasis:names:tc:SAML:2.0:cm:bearer at present -->
<!-- No equivalent to SubjectConfirmationData Recipient at present -->
<!-- No equivalent to SubjectConfirmationData Address at present -->
<!-- No replay protection defined at present -->
<!-- No equivalent to AuthnStatement at present -->
<t>
The JWT MAY contain other claims.
</t>
<t>
The JWT MUST be digitally signed by the issuer and the
authorization server MUST verify the signature.
</t>
<t>
The authorization server MUST verify that the JWT is
valid in all other respects per <xref target="JWT" />.
</t>
</list>
</t>
<section title="Authorization Grant Processing">
<t>If present, the authorization server MUST also validate the client credentials.</t>
<t>Authorization servers SHOULD issue access tokens with a limited
lifetime and require clients to refresh them by requesting a new
access token using the same JWT, if it is still valid, or with a new JWT.
The authorization server SHOULD NOT issue a refresh token.</t>
<t>If the JWT is not valid, or the current time is not within the token's valid time window for use, the
authorization server MUST construct an error response as defined in <xref target="I-D.ietf.oauth-v2"/>.
The value of the error parameter MUST be the "invalid_grant" error code. The authorization server
MAY include additional information regarding the reasons the JWT was considered invalid using the
error_description or error_uri parameters.
<figure>
<preamble>For example:</preamble>
<artwork><![CDATA[HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store
{
"error":"invalid_grant",
"error_description":"Audience validation failed"
}]]></artwork>
</figure>
</t>
</section>
<section title="Client Authentication Processing">
<t>If the client JWT is not valid, or its subject confirmation requirements cannot be met, the
authorization server MUST construct an error response as defined in <xref target="I-D.ietf.oauth-v2"/>.
The value of the error parameter MUST be the "invalid_client" error code. The authorization server
MAY include additional information regarding the reasons the JWT was considered invalid using the
error_description or error_uri parameters.
</t>
</section>
</section>
<section anchor="example" title="Authorization Grant Example">
<t>Though non-normative, the following examples illustrate what a conforming JWT and access token request would look like.
</t>
<figure>
<preamble>
Below is an example JSON object that could be encoded to
produce the JWT Claims Object for a JWT:
</preamble>
<artwork><![CDATA[{"iss":"https://jwt-idp.example.com",
"prn":"mailto:mike@example.com",
"aud":"https://jwt-rp.example.net",
"nbf":1300815780,
"exp":1300819380,
"http://claims.example.com/member":true}]]></artwork>
</figure>
<figure>
<preamble>
The following example JSON object, used as the header of a
JWT, declares that the JWT is signed with the ECDSA P-256
SHA-256 algorithm.
</preamble>
<artwork><![CDATA[{"alg":"ES256"}]]></artwork>
</figure>
<figure>
<preamble>
To present the JWT with the claims and header shown in the previous example as part of an access token request, for example,
the client might make the following HTTPS request (line breaks are for
display purposes only):
</preamble>
<artwork><![CDATA[POST /token.oauth2 HTTP/1.1
Host: authz.example.net
Content-Type: application/x-www-form-urlencoded
grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-
bearer&assertion=eyJhbGciOiJFUzI1NiJ9.
eyJpc3Mi[...omitted for brevity...].
J9l-ZhwP_2n[...omitted for brevity...]]]></artwork>
</figure>
</section>
<section anchor="Security" title="Security Considerations">
<!--<t>All drafts are required to have a security considerations section.
See
<xref target="RFC3552">RFC 3552</xref>
for a guide.
</t> -->
<t>
No additional security considerations apply beyond those described within
<xref target="I-D.ietf.oauth-v2" />, <xref
target="I-D.ietf.oauth-assertions" />, and <xref target="JWT"
/>.
</t>
<!-- "8. Security considerations - you could probably just refer to the core
OAuth spec and to the SAML spec here, but see RFC 3552 for insights." - Peter Saint-Andre -->
</section>
<section title='IANA Considerations'>
<section title='Sub-Namespace Registration of urn:ietf:params:oauth:grant-type:jwt-bearer'>
<t>
This is a request to IANA to please register the value grant-type:jwt-bearer in the
registry urn:ietf:params:oauth established in <xref target="I-D.ietf.oauth-urn-sub-ns"/>.
<list style='symbols'>
<t>URN: urn:ietf:params:oauth:grant-type:jwt-bearer</t>
<t>Common Name: JWT Bearer Token Grant Type Profile for OAuth 2.0</t>
<t>Change controller: IETF</t>
<t>Description: [[this document]]</t>
</list>
</t>
</section>
<section title='Sub-Namespace Registration of urn:ietf:params:oauth:client-assertion-type:jwt-bearer'>
<t>
This is a request to IANA to please register the value client-assertion-type:jwt-bearer in the
registry urn:ietf:params:oauth established in <xref target="I-D.ietf.oauth-urn-sub-ns"/>.
<list style='symbols'>
<t>URN: urn:ietf:params:oauth:client-assertion-type:jwt-bearer</t>
<t>Common Name: JWT Bearer Token Profile for OAuth 2.0 Client Authentication </t>
<t>Change controller: IETF</t>
<t>Description: [[this document]]</t>
</list>
</t>
</section>
</section>
</middle>
<!-- *****BACK MATTER ***** -->
<back>
<!-- References split into informative and normative -->
<!-- see http://www.rfc-editor.org/policy.html#policy.refs -->
<!-- There are 2 ways to insert reference entries from the citation libraries:
1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
(for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")
Both are cited textually in the same manner: by using xref elements.
If you use the PI option, xml2rfc will, by default, try to find included files in the same
directory as the including file. You can also define the XML_LIBRARY environment variable
with a value containing a set of directories to search. These can be either in the local
filing system or remote ones accessed by http (http://domain/dir/... ).-->
<references title="Normative References">
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.4648.xml' ?>
<reference anchor="JWT">
<front>
<title>JSON Web Token (JWT)</title>
<author fullname="Michael B. Jones" initials="M.B." surname="Jones">
<organization>Microsoft</organization>
<address>
<email>mbj@microsoft.com</email>
<uri>http://self-issued.info/</uri>
</address>
</author>
<author fullname="Dirk Balfanz" initials="D." surname="Balfanz">
<organization>Google</organization>
<address>
<email>balfanz@google.com</email>
</address>
</author>
<author fullname="John Bradley" initials="J." surname="Bradley">
<organization>independent</organization>
<address>
<email>ve7jtb@ve7jtb.com</email>
</address>
</author>
<author fullname="Yaron Y. Goland" initials="Y.Y." surname="Goland">
<organization>Microsoft</organization>
<address>
<email>yarong@microsoft.com</email>
</address>
</author>
<author fullname="John Panzer" initials="J." surname="Panzer">
<organization>Google</organization>
<address>
<email>jpanzer@google.com</email>
</address>
</author>
<author fullname="Nat Sakimura" initials="N." surname="Sakimura">
<organization>Nomura Research Institute</organization>
<address>
<email>n-sakimura@nri.co.jp</email>
</address>
</author>
<author fullname="Paul Tarjan" initials="P." surname="Tarjan">
<organization>Facebook</organization>
<address>
<email>pt@fb.com</email>
</address>
</author>
<date day="30" month="October" year="2011" />
</front>
<format target="http://self-issued.info/docs/draft-jones-json-web-token.html" type="HTML" />
</reference>
<reference anchor="I-D.ietf.oauth-assertions">
<front>
<title abbrev='oauth-assertions'>OAuth 2.0 Assertion Profile</title>
<author initials='C.' surname='Mortimore' fullname='Chuck Mortimore' role='editor'/>
<author initials='B.' surname='Campbell' fullname='Brian Campbell' />
<author initials='M.B.' surname='Jones' fullname='Michael B. Jones'/>
<author initials="Y.Y." surname="Goland" fullname="Yaron Y. Goland"/>
<date year="2011" month="October"/>
</front>
<seriesInfo name="ID" value="draft-ietf-oauth-assertions-01 (work in progress)"/>
<format type='TXT' target='http://tools.ietf.org/html/draft-ietf-oauth-assertions-01.txt'/>
<format type='HTML' target='http://tools.ietf.org/html/draft-ietf-oauth-assertions-01.html'/>
</reference>
<reference anchor="I-D.ietf.oauth-urn-sub-ns">
<front>
<title abbrev='oauth-urn-sub-ns'>An IETF URN Sub-Namespace for OAuth</title>
<author initials='B.' surname='Campbell' fullname='Brian Campbell' role='editor'/>
<author initials='H.' surname='Tschofenig' fullname='Hannes Tschofenig'/>
<date year="2011" month="Aug"/>
</front>
<seriesInfo name="ID" value="draft-ietf-oauth-urn-sub-ns-00 (work in progress)"/>
<format type='TXT' target='http://tools.ietf.org/html/draft-ietf-oauth-urn-sub-ns-00.txt'/>
<format type='HTML' target='http://tools.ietf.org/html/draft-ietf-oauth-urn-sub-ns-00.html'/>
</reference>
<reference anchor="I-D.ietf.oauth-v2">
<front>
<title abbrev='OAuth2'>The OAuth 2.0 Authorization Protocol</title>
<author initials='E.' surname='Hammer-Lahav' fullname='Eran Hammer-Lahav' role='editor'/>
<author initials='D.' surname='Recordon' fullname='David Recordon'/>
<author initials='D.' surname='Hardt' fullname='Dick Hardt'/>
<date year="2011" month="September"/>
</front>
<seriesInfo name="ID" value="draft-ietf-oauth-v2-22 (work in progress)"/>
<format type='TXT' target='http://tools.ietf.org/id/draft-ietf-oauth-v2-22.txt'/>
<format type='HTML' target='http://tools.ietf.org/id/draft-ietf-oauth-v2-22.html'/>
</reference>
</references>
<references title="Informative References">
<?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-oauth-saml2-bearer-09.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-html401-19991224.xml' ?>
</references>
<section title='Acknowledgements'>
<t>
This profile was derived from the
SAML 2.0 Bearer Assertion Profiles for OAuth 2.0
<xref target="I-D.ietf-oauth-saml2-bearer" />
by Brian Campbell and Chuck Mortimore.
</t>
</section>
<section title='Document History'>
<t>
[[ to be removed by RFC editor before publication as an RFC ]]
</t>
<t>
-01
<list style='symbols'>
<t>
Merged in changes from draft-ietf-oauth-saml2-bearer-09.
In particular, this draft now uses
draft-ietf-oauth-assertions, rather than being standalone.
It also now defines how to use JWT bearer tokens both for
Authorization Grants and for Client Authentication.
</t>
</list>
</t>
<t>
-00
<list style='symbols'>
<t>
Initial draft.
</t>
</list>
</t>
</section>
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-23 18:45:06 |