<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.9 -->
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc-ext html-pretty-print="prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"?>
<rfc xmlns:x="http://purl.org/net/xml2rfc/ext"
     category="std"
     docName="draft-ietf-httpbis-http2-secondary-certs-04"
     ipr="trust200902"
     submissionType="IETF">
   <x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22\&amp;amp;body=%3c{ref}%3e:"/>
   <front>
      <title abbrev="Secondary Cert Auth in HTTP/2">Secondary Certificate Authentication in HTTP/2</title>
      <author fullname="Mike Bishop" initials="M." surname="Bishop">
         <organization>Akamai</organization>
         <address>
            <email>mbishop@evequefou.be</email>
         </address>
      </author>
      <author fullname="Nick Sullivan" initials="N." surname="Sullivan">
         <organization>Cloudflare</organization>
         <address>
            <email>nick@cloudflare.com</email>
         </address>
      </author>
      <author fullname="Martin Thomson" initials="M." surname="Thomson">
         <organization>Mozilla</organization>
         <address>
            <email>martin.thomson@gmail.com</email>
         </address>
      </author>
      <date year="2019" month="April" day="25"/>
      <area>General</area>
      <workgroup>HTTP</workgroup>
      <keyword>Internet-Draft</keyword>
      <abstract>
         <t>A use of TLS Exported Authenticators is described which enables HTTP/2 clients and servers to offer additional certificate-based credentials after the connection is established. The means by which these credentials are used with requests is defined.</t>
      </abstract>
      <note title="Note to Readers">
         <t>Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/">https://lists.w3.org/Archives/Public/ietf-http-wg/</eref>.</t>
         <t>Working Group information can be found at <eref target="http://httpwg.github.io/">http://httpwg.github.io/</eref>; source code and issues list for this draft can be found at <eref target="https://github.com/httpwg/http-extensions/labels/secondary-certs">https://github.com/httpwg/http-extensions/labels/secondary-certs</eref>.</t>
      </note>
   </front>
   <middle>
      <section anchor="introduction" title="Introduction">
         <t>HTTP clients need to know that the content they receive on a connection comes from the origin that they intended to retrieve it from. The traditional form of server authentication in HTTP has been in the form of a single X.509 certificate provided during the TLS (<xref target="RFC5246"/>, <xref target="RFC8446"/>) handshake.</t>
         <t>Many existing HTTP <xref target="RFC7230"/> servers also have authentication requirements for the resources they serve. Of the bountiful authentication options available for authenticating HTTP requests, client certificates present a unique challenge for resource-specific authentication requirements because of the interaction with the underlying TLS layer.</t>
         <t>TLS 1.2 <xref target="RFC5246"/> supports one server and one client certificate on a connection. These certificates may contain multiple identities, but only one certificate may be provided.</t>
         <t>Many HTTP servers host content from several origins. HTTP/2 permits clients to reuse an existing HTTP connection to a server provided that the secondary origin is also in the certificate provided during the TLS handshake. In many cases, servers choose to maintain separate certificates for different origins but still desire the benefits of a shared HTTP connection.</t>
         <section anchor="server-certificate-authentication"
                  title="Server Certificate Authentication">
            <t>
               <xref target="RFC7540" x:fmt="of" x:sec="9.1.1"/> describes how connections may be used to make requests from multiple origins as long as the server is authoritative for both. A server is considered authoritative for an origin if DNS resolves the origin to the IP address of the server and (for TLS) if the certificate presented by the server contains the origin in the Subject Alternative Names field.</t>
            <t>
               <xref target="RFC7838"/> enables a step of abstraction from the DNS resolution. If both hosts have provided an Alternative Service at hostnames which resolve to the IP address of the server, they are considered authoritative just as if DNS resolved the origin itself to that address. However, the server’s one TLS certificate is still required to contain the name of each origin in question.</t>
            <t>
               <xref target="RFC8336"/> relaxes the requirement to perform the DNS lookup if already connected to a server with an appropriate certificate which claims support for a particular origin.</t>
            <t>Servers which host many origins often would prefer to have separate certificates for some sets of origins. This may be for ease of certificate management (the ability to separately revoke or renew them), due to different sources of certificates (a CDN acting on behalf of multiple origins), or other factors which might drive this administrative decision. Clients connecting to such origins cannot currently reuse connections, even if both client and server would prefer to do so.</t>
            <t>Because the TLS SNI extension is exchanged in the clear, clients might also prefer to retrieve certificates inside the encrypted context. When this information is sensitive, it might be advantageous to request a general-purpose certificate or anonymous ciphersuite at the TLS layer, while acquiring the “real” certificate in HTTP after the connection is established.</t>
         </section>
         <section anchor="client-certificate-authentication"
                  title="Client Certificate Authentication">
            <t>For servers that wish to use client certificates to authenticate users, they might request client authentication during or immediately after the TLS handshake. However, if not all users or resources need certificate-based authentication, a request for a certificate has the unfortunate consequence of triggering the client to seek a certificate, possibly requiring user interaction, network traffic, or other time-consuming activities. During this time, the connection is stalled in many implementations. Such a request can result in a poor experience, particularly when sent to a client that does not expect the request.</t>
            <t>The TLS 1.3 CertificateRequest can be used by servers to give clients hints about which certificate to offer. Servers that rely on certificate-based authentication might request different certificates for different resources. Such a server cannot use contextual information about the resource to construct an appropriate TLS CertificateRequest message during the initial handshake.</t>
            <t>Consequently, client certificates are requested at connection establishment time only in cases where all clients are expected or required to have a single certificate that is used for all resources. Many other uses for client certificates are reactive, that is, certificates are requested in response to the client making a request.</t>
            <section anchor="http11-using-tls-12-and-earlier"
                     title="HTTP/1.1 Using TLS 1.2 and Earlier">
               <t>In HTTP/1.1, a server that relies on client authentication for a subset of users or resources does not request a certificate when the connection is established. Instead, it only requests a client certificate when a request is made to a resource that requires a certificate. TLS 1.2 <xref target="RFC5246"/> accommodates this by permitting the server to request a new TLS handshake, in which the server will request the client’s certificate.</t>
               <t>
                  <xref target="ex-http11"/> shows the server initiating a TLS-layer renegotiation in response to receiving an HTTP/1.1 request to a protected resource.</t>
               <figure anchor="ex-http11"
                       title="HTTP/1.1 reactive certificate authentication with TLS 1.2">
                  <artwork type="drawing">
Client                                      Server
   -- (HTTP) GET /protected -------------------&gt; *1
   &lt;---------------------- (TLS) HelloRequest -- *2
   -- (TLS) ClientHello -----------------------&gt;
   &lt;------------------ (TLS) ServerHello, ... --
   &lt;---------------- (TLS) CertificateRequest -- *3
   -- (TLS) ..., Certificate ------------------&gt; *4
   -- (TLS) Finished --------------------------&gt;
   &lt;-------------------------- (TLS) Finished --
   &lt;--------------------------- (HTTP) 200 OK -- *5
</artwork>
               </figure>
               <t>In this example, the server receives a request for a protected resource (at *1 on <xref target="ex-http11"/>). Upon performing an authorization check, the server determines that the request requires authentication using a client certificate and that no such certificate has been provided.</t>
               <t>The server initiates TLS renegotiation by sending a TLS HelloRequest (at *2). The client then initiates a TLS handshake. Note that some TLS messages are elided from the figure for the sake of brevity.</t>
               <t>The critical messages for this example are the server requesting a certificate with a TLS CertificateRequest (*3); this request might use information about the request or resource. The client then provides a certificate and proof of possession of the private key in Certificate and CertificateVerify messages (*4).</t>
               <t>When the handshake completes, the server performs any authorization checks a second time. With the client certificate available, it then authorizes the request and provides a response (*5).</t>
            </section>
            <section anchor="http11-using-tls-13" title="HTTP/1.1 Using TLS 1.3">
               <t>TLS 1.3 <xref target="RFC8446"/> introduces a new client authentication mechanism that allows for clients to authenticate after the handshake has been completed. For the purposes of authenticating an HTTP request, this is functionally equivalent to renegotiation. <xref target="ex-tls13"/> shows the simpler exchange this enables.</t>
               <figure anchor="ex-tls13"
                       title="HTTP/1.1 reactive certificate authentication with TLS 1.3">
                  <artwork type="drawing">
Client                                      Server
   -- (HTTP) GET /protected -------------------&gt;
   &lt;---------------- (TLS) CertificateRequest --
   -- (TLS) Certificate, CertificateVerify,
               Finished -----------------------&gt;
   &lt;--------------------------- (HTTP) 200 OK --
</artwork>
               </figure>
               <t>TLS 1.3 does not support renegotiation, instead supporting direct client authentication. In contrast to the TLS 1.2 example, in TLS 1.3, a server can simply request a certificate.</t>
            </section>
            <section anchor="http2" title="HTTP/2">
               <t>An important part of the HTTP/1.1 exchange is that the client is able to easily identify the request that caused the TLS renegotiation. The client is able to assume that the next unanswered request on the connection is responsible. The HTTP stack in the client is then able to direct the certificate request to the application or component that initiated that request. This ensures that the application has the right contextual information for processing the request.</t>
               <t>In HTTP/2, a client can have multiple outstanding requests. Without some sort of correlation information, a client is unable to identify which request caused the server to request a certificate.</t>
               <t>Thus, the minimum necessary mechanism to support reactive certificate authentication in HTTP/2 is an identifier that can be use to correlate an HTTP request with a request for a certificate. Since streams are used for individual requests, correlation with a stream is sufficient.</t>
               <t>
                  <xref target="RFC7540"/> prohibits renegotiation after any application data has been sent. This completely blocks reactive certificate authentication in HTTP/2 using TLS 1.2. If this restriction were relaxed by an extension or update to HTTP/2, such an identifier could be added to TLS 1.2 by means of an extension to TLS. Unfortunately, many TLS 1.2 implementations do not permit application data to continue during a renegotiation. This is problematic for a multiplexed protocol like HTTP/2.</t>
            </section>
         </section>
         <section anchor="http-layer-certificate-authentication"
                  title="HTTP-Layer Certificate Authentication">
            <t>This draft defines HTTP/2 frames to carry the relevant certificate messages, enabling certificate-based authentication of both clients and servers independent of TLS version. This mechanism can be implemented at the HTTP layer without breaking the existing interface between HTTP and applications above it.</t>
            <t>This could be done in a naive manner by replicating the TLS messages as HTTP/2 frames on each stream. However, this would create needless redundancy between streams and require frequent expensive signing operations. Instead, TLS Exported Authenticators <xref target="I-D.ietf-tls-exported-authenticator"/> are exchanged on stream zero and other frames incorporate them to particular requests by reference as needed.</t>
            <t>TLS Exported Authenticators are structured messages that can be exported by either party of a TLS connection and validated by the other party. Given an established TLS connection, a request can be constructed which describes the desired certificate and an authenticator message can be constructed proving possession of a certificate and a corresponding private key. Both requests and authenticators can be generated by either the client or the server. Exported Authenticators use the message structures from Sections 4.3.2 and 4.4 of <xref target="RFC8446"/>, but different parameters.</t>
            <t>Each Authenticator is computed using a Handshake Context and Finished MAC Key derived from the TLS session. The Handshake Context is identical for both parties of the TLS connection, while the Finished MAC Key is dependent on whether the Authenticator is created by the client or the server.</t>
            <t>Successfully verified Authenticators result in certificate chains, with verified possession of the corresponding private key, which can be supplied into a collection of available certificates. Likewise, descriptions of desired certificates can be supplied into these collections.</t>
            <t>
               <xref target="discovery"/> describes how the feature is employed, defining means to detect support in peers (<xref target="setting"/>), make certificates and requests available (<xref target="cert-available"/>), and indicate when streams are blocked waiting on an appropriate certificate (<xref target="cert-challenge"/>). <xref target="certs-http2"/> defines the required frame types, which parallel the TLS 1.3 message exchange. Finally, <xref target="errors"/> defines new error types which can be used to notify peers when the exchange has not been successful.</t>
         </section>
         <section anchor="terminology" title="Terminology">
            <t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/>
               <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
         </section>
      </section>
      <section anchor="discovery"
               title="Discovering Additional Certificates at the HTTP/2 Layer">
         <t>A certificate chain with proof of possession of the private key corresponding to the end-entity certificate is sent as a sequence of <spanx style="verb">CERTIFICATE</spanx> frames (see <xref target="http-cert"/>) on stream zero. Once the holder of a certificate has sent the chain and proof, this certificate chain is cached by the recipient and available for future use. Clients can proactively indicate the certificate they intend to use on each request using an unsolicited <spanx style="verb">USE_CERTIFICATE</spanx> frame, if desired. The previously-supplied certificates are available for reference without having to resend them.</t>
         <t>Otherwise, the server uses a <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame to describe a class of certificates on stream zero, then uses <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames to associate these with individual requests. The client responds with a <spanx style="verb">USE_CERTIFICATE</spanx> frame indicating the certificate which should be used to satisfy the request.</t>
         <t>Data sent by each peer is correlated by the ID given in each frame. This ID is unrelated to values used by the other peer, even if each uses the same ID in certain cases. <spanx style="verb">USE_CERTIFICATE</spanx> frames indicate whether they are sent proactively or are in response to a <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame.</t>
         <section anchor="setting"
                  title="Indicating Support for HTTP-Layer Certificate Authentication">
            <t>Clients and servers that will accept requests for HTTP-layer certificate authentication indicate this using the HTTP/2 <spanx style="verb">SETTINGS_HTTP_CERT_AUTH</spanx> (0xSETTING-TBD) setting.</t>
            <t>The initial value for the <spanx style="verb">SETTINGS_HTTP_CERT_AUTH</spanx> setting is 0, indicating that the peer does not support HTTP-layer certificate authentication. If a peer does support HTTP-layer certificate authentication, the value is non-zero.</t>
            <t>In order to ensure that the TLS connection is direct to the server, rather than via a TLS-terminating proxy, each side will separately compute and confirm the value of this setting. The setting is derived from a TLS exporter (see <xref target="RFC8446" x:fmt="of" x:sec="7.5"/> and <xref target="RFC5705"/> for more details on exporters). Clients MUST NOT use an early exporter during their 0-RTT flight, but MUST send an updated SETTINGS frame using a regular exporter after the TLS handshake completes.</t>
            <t>The exporter is constructed with the following input:</t>
            <t>
               <list style="symbols">
                  <t>Label: <list style="symbols">
                        <t>“EXPORTER HTTP CERTIFICATE client” for clients</t>
                        <t>“EXPORTER HTTP CERTIFICATE server” for servers</t>
                     </list>
                  </t>
                  <t>Context: Empty</t>
                  <t>Length: Four bytes</t>
               </list>
            </t>
            <t>The resulting exporter is converted to a setting value as:</t>
            <figure>
               <artwork>
(Exporter &amp; 0x3fffffff) | 0x80000000
</artwork>
            </figure>
            <t>That is, the most significant bit will always be set, regardless of the value of the exporter. Each endpoint will compute the expected value from their peer. If the setting is not received, or if the value received is not the expected value, the frames defined in this document SHOULD NOT be sent.</t>
         </section>
         <section anchor="cert-available"
                  title="Making Certificates or Requests Available">
            <t>When both peers have advertised support for HTTP-layer certificates as in <xref target="setting"/>, either party can supply additional certificates into the connection at any time. This means that clients or servers which predict a certificate will be required could supply the certificate before being asked. These certificates are available for reference by future <spanx style="verb">USE_CERTIFICATE</spanx> frames.</t>
            <t>Certificates supplied by servers can be considered by clients without further action by the server. A server SHOULD NOT send certificates which do not cover origins which it is prepared to service on the current connection, but MAY use the ORIGIN frame <xref target="RFC8336"/> to indicate that not all covered origins will be served.</t>
            <figure anchor="ex-http2-server-proactive"
                    title="Proactive server authentication">
               <artwork type="drawing">
Client                                      Server
   &lt;------------------ (stream 0) CERTIFICATE --
   ...
   -- (stream N) GET /from-new-origin ---------&gt;
   &lt;----------------------- (stream N) 200 OK --

</artwork>
            </figure>
            <figure anchor="ex-http2-client-proactive"
                    title="Proactive client authentication">
               <artwork type="drawing">
Client                                      Server
   -- (stream 0) CERTIFICATE ------------------&gt;
   -- (stream 0) USE_CERTIFICATE (S=1) --------&gt;
   -- (stream 0) USE_CERTIFICATE (S=3) --------&gt;
   -- (streams 1,3) GET /protected ------------&gt;
   &lt;-------------------- (streams 1,3) 200 OK --

</artwork>
            </figure>
            <t>Likewise, either party can supply a <spanx style="verb">CERTIFICATE_REQUEST</spanx> that outlines parameters of a certificate they might request in the future. Upon receipt of a <spanx style="verb">CERTIFICATE_REQUEST</spanx>, endpoints SHOULD provide a corresponding certificate in anticipation of a request shortly being blocked. Clients MAY wait for a <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame to assist in associating the certificate request with a particular HTTP transaction.</t>
         </section>
         <section anchor="cert-challenge" title="Requiring Certificate Authentication">
            <section anchor="requiring-additional-server-certificates"
                     title="Requiring Additional Server Certificates">
               <t>As defined in <xref target="RFC7540"/>, when a client finds that an https:// origin (or Alternative Service <xref target="RFC7838"/>) to which it needs to make a request has the same IP address as a server to which it is already connected, it MAY check whether the TLS certificate provided contains the new origin as well, and if so, reuse the connection.</t>
               <t>If the TLS certificate does not contain the new origin, but the server has claimed support for that origin (with an ORIGIN frame, see <xref target="RFC8336"/>) and advertised support for HTTP-layer certificates (see <xref target="setting"/>), the client MAY send a <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame describing the desired origin. The client then sends a <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame for stream zero referencing the request, indicating that the connection cannot be used for that origin until the certificate is provided.</t>
               <t>If the server does not have the desired certificate, it MUST send an Empty Authenticator, as described in <xref target="I-D.ietf-tls-exported-authenticator" x:fmt="of" x:sec="5"/>, in a <spanx style="verb">CERTIFICATE</spanx> frame in response to the request, followed by a <spanx style="verb">USE_CERTIFICATE</spanx> frame for stream zero which references the Empty Authenticator. In this case, or if the server has not advertised support for HTTP-layer certificates, the client MUST NOT send any requests for resources in that origin on the current connection.</t>
               <figure anchor="ex-http2-server-requested" title="Client-requested certificate">
                  <artwork type="drawing">
Client                                      Server
   &lt;----------------------- (stream 0) ORIGIN --
   -- (stream 0) CERTIFICATE_REQUEST ----------&gt;
   -- (stream 0) CERTIFICATE_NEEDED (S=0) -----&gt;
   &lt;------------------ (stream 0) CERTIFICATE --
   &lt;-------- (stream 0) USE_CERTIFICATE (S=0) --
   -- (stream N) GET /from-new-origin ---------&gt;
   &lt;----------------------- (stream N) 200 OK --
</artwork>
               </figure>
               <t>If a client receives a <spanx style="verb">PUSH_PROMISE</spanx> referencing an origin for which it has not yet received the server’s certificate, this is a fatal connection error (see section 8.2 of <xref target="RFC7540"/>). To avoid this, servers MUST supply the associated certificates before pushing resources from a different origin.</t>
            </section>
            <section anchor="requiring-additional-client-certificates"
                     title="Requiring Additional Client Certificates">
               <t>Likewise, the server sends a <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame for each stream where certificate authentication is required. The client answers with a <spanx style="verb">USE_CERTIFICATE</spanx> frame indicating the certificate to use on that stream. If the request parameters or the responding certificate are not already available, they will need to be sent as described in <xref target="cert-available"/> as part of this exchange.</t>
               <figure anchor="ex-http2-client-requested"
                       title="Reactive certificate authentication">
                  <artwork type="drawing">
Client                                      Server
   &lt;---------- (stream 0) CERTIFICATE_REQUEST --
   ...
   -- (stream N) GET /protected ---------------&gt;
   &lt;----- (stream 0) CERTIFICATE_NEEDED (S=N) --
   -- (stream 0) CERTIFICATE ------------------&gt;
   -- (stream 0) USE_CERTIFICATE (S=N) --------&gt;
   &lt;----------------------- (stream N) 200 OK --
</artwork>
               </figure>
               <t>If the client does not have the desired certificate, it instead sends an Empty Authenticator, as described in <xref target="I-D.ietf-tls-exported-authenticator" x:fmt="of" x:sec="5"/>, in a <spanx style="verb">CERTIFICATE</spanx> frame in response to the request, followed by a <spanx style="verb">USE_CERTIFICATE</spanx> frame which references the Empty Authenticator. In this case, or if the client has not advertised support for HTTP-layer certificates, the server processes the request based solely on the certificate provided during the TLS handshake, if any. This might result in an error response via HTTP, such as a status code 403 (Not Authorized).</t>
            </section>
         </section>
      </section>
      <section anchor="certs-http2" title="Certificates Frames for HTTP/2">
         <t>The <spanx style="verb">CERTIFICATE_REQUEST</spanx> and <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames are correlated by their <spanx style="verb">Request-ID</spanx> field. Subsequent <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames with the same <spanx style="verb">Request-ID</spanx> value MAY be sent for other streams where the sender is expecting a certificate with the same parameters.</t>
         <t>The <spanx style="verb">CERTIFICATE</spanx>, and <spanx style="verb">USE_CERTIFICATE</spanx> frames are correlated by their <spanx style="verb">Cert-ID</spanx> field. Subsequent <spanx style="verb">USE_CERTIFICATE</spanx> frames with the same <spanx style="verb">Cert-ID</spanx> MAY be sent in response to other <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames and refer to the same certificate.</t>
         <t>
            <spanx style="verb">CERTIFICATE_NEEDED</spanx> and <spanx style="verb">USE_CERTIFICATE</spanx> frames are correlated by the Stream ID they reference. Unsolicited <spanx style="verb">USE_CERTIFICATE</spanx> frames are not responses to <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames; otherwise, each <spanx style="verb">USE_CERTIFICATE</spanx> frame for a stream is considered to respond to a <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame for the same stream in sequence.</t>
         <figure anchor="frame-relationships" title="Frame correlation">
            <artwork type="drawing">
   +---------+           +---------+
   | REQUEST |           |   CERT  |
   +---------+           +---------+
        |                     |
        | Request-ID          | Cert-ID
        |                     |
        v                     v
   +---------+ Stream ID +---------+
   | NEEDED  |----------&gt;|   USE   |
   +---------+           +---------+
</artwork>
         </figure>
         <t>
            <spanx style="verb">Request-ID</spanx> and <spanx style="verb">Cert-ID</spanx> are independent and sender-local. The use of the same value by the other peer or in the other context does not imply any correlation between these frames. These values MUST be unique per sender for each space over the lifetime of the connection.</t>
         <section anchor="http-cert-needed" title="The CERTIFICATE_NEEDED Frame">
            <t>The <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame (0xFRAME-TBD1) is sent on stream zero to indicate that the HTTP request on the indicated stream is blocked pending certificate authentication. The frame includes stream ID and a request identifier which can be used to correlate the stream with a previous <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame sent on stream zero. The <spanx style="verb">CERTIFICATE_REQUEST</spanx> describes the certificate the sender requires to make progress on the stream in question.</t>
            <figure anchor="fig-cert-needed" title="CERTIFICATE_NEEDED frame payload">
               <artwork type="drawing">
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +---------------------------------------------------------------+
 |R|                        Stream ID (31)                       |
 +-------------------------------+-------------------------------+
 |        Request-ID (16)        |
 +-------------------------------+
</artwork>
            </figure>
            <t>The <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame contains 6 octets. The first four octets indicate the Stream ID of the affected stream. The following two octets are the authentication request identifier, <spanx style="verb">Request-ID</spanx>. A peer that receives a <spanx style="verb">CERTIFICATE_NEEDED</spanx> of any other length MUST treat this as a stream error of type <spanx style="verb">PROTOCOL_ERROR</spanx>. Frames with identical request identifiers refer to the same <spanx style="verb">CERTIFICATE_REQUEST</spanx>.</t>
            <t>A server MAY send multiple <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames for the same stream. If a server requires that a client provide multiple certificates before authorizing a single request, each required certificate MUST be indicated with a separate <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame, each of which MUST have a different request identifier (referencing different <spanx style="verb">CERTIFICATE_REQUEST</spanx> frames describing each required certificate). To reduce the risk of client confusion, servers SHOULD NOT have multiple outstanding <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames for the same stream at any given time.</t>
            <t>Clients MUST only send multiple <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames for stream zero. Multiple <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames on any other stream MUST be considered a stream error of type <spanx style="verb">PROTOCOL_ERROR</spanx>.</t>
            <t>The <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame MUST NOT be sent to a peer which has not advertised support for HTTP-layer certificate authentication.</t>
            <t>The <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame MUST NOT reference a stream in the “half-closed (local)” or “closed” states <xref target="RFC7540"/>. A client that receives a <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame for a stream which is not in a valid state SHOULD treat this as a stream error of type <spanx style="verb">PROTOCOL_ERROR</spanx>.</t>
         </section>
         <section anchor="http-use-certificate" title="The USE_CERTIFICATE Frame">
            <t>The <spanx style="verb">USE_CERTIFICATE</spanx> frame (0xFRAME-TBD4) is sent on stream zero to indicate which certificate is being used on a particular request stream.</t>
            <t>The <spanx style="verb">USE_CERTIFICATE</spanx> frame defines a single flag:</t>
            <t>
               <list style="hanging">
                  <t hangText="UNSOLICITED (0x01):">Indicates that no <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame has yet been received for this stream.</t>
               </list>
            </t>
            <t>The payload of the <spanx style="verb">USE_CERTIFICATE</spanx> frame is as follows:</t>
            <figure anchor="fig-use-cert" title="USE_CERTIFICATE frame payload">
               <artwork type="drawing">
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +---------------------------------------------------------------+
 |R|                        Stream ID (31)                       |
 +-------------------------------+-------------------------------+
 |         [Cert-ID (16)]        |
 +-------------------------------+
</artwork>
            </figure>
            <t>The first four octets indicate the Stream ID of the affected stream. The following two octets, if present, contain the two-octet <spanx style="verb">Cert-ID</spanx> of the certificate the sender wishes to use. This MUST be the ID of a certificate for which proof of possession has been presented in a <spanx style="verb">CERTIFICATE</spanx> frame. Recipients of a <spanx style="verb">USE_CERTIFICATE</spanx> frame of any other length MUST treat this as a stream error of type <spanx style="verb">PROTOCOL_ERROR</spanx>. Frames with identical certificate identifiers refer to the same certificate chain.</t>
            <t>A <spanx style="verb">USE_CERTIFICATE</spanx> frame which omits the Cert-ID refers to the certificate provided at the TLS layer, if any. If no certificate was provided at the TLS layer, the stream should be processed with no authentication, likely returning an authentication-related error at the HTTP level (e.g. 403) for servers or routing the request to a new connection for clients.</t>
            <t>The <spanx style="verb">UNSOLICITED</spanx> flag MAY be set by clients on the first <spanx style="verb">USE_CERTIFICATE</spanx> frame referring to a given stream. This permits a client to proactively indicate which certificate should be used when processing a new request. When such an unsolicited indication refers to a request that has not yet been received, servers SHOULD cache the indication briefly in anticipation of the request.</t>
            <t>Receipt of more than one unsolicited <spanx style="verb">USE_CERTIFICATE</spanx> frames or an unsolicited <spanx style="verb">USE_CERTIFICATE</spanx> frame which is not the first in reference to a given stream MUST be treated as a stream error of type <spanx style="verb">CERTIFICATE_OVERUSED</spanx>.</t>
            <t>Each <spanx style="verb">USE_CERTIFICATE</spanx> frame which is not marked as unsolicited is considered to respond in order to the <spanx style="verb">CERTIFICATE_NEEDED</spanx> frames for the same stream. If a <spanx style="verb">USE_CERTIFICATE</spanx> frame is received for which a <spanx style="verb">CERTIFICATE_NEEDED</spanx> frame has not been sent, this MUST be treated as a stream error of type <spanx style="verb">CERTIFICATE_OVERUSED</spanx>.</t>
            <t>Receipt of a <spanx style="verb">USE_CERTIFICATE</spanx> frame with an unknown <spanx style="verb">Cert-ID</spanx> MUST result in a stream error of type <spanx style="verb">PROTOCOL_ERROR</spanx>.</t>
            <t>The referenced certificate chain needs to conform to the requirements expressed in the <spanx style="verb">CERTIFICATE_REQUEST</spanx> to the best of the sender’s ability, or the recipient is likely to reject it as unsuitable despite properly validating the authenticator. If the recipient considers the certificate unsuitable, it MAY at its discretion either return an error at the HTTP semantic layer, or respond with a stream error <xref target="RFC7540"/> on any stream where the certificate is used. <xref target="errors"/> defines certificate-related error codes which might be applicable.</t>
         </section>
         <section anchor="http-cert-request" title="The CERTIFICATE_REQUEST Frame">
            <t>The <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame (id=0xFRAME-TBD2) provides an exported authenticator request message from the TLS layer that specifies a desired certificate. This describes the certificate the sender wishes to have presented.</t>
            <t>The <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame SHOULD NOT be sent to a peer which has not advertised support for HTTP-layer certificate authentication.</t>
            <t>The <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame MUST be sent on stream zero. A <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame received on any other stream MUST be rejected with a stream error of type <spanx style="verb">PROTOCOL_ERROR</spanx>.</t>
            <figure anchor="fig-cert-request" title="CERTIFICATE_REQUEST frame payload">
               <artwork type="drawing">
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-------------------------------+-------------------------------+
 |        Request-ID (16)        |          Request (?)        ...
 +---------------------------------------------------------------+
</artwork>
            </figure>
            <t>The frame contains the following fields:</t>
            <t>
               <list style="hanging">
                  <t hangText="Request-ID:">
                     <spanx style="verb">Request-ID</spanx> is a 16-bit opaque identifier used to correlate subsequent certificate-related frames with this request. The identifier MUST be unique in the session for the sender.</t>
                  <t hangText="Request:">An exported authenticator request, generated using the <spanx style="verb">request</spanx> API described in <xref target="I-D.ietf-tls-exported-authenticator"/>. See <xref target="exp-auth"/> for more details on the input to this API.</t>
               </list>
            </t>
            <section anchor="exp-req" title="Exported Authenticator Request Characteristics">
               <t>The Exported Authenticator <spanx style="verb">request</spanx> API defined in <xref target="I-D.ietf-tls-exported-authenticator"/> takes as input a set of desired certificate characteristics and a <spanx style="verb">certificate_request_context</spanx>, which needs to be unpredictable. When generating exported authenticators for use with this extension, the <spanx style="verb">certificate_request_context</spanx> MUST contain both the two-octet Request-ID as well as at least 96 bits of additional entropy.</t>
               <t>Upon receipt of a <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame, the recipient MUST verify that the first two octets of the authenticator’s <spanx style="verb">certificate_request_context</spanx> matches the Request-ID presented in the frame.</t>
               <t>The TLS library on the authenticating peer will provide mechanisms to select an appropriate certificate to respond to the transported request. TLS libraries on servers MUST be able to recognize the <spanx style="verb">server_name</spanx> extension (<xref target="RFC6066"/>) at a minimum. Clients MUST always specify the desired origin using this extension, though other extensions MAY also be included.</t>
            </section>
         </section>
         <section anchor="http-cert" title="The CERTIFICATE Frame">
            <t>The <spanx style="verb">CERTIFICATE</spanx> frame (id=0xFRAME-TBD3) provides an exported authenticator message from the TLS layer that provides a chain of certificates, associated extensions and proves possession of the private key corresponding to the end-entity certificate.</t>
            <t>The <spanx style="verb">CERTIFICATE</spanx> frame defines two flags:</t>
            <t>
               <list style="hanging">
                  <t hangText="TO_BE_CONTINUED (0x01):">Indicates that the exported authenticator spans more than one frame.</t>
                  <t hangText="UNSOLICITED (0x02):">Indicates that the exported authenticator does not contain a Request-ID.</t>
               </list>
            </t>
            <figure anchor="fig-proof-frame" title="CERTIFICATE frame payload">
               <artwork type="drawing">
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-------------------------------+-------------------------------+
 |          Cert-ID (16)         |        Request-ID (16)        |
 +-------------------------------+-------------------------------+
 |                   Authenticator Fragment (*)                ...
 +---------------------------------------------------------------+
</artwork>
            </figure>
            <t>The frame contains the following fields:</t>
            <t>
               <list style="hanging">
                  <t hangText="Cert-ID:">
                     <spanx style="verb">Cert-ID</spanx> is a 16-bit opaque identifier used to correlate other certificate- related frames with this exported authenticator fragment.</t>
                  <t hangText="Request-ID:">
                     <spanx style="verb">Request-ID</spanx> is an optional 16-bit opaque identifier used to correlate this exported authenticator with the request which triggered it, if any. This field is present only if the <spanx style="verb">UNSOLICITED</spanx> flag is not set.</t>
                  <t hangText="Authenticator Fragment:">A portion of the opaque data returned from the TLS connection exported authenticator <spanx style="verb">authenticate</spanx> API. See <xref target="exp-auth"/> for more details on the input to this API.</t>
               </list>
            </t>
            <t>An exported authenticator is transported in zero or more <spanx style="verb">CERTIFICATE</spanx> frames with the <spanx style="verb">TO_BE_CONTINUED</spanx> flag set, followed by one <spanx style="verb">CERTIFICATE</spanx> frame with the <spanx style="verb">TO_BE_CONTINUED</spanx> flag unset. Each of these frames contains the same <spanx style="verb">Cert-ID</spanx> field, permitting them to be associated with each other. Receipt of any <spanx style="verb">CERTIFICATE</spanx> frame with the same <spanx style="verb">Cert-ID</spanx> following the receipt of a <spanx style="verb">CERTIFICATE</spanx> frame with <spanx style="verb">TO_BE_CONTINUED</spanx> unset MUST be treated as a connection error of type <spanx style="verb">PROTOCOL_ERROR</spanx>.</t>
            <t>If the <spanx style="verb">UNSOLICITED</spanx> flag is not set, the <spanx style="verb">CERTIFICATE</spanx> frame also contains a Request-ID indicating the certificate request which caused this exported authenticator to be generated. The value of this flag and the contents of the Request-ID field MUST NOT differ between frames with the same Cert-ID.</t>
            <t>Upon receiving a complete series of <spanx style="verb">CERTIFICATE</spanx> frames, the receiver may validate the Exported Authenticator value by using the exported authenticator API. This returns either an error indicating that the message was invalid, or the certificate chain and extensions used to create the message.</t>
            <t>The <spanx style="verb">CERTIFICATE</spanx> frame MUST be sent on stream zero. A <spanx style="verb">CERTIFICATE</spanx> frame received on any other stream MUST be rejected with a stream error of type <spanx style="verb">PROTOCOL_ERROR</spanx>.</t>
            <section anchor="exp-auth" title="Exported Authenticator Characteristics">
               <t>The Exported Authenticator API defined in <xref target="I-D.ietf-tls-exported-authenticator"/> takes as input a request, a set of certificates, and supporting information about the certificate (OCSP, SCT, etc.). The result is an opaque token which is used when generating the <spanx style="verb">CERTIFICATE</spanx> frame.</t>
               <t>Upon receipt of a <spanx style="verb">CERTIFICATE</spanx> frame, an endpoint MUST perform the following steps to validate the token it contains:</t>
               <t>
                  <list style="symbols">
                     <t>Verify that either the <spanx style="verb">UNSOLICITED</spanx> flag is set (clients only) or that the Request-ID field contains the Request-ID of a previously-sent <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame.</t>
                     <t>Using the <spanx style="verb">get context</spanx> API, retrieve the <spanx style="verb">certificate_request_context</spanx> used to generate the authenticator, if any. Verify that the <spanx style="verb">certificate_request_context</spanx> begins with the supplied Request-ID, if any.</t>
                     <t>Use the <spanx style="verb">validate</spanx> API to confirm the validity of the authenticator with regard to the generated request (if any).</t>
                  </list>
               </t>
               <t>Once the authenticator is accepted, the endpoint can perform any other checks for the acceptability of the certificate itself. Clients MUST NOT accept any end-entity certificate from an exported authenticator which does not contain the Required Domain extension; see <xref target="extension"/> and <xref target="impersonation"/>.</t>
            </section>
         </section>
      </section>
      <section anchor="errors"
               title="Indicating Failures During HTTP-Layer Certificate Authentication">
         <t>Because this draft permits certificates to be exchanged at the HTTP framing layer instead of the TLS layer, several certificate-related errors which are defined at the TLS layer might now occur at the HTTP framing layer. In this section, those errors are restated and added to the HTTP/2 error code registry.</t>
         <t>
            <list style="hanging">
               <t hangText="BAD_CERTIFICATE (0xERROR-TBD1):">A certificate was corrupt, contained signatures that did not verify correctly, etc.</t>
               <t hangText="UNSUPPORTED_CERTIFICATE (0xERROR-TBD2):">A certificate was of an unsupported type or did not contain required extensions</t>
               <t hangText="CERTIFICATE_REVOKED (0xERROR-TBD3):">A certificate was revoked by its signer</t>
               <t hangText="CERTIFICATE_EXPIRED (0xERROR-TBD4):">A certificate has expired or is not currently valid</t>
               <t hangText="CERTIFICATE_GENERAL (0xERROR-TBD5):">Any other certificate-related error</t>
               <t hangText="CERTIFICATE_OVERUSED (0xERROR-TBD6):">More certificates were used on a request than were requested</t>
            </list>
         </t>
         <t>As described in <xref target="RFC7540"/>, implementations MAY choose to treat a stream error as a connection error at any time. Of particular note, a stream error cannot occur on stream 0, which means that implementations cannot send non-session errors in response to <spanx style="verb">CERTIFICATE_REQUEST</spanx>, and <spanx style="verb">CERTIFICATE</spanx> frames. Implementations which do not wish to terminate the connection MAY either send relevant errors on any stream which references the failing certificate in question or process the requests as unauthenticated and provide error information at the HTTP semantic layer.</t>
      </section>
      <section anchor="extension" title="Required Domain Certificate Extension">
         <t>The Required Domain extension allows certificates to limit their use with Secondary Certificate Authentication. A client MUST verify that the server has proven ownership of the indicated identity before accepting the limited certificate over Secondary Certificate Authentication.</t>
         <t>The identity in this extension is a restriction asserted by the requester of the certificate and is not verified by the CA. Conforming CAs SHOULD mark the requiredDomain extension as non-critical. Conforming CAs MUST require the presence of a CAA record <xref target="RFC6844"/> prior to issuing a certificate with this extension. Because a Required Domain value of “*” has a much higher risk of reuse if compromised, conforming Certificate Authorities are encouraged to require more extensive verification prior to issuing such a certificate.</t>
         <t>The required domain is represented as a GeneralName, as specified in <xref target="RFC5280" x:fmt="of" x:sec="4.2.1.6"/>. Unlike the subject field, conforming CAs MUST NOT issue certificates with a requiredDomain extension containing empty GeneralName fields. Clients that encounter such a certificate when processing a certification path MUST consider the certificate invalid.</t>
         <t>The wildcard character “<spanx>” MAY be used to represent that any previously authenticated identity is acceptable. This character MUST be the entirety of the name if used and MUST have a type of “dNSName”. (That is, “</spanx>” is acceptable, but “<spanx>.com” and “w</spanx>.example.com” are not).</t>
         <figure>
            <artwork>
id-ce-requiredDomain OBJECT IDENTIFIER ::=  { id-ce TBD1 }

RequiredDomain ::= GeneralName
</artwork>
         </figure>
      </section>
      <section anchor="security" title="Security Considerations">
         <t>This mechanism defines an alternate way to obtain server and client certificates other than in the initial TLS handshake. While the signature of exported authenticator values is expected to be equally secure, it is important to recognize that a vulnerability in this code path is at least equal to a vulnerability in the TLS handshake.</t>
         <section anchor="impersonation" title="Impersonation">
            <t>This mechanism could increase the impact of a key compromise. Rather than needing to subvert DNS or IP routing in order to use a compromised certificate, a malicious server now only needs a client to connect to <spanx>some</spanx> HTTPS site under its control in order to present the compromised certificate. As recommended in <xref target="RFC8336"/>, clients opting not to consult DNS ought to employ some alternative means to increase confidence that the certificate is legitimate.</t>
            <t>One such means is the Required Domain certificate extension defined in {extension}. Clients MUST require that server certificates presented via this mechanism contain the Required Domain extension and require that a certificate previously accepted on the connection (including the certificate presented in TLS) lists the Required Domain in the Subject field or the Subject Alternative Name extension.</t>
            <t>As noted in the Security Considerations of <xref target="I-D.ietf-tls-exported-authenticator"/>, it is difficult to formally prove that an endpoint is jointly authoritative over multiple certificates, rather than individually authoritative on each certificate. As a result, clients MUST NOT assume that because one origin was previously colocated with another, those origins will be reachable via the same endpoints in the future. Clients MUST NOT consider previous secondary certificates to be validated after TLS session resumption. However, clients MAY proactively query for previously-presented secondary certificates.</t>
         </section>
         <section anchor="fingerprinting" title="Fingerprinting">
            <t>This draft defines a mechanism which could be used to probe servers for origins they support, but opens no new attack versus making repeat TLS connections with different SNI values. Servers SHOULD impose similar denial-of-service mitigations (e.g. request rate limits) to <spanx style="verb">CERTIFICATE_REQUEST</spanx> frames as to new TLS connections.</t>
            <t>While the extensions in the <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame permit the sender to enumerate the acceptable Certificate Authorities for the requested certificate, it might not be prudent (either for security or data consumption) to include the full list of trusted Certificate Authorities in every request. Senders, particularly clients, SHOULD send only the extensions that narrowly specify which certificates would be acceptable.</t>
         </section>
         <section anchor="denial-of-service" title="Denial of Service">
            <t>Failure to provide a certificate on a stream after receiving <spanx style="verb">CERTIFICATE_NEEDED</spanx> blocks processing, and SHOULD be subject to standard timeouts used to guard against unresponsive peers.</t>
            <t>Validating a multitude of signatures can be computationally expensive, while generating an invalid signature is computationally cheap. Implementations will require checks for attacks from this direction. Invalid exported authenticators SHOULD be treated as a session error, to avoid further attacks from the peer, though an implementation MAY instead disable HTTP-layer certificates for the current connection instead.</t>
         </section>
         <section anchor="persistence-of-service" title="Persistence of Service">
            <t>CNAME records in the DNS are frequently used to delegate authority for an origin to a third-party provider. This delegation can be changed without notice, even to the third-party provider, simply by modifying the CNAME record in question.</t>
            <t>After the owner of the domain has redirected traffic elsewhere by changing the CNAME, new connections will not arrive for that origin, but connections which are properly directed to this provider for other origins would continue to claim control of this origin (via ORIGIN frame and Secondary Certificates). This is proper behavior based on the third-party provider’s configuration, but would likely not be what is intended by the owner of the origin.</t>
            <t>This is not an issue which can be mitigated by the protocol, but something about which third-party providers SHOULD educate their customers before using the features described in this document.</t>
         </section>
         <section anchor="confusion-about-state" title="Confusion About State">
            <t>Implementations need to be aware of the potential for confusion about the state of a connection. The presence or absence of a validated certificate can change during the processing of a request, potentially multiple times, as <spanx style="verb">USE_CERTIFICATE</spanx> frames are received. A server that uses certificate authentication needs to be prepared to reevaluate the authorization state of a request as the set of certificates changes.</t>
            <t>Client implementations need to carefully consider the impact of setting the <spanx style="verb">AUTOMATIC_USE</spanx> flag. This flag is a performance optimization, permitting the client to avoid a round-trip on each request where the server checks for certificate authentication. However, once this flag has been sent, the client has zero knowledge about whether the server will use the referenced cert for any future request, or even for an existing request which has not yet completed. Clients MUST NOT set this flag on any certificate which is not appropriate for currently-in-flight requests, and MUST NOT make any future requests on the same connection which they are not willing to have associated with the provided certificate.</t>
         </section>
      </section>
      <section anchor="iana" title="IANA Considerations">
         <t>This draft adds entries in three registries.</t>
         <t>The HTTP/2 <spanx style="verb">SETTINGS_HTTP_CERT_AUTH</spanx> setting is registered in <xref target="iana-setting"/>. Four frame types are registered in <xref target="iana-frame"/>. Six error codes are registered in <xref target="iana-errors"/>.</t>
         <section anchor="iana-setting" title="HTTP/2 SETTINGS_HTTP_CERT_AUTH Setting">
            <t>The SETTINGS_HTTP_CERT_AUTH setting is registered in the “HTTP/2 Settings” registry established in <xref target="RFC7540"/>.</t>
            <t>
               <list style="hanging">
                  <t hangText="Name:">SETTINGS_HTTP_CERT_AUTH</t>
                  <t hangText="Code:">0xSETTING-TBD</t>
                  <t hangText="Initial Value:">0</t>
                  <t hangText="Specification:">This document.</t>
               </list>
            </t>
         </section>
         <section anchor="iana-frame" title="New HTTP/2 Frames">
            <t>Four new frame types are registered in the “HTTP/2 Frame Types” registry established in <xref target="RFC7540"/>. The entries in the following table are registered by this document.</t>
            <texttable>
               <ttcol align="left">Frame Type</ttcol>
               <ttcol align="left">Code</ttcol>
               <ttcol align="left">Specification</ttcol>
               <c>CERTIFICATE_NEEDED</c>
               <c>0xFRAME-TBD1</c>
               <c>
                  <xref target="http-cert-needed"/>
               </c>
               <c>CERTIFICATE_REQUEST</c>
               <c>0xFRAME-TBD2</c>
               <c>
                  <xref target="http-cert-request"/>
               </c>
               <c>CERTIFICATE</c>
               <c>0xFRAME-TBD3</c>
               <c>
                  <xref target="http-cert"/>
               </c>
               <c>USE_CERTIFICATE</c>
               <c>0xFRAME-TBD4</c>
               <c>
                  <xref target="http-use-certificate"/>
               </c>
            </texttable>
         </section>
         <section anchor="iana-errors" title="New HTTP/2 Error Codes">
            <t>Six new error codes are registered in the “HTTP/2 Error Code” registry established in <xref target="RFC7540"/>. The entries in the following table are registered by this document.</t>
            <texttable>
               <ttcol align="left">Name</ttcol>
               <ttcol align="left">Code</ttcol>
               <ttcol align="left">Specification</ttcol>
               <c>BAD_CERTIFICATE</c>
               <c>0xERROR-TBD1</c>
               <c>
                  <xref target="errors"/>
               </c>
               <c>UNSUPPORTED_CERTIFICATE</c>
               <c>0xERROR-TBD2</c>
               <c>
                  <xref target="errors"/>
               </c>
               <c>CERTIFICATE_REVOKED</c>
               <c>0xERROR-TBD3</c>
               <c>
                  <xref target="errors"/>
               </c>
               <c>CERTIFICATE_EXPIRED</c>
               <c>0xERROR-TBD4</c>
               <c>
                  <xref target="errors"/>
               </c>
               <c>CERTIFICATE_GENERAL</c>
               <c>0xERROR-TBD5</c>
               <c>
                  <xref target="errors"/>
               </c>
               <c>CERTIFICATE_OVERUSED</c>
               <c>0xERROR-TBD6</c>
               <c>
                  <xref target="errors"/>
               </c>
            </texttable>
         </section>
      </section>
   </middle>
   <back>
      <references title="Normative References">
         <reference anchor="RFC5246">
            <front>
               <title>The Transport Layer Security (TLS) Protocol Version 1.2</title>
               <author fullname="T. Dierks" initials="T." surname="Dierks"/>
               <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
               <date month="August" year="2008"/>
            </front>
            <seriesInfo name="RFC" value="5246"/>
            <seriesInfo name="DOI" value="10.17487/RFC5246"/>
         </reference>
         <reference anchor="RFC6066">
            <front>
               <title>Transport Layer Security (TLS) Extensions: Extension Definitions</title>
               <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
               <date month="January" year="2011"/>
            </front>
            <seriesInfo name="RFC" value="6066"/>
            <seriesInfo name="DOI" value="10.17487/RFC6066"/>
         </reference>
         <reference anchor="RFC7230">
            <front>
               <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
               <author fullname="R. Fielding"
                       initials="R."
                       role="editor"
                       surname="Fielding"/>
               <author fullname="J. Reschke"
                       initials="J."
                       role="editor"
                       surname="Reschke"/>
               <date month="June" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7230"/>
            <seriesInfo name="DOI" value="10.17487/RFC7230"/>
         </reference>
         <reference anchor="RFC7540">
            <front>
               <title>Hypertext Transfer Protocol Version 2 (HTTP/2)</title>
               <author fullname="M. Belshe" initials="M." surname="Belshe"/>
               <author fullname="R. Peon" initials="R." surname="Peon"/>
               <author fullname="M. Thomson"
                       initials="M."
                       role="editor"
                       surname="Thomson"/>
               <date month="May" year="2015"/>
            </front>
            <seriesInfo name="RFC" value="7540"/>
            <seriesInfo name="DOI" value="10.17487/RFC7540"/>
         </reference>
         <reference anchor="RFC8446">
            <front>
               <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
               <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
               <date month="August" year="2018"/>
            </front>
            <seriesInfo name="RFC" value="8446"/>
            <seriesInfo name="DOI" value="10.17487/RFC8446"/>
         </reference>
         <reference anchor="I-D.ietf-tls-exported-authenticator">
            <front>
               <title>Exported Authenticators in TLS</title>
               <author fullname="Nick Sullivan" initials="N" surname="Sullivan"/>
               <date day="18" month="October" year="2018"/>
            </front>
            <seriesInfo name="Internet-Draft" value="draft-ietf-tls-exported-authenticator-08"/>
         </reference>
         <reference anchor="RFC2119">
            <front>
               <title>Key words for use in RFCs to Indicate Requirement Levels</title>
               <author fullname="S. Bradner" initials="S." surname="Bradner"/>
               <date month="March" year="1997"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
         </reference>
         <reference anchor="RFC8174">
            <front>
               <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
               <author fullname="B. Leiba" initials="B." surname="Leiba"/>
               <date month="May" year="2017"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
         </reference>
         <reference anchor="RFC6844">
            <front>
               <title>DNS Certification Authority Authorization (CAA) Resource Record</title>
               <author fullname="P. Hallam-Baker" initials="P." surname="Hallam-Baker"/>
               <author fullname="R. Stradling" initials="R." surname="Stradling"/>
               <date month="January" year="2013"/>
            </front>
            <seriesInfo name="RFC" value="6844"/>
            <seriesInfo name="DOI" value="10.17487/RFC6844"/>
         </reference>
         <reference anchor="RFC5280">
            <front>
               <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
               <author fullname="D. Cooper" initials="D." surname="Cooper"/>
               <author fullname="S. Santesson" initials="S." surname="Santesson"/>
               <author fullname="S. Farrell" initials="S." surname="Farrell"/>
               <author fullname="S. Boeyen" initials="S." surname="Boeyen"/>
               <author fullname="R. Housley" initials="R." surname="Housley"/>
               <author fullname="W. Polk" initials="W." surname="Polk"/>
               <date month="May" year="2008"/>
            </front>
            <seriesInfo name="RFC" value="5280"/>
            <seriesInfo name="DOI" value="10.17487/RFC5280"/>
         </reference>
      </references>
      <references title="Informative References">
         <reference anchor="RFC7838">
            <front>
               <title>HTTP Alternative Services</title>
               <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
               <author fullname="P. McManus" initials="P." surname="McManus"/>
               <author fullname="J. Reschke" initials="J." surname="Reschke"/>
               <date month="April" year="2016"/>
            </front>
            <seriesInfo name="RFC" value="7838"/>
            <seriesInfo name="DOI" value="10.17487/RFC7838"/>
         </reference>
         <reference anchor="RFC8336">
            <front>
               <title>The ORIGIN HTTP/2 Frame</title>
               <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
               <author fullname="E. Nygren" initials="E." surname="Nygren"/>
               <date month="March" year="2018"/>
            </front>
            <seriesInfo name="RFC" value="8336"/>
            <seriesInfo name="DOI" value="10.17487/RFC8336"/>
         </reference>
         <reference anchor="RFC5705">
            <front>
               <title>Keying Material Exporters for Transport Layer Security (TLS)</title>
               <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
               <date month="March" year="2010"/>
            </front>
            <seriesInfo name="RFC" value="5705"/>
            <seriesInfo name="DOI" value="10.17487/RFC5705"/>
         </reference>
      </references>
      <section anchor="change-log" title="Change Log">
         <t>
            <list style="empty">
               <t>
                  <spanx style="strong">RFC Editor’s Note:</spanx> Please remove this section prior to publication of a final version of this document.</t>
            </list>
         </t>
         <section anchor="since-draft-ietf-httpbis-http2-secondary-certs-03"
                  title="Since draft-ietf-httpbis-http2-secondary-certs-03:">
            <t>
               <list style="symbols">
                  <t>
                     <spanx style="verb">CERTIFICATE_REQUEST</spanx> frames contain the Request-ID, which MUST be checked against the <spanx style="verb">certificate_request_context</spanx> of the Exported Authenticator Request</t>
                  <t>
                     <spanx style="verb">CERTIFICATE</spanx> frames contain the Request-ID to which they respond, unless the UNSOLICITED flag is set</t>
                  <t>The Required Domain extension is defined for certificates, which must be present for certificates presented by servers</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-http2-secondary-certs-02"
                  title="Since draft-ietf-httpbis-http2-secondary-certs-02:">
            <t>Editorial updates only.</t>
         </section>
         <section anchor="since-draft-ietf-httpbis-http2-secondary-certs-01"
                  title="Since draft-ietf-httpbis-http2-secondary-certs-01:">
            <t>
               <list style="symbols">
                  <t>Clients can send <spanx style="verb">CERTIFICATE_NEEDED</spanx> for stream 0 rather than speculatively reserving a stream for an origin.</t>
                  <t>Use SETTINGS to disable when a TLS-terminating proxy is present (#617,#651)</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-http2-secondary-certs-00"
                  title="Since draft-ietf-httpbis-http2-secondary-certs-00:">
            <t>
               <list style="symbols">
                  <t>All frames sent on stream zero; replaced <spanx style="verb">AUTOMATIC_USE</spanx> on <spanx style="verb">CERTIFICATE</spanx> with <spanx style="verb">UNSOLICITED</spanx> on <spanx style="verb">USE_CERTIFICATE</spanx>. (#482,#566)</t>
                  <t>Use Exported Requests from the TLS Exported Authenticators draft; eliminate facilities for expressing certificate requirements in <spanx style="verb">CERTIFICATE_REQUEST</spanx> frame. (#481)</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-bishop-httpbis-http2-additional-certs-05"
                  title="Since draft-bishop-httpbis-http2-additional-certs-05:">
            <t>
               <list style="symbols">
                  <t>Adopted as draft-ietf-httpbis-http2-secondary-certs</t>
               </list>
            </t>
         </section>
      </section>
      <section anchor="ack" numbered="false" title="Acknowledgements">
         <t>Eric Rescorla pointed out several failings in an earlier revision. Andrei Popov contributed to the TLS considerations.</t>
         <t>A substantial portion of Mike’s work on this draft was supported by Microsoft during his employment there.</t>
      </section>
   </back>
</rfc>
