<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-acme-tls-alpn-07" indexInclude="true" ipr="trust200902" number="8737" prepTime="2020-02-28T19:13:09" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-acme-tls-alpn-07" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8737" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="ACME-TLS-ALPN">Automated Certificate Management Environment (ACME) TLS Application‑Layer Protocol Negotiation (ALPN) Challenge Extension</title>
    <seriesInfo name="RFC" value="8737" stream="IETF"/>
    <author initials="R.B." surname="Shoemaker" fullname="Roland Bracewell Shoemaker">
      <organization abbrev="ISRG" showOnFrontPage="true">Internet Security Research Group</organization>
      <address>
        <email>roland@letsencrypt.org</email>
      </address>
    </author>
    <date month="02" year="2020"/>
    <area>Security</area>
    <workgroup>ACME Working Group</workgroup>
    <keyword>acme</keyword>
    <keyword>pki</keyword>
    <abstract pn="section-abstract">
      <t pn="section-abstract-1">This document specifies a new challenge for the Automated Certificate Management Environment (ACME) protocol that allows for domain control validation using TLS.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8737" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t pn="section-boilerplate.2-1">
            Copyright (c) 2020 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
          </li>
          <li pn="section-toc.1-1.2">
            <t keepWithNext="true" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t keepWithNext="true" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-tls-with-application-layer-">TLS with Application-Layer Protocol Negotiation (TLS ALPN) Challenge</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t keepWithNext="true" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-acme-tls-1-protocol-definit">acme-tls/1 Protocol Definition</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t keepWithNext="true" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t keepWithNext="true" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t keepWithNext="true" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-smi-security-for-pkix-certi">SMI Security for PKIX Certificate Extension OID</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t keepWithNext="true" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-alpn-protocol-id">ALPN Protocol ID</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.3">
                <t keepWithNext="true" pn="section-toc.1-1.6.2.3.1"><xref derivedContent="6.3" format="counter" sectionFormat="of" target="section-6.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-acme-validation-method">ACME Validation Method</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t keepWithNext="true" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t keepWithNext="true" pn="section-toc.1-1.8.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-design-rationale">Design Rationale</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t keepWithNext="true" pn="section-toc.1-1.9.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t keepWithNext="true" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-address">Author's Address</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t pn="section-1-1">The Automatic Certificate Management Environment (ACME) <xref target="RFC8555" format="default" sectionFormat="of" derivedContent="RFC8555"/> specification describes methods for
      validating control of domain names via HTTP and DNS. Deployment
      experience has shown it is also useful to be able to validate domain
      control using the TLS layer alone. In particular, this allows hosting
      providers, Content Distribution Networks (CDNs), and TLS-terminating
      load balancers to validate domain control without modifying the HTTP handling behavior of their backends.</t>
      <t pn="section-1-2">This document specifies a new TLS-based challenge type,
      tls-alpn-01. This challenge requires negotiating a new application-layer
      protocol using the TLS Application-Layer Protocol Negotiation (ALPN)
      Extension <xref target="RFC7301" format="default" sectionFormat="of" derivedContent="RFC7301"/>. 

Because this protocol does not build on a pre-existing deployment base, the
ability to complete tls-alpn-01 challenges requires changes by service
providers, making it explicitly an opt-in process. Because service providers must
proactively deploy new code in order to implement tls-alpn-01, we can specify
stronger controls in that code, resulting in a stronger validation method.
</t>
    </section>
    <section anchor="terminology" numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-terminology">Terminology</name>
      <t pn="section-2-1">
    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 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
      </t>
    </section>
    <section anchor="tls-with-application-layer-protocol-negotiation-tls-alpn-challenge" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-tls-with-application-layer-">TLS with Application-Layer Protocol Negotiation (TLS ALPN) Challenge</name>
      <t pn="section-3-1">The TLS with Application-Layer Protocol Negotiation (TLS ALPN) validation method proves control over a domain name by requiring the ACME client to configure a TLS server to respond to specific connection attempts using the ALPN extension with identifying information. The ACME server validates control of the domain name by connecting to a TLS server at one of the addresses resolved for the domain name and verifying that a certificate with specific content is presented.</t>
      <t pn="section-3-2">The tls-alpn-01 ACME challenge object has the following format:</t>
      <dl newline="false" spacing="normal" pn="section-3-3">
        <dt pn="section-3-3.1">type (required, string):</dt>
        <dd pn="section-3-3.2">
  The string "tls-alpn-01"</dd>
        <dt pn="section-3-3.3">token (required, string):</dt>
        <dd pn="section-3-3.4">
  A random value that uniquely identifies the challenge. This value
	<bcp14>MUST</bcp14> have at least 128 bits of entropy. It <bcp14>MUST NOT</bcp14> contain any characters outside the base64url alphabet as
	described in <xref target="RFC4648" sectionFormat="of" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4648#section-5" derivedContent="RFC4648"/>. Trailing '=' padding characters <bcp14>MUST</bcp14> be stripped. See <xref target="RFC4086" format="default" sectionFormat="of" derivedContent="RFC4086"/> for additional information on randomness requirements.</dd>
      </dl>
      <t pn="section-3-4">The client prepares for validation by constructing a self-signed certificate that <bcp14>MUST</bcp14> contain an acmeIdentifier extension and a subjectAlternativeName extension <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280"/>. The subjectAlternativeName extension <bcp14>MUST</bcp14> contain a single dNSName entry where the value is the domain name being validated. The acmeIdentifier extension <bcp14>MUST</bcp14> contain the SHA-256 digest <xref target="FIPS180-4" format="default" sectionFormat="of" derivedContent="FIPS180-4"/> of the key authorization <xref target="RFC8555" format="default" sectionFormat="of" derivedContent="RFC8555"/> for the challenge. The acmeIdentifier extension <bcp14>MUST</bcp14> be critical so that the certificate isn't inadvertently used by non-ACME software.</t>
      <t pn="section-3-5">The acmeIdentifier extension is identified by the id-pe-acmeIdentifier object identifier (OID) in the id-pe arc <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280"/>:</t>
      <sourcecode type="asn.1" markers="false" pn="section-3-6">
id-pe-acmeIdentifier OBJECT IDENTIFIER ::=  { id-pe 31 }
</sourcecode>
      <t pn="section-3-7">The extension has the following ASN.1 <xref target="X.680" format="default" sectionFormat="of" derivedContent="X.680"/> format :</t>
      <sourcecode type="asn.1" markers="false" pn="section-3-8">
Authorization ::= OCTET STRING (SIZE (32))
</sourcecode>
      <t pn="section-3-9">The extnValue of the id-pe-acmeIdentifier extension is the ASN.1 DER encoding <xref target="X.690" format="default" sectionFormat="of" derivedContent="X.690"/> of the Authorization structure, which contains the SHA-256 digest of the key authorization for the challenge.</t>
      <t pn="section-3-10">Once this certificate has been created, it <bcp14>MUST</bcp14> be provisioned such that it is returned during a TLS handshake where the "acme-tls/1" application-layer protocol has been negotiated and a Server Name Indication (SNI) extension <xref target="RFC6066" format="default" sectionFormat="of" derivedContent="RFC6066"/> has been provided containing the domain name being validated.</t>
      <t pn="section-3-11">A client responds by POSTing an empty JSON object ({}) to the
      challenge URL to acknowledge that the challenge is ready to be validated
      by the server. The base64url encoding of the protected headers and
      payload is described in <xref target="RFC8555" sectionFormat="of" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8555#section-6.1" derivedContent="RFC8555"/>.</t>
      <sourcecode markers="false" pn="section-3-12">
POST /acme/authz/1234/1
Host: example.com
Content-Type: application/jose+json

{
  "protected": base64url({
    "alg": "ES256",
    "kid": "https://example.com/acme/acct/1",
    "nonce": "JHb54aT_KTXBWQOzGYkt9A",
    "url": "https://example.com/acme/authz/1234/1"
  }),
  "payload": base64url({}),
  "signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
}</sourcecode>
      <t pn="section-3-13">On receiving this request from a client, the server constructs and stores the key authorization from the challenge "token" value and the current client account key.</t>
      <t pn="section-3-14">The server then verifies the client's control over the domain by verifying that the TLS server was configured as expected using the following steps:</t>
      <ol spacing="normal" type="1" start="1" pn="section-3-15">
        <li pn="section-3-15.1" derivedCounter="1.">The ACME server computes the expected SHA-256 digest of the key authorization.</li>
        <li pn="section-3-15.2" derivedCounter="2.">The ACME server resolves the domain name being validated and chooses one of the IP addresses returned for validation (the server <bcp14>MAY</bcp14> validate against multiple addresses if more than one is returned).</li>
        <li pn="section-3-15.3" derivedCounter="3.">The ACME server initiates a TLS connection to the chosen IP address. This connection <bcp14>MUST</bcp14> use TCP port 443. The ACME server <bcp14>MUST</bcp14> provide an ALPN extension with the single protocol name "acme-tls/1" and an SNI extension containing only the domain name being validated during the TLS handshake.</li>
        <li pn="section-3-15.4" derivedCounter="4.">
          <t pn="section-3-15.4.1">The ACME server verifies that during the TLS handshake the application-layer protocol "acme-tls/1" was successfully negotiated (and that the ALPN extension contained only the value "acme-tls/1") and that the certificate returned contains:
          </t>
          <ul spacing="normal" bare="false" empty="false" pn="section-3-15.4.2">
            <li pn="section-3-15.4.2.1">a subjectAltName extension containing the dNSName being validated and no other entries</li>
            <li pn="section-3-15.4.2.2">a critical acmeIdentifier extension containing the expected SHA-256 digest computed in step 1</li>
          </ul>
        </li>
      </ol>
      <t pn="section-3-16">The comparison of dNSNames <bcp14>MUST</bcp14> be case insensitive
      <xref target="RFC4343" format="default" sectionFormat="of" derivedContent="RFC4343"/>. Note that as ACME doesn't
      support Unicode identifiers, all dNSNames <bcp14>MUST</bcp14> be encoded
      using the rules of <xref target="RFC3492" format="default" sectionFormat="of" derivedContent="RFC3492"/>.</t>
      <t pn="section-3-17">If all of the above steps succeed, then the validation is
      successful. Otherwise, it fails.</t>
    </section>
    <section anchor="acme-tls1-protocol-definition" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-acme-tls-1-protocol-definit">acme-tls/1 Protocol Definition</name>
      <t pn="section-4-1">The "acme-tls/1" protocol <bcp14>MUST</bcp14> only be used for
      validating ACME tls-alpn-01 challenges. The protocol consists of a TLS
      handshake in which the required validation information is
      transmitted. The "acme-tls/1" protocol does not carry application data.
      Once the handshake is completed, the client <bcp14>MUST NOT</bcp14>
      exchange any further data with the server and <bcp14>MUST</bcp14>
      immediately close the connection. While this protocol uses X.509
      certificates, it does not use the authentication method described in
      <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280"/> and, as such, does not require a
      valid signature on the provided certificate nor require the TLS
      handshake to complete successfully. An ACME server may wish to use an
      off-the-shelf TLS stack where it is not simple to allow these
      divergences in the protocol as defined. Because of this, an ACME server
      <bcp14>MAY</bcp14> choose to withhold authorization if either the
      certificate signature is invalid or the handshake doesn't fully
      complete.</t>
      <t pn="section-4-2">ACME servers that implement "acme-tls/1" <bcp14>MUST</bcp14> only negotiate TLS 1.2 <xref target="RFC5246" format="default" sectionFormat="of" derivedContent="RFC5246"/> or higher when connecting to clients for validation.</t>
    </section>
    <section anchor="security-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t pn="section-5-1">The design of this challenge relies on some assumptions centered around how an HTTPS server behaves during validation.</t>
      <t pn="section-5-2">The first assumption is that when an HTTPS server is being used to
      serve content for multiple DNS names from a single IP address, it
      properly segregates control of those names to the users that own
      them. This means that if User A registers Host A and User B registers
      Host B, the HTTPS server should not allow a TLS request using an SNI
      value for Host A to be served by User B or a TLS connection with a
      server_name extension identifying Host B to be answered by User A. If
      the HTTPS server allows User B to serve this request, it allows them to
      illegitimately validate control of Host A to the ACME server.</t>
      <t pn="section-5-3">The second assumption is that a server will not violate <xref target="RFC7301" format="default" sectionFormat="of" derivedContent="RFC7301"/> by blindly agreeing to use the "acme-tls/1" protocol without actually understanding it.</t>
      <t pn="section-5-4">To further mitigate the risk of users claiming domain names used by other users on the same infrastructure hosting providers, CDNs, and other service providers <bcp14>SHOULD NOT</bcp14> allow users to provide their own certificates for the TLS ALPN validation process. If providers wish to implement TLS ALPN validation, they <bcp14>SHOULD</bcp14> only generate certificates used for validation themselves and not expose this functionality to users.</t>
      <t pn="section-5-5">The extensions to the ACME protocol described in this document build
      upon the Security Considerations and threat model defined in <xref target="RFC8555" sectionFormat="of" section="10.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8555#section-10.1" derivedContent="RFC8555"/>.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section anchor="smi-security-for-pkix-certificate-extension-oid" numbered="true" toc="include" removeInRFC="false" pn="section-6.1">
        <name slugifiedName="name-smi-security-for-pkix-certi">SMI Security for PKIX Certificate Extension OID</name>
        <t pn="section-6.1-1">Within the "Structure of Management Information (SMI) Numbers (MIB
	Module Registrations)" registry, the following entry has been added to
	the  "SMI Security for PKIX
	Certificate Extension" (1.3.6.1.5.5.7.1) table.</t>
        <table align="center" pn="table-1">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Decimal</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
              <th align="left" colspan="1" rowspan="1">References</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">31</td>
              <td align="left" colspan="1" rowspan="1">id-pe-acmeIdentifier</td>
              <td align="left" colspan="1" rowspan="1">RFC 8737</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="alpn-protocol-id" numbered="true" toc="include" removeInRFC="false" pn="section-6.2">
        <name slugifiedName="name-alpn-protocol-id">ALPN Protocol ID</name>
        <t pn="section-6.2-1">Within the "Transport Layer Security (TLS) Extensions" registry,
	the following entry has been added to the "TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs" table.</t>
        <table align="center" pn="table-2">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Protocol</th>
              <th align="left" colspan="1" rowspan="1">Identification Sequence</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">acme-tls/1</td>
              <td align="left" colspan="1" rowspan="1">0x61 0x63 0x6d 0x65 0x2d 0x74 0x6c 0x73 0x2f 0x31 ("acme-tls/1")</td>
              <td align="left" colspan="1" rowspan="1">RFC 8737</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="acme-validation-method" numbered="true" toc="include" removeInRFC="false" pn="section-6.3">
        <name slugifiedName="name-acme-validation-method">ACME Validation Method</name>
        <t pn="section-6.3-1">Within the "Automated Certificate Management Environment (ACME)
	Protocol" registry, the following entry has been added to the "ACME Validation Methods" registry.</t>
        <table align="center" pn="table-3">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Label</th>
              <th align="left" colspan="1" rowspan="1">Identifier Type</th>
              <th align="left" colspan="1" rowspan="1">ACME</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">tls-alpn-01</td>
              <td align="left" colspan="1" rowspan="1">dns</td>
              <td align="left" colspan="1" rowspan="1">Y</td>
              <td align="left" colspan="1" rowspan="1">RFC 8737</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
  </middle>
  <back>
    <references pn="section-7">
      <name slugifiedName="name-normative-references">Normative References</name>
      <reference anchor="FIPS180-4" target="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf" quoteTitle="true" derivedAnchor="FIPS180-4">
        <front>
          <title>Secure Hash Standard (SHS)</title>
          <author>
            <organization showOnFrontPage="true">National Institute of Standards and Technology (NIST)</organization>
          </author>
          <date year="2015" month="August"/>
        </front>
        <seriesInfo name="FIPS PUB" value="180-4"/>
        <seriesInfo name="DOI" value="10.6028/NIST.FIPS.180-4"/>
      </reference>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner" fullname="S. Bradner">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="1997" month="March"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC3492" target="https://www.rfc-editor.org/info/rfc3492" quoteTitle="true" derivedAnchor="RFC3492">
        <front>
          <title>Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)</title>
          <author initials="A." surname="Costello" fullname="A. Costello">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2003" month="March"/>
          <abstract>
            <t>Punycode is a simple and efficient transfer encoding syntax designed for use with Internationalized Domain Names in Applications (IDNA).  It uniquely and reversibly transforms a Unicode string into an ASCII string.  ASCII characters in the Unicode string are represented literally, and non-ASCII characters are represented by ASCII characters that are allowed in host name labels (letters, digits, and hyphens). This document defines a general algorithm called Bootstring that allows a string of basic code points to uniquely represent any string of code points drawn from a larger set.  Punycode is an instance of Bootstring that uses particular parameter values specified by this document, appropriate for IDNA.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="3492"/>
        <seriesInfo name="DOI" value="10.17487/RFC3492"/>
      </reference>
      <reference anchor="RFC4086" target="https://www.rfc-editor.org/info/rfc4086" quoteTitle="true" derivedAnchor="RFC4086">
        <front>
          <title>Randomness Requirements for Security</title>
          <author initials="D." surname="Eastlake 3rd" fullname="D. Eastlake 3rd">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="J." surname="Schiller" fullname="J. Schiller">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Crocker" fullname="S. Crocker">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2005" month="June"/>
          <abstract>
            <t>Security systems are built on strong cryptographic algorithms that foil pattern analysis attempts.  However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities.  The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.</t>
            <t>Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult.  This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities.  It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="106"/>
        <seriesInfo name="RFC" value="4086"/>
        <seriesInfo name="DOI" value="10.17487/RFC4086"/>
      </reference>
      <reference anchor="RFC4343" target="https://www.rfc-editor.org/info/rfc4343" quoteTitle="true" derivedAnchor="RFC4343">
        <front>
          <title>Domain Name System (DNS) Case Insensitivity Clarification</title>
          <author initials="D." surname="Eastlake 3rd" fullname="D. Eastlake 3rd">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2006" month="January"/>
          <abstract>
            <t>Domain Name System (DNS) names are "case insensitive".  This document explains exactly what that means and provides a clear specification of the rules.  This clarification updates RFCs 1034, 1035, and 2181.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="4343"/>
        <seriesInfo name="DOI" value="10.17487/RFC4343"/>
      </reference>
      <reference anchor="RFC4648" target="https://www.rfc-editor.org/info/rfc4648" quoteTitle="true" derivedAnchor="RFC4648">
        <front>
          <title>The Base16, Base32, and Base64 Data Encodings</title>
          <author initials="S." surname="Josefsson" fullname="S. Josefsson">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2006" month="October"/>
          <abstract>
            <t>This document describes the commonly used base 64, base 32, and base 16 encoding schemes.  It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="4648"/>
        <seriesInfo name="DOI" value="10.17487/RFC4648"/>
      </reference>
      <reference anchor="RFC5246" target="https://www.rfc-editor.org/info/rfc5246" quoteTitle="true" derivedAnchor="RFC5246">
        <front>
          <title>The Transport Layer Security (TLS) Protocol Version 1.2</title>
          <author initials="T." surname="Dierks" fullname="T. Dierks">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="E." surname="Rescorla" fullname="E. Rescorla">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2008" month="August"/>
          <abstract>
            <t>This document specifies Version 1.2 of the Transport Layer Security (TLS) protocol.  The TLS protocol provides communications security over the Internet.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5246"/>
        <seriesInfo name="DOI" value="10.17487/RFC5246"/>
      </reference>
      <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280" quoteTitle="true" derivedAnchor="RFC5280">
        <front>
          <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
          <author initials="D." surname="Cooper" fullname="D. Cooper">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Santesson" fullname="S. Santesson">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Farrell" fullname="S. Farrell">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Boeyen" fullname="S. Boeyen">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="R." surname="Housley" fullname="R. Housley">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="W." surname="Polk" fullname="W. Polk">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2008" month="May"/>
          <abstract>
            <t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet.  An overview of this approach and model is provided as an introduction.  The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms.  Standard certificate extensions are described and two Internet-specific extensions are defined.  A set of required certificate extensions is specified.  The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions.  An algorithm for X.509 certification path validation is described.  An ASN.1 module and examples are provided in the appendices.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5280"/>
        <seriesInfo name="DOI" value="10.17487/RFC5280"/>
      </reference>
      <reference anchor="RFC6066" target="https://www.rfc-editor.org/info/rfc6066" quoteTitle="true" derivedAnchor="RFC6066">
        <front>
          <title>Transport Layer Security (TLS) Extensions: Extension Definitions</title>
          <author initials="D." surname="Eastlake 3rd" fullname="D. Eastlake 3rd">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2011" month="January"/>
          <abstract>
            <t>This document provides specifications for existing TLS extensions.  It is a companion document for RFC 5246, "The Transport Layer Security (TLS) Protocol Version 1.2".  The extensions specified are server_name, max_fragment_length, client_certificate_url, trusted_ca_keys, truncated_hmac, and status_request.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6066"/>
        <seriesInfo name="DOI" value="10.17487/RFC6066"/>
      </reference>
      <reference anchor="RFC7301" target="https://www.rfc-editor.org/info/rfc7301" quoteTitle="true" derivedAnchor="RFC7301">
        <front>
          <title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
          <author initials="S." surname="Friedl" fullname="S. Friedl">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="A." surname="Popov" fullname="A. Popov">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="A." surname="Langley" fullname="A. Langley">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="E." surname="Stephan" fullname="E. Stephan">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2014" month="July"/>
          <abstract>
            <t>This document describes a Transport Layer Security (TLS) extension for application-layer protocol negotiation within the TLS handshake. For instances in which multiple application protocols are supported on the same TCP or UDP port, this extension allows the application layer to negotiate which protocol will be used within the TLS connection.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7301"/>
        <seriesInfo name="DOI" value="10.17487/RFC7301"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author initials="B." surname="Leiba" fullname="B. Leiba">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2017" month="May"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC8555" target="https://www.rfc-editor.org/info/rfc8555" quoteTitle="true" derivedAnchor="RFC8555">
        <front>
          <title>Automatic Certificate Management Environment (ACME)</title>
          <author initials="R." surname="Barnes" fullname="R. Barnes">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="J." surname="Hoffman-Andrews" fullname="J. Hoffman-Andrews">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="D." surname="McCarney" fullname="D. McCarney">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="J." surname="Kasten" fullname="J. Kasten">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2019" month="March"/>
          <abstract>
            <t>Public Key Infrastructure using X.509 (PKIX) certificates are used for a number of purposes, the most significant of which is the authentication of domain names.  Thus, certification authorities (CAs) in the Web PKI are trusted to verify that an applicant for a certificate legitimately represents the domain name(s) in the certificate.  As of this writing, this verification is done through a collection of ad hoc mechanisms.  This document describes a protocol that a CA and an applicant can use to automate the process of verification and certificate issuance.  The protocol also provides facilities for other certificate management functions, such as certificate revocation.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8555"/>
        <seriesInfo name="DOI" value="10.17487/RFC8555"/>
      </reference>
      <reference anchor="X.680" target="https://www.itu.int/rec/T-REC-X.680-201508-I/en" quoteTitle="true" derivedAnchor="X.680">
        <front>
          <title>Information technology -- Abstract Syntax Notation One (ASN.1): Specification of basic notation</title>
          <author>
            <organization showOnFrontPage="true">ITU-T</organization>
          </author>
          <date month="August" year="2015"/>
        </front>
        <seriesInfo name="ITU-T Recommendation" value="X.680"/>
        <seriesInfo name="ISO/IEC" value="8824-1:2015"/>
      </reference>
      <reference anchor="X.690" target="https://www.itu.int/rec/T-REC-X.690-201508-I/en" quoteTitle="true" derivedAnchor="X.690">
        <front>
          <title>Information Technology -- ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title>
          <author>
            <organization showOnFrontPage="true">ITU-T</organization>
          </author>
          <date month="August" year="2015"/>
        </front>
        <seriesInfo name="ITU-T Recommendation" value="X.690"/>
        <seriesInfo name="ISO/IEC" value="8825-1:2015"/>
      </reference>
    </references>
    <section anchor="design-rationale" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-design-rationale">Design Rationale</name>
      <t pn="section-appendix.a-1">The TLS ALPN challenge exists to iterate on the TLS SNI challenge
      defined in the early ACME drafts. The TLS SNI challenge was
      convenient for service providers who were either operating large
      TLS-layer load balancing systems at which they wanted to perform
      validation or running servers fronting large numbers of DNS names from a
      single host as it allowed validation purely within the TLS layer. The
      value provided by the TLS SNI challenge was considered large enough that
      this document was written in order to provide a new challenge type that
      addressed the existing security concerns.</t>
      <t pn="section-appendix.a-2">A security issue in the TLS SNI challenge was discovered by Frans
      Rosen, which allowed users of various service providers to
      illegitimately validate control of the DNS names of other users of the
      provider. When the TLS SNI challenge was designed, it was assumed that a
      user would only be able to respond to TLS traffic via SNI for domain
      names they had registered with a service provider (i.e., if a user
      registered 'a.example', they would only be able to respond to SNI
      requests for 'a.example' and not for SNI requests for 'b.example'). It
      turns out that a number of large service providers do not honor this
      property. Because of this, users were able to respond to SNI requests
      for the names used by the TLS SNI challenge validation process. 




This meant that (1) if User A and User B had registered Host A and Host B,
respectively, User A would be able to claim the constructed SNI challenge name
for Host B, and (2) when the validation connection was made, User A would be
able to answer, thereby proving 'control' of Host B.

As the SNI name used was a subdomain of the domain name being validated,
rather than the domain name itself, it was likely to not already be registered
with the service provider for traffic routing, making it much easier for a
hijack to occur.</t>
    </section>
    <section anchor="acknowledgments" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t pn="section-appendix.b-1">The author would like to thank all those that provided design
      insights and editorial review of this document, including 
      <contact fullname="Richard Barnes"/>,
      <contact fullname="Ryan Hurst"/>,
      <contact fullname="Adam Langley"/>,
      <contact fullname="Ryan Sleevi"/>,
      <contact fullname="Jacob Hoffman-Andrews"/>,
      <contact fullname="Daniel McCarney"/>,
      <contact fullname="Marcin Walas"/>,
      <contact fullname="Martin Thomson"/>,
      and especially 
      <contact fullname="Frans Rosen"/>, who discovered the vulnerability in the
TLS SNI method that necessitated the writing of this specification.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-address">Author's Address</name>
      <author initials="R.B." surname="Shoemaker" fullname="Roland Bracewell Shoemaker">
        <organization abbrev="ISRG" showOnFrontPage="true">Internet Security Research Group</organization>
        <address>
          <email>roland@letsencrypt.org</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
