<?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.3.8 -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-vvv-httpbis-alps-00" category="std" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 2.43.0 -->
  <front>
    <title abbrev="HTTP ALPS">Using TLS Application-Layer Protocol Settings (ALPS) in HTTP</title>
    <seriesInfo name="Internet-Draft" value="draft-vvv-httpbis-alps"/>
    <author initials="V." surname="Vasiliev" fullname="Victor Vasiliev">
      <organization>Google</organization>
      <address>
        <email>vasilvv@google.com</email>
      </address>
    </author>
    <date year="2020" month="July" day="06"/>
    <area>General</area>
    <workgroup>HTTP Working Group</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document describes the use of TLS Application-Level Protocol Settings
(ALPS) in HTTP/2 and HTTP/3.  Additionally, it defines a set of additional HTTP
SETTINGS parameters that would normally be impractical without ALPS.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Discussion of this document takes place on the
  HTTPBIS Working Group mailing list (httpbis@ietf.org),
  which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/httpbis/">https://mailarchive.ietf.org/arch/browse/httpbis/</eref>.</t>
      <t>Source for this draft and an issue tracker can be found at
  <eref target="https://github.com/vasilvv/httpbis-alps">https://github.com/vasilvv/httpbis-alps</eref>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>HTTP/2 defines a mechanism for exchanging the protocol settings using a
SETTINGS frame (<xref target="RFC7540" format="default"/>, Section 6.5).  HTTP/3 uses a similar mechanism
(<xref target="HTTP3" format="default"/>, Section 7.2.4).  One of the properties of the mechanism as defined by
both of those protocols is that the parties start out without having access to
the entirety of the peer's settings.  This means that they have to initially
operate using the default settings, and after receiving the SETTINGS frame,
they have to find a way to transition from the default to the exchanged
settings.</t>
      <t>HTTP is commonly used in conjunction with TLS.  TLS performs its own handshake
that precedes any data being exchanged by the HTTP layer itself.  The TLS
Application-Level Protocol Settings extension <xref target="ALPS" format="default"/> allows settings
negotiation to be performed within the TLS handshake, thus making the result
immediately available to the HTTP layer as soon as the handshake completes.
This removes the need for synchronizing settings, and makes them available
earlier than they would be otherwise.</t>
      <t>This document defines how ALPS is used with HTTP/2 and HTTP/3, and introduces
certain new settings that would not be practical without ALPS.</t>
    </section>
    <section anchor="conventions-and-definitions" numbered="true" toc="default">
      <name>Conventions and Definitions</name>
      <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" format="default"/> <xref target="RFC8174" format="default"/>
when, and only when, they appear in all capitals, as shown here.</t>
    </section>
    <section anchor="use-of-alps-in-http" numbered="true" toc="default">
      <name>Use of ALPS in HTTP</name>
      <t>If ALPS is successfully negotiated during the TLS handshake for an HTTP/2
connection, the ALPS payload for both peers SHALL be a sequence of HTTP/2
frames.  Frames SHALL NOT be present in ALPS unless they are explicitly allowed
to be there; this document only allows the SETTINGS frame (<xref target="RFC7540" format="default"/>,
Section 6.5.1).  Sending a SETTINGS frame in ALPS supersedes the requirement to
send a SETTINGS frame at the beginning of the connection.  All settings
exchanged via ALPS SHALL be automatically treated as acknowledged.</t>
      <t>If ALPS is successfully negotiated during TLS handshake for an HTTP/3
connection, the ALPS payload for both peers SHALL be a sequence of HTTP/3
frames.  Frames SHALL NOT be present in ALPS unless they are explicitly allowed
to be there; this document only allows the SETTINGS frame (<xref target="HTTP3" format="default"/>, Section
7.2.4).  Sending a SETTINGS frame in ALPS supersedes the requirement to send a
SETTINGS frame at the beginning of the control stream.</t>
      <t>Since settings exchanged through ALPS are always available at the beginning of
the connection, some HTTP extensions may opt to require those to be sent
through ALPS.  Such extensions are exempt from the initialization requirements
of the Section 7.2.4.2 of <xref target="HTTP3" format="default"/>.</t>
    </section>
    <section anchor="new-settings" numbered="true" toc="default">
      <name>New Settings</name>
      <t>In addition to specifying the use of ALPS, this document introduces a way for
an endpoint to use HTTP/2 and HTTP/3 without any form of header compression.
Previously, using SETTINGS to opt into the use of header compression would
result in the first flight of requests being sent fully uncompressed; ALPS
provides settings before any of the requests are sent, thus removing that
concern.</t>
      <t>The following new HTTP/2 setting is introduced:</t>
      <dl newline="false" spacing="normal">
        <dt>SETTINGS_HPACK_ENABLE_STATIC_TABLES (0x??):</dt>
        <dd>
  May be "0" or "1".  If set to "0", the only allowed HPACK instructions are
"Literal Header Field without Indexing" and "Literal Header Field Never
Indexed" (Sections 6.2.2 and 6.2.3 of <xref target="RFC7541" format="default"/>), with index set to "0",
and the "H" bit set to zero for both string literals.  The default value is
"1".</dd>
      </dl>
      <t>The following new HTTP/3 setting is introduced:</t>
      <dl newline="false" spacing="normal">
        <dt>SETTINGS_QPACK_ENABLE_STATIC_TABLES (0x??):</dt>
        <dd>
  May be "0" or "1".  If set to "0", the only allowed QPACK instruction is
"Literal Field Line Without Name Reference", with the "H" bit set to zero
for both string literals.  The default value is "1".</dd>
      </dl>
      <t>Those settings MUST be supported by any endpoint that uses ALPS in conjunction
with HTTP/2 or HTTP/3.  Both of those settings MUST NOT be sent outside of the
ALPS.</t>
    </section>
    <section anchor="security-considerations" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>In ALPS, both client and server settings are sent encrypted.  Settings
communicated through ALPS are presented to all clients before they are
authenticated; thus, if a server relies on TLS client authentication and
considers its settings private, it MUST NOT use the mechanism defined in this
document.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>IANA will add an "Allowed in ALPS" column to the "HTTP/2 Frames" section of the
"Hypertext Transfer Protocol version 2 (HTTP/2) Parameters" registry, with a
value set to "Yes" for SETTINGS (0x4), and to "No" for all other previously
defined settings.</t>
      <t>IANA will add the following entry into the "HTTP/2 Settings" table:</t>
      <dl newline="false" spacing="normal">
        <dt>Code</dt>
        <dd>
  0x??</dd>
        <dt>Name</dt>
        <dd>
  HPACK_ENABLE_STATIC_TABLES</dd>
        <dt>Initial Value</dt>
        <dd>
  1</dd>
        <dt>ALPS Only</dt>
        <dd>
  Yes</dd>
        <dt>Reference</dt>
        <dd>
  This document</dd>
      </dl>
      <t>TODO: Add HTTP/3 once IANA has an HTTP/3 registry.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="BCP" value="14"/>
          <author initials="S." surname="Bradner" fullname="S. Bradner">
            <organization/>
          </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>
      </reference>
      <reference anchor="HTTP3">
        <front>
          <title>Hypertext Transfer Protocol Version 3 (HTTP/3)</title>
          <seriesInfo name="Internet-Draft" value="draft-ietf-quic-http-latest"/>
          <author initials="M." surname="Bishop" fullname="Mike Bishop" role="editor">
            <organization>Akamai Technologies</organization>
          </author>
          <date/>
        </front>
      </reference>
      <reference anchor="ALPS">
        <front>
          <title>TLS Application-Layer Protocol Settings Extension</title>
          <seriesInfo name="Internet-Draft" value="draft-vvv-tls-alps-latest"/>
          <author initials="V." surname="Vasiliev" fullname="Victor Vasiliev">
            <organization>Google</organization>
          </author>
          <date/>
        </front>
      </reference>
      <reference anchor="RFC7540" target="https://www.rfc-editor.org/info/rfc7540">
        <front>
          <title>Hypertext Transfer Protocol Version 2 (HTTP/2)</title>
          <seriesInfo name="DOI" value="10.17487/RFC7540"/>
          <seriesInfo name="RFC" value="7540"/>
          <author initials="M." surname="Belshe" fullname="M. Belshe">
            <organization/>
          </author>
          <author initials="R." surname="Peon" fullname="R. Peon">
            <organization/>
          </author>
          <author initials="M." surname="Thomson" fullname="M. Thomson" role="editor">
            <organization/>
          </author>
          <date year="2015" month="May"/>
          <abstract>
            <t>This specification describes an optimized expression of the semantics of the Hypertext Transfer Protocol (HTTP), referred to as HTTP version 2 (HTTP/2).  HTTP/2 enables a more efficient use of network resources and a reduced perception of latency by introducing header field compression and allowing multiple concurrent exchanges on the same connection.  It also introduces unsolicited push of representations from servers to clients.</t>
            <t>This specification is an alternative to, but does not obsolete, the HTTP/1.1 message syntax.  HTTP's existing semantics remain unchanged.</t>
          </abstract>
        </front>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="BCP" value="14"/>
          <author initials="B." surname="Leiba" fullname="B. Leiba">
            <organization/>
          </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>
      </reference>
      <reference anchor="RFC7541" target="https://www.rfc-editor.org/info/rfc7541">
        <front>
          <title>HPACK: Header Compression for HTTP/2</title>
          <seriesInfo name="DOI" value="10.17487/RFC7541"/>
          <seriesInfo name="RFC" value="7541"/>
          <author initials="R." surname="Peon" fullname="R. Peon">
            <organization/>
          </author>
          <author initials="H." surname="Ruellan" fullname="H. Ruellan">
            <organization/>
          </author>
          <date year="2015" month="May"/>
          <abstract>
            <t>This specification defines HPACK, a compression format for efficiently representing HTTP header fields, to be used in HTTP/2.</t>
          </abstract>
        </front>
      </reference>
    </references>
    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t>This document has benefited from contributions and suggestions from
David Benjamin,
Nick Harper,
David Schinazi,
and many others.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAJBtA18AA81Y728bNxL9zr+Ct/1wMSCpsZ1erioOPcV2aqOO7UZKiqIo
AmqXklivyC25K0cJ/L/fmyF3V7KTokXvgPMXr3b5Y+bNmzdDDodDUZu61GOZ
vQnGLuXscionVVWaXNXG2eGl2movb7yrXe5KOdV1jWFBPplc3kwPpLHyfDa7
yYSaz73eYBn6KeljJgqXW7XG2oVXi3q42WyGq7qu5iYMVVkFgS300vntWIa6
EMJUfixr34T66OnTr58eCeW1GsvvtNVeleLO+duld0015i3lj/hNFn9H78St
3mJAMZYXttbe6np4SpsKEWpli3eqdBaGbHUQlRnLn+HNQAbna68XAU/bNT38
IoRq6pXzYyGHQuLP2DCWb0fyrQqmNHrDL6NTb01eO7//xfmlsuYDQwfLnVuW
mj/otTLlWG5o8Gbz7yV/GeVuLYR1fo0JG41N5euXJ0eHh1/TIzl5PObZbYjO
t5X2tX5fy5lXNix2I/NW+4Bd5bF8QjO/PD7IeG4BkMfy4+lkdnbPL4L2RiPW
CxcXlw8ga8NldL0Y/taYnIM2LLFOqHlGhxH/DdP/Dq5XI/nChJWrdj5EyF6Z
W/34G0Aby8mtAkRypvOVdaVbwsSdId6R/7owQByviV77yPxR2p69r7UlnP4i
OMTluow8/hPQPGTSLjif4tMOQIlMgmzrCCPEcDiUah5qr3KQfbYyQSLtmrW2
tSx0yL2Z6yDrlZZN0NItHie43ujyMVJiP8G/PJJIo/h4PEIECsQC01VZbgfS
0F4LY7GTAoQ17aO6ETxLTM9ms4ur76ayUh7+AlQyS9XyzjVlITkLsJica2nW
FbkDC0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