<?xml version='1.0' encoding='UTF-8'?>


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" number="0000" category="std" docName="draft-ietf-oauth-jwk-thumbprint-uri-03" ipr="trust200902" obsoletes="" updates="" consensus="true" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.10 -->
  <front>
    <title abbrev="JWK Thumbprint URI">JWK Thumbprint URI</title>
    <seriesInfo name="RFC" value="0000" />
    <author fullname="Michael B. Jones" initials="M." surname="Jones">
      <organization>Microsoft</organization>
      <address>
        <email>mbj@microsoft.com</email>
        <uri>https://self-issued.info/</uri>
      </address>
    </author>
    <author fullname="Kristina Yasuda" initials="K." surname="Yasuda">
      <organization>Microsoft</organization>
      <address>
        <email>kryasuda@microsoft.com</email>
        <uri>https://twitter.com/kristinayasuda</uri>
      </address>
    </author>
    <date month="June" year="2022"/>
    <area>Security</area>
    <workgroup>oauth</workgroup>
    <keyword>JSON Web Key</keyword>
    <keyword>JWK</keyword>
    <keyword>Thumbprint</keyword>
    <keyword>URI</keyword>
    <keyword>URN</keyword>
    <keyword>OAuth</keyword>
    <abstract>
      <t>
	This specification registers a kind of URI that represents
  a JSON Web Key (JWK) Thumbprint value.
	JWK Thumbprints are defined in RFC 7638.
	This enables JWK Thumbprints to be used,
	for instance, as key identifiers in contexts requiring URIs.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="Introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
	A JSON Web Key (JWK) Thumbprint <xref target="RFC7638" format="default"/>
	is a URL-safe representation of a hash value over a JSON Web Key (JWK) <xref target="RFC7517" format="default"/>.
	This specification defines a URI prefix indicating that the
	portion of the URI following the prefix is a JWK Thumbprint.
	This enables JWK Thumbprints to be communicated in contexts requiring URIs,
	including in specific JSON Web Token (JWT) <xref target="RFC7519" format="default"/> claims.
      </t>
      <t>
	JWK Thumbprints URIs are being used in the <xref target="SIOPv2" format="default"/> specification
	as one kind of subject identifier in a context requiring that the identifier be a URI.
	In this case, the subject identifier is derived from a public key represented as a JWK.
	Expressing the identifier as JWK Thumbprint URI enables this kind of identifier
	to be differentiated from other kinds of identifiers that are also URIs,
	such as Decentralized Identifiers (DIDs) <xref target="DID-Core" format="default"/>.
      </t>
    </section>
    <section anchor="RNC" numbered="true" toc="default">
      <name>Requirements Notation and Conventions</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
    </section>
    <section anchor="JKTURI" numbered="true" toc="default">
      <name>JWK Thumbprint URI</name>
      <t>
	The following URI prefix is defined to indicate that the
	portion of the URI following the prefix is a JWK Thumbprint:
      </t>


<t indent="3"><tt>urn:ietf:params:oauth:jwk-thumbprint</tt></t>

      <t>
	To make it explicit in a URI which hash algorithm is used,
  the prefix is followed by a hash algorithm identifier and a JWK Thumbprint value,
  each separated by a colon character to form a URI representing a JWK Thumbprint.
      </t>
    </section>
    <section anchor="HashAlgorithms" numbered="true" toc="default">
      <name>Hash Algorithms Identifier</name>
      <t>
	Hash algorithm identifiers used in JWK Thumbprint URIs <bcp14>MUST</bcp14> be values from the "Hash Name String" column
	in the IANA "Named Information Hash Algorithm" registry <xref target="IANA.Hash.Algorithms" format="default"/>.
	JWK Thumbprint URIs with hash algorithm identifiers not found in this registry are not considered valid
	and applications will need to detect and handle this error, should it occur.
      </t>
    </section>
    <section anchor="MTI" numbered="true" toc="default">
      <name>Mandatory to Implement Hash Algorithm</name>
      <t>
	  To promote interoperability among implementations,
	  the SHA-256 hash algorithm is mandatory to implement.
      </t>
    </section>
    <section anchor="Example" numbered="true" toc="default">
      <name>Example JWK Thumbprint URI</name>
      <t>
<xref target="RFC7638" sectionFormat="of" section="3.1"/> contains the following example JWK Thumbprint value:
 </t>

<t indent="3"> NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs</t>

      <t>
	  A complete JWK Thumbprint URI using the above JWK Thumbprint and SHA-256 hash algorithm is:
      </t>
<t indent="3"> urn:ietf:params:oauth:jwk-thumbprint:sha-256:NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs
    </t></section>

    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
        The security considerations of <xref target="RFC7638" format="default"/>
	also apply when using this specification.
      </t>
      <section anchor="MultiplePublicKeysPerPrivateKey" numbered="true" toc="default">
        <name>Multiple Public Keys per Private Key</name>
        <t>
	  There are cryptographic algorithms for which multiple public keys correspond to the same private key.
	  This is described in the security considerations of <xref target="RFC7748" format="default"/> as follows:
        </t>
<blockquote>        

	      Designers using these curves should be aware that for each public
	      key, there are several publicly computable public keys that are
	      equivalent to it, i.e., they produce the same shared secrets.  Thus
	      using a public key as an identifier and knowledge of a shared secret
	      as proof of ownership (without including the public keys in the key
	      derivation) might lead to subtle vulnerabilities.
 </blockquote>
        <t>
	  This consideration for public keys as identifiers equally applies to JWK Thumbprint URIs used as identifiers.
	  A recommended way to ensure that the JWK Thumbprint URI corresponds to the actual
	  public key used is to sign a message containing the correct public key with the private key.
	  This signed message could also contain the JWK Thumbprint URI
	  (although, by definition, it could also be computed directly from the public key).
        </t>
      </section>
    </section>
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section anchor="URIReg" numbered="true" toc="default">
        <name>OAuth URI Registration</name>
        <t>
	  This specification registers the following value in the
	  IANA "OAuth URI" registry
	  <xref target="IANA.OAuth.Parameters" format="default"/>
	  established by <xref target="RFC6755" format="default"/>.
        </t>
        <section anchor="URIContents" numbered="true" toc="default">
          <name>Registry Contents</name>
          <ul spacing="compact">
            <li>URN: urn:ietf:params:oauth:jwk-thumbprint</li>
            <li>Common Name: JWK Thumbprint URI</li>
            <li>Change controller: IESG</li>
            <li>Specification Document: [[ this specification ]]</li>
          </ul>
        </section>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7638.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <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>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6755.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7517.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7748.xml"/>
        <reference anchor="IANA.Hash.Algorithms" target="https://www.iana.org/assignments/named-information/named-information.xhtml#hash-alg">
          <front>
            <title>Named Information Hash Algorithm Registry</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="SIOPv2" target="https://openid.net/specs/openid-connect-self-issued-v2-1_0.html">
          <front>
            <title>Self-Issued OpenID Provider v2</title>
            <author fullname="Kristina Yasuda">
              <organization>Microsoft</organization>
            </author>
            <author fullname="Michael B. Jones">
              <organization>Microsoft</organization>
            </author>
            <date day="18" month="December" year="2021"/>
          </front>
        </reference>
        <reference anchor="DID-Core" target="https://www.w3.org/TR/2021/PR-did-core-20210803/">
          <front>
            <title>Decentralized Identifiers (DIDs) v1.0</title>
            <author fullname="Manu Sporny">
              <organization>Digital Bazaar</organization>
            </author>
            <author fullname="Amy Guy">
              <organization>Digital Bazaar</organization>
            </author>
            <author fullname="Markus Sabadello">
              <organization>Danube Tech</organization>
            </author>
            <author fullname="Drummond Reed">
              <organization>Evernym</organization>
            </author>
            <date day="3" month="Aug" year="2021"/>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="Acknowledgements" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>
	Use cases for this specification were developed in the
	OpenID Connect Working Group of the OpenID Foundation.
	Specifically, it is being used a key identifier in the
	<xref target="SIOPv2" format="default"/> specification.
      </t>
      <t>
        The following individuals also contributed to the creation of this specification:
<contact fullname="John Bradley"/>, <contact fullname="Scott Bradner"/>, <contact fullname="Brian Campbell"/>, <contact fullname="Roman Danyliw"/>, <contact fullname="Vladimir Dzhuvinov"/>, <contact fullname="Lars Eggert"/>, <contact fullname="Warren Kumari"/>, <contact fullname="Adam Lemmon"/>, <contact fullname="Neil Madden"/>, <contact fullname="James Manger"/>, <contact fullname="Francesca Palombini"/>, <contact fullname="Aaron Parecki"/>, <contact fullname="Gonzalo Salgueiro"/>, <contact fullname="Rifaat Shekh-Yusef"/>, <contact fullname="Robert Sparks"/>, <contact fullname="David Waite"/>, <contact fullname="Robert Wilton"/>, and <contact fullname="Paul Wouters"/>.
      </t>
    </section>
    <section anchor="History" numbered="true" toc="default">
      <name>Document History</name>
      <t>
	[[ to be removed by the RFC Editor before publication as an RFC ]]
      </t>
      <t>
        -03
      </t>
      <ul spacing="compact">
        <li>
            Addressed IESG comment by Lars Eggert on the use of inclusive language.
	  </li>
      </ul>
      <t>
        -02
      </t>
      <ul spacing="compact">
        <li>
            Addressed IETF last call comments by clarifying the requirement to use registered hash algorithm identifiers.
	  </li>
      </ul>
      <t>
        -01
      </t>
      <ul spacing="compact">
        <li>
            Added security considerations about multiple public keys coresponding to the same private key.
	  </li>
        <li>
            Added hash algorithm identifier after the JWK thumbprint URI prefix to make it explicit in a URI which hash algorithm is used.
	  </li>
        <li>
            Added reference to a registry for hash algorithm identifiers.
	  </li>
        <li>
            Added SHA-256 as a mandatory to implement hash algorithm to promote interoperability.
	  </li>
      </ul>
      <t>
        -00
      </t>
      <ul spacing="compact">
        <li>
            Created initial working group draft from draft-jones-oauth-jwk-thumbprint-uri-01.
	  </li>
      </ul>
    </section>
  </back>
</rfc>
