<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "http://xml.resource.org/authoring/rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='http://xml.resource.org/authoring/rfc2629.xslt' ?>
<rfc category="std" docName="draft-ietf-oauth-jwsreq-24" ipr="trust200902">
  <?rfc toc="yes"?>
  <?rfc tocompact="yes"?>
  <?rfc tocdepth="3"?>
  <?rfc tocindent="yes"?>
  <?rfc symrefs="yes"?>
  <?rfc sortrefs="yes"?>
  <?rfc comments="yes"?>
  <?rfc inline="yes"?>
  <?rfc compact="yes"?>
  <?rfc subcompact="no"?>
  <?rfc strict="no"?>

  <front>
    <title abbrev="OAuth JAR">The OAuth 2.0 Authorization Framework: JWT Secured Authorization Request (JAR)</title>

    <author fullname="Nat Sakimura" initials="N." 
            surname="Sakimura">
      <organization>NAT.Consulting</organization>

      <address>
        <postal>
          <street>2-22-17 Naka</street>
          <city>Kunitachi</city>
          <code>186-0004</code>
          <region>Tokyo</region>
          <country>Japan</country>
        </postal>
        <phone>+81-42-580-7401</phone>
        <email>nat@nat.consulting</email>
        <uri>http://nat.sakimura.org/</uri>
      </address>
    </author>

    <author fullname="John Bradley" initials="J." surname="Bradley">
      <organization>Yubico</organization>

      <address>
        <postal>
          <street>Casilla 177, Sucursal Talagante</street>
          <city>Talagante</city>
          <region>RM</region>
          <code/>
          <country>Chile</country>
        </postal>

        <phone>+1.202.630.5272</phone>
        <facsimile/>
        <email>ve7jtb@ve7jtb.com</email>
        <uri>http://www.thread-safe.com/</uri>
      </address>
    </author>

    <date day="1" month="July" year="2020"/>

    <area>Security</area>

    <workgroup>OAuth Working Group</workgroup>

    <keyword>RFC</keyword>
    <keyword>Request for Comments</keyword>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>Assertion</keyword>
    <keyword>Claim</keyword>
    <keyword>Security Token</keyword>
    <keyword>OAuth</keyword>
    <keyword>JavaScript Object Notation</keyword>
    <keyword>JSON</keyword>
    <keyword>JSON Web Token</keyword>
    <keyword>JWT</keyword>
    <keyword>JSON Web Signature</keyword>
    <keyword>JWS</keyword>
    <keyword>JSON Web Encryption</keyword>
    <keyword>JWE</keyword>

    <abstract>
      <t>The authorization request in OAuth 2.0 described in 
      RFC 6749 utilizes query parameter
      serialization, which means that Authorization Request parameters are 
	  encoded in the URI of the request and sent through user agents such as 
	  web browsers. 
	  While it is easy to implement, it means that 
	  (a) the communication through the user agents are not integrity protected 
	  and thus the parameters can be tainted, and 
	  (b) the source of the communication is not authenticated. 
	  Because of these weaknesses, several attacks to the protocol have now been 
	  put forward.</t>

      <t>This document introduces the ability to send request parameters in a 
      JSON Web Token (JWT) instead, which allows the request to be signed with
	  JSON Web Signature (JWS) and encrypted with JSON Web Encryption (JWE)
	  so that the integrity, source authentication and confidentiality property
	  of the Authorization Request is attained.
      The request can be sent by value or by reference.
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>
	  The Authorization Request in <xref target="RFC6749">OAuth 2.0</xref> utilizes query parameter
      serialization and is typically sent through user agents such as web browsers.
	  </t>
	  <t>
	  For example, the parameters <spanx style="verb">response_type</spanx>, <spanx style="verb">client_id</spanx>, <spanx style="verb">state</spanx>, and <spanx style="verb">redirect_uri</spanx> are encoded in the URI of the request:
      </t>
      <figure>
        <artwork><![CDATA[
    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
        ]]></artwork>
	  </figure>	 

	  <t>
	  While it is easy to implement,  the encoding in the URI 
	  does not allow application layer security to be used to
	  provide confidentiality and integrity protection. 
	  While TLS is used to offer communication security 
	  between the Client and the user-agent as well as 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). 
	  </t>
	  <t>
	  As the result, the Authorization Request of <xref target="RFC6749" /> has
	  shortcomings in that:
	  </t>
	  <t><list style="format (%c)">
	    <t>the communication through the user agents are 
		not integrity protected and thus the parameters can be tainted 
		(integrity protection failure)</t>
	    <t>the source of the communication is not authenticated  
		(source authentication failure)</t>
		<t>the communication through the user agents can be monitored 
		(containment / confidentiality failure). </t>
	  </list></t>
	  <t>
	  Due to these inherent weaknesses, several attacks against the protocol, 
	  such as Redirection URI rewriting and Mix-up attack
	  <xref target="FETT" />, have been identified.
	  </t>
	  <t>
	  The use of application layer security mitigates these issues. 
	  </t>
      <t>
      The use of application layer security allows requests to be prepared
      by a third party so that a client application cannot request more permissions 
      than previously agreed. This offers an additional degree of privacy protection.
      </t>
      <t>
      Furthermore, passing the request by reference allows the reduction of over-the-wire overhead.
      </t>
      <t>The <xref target="RFC7519">JWT</xref> encoding has been chosen because of </t>
      <t><list style="format (%d)">
        <t>its close relationship with JSON,
        which is used as OAuth's response format </t>
        <t>its developer friendliness due to its textual nature</t>
        <t>its relative compactness compared to XML </t>
        <t>its development status as a Proposed Standard,  along
		with the associated signing and encryption methods
        <xref target="RFC7515" />  <xref target="RFC7516" /></t>
		<t>the relative ease of JWS and JWE compared to XML Signature and Encryption. </t>
      </list>
      </t>
      <t>The parameters <spanx style="verb">request</spanx> and <spanx
      style="verb">request_uri</spanx> are introduced as additional
      authorization request parameters for the <xref target="RFC6749">OAuth
      2.0</xref> flows. The <spanx style="verb">request</spanx> parameter is a
      <xref target="RFC7519">JSON Web Token (JWT) </xref> whose JWT Claims Set holds the JSON
      encoded OAuth 2.0 authorization request parameters. 
	  This JWT is integrity protected and source authenticated using 
	  JWS. 
	  </t>
	  <t>
	  The <xref
      target="RFC7519">JWT</xref> can be passed to the authorization endpoint by reference,
      in which case the parameter <spanx style="verb">request_uri</spanx> is
      used instead of the <spanx style="verb">request</spanx>.</t>

      <t>Using <xref target="RFC7519">JWT</xref> as the request encoding instead of query
      parameters has several advantages:</t>

      <t><list style="format (%c)">
          <t>(integrity protection)
		  The request can be signed so that the integrity of the request can be checked.</t>
		  <t>(source authentication)
		  The request can be signed so that the signer can be authenticated.</t>

          <t>(confidentiality protection)
		  The request can be encrypted so that end-to-end 
		  confidentiality can be provided even if the TLS connection is 
		  terminated at one point or another (including at and before user-agents). </t>
		  <t>(collection minimization)
		  The request can be signed by a third party attesting that 
		  the authorization request is compliant with a 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 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. 
		  </t>
        </list></t>

      <t>There are a few cases that request by reference is useful such
      as:</t>

      <t><list style="numbers">
          <t>When it is desirable to reduce the size of transmitted request. 
		  The use of application layer security increases 
		  the size of the request, particularly when public key 
		  cryptography is used. </t>

		  <t>When the client does not want to do the application level crypto.
		  The Authorization Server may provide an endpoint to 
		  accept the Authorization Request through direct communication 
		  with the Client so that the Client is authenticated 
		  and the channel is TLS protected. </t>
        </list></t>

      <t>This capability is in use by OpenID Connect <xref target="OpenID.Core" />.</t>

      <section title="Requirements Language">
        <t>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 BCP 14 <xref target="RFC2119" /> 
		<xref target="RFC8174" /> when, and only when, they
		appear in all capitals, as shown here.</t>
      </section>
    </section>

    <section anchor="Terminology" title="Terminology">
      <t>For the purposes of this specification, the following terms and
      definitions in addition to what is defined in 
	  <xref target="RFC6749">OAuth 2.0 Framework</xref>, 
	  <xref target="RFC7515">JSON Web Signature</xref>, and 
	  <xref target="RFC7519">JSON Web Encryption</xref> apply.</t>

      <section anchor="request_object" title="Request Object">
        <t><xref target="RFC7519">JWT</xref> that holds an OAuth 2.0 authorization
        request as JWT Claims Set</t>
      </section>

      <section anchor="request_uri" title="Request Object URI">
        <t>Absolute URI that references the set of parameters comprising an OAuth 2.0 authorization request.
        The contents of the resource referenced by the URI are a <xref target="request_object">Request Object</xref>,
        unless the URI was provided to the client by the same Authorization Server,
        in which case the content is an implementation detail at the discretion the Authorization Server. The former is
        to ensure interoperability in cases where the provider of the request_uri is a separate
        entity from the consumer, such as when a client provides a URI referencing a Request Object stored on the client's
        backend service and made accessible via HTTPS. In the latter case where the Authorization Server is both provider
        and consumer of the URI, such as when it offers an endpoint that provides
        a URI in exchange for a Request Object, this interoperability concern does not apply.</t>
      </section>
    </section>
	
	<section anchor="abbreviation" title="Symbols and abbreviated terms">
		<t>
			The following abbreviations are common to this specification.
		</t>
		<t><list style="hanging">
			<t hangText="JSON">Javascript Object Notation</t>
			<t hangText="JWT">JSON Web Token</t>
			<t hangText="JWS">JSON Web Signature</t>
			<t hangText="JWE">JSON Web Encryption</t>
			<t hangText="URI">Uniform Resource Identifier</t>
			<t hangText="URL">Uniform Resource Locator</t>
		</list></t>
	</section>

    <section anchor="authorization_request_object" title="Request Object">
      <t>A <xref target="request_object">Request Object</xref> is used to
      provide authorization request parameters for an OAuth 2.0 authorization
      request. It MUST contain all the parameters (including extension
      parameters) used to process the <xref target="RFC6749">OAuth 2.0</xref>
      authorization request except the <spanx style="verb">request</spanx> and
      <spanx style="verb">request_uri</spanx> parameters that are defined in
      this document.
	  The parameters are represented as the JWT claims of the object.
	  Parameter names and string values MUST be included as JSON strings. 
	  Since Request Objects are handled across domains and potentially 
	  outside of a closed ecosystem, per section 8.1 of <xref target="RFC8259" />, 
	  these JSON strings MUST be encoded using UTF-8 <xref target="RFC3629" />. 
	  Numerical values MUST be included as JSON numbers. 
	  It MAY include any extension parameters. 
	  This <xref target="RFC7159">JSON</xref> object constitutes the
      JWT Claims Set defined in <xref
      target="RFC7519">JWT</xref>.
	  The JWT Claims Set is then signed or signed and encrypted. </t>
	  <t>To sign, 
      <xref target="RFC7515">JSON Web Signature (JWS)</xref> is used. 
	  The result is a JWS signed <xref
      target="RFC7519">JWT</xref>. If signed, the
      Authorization Request Object SHOULD contain the Claims <spanx
      style="verb">iss</spanx> (issuer) and <spanx style="verb">aud</spanx> 
      (audience) as members, with their semantics being the same as defined in
      the <xref target="RFC7519">JWT</xref> specification.
      The value of <spanx style="verb">aud</spanx> should be the value of the 
	  Authorization Server (AS) 
      <spanx style="verb">issuer</spanx> as defined in 
      <xref target="RFC8414">RFC8414</xref>.</t>
    

      <t>To encrypt, <xref
      target="RFC7516">JWE</xref> is used. 
	  When both signature and encryption are being applied, 
	  the JWT MUST be signed then encrypted as advised in 
	  the section 11.2 of <xref target="RFC7519" />. 
	  The result is a Nested JWT, as defined in
	  <xref target="RFC7519" />.  
	  </t>

	  <t>The client determines the algorithms used to sign and encrypt request objects. This decision can be based on metadata 
	  the client registered via dynamic client registration <xref target="RFC7591"/> using the parameters <spanx style="verb">request_object_signing_alg</spanx>, 
	  <spanx style="verb">request_object_encryption_alg</spanx>, <spanx style="verb">request_object_encryption_enc</spanx> as 
	  defined in the the IANA "OAuth Dynamic Client Registration Metadata" registry <xref target="IANA.OAuth.Parameters"/> 
	  established by <xref target="RFC7591"/>.</t>
	  
	  <t>If the authorization server publishes its supported algorithms using Authorization Server Metadata <xref target="RFC8414"/>, 
	  the algorithms used by the client must be contained in the list of algorithms published in the metadata data parameters 
	  <spanx style="verb">request_object_signing_alg_values_supported</spanx>, <spanx style="verb">request_object_encryption_alg_values_supported</spanx>, 
	  and <spanx style="verb">request_object_encryption_enc_values_supported</spanx>
	  as defined in IANA "OAuth Authorization Server Metadata" registry
        <xref target="IANA.OAuth.Parameters"/> established by <xref target="RFC8414"/>.</t>
	  
	  <t>The Authorization Request Object MAY be sent by value as 
	  described in <xref target="RequestParameter" /> 
	  or by reference as described in <xref target="RequestUriParameter" />.</t>

	  <t>
	  <spanx style="verb">request</spanx> and
	  <spanx style="verb">request_uri</spanx> parameters
	  MUST NOT be included in Request Objects.
	  </t>
	  <t>
	  A <xref target="request_object">Request Object</xref> has the
	  <spanx style="verb">mime-type</spanx>
	  <spanx style="verb">application/oauth.authz.req+jwt</spanx>
	  </t>

	  <figure>
	    <preamble>
	      The following is an example of the Claims in
	      a Request Object before base64url encoding and signing. 
		  Note that it includes extension variables 
		  such as "nonce" and "max_age".
	    </preamble>

	    <artwork><![CDATA[
  {
   "iss": "s6BhdRkqt3",
   "aud": "https://server.example.com",
   "response_type": "code id_token",
   "client_id": "s6BhdRkqt3",
   "redirect_uri": "https://client.example.org/cb",
   "scope": "openid",
   "state": "af0ifjsldkj",
   "nonce": "n-0S6_WzA2Mj",
   "max_age": 86400
  }
]]></artwork>
	  </figure>	  
	  <figure>
	    <preamble>
	      Signing it with the <spanx style="verb">RS256</spanx> algorithm
	      results in this Request Object value
	      (with line wraps within values for display purposes only):
	    </preamble>

	    <artwork><![CDATA[
  eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ewogICAgImlzcyI6ICJzNkJoZF
  JrcXQzIiwKICAgICJhdWQiOiAiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLAog
  ICAgInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsCiAgICAiY2xpZW50X2
  lkIjogInM2QmhkUmtxdDMiLAogICAgInJlZGlyZWN0X3VyaSI6ICJodHRwczovL2Ns
  aWVudC5leGFtcGxlLm9yZy9jYiIsCiAgICAic2NvcGUiOiAib3BlbmlkIiwKICAgIC
  JzdGF0ZSI6ICJhZjBpZmpzbGRraiIsCiAgICAibm9uY2UiOiAibi0wUzZfV3pBMk1q
  IiwKICAgICJtYXhfYWdlIjogODY0MDAKfQ.Nsxa_18VUElVaPjqW_ToI1yrEJ67BgK
  b5xsuZRVqzGkfKrOIX7BCx0biSxYGmjK9KJPctH1OC0iQJwXu5YVY-vnW0_PLJb1C2
  HG-ztVzcnKZC2gE4i0vgQcpkUOCpW3SEYXnyWnKzuKzqSb1wAZALo5f89B_p6QA6j6
  JwBSRvdVsDPdulW8lKxGTbH82czCaQ50rLAg3EYLYaCb4ik4I1zGXE4fvim9FIMs8O
  CMmzwIB5S-ujFfzwFjoyuPEV4hJnoVUmXR_W9typPf846lGwA8h9G9oNTIuX8Ft2jf
  pnZdFmLg3_wr3Wa5q3a-lfbgF3S9H_8nN3j1i7tLR_5Nz-g
]]></artwork>
	  </figure>
	  <figure>
	    <preamble>
	      The following RSA public key, represented in JWK format, can be used to
	      validate the Request Object signature in this
	      and subsequent Request Object examples
	      (with line wraps within values for display purposes only):
	    </preamble>

	    <artwork><![CDATA[
  {
   "kty":"RSA",
   "kid":"k2bdc",
   "n":"x5RbkAZkmpRxia65qRQ1wwSMSxQUnS7gcpVTV_cdHmfmG2ltd2yabEO9XadD8
        pJNZubINPpmgHh3J1aD9WRwS05ucmFq3CfFsluLt13_7oX5yDRSKX7poXmT_5
        ko8k4NJZPMAO8fPToDTH7kHYbONSE2FYa5GZ60CUsFhSonI-dcMDJ0Ary9lxI
        w5k2z4TAdARVWcS7sD07VhlMMshrwsPHBQgTatlkxyIHXbYdtak8fqvNAwr7O
        lVEvM_Ipf5OfmdB8Sd-wjzaBsyP4VhJKoi_qdgSzpC694XZeYPq45Sw-q51iF
        UlcOlTCI7z6jltUtnR6ySn6XDGFnzH5Fe5ypw",
   "e":"AQAB"
  }
]]></artwork>
	  </figure>
    </section>
	
	
   
    <section title="Authorization Request" anchor="authreq">
      <t>The client constructs the authorization request URI 
	  by adding the following parameters
	  to the query component of the authorization
      endpoint URI using the <spanx style="verb">application/x-www-form-urlencoded</spanx>
      format:</t>

      <t><list style="hanging">
          <t hangText="request"> REQUIRED unless <spanx style="verb">request_uri</spanx>
          is specified. The <xref target="request_object">Request Object</xref> that
          holds authorization request parameters stated in section 4 of
          <xref target="RFC6749">OAuth 2.0</xref>. </t>

          <t hangText="request_uri"> REQUIRED unless <spanx style="verb">request</spanx>
          is specified. The absolute URI as defined by <xref
          target="RFC3986">RFC3986</xref> that is the <xref
          target="request_uri">Request Object URI</xref> referencing the authorization request
          parameters stated in section 4 of <xref target="RFC6749">OAuth
          2.0</xref>.</t>

          <t hangText="client_id"> REQUIRED. <xref target="RFC6749">OAuth 2.0</xref>
          <spanx style="verb">client_id</spanx>. The value MUST match the
          <spanx style="verb">request</spanx> or <spanx style="verb">request_uri</spanx>
          <xref target="request_object">Request Object's</xref>
          <spanx style="verb">client_id</spanx>.</t>
        </list>The client directs the resource owner to the constructed URI
      using an HTTP redirection response, or by other means available to it
      via the user-agent.</t>

      <t>For example, the client directs the end user's user-agent to make the
      following HTTPS request:</t>

      <figure>
        <artwork><![CDATA[GET /authz?client_id=s6BhdRkqt3&request=eyJhbG..AlMGzw HTTP/1.1
Host: server.example.com]]></artwork>
		<postamble>
		The value for the request parameter is abbreviated 
		for brevity. 
		</postamble>
      </figure>

      <t>The authorization request object MUST be one of the following: </t>
	  <t><list style="format (%c)">
			<t>JWS signed </t>
			<t>JWS signed and JWE encrypted</t>
	  </list></t>
	  <t>The client MAY send the parameters included in 
	  the request object duplicated in the query parameters as well 
	  for the backward compatibility etc. 
	  However, the authorization server supporting this specification 
	  MUST only use the parameters included in the request object. 
	  </t>
	  
	  
	  <section anchor="RequestParameter"
		 title='Passing a Request Object by Value'>
	  <t>The Client sends the Authorization Request as a 
	  Request Object to the Authorization Endpoint as the 
	  <spanx style="verb">request</spanx> parameter value.</t>

	  <t>
	    <figure>
	      <preamble>The following is an example of an
	      Authorization Request using the <spanx style='verb'>request</spanx>
	      parameter
	      (with line wraps within values for display purposes only):
	      </preamble>

	      <artwork><![CDATA[
  https://server.example.com/authorize?client_id=s6BhdRkqt3&
    request=eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ewogICAgImlzcyI6
    ICJzNkJoZFJrcXQzIiwKICAgICJhdWQiOiAiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBs
    ZS5jb20iLAogICAgInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsCiAg
    ICAiY2xpZW50X2lkIjogInM2QmhkUmtxdDMiLAogICAgInJlZGlyZWN0X3VyaSI6
    ICJodHRwczovL2NsaWVudC5leGFtcGxlLm9yZy9jYiIsCiAgICAic2NvcGUiOiAi
    b3BlbmlkIiwKICAgICJzdGF0ZSI6ICJhZjBpZmpzbGRraiIsCiAgICAibm9uY2Ui
    OiAibi0wUzZfV3pBMk1qIiwKICAgICJtYXhfYWdlIjogODY0MDAKfQ.Nsxa_18VU
    ElVaPjqW_ToI1yrEJ67BgKb5xsuZRVqzGkfKrOIX7BCx0biSxYGmjK9KJPctH1OC
    0iQJwXu5YVY-vnW0_PLJb1C2HG-ztVzcnKZC2gE4i0vgQcpkUOCpW3SEYXnyWnKz
    uKzqSb1wAZALo5f89B_p6QA6j6JwBSRvdVsDPdulW8lKxGTbH82czCaQ50rLAg3E
    YLYaCb4ik4I1zGXE4fvim9FIMs8OCMmzwIB5S-ujFfzwFjoyuPEV4hJnoVUmXR_W
    9typPf846lGwA8h9G9oNTIuX8Ft2jfpnZdFmLg3_wr3Wa5q3a-lfbgF3S9H_8nN3
    j1i7tLR_5Nz-g
]]></artwork>
	    </figure>
	  </t>
	  </section>

      <section anchor="RequestUriParameter" title="Passing a Request Object by Reference">
	<t>
	  The <spanx style="verb">request_uri</spanx> Authorization Request parameter enables
	  OAuth authorization requests to be passed by reference, rather than by value.
	  This parameter is used identically to the
	  <spanx style="verb">request</spanx> parameter, other than that
	  the Request Object value is retrieved from the resource identified by the specified URI 
	  rather than passed by value.
	</t>
	<t>
	  The entire Request URI MUST NOT exceed 512 ASCII characters.
	  There are three reasons for this restriction. 
	</t>
	<t><list style="numbers">
          <t>Many phones in the market as of this writing still 
          do not accept large payloads.   
		  The restriction is typically either 512 or 1024 ASCII characters.</t>
		  <t>The maximum URL length supported by older versions of 
		  Internet Explorer is 2083 ASCII characters. </t>
		  <t>On a slow connection such as 2G mobile connection, 
		  a large URL would cause the slow response and therefore the use of such 
		  is not advisable from the user experience point of view. 
		  </t>
		</list>
	</t>
	<t>
	  The contents of the resource referenced by the URI MUST be a Request Object,
	  unless the URI was provided to the client by the Authorization Server.
	  The 
	  <spanx style="verb">request_uri</spanx> value MUST be 
	  either URN as defined in <xref target="RFC8141">RFC8141</xref> 
	  or <spanx style="verb">https</spanx> URI,
	  as defined in 2.7.2 of <xref target="RFC7230">RFC7230</xref> . 
	  The <spanx style="verb">request_uri</spanx> value MUST be reachable by the
	  Authorization Server. 
	</t>

	<t>
	  <figure>
	    <preamble>The following is an example of
	    the contents of a Request Object resource that can be
	    referenced by a <spanx style="verb">request_uri</spanx>
	    (with line wraps within values for display purposes only):</preamble>

	    <artwork><![CDATA[
  eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ewogICAgImlzcyI6ICJzNkJoZF
  JrcXQzIiwKICAgICJhdWQiOiAiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLAog
  ICAgInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsCiAgICAiY2xpZW50X2
  lkIjogInM2QmhkUmtxdDMiLAogICAgInJlZGlyZWN0X3VyaSI6ICJodHRwczovL2Ns
  aWVudC5leGFtcGxlLm9yZy9jYiIsCiAgICAic2NvcGUiOiAib3BlbmlkIiwKICAgIC
  JzdGF0ZSI6ICJhZjBpZmpzbGRraiIsCiAgICAibm9uY2UiOiAibi0wUzZfV3pBMk1q
  IiwKICAgICJtYXhfYWdlIjogODY0MDAKfQ.Nsxa_18VUElVaPjqW_ToI1yrEJ67BgK
  b5xsuZRVqzGkfKrOIX7BCx0biSxYGmjK9KJPctH1OC0iQJwXu5YVY-vnW0_PLJb1C2
  HG-ztVzcnKZC2gE4i0vgQcpkUOCpW3SEYXnyWnKzuKzqSb1wAZALo5f89B_p6QA6j6
  JwBSRvdVsDPdulW8lKxGTbH82czCaQ50rLAg3EYLYaCb4ik4I1zGXE4fvim9FIMs8O
  CMmzwIB5S-ujFfzwFjoyuPEV4hJnoVUmXR_W9typPf846lGwA8h9G9oNTIuX8Ft2jf
  pnZdFmLg3_wr3Wa5q3a-lfbgF3S9H_8nN3j1i7tLR_5Nz-g
  ]]></artwork>
	  </figure>
	</t>

	<section anchor="CreateRequestUri"
		 title="URI Referencing the Request Object">
	  <t>
	    The Client stores the Request Object resource either
	    locally or remotely at a URI the Authorization Server can access. 
		Such facility may be provided by the authorization server 
		or a third party. For example, the authorization server may 
		provide a URL to which the client POSTs the request object and 
		obtains the Request URI. 
	    This URI is the Request Object URI, <spanx style="verb">request_uri</spanx>. 
	  </t>
	  <t>
	    It is possible for the Request Object to include values that 
	    are to be revealed only to the Authorization Server.
	    As such, the <spanx style="verb">request_uri</spanx> MUST have
	    appropriate entropy for its lifetime.
	    For the guidance, refer to 5.1.4.2.2 of  
	    <xref target="RFC6819" /> and
	    <xref target="CapURLs">Good Practices for Capability URLs</xref>.
	    It is RECOMMENDED that it be removed
		after a reasonable timeout
	    unless access control measures are taken.
	  </t>
	  <figure>
	    <preamble>The following is an example
	    of a Request Object URI value
	    (with line wraps within values for display purposes only):</preamble>

	    <artwork><![CDATA[
  https://tfp.example.org/request.jwt/
    GkurKxf5T0Y-mnPFCHqWOMiZi4VS138cQO_V7PZHAdM
]]></artwork>
	  </figure>

	</section>

	<section anchor="UseRequestUri"
		 title='Request using the "request_uri" Request Parameter'>
	  <t>The Client sends the Authorization Request to the
	  Authorization Endpoint.</t>

	  <figure>
	    <preamble>The following is an example
	    of an Authorization Request using the <spanx style="verb">request_uri</spanx> parameter
	    (with line wraps within values for display purposes only):</preamble>

	    <artwork><![CDATA[
  https://server.example.com/authorize?
    client_id=s6BhdRkqt3
    &request_uri=https%3A%2F%2Ftfp.example.org%2Frequest.jwt
    %2FGkurKxf5T0Y-mnPFCHqWOMiZi4VS138cQO_V7PZHAdM
]]></artwork>
	  </figure>
	</section>

	<section anchor="GetRequestUri" title="Authorization Server Fetches Request Object">
	  <t>Upon receipt of the Request, the Authorization Server MUST
	  send an HTTP <spanx style="verb">GET</spanx> request 
	  to the <spanx style="verb">request_uri</spanx>
	  to retrieve the referenced Request Object, unless it is stored in a way so that 
	  it can retrieve it through other mechanism securely, and parse it
	  to recreate the Authorization Request parameters.</t>

	  <figure>
	    <preamble>The following is an example of this fetch
	    process:</preamble>

	    <artwork><![CDATA[
  GET /request.jwt/GkurKxf5T0Y-mnPFCHqWOMiZi4VS138cQO_V7PZHAdM HTTP/1.1
  Host: tfp.example.org
]]></artwork>
	  </figure>
	  <figure>
	    <preamble>The following is an example of the fetch
	    response:</preamble>

	    <artwork><![CDATA[
  HTTP/1.1 200 OK
  Date: Thu, 16 Feb 2017 23:52:39 GMT
  Server: Apache/2.2.22 (tfp.example.org)
  Content-type: application/oauth.authz.req+jwt
  Content-Length: 1250
  Last-Modified: Wed, 15 Feb 2017 23:52:32 GMT

  eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ewogICAgImlzcyI6ICJzNkJoZF
  JrcXQzIiwKICAgICJhdWQiOiAiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLAog
  ICAgInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsCiAgICAiY2xpZW50X2
  lkIjogInM2QmhkUmtxdDMiLAogICAgInJlZGlyZWN0X3VyaSI6ICJodHRwczovL2Ns
  aWVudC5leGFtcGxlLm9yZy9jYiIsCiAgICAic2NvcGUiOiAib3BlbmlkIiwKICAgIC
  JzdGF0ZSI6ICJhZjBpZmpzbGRraiIsCiAgICAibm9uY2UiOiAibi0wUzZfV3pBMk1q
  IiwKICAgICJtYXhfYWdlIjogODY0MDAKfQ.Nsxa_18VUElVaPjqW_ToI1yrEJ67BgK
  b5xsuZRVqzGkfKrOIX7BCx0biSxYGmjK9KJPctH1OC0iQJwXu5YVY-vnW0_PLJb1C2
  HG-ztVzcnKZC2gE4i0vgQcpkUOCpW3SEYXnyWnKzuKzqSb1wAZALo5f89B_p6QA6j6
  JwBSRvdVsDPdulW8lKxGTbH82czCaQ50rLAg3EYLYaCb4ik4I1zGXE4fvim9FIMs8O
  CMmzwIB5S-ujFfzwFjoyuPEV4hJnoVUmXR_W9typPf846lGwA8h9G9oNTIuX8Ft2jf
  pnZdFmLg3_wr3Wa5q3a-lfbgF3S9H_8nN3j1i7tLR_5Nz-g
]]></artwork>
	  </figure>

	</section>
   </section>

    </section>

  <section anchor="JWTRequestValidation" title="Validating JWT-Based Requests">

	<section anchor="EncryptedRequestObject" title="Encrypted Request Object">

	  <t>
	    If the request object is encrypted, 
	    the Authorization Server MUST decrypt the JWT in accordance with
	    the <xref target="RFC7516">JSON Web Encryption</xref> 
	    specification. 
	  </t>
	  <t>
		The result is a signed request object.
	  </t>

	  <t>
	    If decryption fails, 
		the Authorization Server MUST return an  
		<spanx style="verb">invalid_request_object</spanx> error. 
	  </t>
	</section>

	<section anchor="SignedRequestObject" title="JWS Signed Request Object">

	  <t>
	  	The Authorization Server MUST perform the signature validation of the 
	    <xref target="RFC7515">JSON Web Signature</xref> signed request
	    object. For this, the <spanx style="verb">alg</spanx> Header Parameter in
	    its JOSE Header MUST match the value of the pre-registered algorithm.
	    The signature MUST be validated against the appropriate key
	    for that <spanx style="verb">client_id</spanx>
	    and algorithm.
	  </t>

	  <t>
	    If signature validation fails, 
		the Authorization Server MUST return an 
		<spanx style="verb">invalid_request_object</spanx> error.
	  </t>
	</section>

	<section anchor="RequestParameterValidation" title="Request Parameter Assembly and Validation">

	  <t>
	    The Authorization Server MUST extract 
	    the set of Authorization Request parameters 
	    from the Request Object value.
	    The Authorization Server MUST only use the 
	    parameters in the Request Object even if the 
	    same parameter is provided in the query parameter. 
	    The Authorization Server then validates the request
	    as specified in <xref target="RFC6749">OAuth 2.0</xref>.
	  </t>
	  <t>
	    If the validation fails, 
	    then the Authorization Server MUST return an error 
	    as specified in <xref target="RFC6749">OAuth 2.0</xref>.
	  </t>

	</section>
	
  </section>

   
	
    <section title="Authorization Server Response">
      <t>Authorization Server Response is created and sent to the client as in
      Section 4 of <xref target="RFC6749">OAuth 2.0</xref> .</t>

      <t>In addition, this document uses these additional error values:
	    <list style="hanging">
          <t hangText="invalid_request_uri">
		  The <spanx style="verb">request_uri</spanx> in the 
		  Authorization Request returns an error or contains invalid data.</t>

          <t hangText="invalid_request_object">The request parameter contains
          an invalid Request Object.</t>
		  
		  <t hangText="request_not_supported">
		  The Authorization Server does not support 
		  the use of the <spanx style="verb">request</spanx> parameter.</t>
		  
		  <t hangText="request_uri_not_supported">
		  The Authorization Server does not support the use of 
		  the <spanx style="verb">request_uri</spanx> parameter. </t>
        </list></t>
    </section>
	<section anchor="tlsreq" title="TLS Requirements">
		<t>
			Client implementations supporting the Request Object URI method 
			MUST support TLS following  
			<xref target="BCP195">Recommendations for Secure Use 
			of Transport Layer Security (TLS) and 
			Datagram Transport Layer Security (DTLS)</xref>. 
		</t>
		<t>
			To protect against information disclosure and tampering,
			confidentiality protection MUST be applied using TLS with a 
			cipher suite that provides confidentiality and integrity protection.
		</t>
		<t> HTTP clients MUST also verify the TLS server certificate, using
            DNS-ID 
  			<xref target="RFC6125" />, to avoid man-in-the-middle attacks.
  			  The rules and guidelines defined in
              <xref target="RFC6125" /> apply here, with the following considerations:
              <list style="symbols">
          		<t>
		  		Support for DNS-ID identifier type (that is, the dNSName identity
     			in the subjectAltName extension) is REQUIRED.  Certification
     			authorities which issue server certificates MUST support
     			the DNS-ID identifier type, and the DNS-ID identifier type MUST
     			be present in server certificates.</t>
     			<t>
     			DNS names in server certificates MAY contain the
     			wildcard character "*". </t>
     			<t>
     			Clients MUST NOT use CN-ID
     			identifiers; a CN field may be present in the server
				certificate's
     			subject name, but MUST NOT be used for authentication within the
     			rules described in <xref target="BCP195" />. </t>
     			<t>
     			SRV-ID and URI-ID as described in Section 6.5 of <xref target="RFC6125" />
     			MUST NOT be used for comparison.
     			</t>
     			</list> </t>

	</section>
    <section anchor="IANA" title="IANA  Considerations">
		<section anchor="OAuthParametersRegistry" title="OAuth Parameters Registration">
            <t>Since the request object is a JWT, the core JWT claims cannot be used for 
            any purpose in the request object other than for what JWT dictates. 
            Thus, they need to be registered to OAuth Parameter Registry to avoid 
            future OAuth extensions using them with different meanings.</t>
			<t>This specification adds the following values to the "OAuth Parameters" registry established by <xref target="RFC6749" />.</t>
			<t> <?rfc subcompact="yes"?>
				<list style='symbols'>
					<t>Claim Name: <spanx style="verb">iss</spanx></t>
					<t>Claim Description: Issuer of the JWT</t>
					<t>Change Controller: IESG</t>
					<t>Specification Document(s): Section 4.1.1 of <xref target="RFC7519" /> and this document. </t>
				</list>
				<list style='symbols'>
					<t>Claim Name: <spanx style="verb">sub</spanx></t>
					<t>Claim Description: Subject of the JWT</t>
					<t>Change Controller: IESG</t>
					<t>Specification Document(s): Section 4.1.2 of <xref target="RFC7519" /> and this document. </t>
				</list>
				<list style='symbols'>
					<t>Claim Name: <spanx style="verb">aud</spanx></t>
					<t>Claim Description: Audience of the JWT</t>
					<t>Change Controller: IETF</t>
					<t>Specification Document(s): Section 4.1.3 of <xref target="RFC7519" /> and this document. </t>
				</list>
				<list style='symbols'>
					<t>Claim Name: <spanx style="verb">exp</spanx></t>
					<t>Claim Description: Expiry time of the JWT</t>
					<t>Change Controller: IETF</t>
					<t>Specification Document(s): Section 4.1.4 of <xref target="RFC7519" /> and this document. </t>
				</list>
				<list style='symbols'>
					<t>Claim Name: <spanx style="verb">nbf</spanx></t>
					<t>Claim Description: Not Before - The time the JWT is not valid before</t>
					<t>Change Controller: IETF</t>
					<t>Specification Document(s): Section 4.1.5 of <xref target="RFC7519" /> and this document. </t>
				</list>
				<list style='symbols'>
					<t>Claim Name: <spanx style="verb">iat</spanx></t>
					<t>Claim Description: The time the JWT was issued at.</t>
					<t>Change Controller: IESG</t>
					<t>Specification Document(s): Section 4.1.6 of <xref target="RFC7519" /> and this document. </t>
				</list>
				<list style='symbols'>
					<t>Claim Name: <spanx style="verb">jti</spanx></t>
					<t>Claim Description: JWT Identifier</t>
					<t>Change Controller: IESG</t>
					<t>Specification Document(s): Section 4.1.7 of <xref target="RFC7519" /> and this document. </t>
				</list>
			</t>
		</section>
		<section anchor="OAuthAuthorizationServerMetadataRegistry" title="OAuth Authorization Server Metadata Registry">
      		<t>This specification adds the following values to the "OAuth Parameters" registry established by <xref target="RFC8414" />.</t>
			<t> <?rfc subcompact="yes"?>
				<list style='symbols'>
					<t>Metadata Name: <spanx style="verb">require_signed_request_objects</spanx></t>
					<t>Metadata Description: Indicates where authorization request needs to be protected as Request Object and provided 
                    through either <spanx style="verb">request</spanx> or <spanx style="verb">request_uri parameter</spanx>. </t>
					<t>Change Controller: IESG</t>
					<t>Specification Document(s): Section 10.5 of this document. </t>
				</list>
            </t>
		</section>
		<section anchor="OAuthDynamicClientRegistrationMetadataRegistry" title="OAuth Dynamic Client Registration Metadata Registry">
      		<t>This specification adds the following values to the "OAuth Parameters" registry established by <xref target="RFC7591" />.</t>
			<t> <?rfc subcompact="yes"?>
				<list style='symbols'>
					<t>Metadata Name: <spanx style="verb">require_signed_request_objects</spanx></t>
					<t>Metadata Description: Indicates where authorization request needs to be protected as Request Object and provided 
                    through either <spanx style="verb">request</spanx> or <spanx style="verb">request_uri parameter</spanx>. </t>
					<t>Change Controller: IESG</t>
					<t>Specification Document(s): Section 10.5 of this document. </t>
				</list>
            </t>
		</section>

        <section title="Media Type Registration" anchor="MediaReg">
            <section title="Registry Contents" anchor="MediaContents">
                <t>
                    This section registers the
                    <spanx style="verb">application/oauth.authz.req+jwt</spanx>
                    media type <xref target="RFC2046"/> in the "Media Types"
                    registry <xref target="IANA.MediaTypes"/> in the manner
                    described in <xref target="RFC6838"/>, which can be used to
                    indicate that the content is a JWT containing Request
                    Object claims.
                </t>
                <t> <?rfc subcompact="yes"?>
                    <list style="symbols">
                        <t>
                            Type name: application
                        </t>
                        <t>
                            Subtype name: oauth.authz.req+jwt
                        </t>
                        <t>
                            Required parameters: n/a
                        </t>
                        <t>
                            Optional parameters: n/a
                        </t>
                        <t>
                            Encoding considerations: binary;
                            A Request OBject is a JWT;
                            JWT values are encoded as a
                            series of base64url-encoded values (some of which may be the
                            empty string) separated by period ('.') characters.
                        </t>
                        <t>
                            Security considerations: See <xref target="Security"/> of [[ this specification ]]
                        </t>
                        <t>
                            Interoperability considerations: n/a
                        </t>
                        <t>
                            Published specification: <xref target="authorization_request_object"/> of [[ this specification ]]
                        </t>
                        <t>
                            Applications that use this media type:
                            Applications that use Request Objects to make an OAuth 2.0 Authorization Request
                        </t>
                        <t>
                            Fragment identifier considerations: n/a
                        </t>
                        <t>
                            Additional information:<list style="empty">
                            <t>Magic number(s): n/a</t>
                            <t>File extension(s): n/a</t>
                            <t>Macintosh file type code(s): n/a </t></list>
                            <vspace/>
                        </t>
                        <t>
                            Person &amp; email address to contact for further information:
                            <vspace/>
                            Nat Sakimura, nat@nat.consulting
                        </t>
                        <t>
                            Intended usage: COMMON
                        </t>
                        <t>
                            Restrictions on usage: none
                        </t>
                        <t>
                            Author: Nat Sakimura, nat@nat.consulting
                        </t>
                        <t>
                            Change controller: IESG
                        </t>
                        <t>
                            Provisional registration? No
                        </t>
                    </list>
                </t>
            </section>
            <?rfc subcompact="no"?>
        </section>



    </section>

    <section anchor="Security" title="Security Considerations">
      <t>In addition to the all <xref target="RFC6819">
      the security considerations discussed in OAuth 2.0</xref>, 
	  the security considerations in 
	  <xref target="RFC7515" />, 
	  <xref target="RFC7516" />, 
	  <xref target="RFC7518" />, and 
	  <xref target="RFC8725" />	needs to be considered. 
	  Also, there are several academic papers such as 
	  <xref target="BASIN" /> that provide useful 
	  insight into the security properties of protocols 
	  like OAuth. 
	  </t>
	  <t>
	  In consideration of the above, this document 
	  advises taking  
	  the following security considerations
      into account.
	  </t>
	  <section anchor="alg_choice" title="Choice of Algorithms">
		  <t>When sending the authorization request object through <spanx
		  style="verb">request</spanx> parameter, it MUST either be 
	      signed using <xref target="RFC7515">JWS</xref>
	      or signed then encrypted using <xref target="RFC7515">JWS</xref> and
	      <xref target="RFC7516">JWE</xref> respectively,
		  with then considered appropriate algorithms. </t>
	  </section>

	  <section anchor="src_authn" title="Request Source Authentication">
		<t>
			The source of the Authorization Request MUST always be 
			verified. There are several ways to do it in this specification. 
		</t>
		<t><list style="format (%c)">
			<t>Verifying the JWS Signature of the Request Object.</t>
			<t>Verifying that the symmetric key for the JWE encryption is the correct one
			if the JWE is using symmetric encryption.</t>
			<t>Verifying the TLS Server Identity of the Request Object URI.
			In this case, the Authorization Server MUST know 
			out-of-band that the Client uses Request Object URI and 
			only the Client is covered by the TLS certificate. 
			In general, it is not a reliable method. 
			</t>
			<t>When Authorization Server is providing an endpoint
			that provides a Request Object URI in exchange for 
			a Request Object, the Authorization
			Server MUST perform Client Authentication to accept 
			the Request Object and bind the Client Identifier 
			to the Request Object URI it is providing. 
			Since Request Object URI can be replayed, the lifetime 
			of the Request Object URI MUST be short and preferably 
			one-time use. The entropy of the Request Object URI 
			MUST be sufficiently large. 
            The adequate shortness of the validity and 
            the entropy of the Request Object URI depends 
            on the risk calculation based on the value  
            of the resource being protected. A general guidance 
            for the validity time would be less than a minute 
            and the Request Object URI is to include a cryptographic  
            random value of 128bit or more at the time of the 
            writing of this specification. 
			</t>
			<t>When a third party, such as a Trust Framework Provider(TFP),
			provides an endpoint
			that provides a Request Object URI in exchange for
			a Request Object. The same requirements as (b) and (c) above
			apply. In addition, the Authorization Server
			MUST know out-of-band that the Client utilizes
			the Trust Framework Operator and the
			Authorization Server MUST be a member of that trust framework so
			that it can trust the TFP.
			</t>
		</list></t>
	  </section>
	  <section anchor="explicit_endpoints" title="Explicit Endpoints">
	    <t>
	      Although this specification does not require them, 
	      research such as <xref target="BASIN" /> points out that 
	      it is a good practice to explicitly state 
	      the intended interaction endpoints and the message 
	      position in the sequence in a tamper evident 
	      manner so that the intent of the initiator is unambiguous. 
	      The following endpoints defined in <xref target="RFC6749" />,
	      <xref target="RFC6750" />, and <xref target="RFC8414" /> are
	      RECOMMENDED by this specification to use this practice :
	    </t> 
	    <t><list style="format (%c)">
	      <t>Protected Resources (<spanx style="verb">protected_resources</spanx>)</t>
	      <t>Authorization Endpoint (<spanx style="verb">authorization_endpoint</spanx>)</t>
	      <t>Redirection URI (<spanx style="verb">redirect_uri</spanx>)</t>
	      <t>Token Endpoint (<spanx style="verb">token_endpoint</spanx>)</t>
	    </list></t>
	    <t>
	      Further, if dynamic discovery is used, then this practice also applies
	      to the discovery related endpoints.
	    </t>
	    <t>
	      In <xref target="RFC6749" />, 
	      while Redirection URI is included in the Authorization Request, others
	      are not.
	      As a result, the same applies to Authorization Request Object.
	    </t>
	    <t>
	      The lack of the link among those endpoints are cited as the 
	      cause of Cross-Phase Attacks introduced in <xref target="FETT" />. 
	      An extension specification should be created 
          as a measure to address the risk.  
	    </t>
	  </section>
	  <section anchor="request_uri_threats" title="Risks Associated with request_uri">
	    <t>
	        The introduction of <spanx style="verb">request_uri</spanx>
	        introduces several attack possibilities. 
	        Consult the security considerations in Section 7 of
	        <xref target="RFC3986">RFC3986</xref> for more information regarding
	        risks associated with URIs.
	    </t>
	    <section anchor="ddos_on_authz_server" title="DDoS Attack on the Authorization Server">
	      <t>
	        A set of malicious client can launch a DoS attack 
	        to the authorization server by pointing the 
	        <spanx style="verb">request_uri</spanx> to a uri 
	        that returns extremely large content or extremely slow to respond. 
	        Under such an attack, the server may use up its resource 
	        and start failing. 
	      </t>
	      <t>
	        Similarly, a malicious client can specify the 
		<spanx style="verb">request_uri</spanx> value 
		that itself points to an authorization request URI 
		that uses <spanx style="verb">request_uri</spanx> to 
		cause the recursive lookup. 
	      </t>
	      <t>
	        To prevent such attack to succeed, the server should 
	        (a) check that the value of <spanx style="verb">request_uri</spanx> 
	        parameter does not point to an unexpected location, 
	        (b) check the content type of the response is 
	        <spanx style="verb">application/oauth.authz.req+jwt</spanx>
	        (c) implement a time-out for obtaining the content of 
	        <spanx style="verb">request_uri</spanx>, and 
		(d) not perform recursive GET on the
		<spanx style="verb">request_uri</spanx>.
	      </t>
	    </section>
	    <section anchor="request_uri_rewrite" title="Request URI Rewrite">
	      <t>
	        The value of <spanx style="verb">request_uri</spanx> is not signed 
	        thus it can be tampered by Man-in-the-browser attacker. 
	        Several attack possibilities rise because of this, e.g., 
	        (a) attacker may create another file that the rewritten 
	        URI points to making it possible to request extra scope 
	        (b) attacker launches a DoS attack to a victim site 
	        by setting the value of <spanx style="verb">request_uri</spanx> 
	        to be that of the victim. 
	      </t>
	      <t>
	        To prevent such attack to succeed, the server should 
	        (a) check that the value of <spanx style="verb">request_uri</spanx> 
	        parameter does not point to an unexpected location, 
	        (b) check the content type of the response is 
	        <spanx style="verb">application/oauth.authz.req+jwt</spanx>
	        (c) implement a time-out for obtaining the content of 
	        <spanx style="verb">request_uri</spanx>.
	      </t>
	    </section>
	  </section>
      <section anchor="require_signed_request_object" title="Downgrade Attack">
	      <t>
            Unless the protocol used by client and the server is locked down to 
            use OAuth JAR, it is possible for an attacker to use RFC6749 requests 
            to bypass all the protection provided by this specification. 
          </t>
          <t>
            To prevent it, this specification defines a new client metadata and 
            server metadata <spanx style="verb">require_signed_request_object</spanx> 
            whose value is a boolean. 
          </t>
          <t>
            When the value of it as a client metadata 
            is <spanx style="verb">true</spanx>, 
            then the server MUST reject the authorization request from  
            the client that does 
            not conform to this specification. 
            If omitted, the default value is <spanx style="verb">false</spanx>.
	      </t>
          <t>
            When the value of it as a server metadata 
            is <spanx style="verb">true</spanx>, 
            then the server MUST reject the authorization request from  
            any client that does 
            not conform to this specification. 
            If omitted, the default value is <spanx style="verb">false</spanx>.
	      </t>
      </section>	  
    </section>
    
    <section title="TLS security considerations" anchor="tls_sec">
      <t>Current security
      considerations can be found in <xref target="BCP195">Recommendations
      for Secure Use of TLS and DTLS</xref>.  This 
      supersedes the TLS version recommendations in <xref target="RFC6749">OAuth
        2.0</xref>.</t>
	  </section>
	
	<section anchor="Privacy" title="Privacy Considerations">
		<t>
			When the Client is being granted access to a protected resource 
			containing personal data, both the Client 
			and the Authorization Server need to adhere to 
			Privacy Principles. 
			<xref target="RFC6973">
			RFC 6973 Privacy Considerations for Internet Protocols
			</xref>
			gives excellent guidance on the
			enhancement of protocol design and implementation.  
			The provision listed in it should be followed. 
		</t>
		<t>
			Most of the provision would apply to 
			<xref target="RFC6749">The OAuth 2.0 Authorization Framework</xref>
			and <xref target="RFC6750">
			The OAuth 2.0 Authorization Framework: 
			Bearer Token Usage</xref>	
			and are not specific to this specification.
			In what follows, only the specific provisions 
			to this specification are noted. 
		</t>

		<section anchor="collection_limitation" title="Collection limitation">
			<t>
				When the Client is being granted access to a protected resource 
			    containing personal data, 
				the Client SHOULD limit the collection of 
				personal data to that which is within 
				the bounds of applicable law and strictly necessary 
				for the specified purpose(s).
			</t>
			<t>
				It is often hard for the user to find out if 
				the personal data asked for is strictly necessary. 
				A Trust Framework Provider can help the user 
				by examining the Client request and comparing
				to the proposed processing by the Client and
				certifying the request. After the certification,
				the Client, when making an Authorization Request,
				can submit Authorization Request to the
				Trust Framework Provider to obtain the Request Object URI.
				This process is two steps:
				<list style="format (%d)">
				<t>(Certification Process) The TFP examines the business
				process of the client and determines what claims they need:
				This is the certification process. Once the client is certified,
				then they are issued a client credential to authenticate against
				to push request objects to the TFP to get the
				<spanx style="verb">request_uri</spanx>.</t>
				<t>(Translation Process) The client uses the client credential
				that it got to push the request object to the TFP to get the
				<spanx style="verb">request_uri</spanx>.</t>
				</list>
			</t>
			<t>
				Upon receiving such Request Object URI in the Authorization 
				Request, the Authorization Server first verifies 
				that the authority portion of the Request Object URI 
				is a legitimate one for the Trust Framework Provider. 
				Then, the Authorization Server issues 
				HTTP GET request to the Request Object URI. 
				Upon connecting, the Authorization Server MUST 
				verify the server identity represented in the 
				TLS certificate is legitimate for the Request Object URI. 
				Then, 
				the Authorization Server can obtain the Request Object, 
				which includes the <spanx style="verb">client_id</spanx> 
				representing the Client. 
			</t>
			<t>
				The Consent screen 
				MUST indicate the Client and SHOULD indicate 
				that the request has been vetted by the Trust Framework 
				Operator for the adherence to the Collection Limitation 
				principle. 
			</t>
		</section>
		<section anchor="disclosure_limitation" title="Disclosure Limitation">
			<section anchor="request_disclosure" title="Request Disclosure">
				<t>
					This specification allows extension parameters. 
					These may include potentially sensitive information. 
					Since URI query parameter may leak through various 
					means but most notably through referrer and browser history, 
					if the authorization request contains a potentially sensitive 
					parameter, the Client SHOULD 
					<xref target="RFC7516">JWE</xref> encrypt the request object.
				</t>
				<t>
					Where Request Object URI method is being used, 
					if the request object contains personally identifiable 
					or sensitive information, the <spanx style="verb">request_uri</spanx> SHOULD be 
					used only once, have a short validity period, and MUST have large enough entropy 
					deemed necessary with applicable security policy 
					unless the Request Object itself is 
					<xref target="RFC7516">JWE</xref> Encrypted. 
					The adequate shortness of the validity and 
					the entropy of the Request Object URI depends 
					on the risk calculation based on the value  
					of the resource being protected. A general guidance 
					for the validity time would be less than a minute 
					and the Request Object URI is to include a cryptographic  
					random value of 128bit or more at the time of the 
					writing of this specification. 

				</t>
			</section>
			<section anchor="tracking" title="Tracking using Request Object URI">
				<t>
					Even if the protected resource does not include a 
					personally identifiable information, 
					it is sometimes possible to identify the user 
					through the Request Object URI if persistent static per-user
					Request Object URIs are used. A third party may observe
					it through browser history etc. and start correlating 
					the user's activity using it. 
					In a way, it is a data disclosure as well and
					should be avoided. 
				</t>
				<t>
					Therefore, per-user Request Object URI should be avoided. 
				</t>
			</section>
		</section>
	</section>

    <section anchor="Acknowledgements" title="Acknowledgements">
	  <t>The following people contributed to the creation of this document 
	  in the OAuth WG. (Affiliations at the time of the contribution are used.) </t>
	  
	  <t>Sergey Beryozkin, 
	  Brian Campbell (Ping Identity), 
	  Vladimir Dzhuvinov (Connect2id),
	  Michael B. Jones (Microsoft),
	  Torsten Lodderstedt (yes.com)
	  Jim Manico, 
	  Axel Nenker(Deutsche Telecom), 
	  Hannes Tschofenig (ARM), 
	  Ben Campbell,
	  Dirk Balfanz (Google),
	  James H. Manger (Telstra),
	  John Panzer (Google),
	  David Recordon (Facebook),
	  Marius Scurtescu (Google),
	  Luke Shepard (Facebook),
	  Annabelle Backman (Amazon)
      Kathleen Moriarty (as AD), and
      Steve Kent (as SECDIR). 
	  </t>
	  
      <t>The following people contributed to creating this document through <xref
      target="OpenID.Core">the OpenID Connect Core 1.0</xref>.</t>

      <t>
	  Brian Campbell (Ping Identity),
	  George Fletcher (AOL),
	  Ryo Itou (Mixi), 
      Edmund Jay (Illumila), 
	  Michael B. Jones (Microsoft), 	  
	  Breno de Medeiros (Google), 
	  Hideki Nara (TACT), 
	  Justin Richer (MITRE).
	  </t>
    </section>
	<section title="Revision History" anchor="hist">
		<t>Note to the RFC Editor: Please remove this section 
			from the final RFC. </t>
		<t>-20</t>
		<t>
			<list style="symbols">
				<t>BK comments </t>
				<t>Section 3 Removed WAP </t>
				<t>Section 4.  Clarified authorization request object parameters,
					removed extension parameters from examples </t>
				<t>Section 4.  Specifies application/oauth.authz.req+jwt as mime-type fore request objects</t>
				<t>Section 5.2.1 Added reference to Capability URLs </t>
				<t>Section 5.2.3. Added entrophy fragment to example request</t>
				<t>Section 8.  Replaced "subjectAltName dnsName" with "DNS-ID"</t>
				<t>Section 9. Registers authorization request parameters in JWT Claims Registry.  </t>
				<t>Section 9. Registers application/oauth.authz.req in IANA mime-types registry </t>
				<t>Section 10.1.  Clarified encypted request objects are "signed then encrypted" to maintain consistency</t>
				<t>Section 10.2.  Clarifies trust between AS and TFP</t>
				<t>Section 10.3. Clarified endpoints subject to the practice </t>
				<t>Section 10.4  Replaced "redirect_uri" to "request_uri" </t>
				<t>Section 10.4. Added reference to RFC 3986 for risks </t>
				<t>Section 10.4.1.d Deleted "do" to maintain grammar flow </t>
				<t>Section 10.4.1, 10.4.2  Replaced "application/jose" to "application/jwt"</t>
				<t>Section 12.1. Extended description for submitting authorization request to TFP to obtain request objec </t>
				<t>Section 12.2.2.  Replaced per-user Request Object URI with static per-user Request URIs</t>
				<t>Section 13. Combined OAuth WG contributors together</t>
				<t>Section Whole doc Replaced application/jwt with application/oauth.authz.req+jwt </t>
			</list>
		</t>

		<t>-19</t>
		<t>
			<list style="symbols">
			<t>AD comments </t>
			<t>Section 5.2.1.  s/Requiest URI/Request URI/ </t>
			<t>Section 8  s/[BCP195] ./[BCP195]./ </t>
			<t>Section 10.3.  s/sited/cited/</t>
			<t>Section 11.  Typo.  s/Curent/Current/</t>
			</list>
		</t>
		<t>-17</t>
		<t>
			<list style="symbols">
			<t>#78 Typos in content-type </t>
			</list>
		</t>
		<t>-16</t>
		<t>
			<list style="symbols">
			<t>Treated remaining Ben Campbell comments. </t>
			</list>
		</t>
		<t>-15</t>
		<t>
			<list style="symbols">
			<t>Removed further duplication</t>
			</list>
		</t>
		<t>-14</t>
		<t>
			<list style="symbols">
			<t>#71 Reiterate dynamic params are included. </t>
			<t>#70 Made clear that AS must return error.</t>
			<t>#69 Inconsistency of the need to sign.</t>
			<t>Fixed Mimetype. </t>
			<t>#67 Incosistence in requiring HTTPS in request uri.</t>
			<t>#66 Dropped ISO 29100 reference.</t>
			<t>#25 Removed Encrypt only option.</t>
			<t>#59 Same with #25.</t>
			</list>
		</t>
		<t>-13</t>
		<t>
			<list style="symbols">
			<t>add TLS Security Consideration section</t>
			<t>replace RFC7525 reference with BCP195</t>
			<t>moved front tag in FETT reference to fix XML structure</t>
			<t>changes reference from SoK to FETT</t>
			</list>
		</t>
		<t>-12</t>
		<t>
			<list style="symbols">
				<t>fixes #62 - Alexey Melnikov Discuss </t>
				<t>fixes #48 - OPSDIR Review : General - delete semicolors after list items</t>
				<t>fixes #58 - DP Comments for the Last Call</t>
				<t>fixes #57 - GENART - Remove "non-normative ... " from examples.</t>
				<t>fixes #45 - OPSDIR Review : Introduction - are attacks discovered or already opened</t>
				<t>fixes #49 - OPSDIR Review : Introduction - Inconsistent colons after initial sentence of list items.</t>
				<t>fixes #53 - OPSDIR Review : 6.2 JWS Signed Request Object - Clarify JOSE Header</t>
				<t>fixes #42 - OPSDIR Review : Introduction - readability of 'and' is confusing</t>
				<t>fixes #50 - OPSDIR Review : Section 4 Request Object - Clarify 'signed, encrypted, or signed and encrypted'</t>
				<t>fixes #39 - OPSDIR Review : Abstract - Explain/Clarify JWS and JWE</t>
				<t>fixed #50 - OPSDIR Review : Section 4 Request Object - Clarify 'signed, encrypted, or signed and encrypted'</t>
				<t>fixes #43 - OPSDIR Review : Introduction - 'properties' sounds awkward and are not exactly 'properties'</t>
				<t>fixes #56 - OPSDIR Review : 12 Acknowledgements - 'contribution is' => 'contribution are'</t>
				<t>fixes #55 - OPSDIR Review : 11.2.2 Privacy Considerations - ' It is in a way' => 'In a way, it is'</t>
				<t>fixes #54 - OPSDIR Review : 11 Privacy Considerations - 'and not specific' => 'and are not specific'</t>
				<t>fixes #51 - OPSDIR Review : Section 4 Request Object - 'It is fine' => 'It is recommended'</t>
				<t>fixes #47 - OPSDIR Review : Introduction - 'over- the- wire' => 'over-the-wire'</t>
				<t>fixes #46 - OPSDIR Review : Introduction - 'It allows' => 'The use of application security' for</t>
				<t>fixes #44 - OPSDIR Review : Introduction - 'has' => 'have'</t>
				<t>fixes #41 - OPSDIR Review : Introduction - missing 'is' before 'typically sent'</t>
				<t>fixes #38 - OPSDIR Review : Section 11 - Delete 'freely accessible' regarding ISO 29100</t>
			</list>
		</t>
		<t>-11</t>
		<t>
			<list style="symbols">
				<t>s/bing/being/</t>
				<t>Added history for -10</t>
			</list>
		</t>
	    <t>-10</t>
		<t>
		    <list style="symbols">
				<t>#20: KM1 -- some wording that is awkward in the TLS section.
				</t>
				<t>#21: KM2 - the additional attacks against OAuth 2.0 should 
				also have a pointer
				</t>
				<t>#22: KM3 -- Nit: in the first line of 10.4:
				</t>
				<t>#23: KM4 -- Mention RFC6973 in Section 11 in addition 
				to ISO 29100
				</t>
				<t>#24: SECDIR review: Section 4 -- Confusing requirements 
				for sign+encrypt
				</t>
				<t>#25: SECDIR review: Section 6 -- authentication and integrity 
				need not be provided if the requestor encrypts the token?
				</t>
				<t>#26: SECDIR Review: Section 10 -- why no reference for 
				JWS algorithms?
				</t>
				<t>#27: SECDIR Review: Section 10.2 - how to do the agreement 
				between client and server "a priori"?
				</t>
				<t>#28: SECDIR Review: Section 10.3 - Indication on "large entropy" 
				and "short lifetime" should be indicated
				</t>
				<t>#29: SECDIR Review: Section 10.3 - Typo
				</t>
				<t>#30: SECDIR Review: Section 10.4 - typos and missing articles</t>
				<t>#31: SECDIR Review: Section 10.4 - Clearer statement 
				on the lack of endpoint identifiers needed</t>
				<t>#32: SECDIR Review: Section 11 - ISO29100 needs 
				to be moved to normative reference</t>
				<t>#33: SECDIR Review: Section 11 - Better English and Entropy 
				language needed</t>
				<t>#34: Section 4: Typo</t>
				<t>#35: More Acknowledgment</t>
				<t>#36: DP - More precise qualification on Encryption needed.</t>

			</list>
		</t>
	    <t>-09</t>
		<t>
		    <list style="symbols">
				<t>Minor Editorial Nits. </t>
				<t>Section 10.4 added.</t>
				<t>Explicit reference to Security consideration (10.2) added in 
				   section 5 and section 5.2.</t>
				<t>, (add yourself) removed from the acknowledgment. </t>
			</list>
		</t>
	    <t>-08</t>
		<t>
		    <list style="symbols">
				<t>Applied changes proposed by Hannes on 2016-06-29 on IETF OAuth
				list recorded as https://bitbucket.org/Nat/oauth-jwsreq/issues/12/. </t>
				<t>TLS requirements added.</t>
				<t>Security Consideration reinforced.</t>
				<t>Privacy Consideration added.</t>
				<t>Introduction improved. </t>
			</list>
		</t>
		<t>-07</t>
		<t>
			<list style="symbols">
				<t>Changed the abbrev to OAuth JAR from oauth-jar. </t>
				<t>Clarified sig and enc methods. </t>
				<t>Better English.</t>
				<t>Removed claims from one of the example. </t>
				<t>Re-worded the URI construction.</t>
				<t>Changed the example to use request instead of request_uri.</t>
				<t>Clarified that Request Object parameters take precedence 
				regardless of request or request_uri parameters were used. </t>
				<t>Generalized the language in 4.2.1 to convey the intent 
				more clearly.</t>
				<t>Changed "Server" to "Authorization Server" as a clarification.</t>
				<t>Stopped talking about request_object_signing_alg.</t>
				<t>IANA considerations now reflect the current status.</t>
				<t>Added Brian Campbell to the contributors list. 
				Made the lists alphabetic order based on the last names. 
				Clarified that the affiliation is at the time of the contribution.</t>
				<t>Added "older versions of " to the reference to IE uri length 
				limitations.</t>
				<t>Stopped talking about signed or unsigned JWS etc.</t>
				<t>1.Introduction improved.</t>
			</list>
		</t>
		<t>-06</t>
		<t>
			<list style="symbols">
				<t>Added explanation on the 512 chars URL restriction. </t>
				<t>Updated Acknowledgements. </t>
			</list>
		</t>
		<t>-05</t>
		<t>
			<list style="symbols">
				<t>More alignment with OpenID Connect. </t>
			</list>
		</t>
		<t>-04</t>
		<t>
			<list style="symbols">
				<t>Fixed typos in examples. (request_url -> request_uri, cliend_id -> client_id) </t>
				<t>Aligned the error messages with the OAuth IANA registry.</t>
				<t>Added another rationale for having request object.</t>
			</list>
		</t>
		<t>-03</t>
		<t>
			<list style="symbols">
				<t>Fixed the non-normative description about the advantage of static signature. </t>
				<t>Changed the requirement for the parameter values in the request itself and the request object from 'MUST MATCH" to 'Req Obj takes precedence.</t>
			</list>
		</t>
		<t>-02</t>
		<t>
			<list style="symbols">
				<t>Now that they are RFCs, replaced JWS, JWE, etc. with RFC numbers. </t>
			</list>
		</t>

		<t>-01</t>
		<t>
			<list style="symbols">
				<t>Copy Edits.</t>
			</list>
		</t>
	</section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.3629"?>
      <?rfc include="reference.RFC.3986"?>
      <?rfc include="reference.RFC.6125"?>
      <?rfc include='reference.RFC.6749'?>
      <?rfc include='reference.RFC.6750'?>
      <?rfc include='reference.RFC.7159'?>
      <?rfc include='reference.RFC.7230'?>
      <?rfc include='reference.RFC.7515'?>
      <?rfc include='reference.RFC.7516'?>
      <?rfc include='reference.RFC.7518'?>
      <?rfc include='reference.RFC.7519'?>
      <?rfc include='reference.RFC.7636'?>
	  <?rfc include='reference.RFC.8141'?>
	  <?rfc include='reference.RFC.8174'?>
	  <?rfc include='reference.RFC.8259'?>
	   <?rfc include='reference.RFC.8414'?>
		<reference anchor="IANA.MediaTypes" target="http://www.iana.org/assignments/media-types">
			<front>
				<title>Media Types</title>
				<author>
					<organization>IANA</organization>
				</author>
				<date/>
			</front>
		</reference>
      <?rfc include='reference.RFC.8485'?>
	  	<reference anchor='BCP195'>

		<front>
		<title>Recommendations for Secure Use of Transport Layer Security (TLS) and 
		Datagram Transport Layer Security (DTLS)</title>
		<author initials='Y.' surname='Sheffer' fullname='Y. Sheffer'>
		<organization /></author>
		<author initials='R.' surname='Holz' fullname='R. Holz'>
		<organization /></author>
		<author initials='P.' surname='Saint-Andre' fullname='P. Saint-Andre'>
		<organization /></author>
		<date year='2015' month='May' />
		<abstract>
		<t>Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) are
		 widely used to protect data exchanged over application protocols such as HTTP, 
		 SMTP, IMAP, POP, SIP, and XMPP.  Over the last few years, several serious 
		 attacks on TLS have emerged, including attacks on its most commonly used cipher 
		 suites and their modes of operation.  This document provides recommendations for 
		 improving the security of deployed services that use TLS and DTLS.  The 
		 recommendations are applicable to the majority of use cases.</t></abstract></front>

		<seriesInfo name='BCP' value='195' />
		<seriesInfo name='RFC' value='7525' />
		<format type='TXT' octets='60283' target='http://www.rfc-editor.org/bcp/bcp195.txt' />
		</reference> 
	  
    </references>


    <references title="Informative References">

	<reference anchor="IANA.OAuth.Parameters" target="http://www.iana.org/assignments/oauth-parameters">
        <front>
          <title>OAuth Parameters</title>
          <author>
            <organization>IANA</organization>
          </author>
          <date/>
        </front>
      </reference>

	  <?rfc include='reference.RFC.7591'?>
      <?rfc include='reference.RFC.6819'?>
	  <?rfc include='reference.RFC.6973'?>
	  <?rfc include='reference.RFC.2046' ?>
	  <?rfc include='reference.RFC.6838' ?>
	  <?rfc include='reference.RFC.8725' ?>

      <reference anchor="OpenID.Core" target="http://openid.net/specs/openid-connect-core-1_0.html">
        <front>
          <title>OpenID Connect Core 1.0</title>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute, Ltd.</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="Ping Identity">Ping Identity</organization>
          </author>

          <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
            <organization abbrev="Microsoft">Microsoft</organization>
          </author>

          <author fullname="Breno de Medeiros" initials="B." surname="de Medeiros">
            <organization abbrev="Google">Google</organization>
          </author>

		  <author fullname="Chuck Mortimore" initials="C." surname="Mortimore">
			<organization abbrev="Salesforce">Salesforce</organization>
		  </author>

          <date day="25" month="February" year="2014"/>
        </front>
		<seriesInfo name="OpenID Foundation" 
            value="Standards" />
      </reference>

      <reference anchor="BASIN" target="https://www.cs.ox.ac.uk/people/cas.cremers/downloads/papers/BCM2012-iso9798.pdf">
        <front>
          <title>Provably Repairing the ISO/IEC 9798 Standard for Entity Authentication</title>
          <author fullname="David Basin" initials="D." surname="Basin"></author>
          <author fullname="Cas Cremers" initials="C." surname="Cremers"></author>
          <author fullname="Simon Meier" initials="S." surname="Meier"></author>
          <date month="November" year="2013" />
        </front>
        <seriesInfo name="Journal of Computer Security - Security and Trust Principles" 
            value="Volume 21 Issue 6, Pages 817-846" />
       </reference>
       
       <reference anchor="FETT" target="https://arxiv.org/pdf/1601.01229v2.pdf">
         <front>
           <title>A Comprehensive Formal Security Analysis of OAuth 2.0</title>
           <author fullname="Daniel Fett" initials="D." surname="Fett"></author>
           <author fullname="Ralf Kusters" initials="R." surname="Kusters"></author>
           <author fullname="Guido Schmitz" initials="G." surname="Schmitz"></author>
           <date month="October" year="2016" />
        </front>
           <seriesInfo name="CCS '16 Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security" value="Pages 1204-1215 " />
       </reference>

        <reference anchor="CapURLs" target="https://www.w3.org/TR/capability-urls/">
            <front>
                <title>Good Practices for Capability URLs</title>
                <author fullname="Jeni Tennison" initials="J." surname="Tennison"></author>
                <date day="18" month="February" year="2014" />
            </front>
            <seriesInfo name="W3C"
                        value="Working Draft" />
        </reference>
    </references>
  </back>
</rfc>
