<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='http://xml2rfc.tools.ietf.org/authoring/rfc2629.xslt' ?>
<!DOCTYPE rfc PUBLIC "-//IETF//DTD RFC 2629//EN"
"http://xml2rfc.tools.ietf.org/authoring/rfc2629.dtd">

<rfc category="std" docName="draft-jones-oauth-resource-metadata-00" ipr="trust200902">

  <?rfc toc="yes" ?>
  <?rfc tocdepth="5" ?>
  <?rfc symrefs="yes" ?>
  <?rfc sortrefs="yes"?>
  <?rfc strict="yes" ?>
  <?rfc compact='yes' ?>
  <?rfc subcompact='no' ?>

  <front>
    <title abbrev="OAuth 2.0 Protected Resource Metadata">OAuth 2.0 Protected Resource Metadata</title>

    <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
      <organization abbrev="Microsoft">Microsoft</organization>
      <address>
        <email>mbj@microsoft.com</email>
	<uri>http://self-issued.info/</uri>
      </address>
    </author>

    <author fullname="Phil Hunt" initials="P." surname="Hunt">
      <organization>Oracle</organization>
      <address>
        <email>phil.hunt@yahoo.com</email>
      </address>
    </author>

    <date day="3" month="August" year="2016" />

    <area>Security</area>
    <workgroup>OAuth Working Group</workgroup>

    <keyword>OAuth</keyword>
    <keyword>Discovery</keyword>
    <keyword>Metadata</keyword>
    <keyword>Discovery Metadata</keyword>
    <keyword>Configuration Information</keyword>
    <keyword>Resource Server</keyword>
    <keyword>Protected Resource</keyword>
    <keyword>JavaScript Object Notation</keyword>
    <keyword>JSON</keyword>
    <keyword>JSON Web Token</keyword>
    <keyword>JWT</keyword>

    <abstract>
      <t>
	This specification defines a metadata format that
	an OAuth 2.0 client can use to obtain
	the information needed to interact with
	an OAuth 2.0 protected resource.
      </t>
    </abstract>
  </front>

  <middle>
    <section anchor="Introduction" title="Introduction">
      <t>
	This specification defines a metadata format
	enabling OAuth 2.0 clients to obtain information needed
	to interact with an OAuth 2.0 protected resource.
	This specification is intentionally as parallel as possible to
	<xref target="RFC7591">"OAuth 2.0 Dynamic Client Registration Protocol"</xref>,
	which enables a client to provide metadata about itself
	to an OAuth 2.0 authorization server and to
	<xref target="OAuth.AuthorizationMetadata">OAuth 2.0 Authorization Server Metadata</xref>,
	which enables a client to obtain metadata about
	an OAuth 2.0 authorization server.
      </t>
      <t>
	The metadata for a protected resource
	is retrieved from a well-known location as a JSON <xref target="RFC7159"/> document,
	which declares information about its capabilities and optionally, its relationships to other services.
	This process is described in <xref target="RSConfig"/>.
      </t>
      <t>
	This metadata can either be communicated in a self-asserted fashion or as
	a set of signed metadata values represented as claims
	in a JSON Web Token (JWT) <xref target="JWT"/>.
	In the JWT case, the issuer is vouching for
	the validity of the data about the protected resource.
	This is analogous to the role that the Software Statement
	plays in OAuth Dynamic Client Registration <xref target="RFC7591"/>.
      </t>
      <t>
	Each protected resource publishing metadata about itself makes its own
	metadata document available at a well-known location
	rooted at the protect resource's URL,
	even when the resource server implements multiple protected resources.
	This prevents attackers from publishing metadata supposedly describing
	the protected resource, but that is not actually authoritative for
	the protected resource, as described in <xref target="Impersonation"/>.
      </t>
      <t>
	The means by which the client obtains the location
	of the protected resource metadata document
	is out of scope.
	In some cases, the location may be manually configured into the client.
	In other cases, it may be dynamically discovered, for instance,
	through the use of <xref target="RFC7033">WebFinger</xref>,
	in a manner related to the description in Section 2 of
	<xref target="OpenID.Discovery">"OpenID Connect Discovery 1.0"</xref>.
      </t>

      <section anchor="rnc" title="Requirements Notation and Conventions">
	<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 <xref
	target="RFC2119">RFC 2119</xref>.</t>

	<t>
	  All uses of <xref target="JWS">JSON Web Signature (JWS)</xref>
	  and <xref target="JWE">JSON Web Encryption (JWE)</xref>
	  data structures in this specification utilize
	  the JWS Compact Serialization or the JWE Compact Serialization;
	  the JWS JSON Serialization and the JWE JSON Serialization are not used.
	</t>
      </section>

      <section anchor="Terminology" title="Terminology">
	<t>
	  This specification uses the terms "Access Token", "Authorization Code",
	  "Authorization Endpoint", "Authorization Grant", "Authorization Server",
	  "Client", "Client Authentication", "Client Identifier", "Client Secret",
	  "Grant Type", "Protected Resource", "Redirection URI", "Refresh Token",
	  "Resource Owner", "Resource Server", "Response Type", and "Token Endpoint"
	  defined by <xref target="RFC6749">OAuth 2.0</xref>,
	  the terms "Claim Name", "Claim Value", and "JSON Web Token (JWT)"
	  defined by <xref target="JWT">JSON Web Token (JWT)</xref>.
	</t>
      </section>
    </section>

    <section anchor="RSMetadata" title="Protected Resource Metadata">
      <t>
	Protected resources can have metadata describing their configuration.
	The following protected resource metadata values
	are used by this specification and are registered in the IANA
	"OAuth Protected Resource Metadata" registry
	established in <xref target="RSMetadataReg"/>:

	<list style="hanging">

	  <t hangText="resource">
	    <vspace/>
	    REQUIRED.
	    The protected resource's resource identifier, which is a URL that
	    uses the <spanx style="verb">https</spanx> scheme and has no fragment components.
	    This is the location where
	    <spanx style="verb">.well-known</spanx> <xref target="RFC5785">RFC 5785</xref> resources
	    containing information about the protected resource are published.
	    Using these well-known resources is described in <xref target="RSConfig"/>.
	  </t>

	  <t hangText="authorization_servers">
	    <vspace/>
	    OPTIONAL.
	    JSON array containing a list of OAuth authorization server issuer identifiers,
	    as defined in <xref target="OAuth.AuthorizationMetadata"/>,
	    for authorization servers that can be used with this protected resource.
	    Protected resources MAY choose not to advertise some supported authorization servers
	    even when this parameter is used.
	    In some use cases, the set of authorization servers will not be enumerable,
	    in which case this metadata parameter would not be used.
	  </t>

	  <t hangText="jwks_uri">
	    <vspace/>
	    OPTIONAL.
	    URL of the protected resource's JWK Set <xref target="JWK"/> document.
	    This contains keys belonging to the protected resource.
	    For instance, this JWK Set MAY contain encryption key(s)
	    that are used to encrypt access tokens to the protected resource.
	    When both signing and encryption keys are made available,
	    a <spanx style="verb">use</spanx> (public key use) parameter
	    value is REQUIRED for all keys in the referenced JWK Set
	    to indicate each key's intended usage.
	  </t>

	  <t hangText="scopes_provided">
	    <vspace/>
	    RECOMMENDED.
	    JSON array containing a list of the <xref
	    target="RFC6749">OAuth 2.0</xref> <spanx style="verb">scope</spanx> values that
	    are used in authorization requests to request access to this protected resource.
	    Protected resources MAY choose not to advertise some scope values provided
	    even when this parameter is used.
	  </t>

	  <t hangText="bearer_methods_supported">
	    <vspace/>
	    OPTIONAL.
	    JSON array containing a list of the OAuth 2.0 Bearer Token <xref target="RFC6750"/>
	    presentation methods that this protected resource supports.
	    Defined values are
	    <spanx style="verb">["header", "fragment", "query"]</spanx>,
	    corresponding to Sections 2.1, 2.2, and 2.3 of RFC 6750.
	  </t>

	  <t hangText="resource_signing_alg_values_supported">
	    <vspace/>
	    OPTIONAL.
	    JSON array containing a list of the JWS <xref target="JWS" /> signing algorithms
	    (<spanx style="verb">alg</spanx> values) <xref target="JWA" />
	    supported by the protected resource
	    for signed content.
	    The value <spanx style="verb">none</spanx> MAY be included.
	  </t>

	  <t hangText="resource_encryption_alg_values_supported">
	    <vspace/>
	    OPTIONAL.
	    JSON array containing a list of the JWE <xref target="JWE" /> encryption algorithms
	    (<spanx style="verb">alg</spanx> values) <xref target="JWA" />
	    supported by the protected resource
	    for encrypted content.
	  </t>

	  <t hangText="resource_encryption_enc_values_supported">
	    <vspace/>
	    OPTIONAL.
	    JSON array containing a list of the JWE encryption algorithms
	    (<spanx style="verb">enc</spanx> values) <xref target="JWA" />
	    supported by the protected resource
	    for encrypted content.
	  </t>

	  <t hangText="resource_documentation">
	    <vspace/>
	    OPTIONAL.
	    URL of a page containing human-readable information that
	    developers might want or need to know when using the protected resource
	  </t>

	  <t hangText="resource_policy_uri">
	    <vspace/>
	    OPTIONAL.
	    URL that the protected resource provides
	    to read about the protected resource's requirements on how
	    the client can use the data provided by the protected resource
	  </t>

	  <t hangText="resource_tos_uri">
	    <vspace/>
	    OPTIONAL.
	    URL that the protected resource provides
	    to read about the protected resource's terms of service
	  </t>

	</list>
      </t>
      <t>
	Additional protected resource metadata parameters MAY also be used.
      </t>

      <section anchor="SignedMetadata" title="Signed Protected Resource Metadata">
	<t>
	  In addition to JSON elements, metadata values MAY also be provided
	  as a <spanx style="verb">signed_metadata</spanx> value,
	  which is a JSON Web Token (JWT) <xref target="JWT"/>
	  that asserts metadata values about the protected resource as a bundle.
	  A set of claims that can be used in signed metadata
	  are defined in <xref target="RSMetadata"/>.
	  The signed metadata MUST be digitally signed or MACed
	  using <xref target="JWS">JSON Web Signature (JWS)</xref>
	  and MUST contain an <spanx style="verb">iss</spanx> (issuer) claim
	  denoting the party attesting to the claims in the signed metadata.
	  Consumers of the metadata MAY ignore the signed metadata
	  if they do not support this feature.
	  If the consumer of the metadata supports signed metadata,
	  metadata values conveyed in the signed metadata
	  MUST take precedence over those conveyed using plain JSON elements.
	</t>
	<t>
	  Signed metadata is included in the protected resource metadata JSON object
	  using this OPTIONAL member:
	  <list style="hanging">

	    <t hangText="signed_metadata">
	      <vspace/>
	      A JWT containing metadata values about the protected resource as claims.
	      This is a string value consisting of the entire signed JWT.
	      A <spanx style="verb">signed_metadata</spanx>
	      metadata value SHOULD NOT appear as a claim in the JWT.
	    </t>

	  </list>
	</t>
      </section>

    </section>

    <section anchor="RSConfig"
             title="Obtaining Protected Resource Metadata">

      <t>
	Protected resources supporting metadata
	MUST make a JSON document containing metadata as specified in <xref target="RSMetadata"/>
	available at a path formed by
	concatenating a well-known URI string such as
	<spanx style="verb">/.well-known/oauth-protected-resource</spanx> to the
	protected resource's resource identifier.
	The syntax and semantics of <spanx style="verb">.well-known</spanx>
	are defined in <xref target="RFC5785">RFC 5785</xref>.
	The well-known URI path suffix used MUST be registered in the IANA
	"Well-Known URIs" registry <xref target="IANA.well-known"/>.
      </t>
      <t>
	Different applications utilizing OAuth protected resources in application-specific ways
	may define and register different well-known URI path suffixes
	used to publish protected resource metadata as used by those applications.
	For instance, if the Example application uses an OAuth protected resource in an Example-specific way,
	and there are Example-specific metadata values that it needs to publish,
	then it might register and use the
	<spanx style="verb">example-resource-configuration</spanx> URI path suffix and publish
	the metadata document at the path formed by concatenating
	<spanx style="verb">/.well-known/example-resource-configuration</spanx> to the
	protected resource's resource identifier.
      </t>
      <t>
	An OAuth 2.0 application using this specification MUST specify
	what well-known URI string it will use for this purpose.
	The same protected resource MAY choose to publish its metadata at multiple
	well-known locations relative to its resource identifier,
	for example, publishing metadata at both
	<spanx style="verb">/.well-known/example-resource-configuration</spanx> and
	<spanx style="verb">/.well-known/oauth-protected-resource</spanx>.
      </t>

      <section anchor="RSConfigurationRequest"
	       title="Protected Resource Metadata Request">
        <t>
	  A protected resource metadata document MUST be queried using an HTTP
	  <spanx style="verb">GET</spanx> request at the previously specified path.
	</t>
        <t>
	  The consumer of the metadata would make the following request when the
	  resource identifier is <spanx style="verb">https://resource.example.com</spanx>
	  and the well-known URI path suffix is <spanx style="verb">oauth-protected-resource</spanx>
	  to obtain the metadata,
	  since the resource identifier contains no path component:
	</t>
        <t>
	  <figure>
            <artwork><![CDATA[
  GET /.well-known/oauth-protected-resource HTTP/1.1
  Host: resource.example.com
]]></artwork>
          </figure>
	</t>

	<t>
	  If the
	  resource identifier value contains a path component, any terminating
	  <spanx style="verb">/</spanx> MUST be removed before appending
	  <spanx style="verb">/.well-known/</spanx> and the well-known URI path suffix.
	  The consumer of the metadata would make the following request when the
	  resource identifier is <spanx style="verb">https://resource.example.com/resource1</spanx>
	  and the well-known URI path suffix is <spanx style="verb">oauth-protected-resource</spanx>
	  to obtain the metadata,
	  since the resource identifier contains a path component:
	</t>
        <t>
	  <figure>
            <artwork><![CDATA[
  GET /resource1/.well-known/oauth-protected-resource HTTP/1.1
  Host: resource.example.com
]]></artwork>
          </figure>
	</t>

	<t>
	  Using path components enables supporting multiple resources per host.
	  This is required in some multi-tenant hosting configurations.
	  This use of <spanx style="verb">.well-known</spanx> is for supporting
	  multiple resources per host; unlike its use in
	  <xref target="RFC5785">RFC 5785</xref>, it does not provide
	  general information about the host.
	</t>

      </section>

      <section anchor="RSConfigurationResponse"
	       title="Protected Resource Metadata Response">
        <t>
	  The response is a set of claims about the protected resource's
	  configuration.
	  A successful response MUST use the 200 OK HTTP status code and return
	  a JSON object using the <spanx style="verb">application/json</spanx> content type
	  that contains a set of claims as its members
	  that are a subset of the metadata values defined in
	  <xref target="RSMetadata"/>.
	  Other claims MAY also be returned.
	</t>
        <t>
	  Claims that return multiple values are represented as JSON arrays.
	  Claims with zero elements MUST be omitted from the response.
	</t>
	<t>
	  An error response uses the applicable HTTP status code value.
	</t>
        <t>
	  <figure>
	    <preamble>The following is a non-normative example response:</preamble>

            <artwork><![CDATA[
  HTTP/1.1 200 OK
  Content-Type: application/json

  {
   "resource":
     "https://resource.example.com",
   "authorization_servers":
     ["https://as1.example.com",
      "https://as2.example.net"],
   "bearer_methods_supported":
     ["header", "body"],
   "resource_documentation":
     "http://resource.example.com/resource_documentation.html"
  }
]]></artwork>
          </figure>
	</t>
      </section>

      <section anchor="RSConfigurationValidation"
	       title="Protected Resource Metadata Validation">

        <t>
	  The <spanx style="verb">resource</spanx> value returned MUST be identical to
	  the protected resource's resource identifier value that was
	  concatenated with the well-known URI path suffix to create the URL
	  used to retrieve the metadata.
	  <!--
	  This MUST also be identical to the <spanx style="verb">iss</spanx> claim value
	  in ID Tokens issued from this Issuer.
	  -->
	  If these values are not identical, the data contained in the response MUST NOT be used.
	</t>
      </section>
    </section>

    <section anchor="StringOps" title="String Operations">

      <t>
	Processing some OAuth 2.0 messages requires comparing
	values in the messages to known values. For example, the
	member names in the metadata response might be
	compared to specific member names such as <spanx
	style="verb">resource</spanx>.  Comparing Unicode <xref target="UNICODE"/> strings,
	however, has significant security implications.
      </t>
      <t>
	Therefore, comparisons between JSON strings and other Unicode
	strings MUST be performed as specified below:

	<list style="numbers">

          <t>
	    Remove any JSON applied escaping to produce an array of
	    Unicode code points.
	  </t>
          <t>
	    Unicode Normalization <xref target="USA15"/> MUST NOT
	    be applied at any point to either the JSON string or to
	    the string it is to be compared against.
	  </t>
          <t>
	    Comparisons between the two strings MUST be performed as a
	    Unicode code point to code point equality comparison.
	  </t>

        </list>
      </t>

    </section>

    <section anchor="Security" title="Security Considerations">

      <section anchor="TLSRequirements" title="TLS Requirements">
	<t>
	  Implementations MUST support TLS.
	  Which version(s) ought to be implemented will vary over
	  time, and depend on the widespread deployment and known
	  security vulnerabilities at the time of implementation.
	  The protected resource MUST support
	  TLS version 1.2 <xref target='RFC5246' />
	  and MAY support additional transport-layer security mechanisms meeting its security requirements.
	  When using TLS, the client MUST perform a TLS/SSL server certificate check,
	  per <xref target="RFC6125">RFC 6125</xref>.
	  Implementation security considerations can be found in
	  <xref target="BCP195">Recommendations for Secure Use of TLS and DTLS</xref>.
	</t>
	<t>
	  To protect against information disclosure and tampering,
	  confidentiality protection MUST be applied using TLS
	  with a ciphersuite that provides confidentiality and
	  integrity protection.
	</t>
      </section>

      <section anchor="Impersonation" title="Impersonation Attacks">
	<t>
	  TLS certificate checking MUST be performed by the client,
	  as described in <xref target="TLSRequirements"/>,
	  when making a protected resource metadata request.
	  Checking that the server certificate is valid for the resource identifier URL
	  prevents man-in-middle and DNS-based attacks.
	  These attacks could cause a client to be tricked into using an attacker's
	  resource server, which would enable impersonation of the legitimate protected resource.
	  If an attacker can accomplish this, they can access the resources
	  that the affected client has access to
	  using the protected resource that they are impersonating.
	</t>
	<t>
	  An attacker may also attempt to impersonate a protected resource by publishing
	  a metadata document that contains a <spanx style="verb">resource</spanx> claim
	  using the resource identifier URL of the protected resource being impersonated,
	  but containing information of the attacker's choosing.
	  This would enable it to impersonate that protected resource, if accepted by the client.
	  To prevent this, the client MUST ensure that the resource identifier URL it is using
	  as the prefix for the metadata request exactly matches the value of
	  the <spanx style="verb">resource</spanx> metadata value
	  in the protected resource metadata document received by the client.
	  <!--
	  and that this also exactly matches the <spanx style="verb">iss</spanx> claim
	  value in ID Tokens that are supposed to be from that Issuer.
	  -->
	</t>
      </section>

      <section anchor="StandardFormat" title="Publishing Metadata in a Standard Format">
	<t>
	  Publishing information about the protected resource in a standard format
	  makes it easier for both legitimate clients and attackers
	  to use the protected resource.
	  Whether a protected resource publishes its metadata in an ad-hoc manner
	  or in the standard format defined by this specification,
	  the same defenses against attacks that might be mounted
	  that use this information should be applied.
	</t>
      </section>

      <section anchor="AuthorizationServers" title="Authorization Servers">
	<t>
	  Secure determination of appropriate authorization servers
	  to use with a protected resource for all use cases
	  is out of scope of this specification.
	  This specification assumes that the client has a means of determining
	  appropriate authorization servers to use with a protected resource
	  and that the client is using the correct metadata
	  for each protected resource.
	  Implementers need to be aware that if an inappropriate authorization server
	  is used by the client, that an attacker may be able to act as
	  a man-in-the-middle proxy to a valid authorization server without
	  it being detected by the authorization server or the client.
	</t>
	<t>
	  The ways to determine the appropriate authorization servers to use
	  with a protected resource are in general, application-dependent.
	  For instance, some protected resources are used with
	  a fixed authorization server or set of authorization servers,
	  the locations of which may be well known,
	  or which could be published as metadata values by the protected resource.
	  In other cases, the set of authorization servers that can be used with
	  a protected resource can by dynamically changed
	  by administrative actions
	  or by changes to the set of authorization servers adhering to a trust framework.
	  Many other means of determining appropriate associations between
	  protected resources and authorization servers are also possible.
	</t>
	<t>
	  To support use cases in which the set of legitimate authorization servers
	  to use with the protected resource is fixed and enumerable,
	  this specification defines the <spanx style="verb">authorization_servers</spanx>
	  metadata value, which enables explicitly listing them.
	  Note that if the set of legitimate protected resources
	  to use with an authorization server is also fixed and enumerable,
	  lists in the protected resource metadata and authorization server metadata
	  should be cross-checked against one another for consistency
	  when these lists are used by the application profile.
	</t>
      </section>

    </section>

    <section anchor="IANA" title="IANA Considerations">

      <t>
	The following registration procedure is used for the
	registry established by this specification.
      </t>
      <t>
	Values are registered on a Specification Required <xref target="RFC5226"/>
	basis after a two-week review period on the oauth-ext-review@ietf.org
	mailing list, on the advice of one or more Designated Experts.
	However, to allow for the allocation of values prior to publication,
	the Designated Experts may approve registration once they are satisfied
	that such a specification will be published.
       </t>
       <t>
	Registration requests sent to the mailing list for review should use
	an appropriate subject
	(e.g., "Request to register OAuth Protected Resource Metadata: example").
       </t>
      <t>
	Within the review period, the Designated Experts will either approve or
	deny the registration request, communicating this decision to the review list and IANA.
	Denials should include an explanation and, if applicable, suggestions as to how to make
	the request successful.
	Registration requests that are undetermined for
	a period longer than 21 days can be brought to the IESG's attention
	(using the iesg@ietf.org mailing list) for resolution.
      </t>
      <t>
	Criteria that should be applied by the Designated Experts includes
	determining whether the proposed registration duplicates existing functionality,
	determining whether it is likely to be of general applicability
	or whether it is useful only for a single application,
	and whether the registration makes sense.
      </t>
      <t>
	IANA must only accept registry updates from the Designated Experts and should direct
	all requests for registration to the review mailing list.
      </t>
      <t>
	It is suggested that multiple Designated Experts be appointed who are able to
	represent the perspectives of different applications using this specification,
	in order to enable broadly-informed review of registration decisions.
	In cases where a registration decision could be perceived as
	creating a conflict of interest for a particular Expert,
	that Expert should defer to the judgment of the other Experts.
      </t>

      <section title="OAuth Protected Resource Metadata Registry" anchor="RSMetadataReg">
	<t>
	  This specification establishes the
	  IANA "OAuth Protected Resource Metadata" registry
	  for OAuth 2.0 protected resource metadata names.
	  The registry records the protected resource metadata member
	  and a reference to the specification that defines it.
	</t>

        <section title="Registration Template" anchor="RSMetadataTemplate">
          <t>
            <list style='hanging'>
              <t hangText='Metadata Name:'>
                <vspace/>
                The name requested (e.g., "resource").
		This name is case-sensitive.
		Names may not match other registered names in a case-insensitive manner
		unless the Designated Experts state that there is a compelling reason
		to allow an exception.
              </t>
              <t hangText='Metadata Description:'>
                <vspace/>
                Brief description of the metadata (e.g., "Resource identifier URL").
              </t>
              <t hangText='Change Controller:'>
                <vspace/>
                For Standards Track RFCs, list the "IESG".
		For others, give the name of the responsible party.
		Other details (e.g., postal address, email address, home page URI) may also be included.
              </t>
              <t hangText='Specification Document(s):'>
                <vspace/>
                Reference to the document or documents that specify the parameter,
		preferably including URIs that
                can be used to retrieve copies of the documents.
		An indication of the relevant
                sections may also be included but is not required.
              </t>
            </list>
          </t>
        </section>

        <section title="Initial Registry Contents" anchor="RSMetadataContents">
          <t> <?rfc subcompact="yes"?>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">resource</spanx>
              </t>
              <t>
                Metadata Description:
		Protected resource's resource identifier URL
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">authorization_servers</spanx>
              </t>
              <t>
                Metadata Description:
		JSON array containing a list of OAuth authorization server issuer identifiers
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">jwks_uri</spanx>
              </t>
              <t>
                Metadata Description:
		URL of the protected resource's JWK Set document
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">scopes_provided</spanx>
              </t>
              <t>
                Metadata Description:
		JSON array containing a list of the OAuth 2.0
		<spanx style="verb">scope</spanx> values that
		are used in authorization requests to request access this protected resource
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">bearer_methods_supported</spanx>
              </t>
              <t>
                Metadata Description:
		JSON array containing a list of the OAuth 2.0 Bearer Token
		presentation methods that this protected resource supports
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">resource_signing_alg_values_supported</spanx>
              </t>
              <t>
                Metadata Description:
		JSON array containing a list of the JWS signing algorithms
		(<spanx style="verb">alg</spanx> values)
		supported by the protected resource
		for signed content
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">resource_encryption_alg_values_supported</spanx>
              </t>
              <t>
                Metadata Description:
		JSON array containing a list of the JWE encryption algorithms
		(<spanx style="verb">alg</spanx> values)
		supported by the protected resource
		for encrypted content
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">resource_encryption_enc_values_supported</spanx>
              </t>
              <t>
                Metadata Description:
		JSON array containing a list of the JWE encryption algorithms
		(<spanx style="verb">enc</spanx> values)
		supported by the protected resource
		for encrypted content
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">resource_documentation</spanx>
              </t>
              <t>
                Metadata Description:
		URL of a page containing human-readable information that
		developers might want or need to know when using the protected resource
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">resource_policy_uri</spanx>
              </t>
              <t>
                Metadata Description:
		URL that the protected resource provides
		to read about the protected resource's requirements on how
		the client can use the data provided by the protected resource
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
          <t>
            <list style='symbols'>
              <t>
                Metadata Name: <spanx style="verb">resource_tos_uri</spanx>
              </t>
              <t>
                Metadata Description:
		URL that the protected resource provides
		to read about the protected resource's terms of service
              </t>
              <t>
                Change Controller: IESG
              </t>
              <t>
                Specification Document(s): <xref target="RSMetadata"/> of [[ this specification ]]
              </t>
            </list>
          </t>
	</section>
	<?rfc subcompact="no"?>
      </section>

      <section anchor="WellKnownRegistry" title="Well-Known URI Registry">
	<t>
	  This specification registers the well-known URI defined in
	  <xref target="RSConfig"/> in the IANA
	  "Well-Known URIs" registry <xref target="IANA.well-known"/>
	  established by <xref target="RFC5785">RFC 5785</xref>.
	</t>

	<section anchor='WellKnownContents' title='Registry Contents'>
	  <t> <?rfc subcompact="yes"?>
            <list style='symbols'>
	      <t>
		URI suffix: <spanx style="verb">oauth-protected-resource</spanx>
	      </t>
	      <t>
		Change controller: IESG
	      </t>
	      <t>
		Specification document: <xref target="RSConfig"/> of [[ this specification ]]
	      </t>
	      <t>
		Related information: (none)
	      </t>
	    </list>
	  </t>
	</section>
	<?rfc subcompact="no"?>

      </section>

    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5226"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5246"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5785"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6125"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6749"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6750"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7033"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7159"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7591"?>

      <reference anchor='BCP195' target='http://www.rfc-editor.org/info/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'/>
	<seriesInfo name='DOI' value='10.17487/RFC7525'/>
	<format type='ASCII' octets='60283'/>
      </reference>

      <reference anchor="USA15" target="http://www.unicode.org/reports/tr15/">
	<front>
	  <title>Unicode Normalization Forms</title>

	  <author fullname="Mark Davis" initials="M." surname="Davis">
	  </author>

	  <author fullname="Ken Whistler" initials="K." surname="Whistler">
	  </author>

	  <date day="1" month="June" year="2015" />
	</front>

	<seriesInfo name="Unicode Standard Annex" value="15" />
      </reference>

      <reference anchor="JWT" target="http://tools.ietf.org/html/rfc7519">
        <front>
          <title>JSON Web Token (JWT)</title>

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

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

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

          <date month="May" year="2015" />
        </front>

	<seriesInfo name="RFC" value="7519"/>
	<seriesInfo name="DOI" value="10.17487/RFC7519"/>
      </reference>

      <reference anchor="JWS" target="http://tools.ietf.org/html/rfc7515">
        <front>
          <title>JSON Web Signature (JWS)</title>

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

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

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

          <date month="May" year="2015" />
        </front>

	<seriesInfo name="RFC" value="7515"/>
	<seriesInfo name="DOI" value="10.17487/RFC7515"/>
      </reference>

      <reference anchor="JWE" target="http://tools.ietf.org/html/rfc7516">
        <front>
          <title>JSON Web Encryption (JWE)</title>

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

	  <author fullname="Joe Hildebrand" initials="J." surname="Hildebrand">
	    <organization>Cisco Systems, Inc.</organization>
	  </author>

	  <date month="May" year="2015" />
        </front>

	<seriesInfo name="RFC" value="7516"/>
	<seriesInfo name="DOI" value="10.17487/RFC7516"/>
      </reference>

      <reference anchor="JWA" target="http://tools.ietf.org/html/rfc7518">
        <front>
          <title>JSON Web Algorithms (JWA)</title>

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

          <date month="May" year="2015" />
        </front>

	<seriesInfo name="RFC" value="7518"/>
	<seriesInfo name="DOI" value="10.17487/RFC7518"/>
      </reference>

      <reference anchor="JWK" target="http://tools.ietf.org/html/rfc7517">
        <front>
	  <title>JSON Web Key (JWK)</title>

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

	  <date month="May" year="2015" />
        </front>

	<seriesInfo name="RFC" value="7517"/>
	<seriesInfo name="DOI" value="10.17487/RFC7517"/>
      </reference>

      <reference anchor="UNICODE" target="http://www.unicode.org/versions/latest/">
	<front>
	  <title abbrev="Unicode">The Unicode Standard</title>
	  <author>
	    <organization>The Unicode Consortium</organization>
	    <address />
	  </author>
	  <date />
	</front>
	<!--
	  Note that this reference is to the latest version of Unicode,
	  rather than to a specific release.  It is not expected that future changes in
	  the UNICODE specification will impact the syntax of JSON or the UTF-8 encoding.
	-->
      </reference>

      <reference anchor="OAuth.AuthorizationMetadata" target="http://tools.ietf.org/html/draft-ietf-oauth-discovery-04">
        <front>
	  <title abbrev="OAuth 2.0 Authorization Server Metadata">OAuth 2.0 Authorization Server Metadata</title>

	  <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
	    <organization abbrev="Microsoft">Microsoft</organization>
	    <address>
	      <email>mbj@microsoft.com</email>
	      <uri>http://self-issued.info/</uri>
	    </address>
	  </author>

	  <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
	    <organization abbrev="NRI">Nomura Research Institute, Ltd.</organization>
	    <address>
	      <email>n-sakimura@nri.co.jp</email>
	      <uri>http://nat.sakimura.org/</uri>
	    </address>
	  </author>

	  <author fullname="John Bradley" initials="J." surname="Bradley">
	    <organization abbrev="Ping Identity">Ping Identity</organization>
	    <address>
	      <email>ve7jtb@ve7jtb.com</email>
	      <uri>http://www.thread-safe.com/</uri>
	    </address>
	  </author>

	  <date day="3" month="August" year="2016" />
        </front>
	<seriesInfo name="Internet-Draft" value="draft-ietf-oauth-discovery-04"/>
      </reference>

    </references>

    <references title="Informative References">

      <reference anchor="OpenID.Discovery" target="http://openid.net/specs/openid-connect-discovery-1_0.html">
        <front>
          <title>OpenID Connect Discovery 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="Edmund Jay" initials="E." surname="Jay">
            <organization>Illumila</organization>
          </author>

          <date day="8" month="November" year="2014"/>
        </front>

      </reference>

      <reference anchor="IANA.well-known" target="http://www.iana.org/assignments/well-known-uris">
        <front>
          <title>Well-Known URIs</title>
          <author>
            <organization>IANA</organization>
          </author>
	  <date/>
        </front>
      </reference>

      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-oauth-mix-up-mitigation-01.xml" ?>

    </references>

    <section anchor="Acknowledgements" title="Acknowledgements">

      <t>
	Thanks to George Fletcher and Tony Nadalin for their input on the specification.
      </t>
    </section>

    <section anchor="History" title="Document History">
      <t>[[ to be removed by the RFC Editor before publication as an RFC ]]</t>

      <t>
	-00
        <list style="symbols">
	  <t>
	    Created the initial version.
	    This draft reuses some text from draft-ietf-oauth-discovery-03.
	  </t>
	</list>
      </t>

    </section>

  </back>
</rfc>
