<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.19 (Ruby 2.7.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-joshco-symmetric-h2-00" category="info" submissionType="independent" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.23.2 -->
  <front>
    <title abbrev="symh2">Symmetric HTTP/2 Extension</title>
    <seriesInfo name="Internet-Draft" value="draft-joshco-symmetric-h2-00"/>
    <author initials="J." surname="Cohen" fullname="Josh Cohen">
      <organization>Self</organization>
      <address>
        <email>joshco@gmail.com</email>
      </address>
    </author>
    <date year="2024" month="October" day="20"/>
    <area>General</area>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 28?>

<t>This draft defines an HTTP/2 <xref target="RFC9113"/> extension to support Symmetric HTTP, which makes a simplifying assumption that the client-side HTTP server is only accessible and addressible by the server that accepted the HTTP/2 connection.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/joshco/sh2"/>.</t>
    </note>
  </front>
  <middle>
    <?line 32?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>This extension allows the client or browser to act as a web server which receives HTTP requests from the origin server and send responses back.  This is enabled by allowing server initiated streams to the client.  To avoid confusion over terminology...</t>
      <section anchor="terminology">
        <name>Terminology</name>
        <t>This document uses the following terminology.</t>
        <table>
          <thead>
            <tr>
              <th align="left">Term</th>
              <th align="left">Definition</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">Client</td>
              <td align="left">The HTTP/2 client that initiates an HTTP/2 connection to a server</td>
            </tr>
            <tr>
              <td align="left">Server</td>
              <td align="left">The HTTP/2 server that accepts an inbound connection from the client</td>
            </tr>
            <tr>
              <td align="left">Agent</td>
              <td align="left">An HTTP engine that processes incoming requests and generates responses</td>
            </tr>
            <tr>
              <td align="left">Client Agent</td>
              <td align="left">The Agent on the client</td>
            </tr>
            <tr>
              <td align="left">Server Agent</td>
              <td align="left">The Agent on the server</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="simplifying-assumption">
        <name>Simplifying Assumption</name>
        <t>A previous draft "Peer-to-peer Extension to HTTP/2" (<xref target="P2P"/>) attempted to create bidirectional HTTP/2 extension, but specified that the client authority needed to be verified out of band.</t>
        <t>Section 3 of (<xref target="P2P"/>) states:</t>
        <ul empty="true">
          <li>
            <t>a listener or coalescing intermediary has no in-
band method of validating that a dialer's authority claims are valid.
Therefore, a conforming listener <bcp14>MUST</bcp14> confirm a dialer's authority
claims using some out-of-band method.</t>
          </li>
        </ul>
        <t>This document attempts to sidestep that issue by having the client only accessible, or addressable by the HTTP/2 server that it opened an HTTP/2 connected to.  As a result, a real-world authority isn't necessary.</t>
        <t>Instead the client, known only to the server, is simply the "other side" of an HTTP/2 connection, and is specified according to the Client Authority section of this document.</t>
      </section>
    </section>
    <section anchor="http2-extensions">
      <name>HTTP/2 Extensions</name>
      <t>This document overrides HTTP/2 <xref target="RFC9113"/> section 5.1, where it says:</t>
      <ul empty="true">
        <li>
          <t>"If this stream is initiated by the server, as described in Section 5.1.1, then receiving a HEADERS frame <bcp14>MUST</bcp14> also be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR."</t>
        </li>
      </ul>
      <t>When operating in symmetric HTTP mode, this restriction is removed.</t>
      <section anchor="http2-settingssymmetric">
        <name>HTTP/2 SETTINGS_SYMMETRIC</name>
        <t>This document introduces a new HTTP/2 setting SETTINGS_SYMMETRIC.</t>
        <t>When SETTINGS_SYMMETRIC (0xTBA) is set to 1, it informs the server that the client supports server initiated streams which carry HTTP/2 requests to the client and responses to the server.</t>
        <t>This setting <bcp14>MUST NOT</bcp14> be emitted by the server. If the client receives this setting from the server, it must respond with a conection error  <xref target="HTTP2"/> Section 5.4.1) of type PROTOCOL ERROR.</t>
      </section>
      <section anchor="client-authority">
        <name>Client Authority</name>
        <section anchor="http2-authority">
          <name>HTTP/2 Authority</name>
          <t>In the use of symmetric HTTP, when the server sends an HTTP message to the client agent, the <tt>authority</tt> header is either:</t>
          <ul spacing="normal">
            <li>
              <t>Omitted</t>
            </li>
            <li>
              <t>Set to the value of <tt>TBA_TOKEN</tt></t>
            </li>
          </ul>
        </section>
        <section anchor="client-known-urn">
          <name>Client Known URN</name>
          <t>In situations where a client needs to provide a URI to the server, for example to register a subscription, it <bcp14>MUST</bcp14> use the following URN as a prefix.</t>
          <t>For example, if the client wishes to receive HTTP messages as a specific path, <tt>/foo</tt>, the URI would be:</t>
          <t><tt>urn:symmetric_http:client/foo</tt></t>
        </section>
      </section>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This document defines the client and client agent to be only accessible and addressable from the HTTP/2 server it has connected to.  It is not yet known if there are viable exploits that would allow a third party to access the client agent using symmetric HTTP.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="http2-settings-registry-update">
        <name>HTTP/2 Settings Registry Update</name>
        <t>This document updates the registry for HTTP/2 Settings to add SETTINGS_SYMMETRIC, ID=0xTBA, which can have a value of 1 or 0.</t>
      </section>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="RFC9113">
        <front>
          <title>HTTP/2</title>
          <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson"/>
          <author fullname="C. Benfield" initials="C." role="editor" surname="Benfield"/>
          <date month="June" year="2022"/>
          <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 latency by introducing field compression and allowing multiple concurrent exchanges on the same connection.</t>
            <t>This document obsoletes RFCs 7540 and 8740.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9113"/>
        <seriesInfo name="DOI" value="10.17487/RFC9113"/>
      </reference>
      <reference anchor="P2P">
        <front>
          <title>Peer-to-peer Extension to HTTP/2</title>
          <author fullname="Cory Benfield" initials="C." surname="Benfield">
         </author>
          <date day="9" month="October" year="2015"/>
          <abstract>
            <t>   This document introduces a negotiated extension to HTTP/2 that turns
   a single HTTP/2 connection into a bi-directional communication
   channel.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-benfield-http2-p2p-02"/>
      </reference>
      <reference anchor="HTTP2">
        <front>
          <title>HTTP/2</title>
          <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson"/>
          <author fullname="C. Benfield" initials="C." role="editor" surname="Benfield"/>
          <date month="June" year="2022"/>
          <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 latency by introducing field compression and allowing multiple concurrent exchanges on the same connection.</t>
            <t>This document obsoletes RFCs 7540 and 8740.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9113"/>
        <seriesInfo name="DOI" value="10.17487/RFC9113"/>
      </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"/>
          <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="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"/>
          <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>
    </references>
    <?line 138?>

<section anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>This document draws wisdom and inspiration from Cory Benfield's Intenet Draft from 2015, "Peer-to-peer Extension to HTTP/2", draft-benfield-http2-p2p-02 (<xref target="P2P"/>).</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA81Y7Y7bNhb9r6dgnR9NCsu13RTbGE1ax+M2bifjWduDIiiK
GVqkLXYkUiUpO9om79Jn6ZPtvaQ+7WmzQIFg/WNGosTL+3F47qHCMAyssAmf
kN66SFNutYjIq83m+vMxmb+1XBqhZC+g263mB3jJFGk87gVMRZKmMItpurPh
r8rEkQpNZSGMx+FwGETU8r3SxYQIuVNBIDI9IVbnxo6Hw2fDcUA1pxPyPZdc
0yS458VRaTYhC2m5ltyGF2g9MBZeS9EI4xmHP9IGMEglu6WJkuBFwU1gUqrt
7W+5stxMiFRBJibkZ6uiP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