<?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-01" 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-01"/>
    <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="21"/>
    <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.</t>
      <t>Resources on the client side of an HTTP/2 connection are addressed using a URN prefix.  The path /foo on the client is addressed as</t>
      <t><tt>urn:symmetric_http:client/foo</tt></t>
      <t>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 144?>

<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:
H4sIAAAAAAAAA81YbXPbNhL+jl+BKh+adETVUtO5RtOkVWy3UetYPkmem0yn
Y0MkJKEmARYAreia/Jf7LffLbnfBV8m5dKYzmeqDTYLEYvfB7rMPGEUR88qn
csx7i32WSW9VzF8tl1dfjvj5Wy+1U0b3mFitrLyHl9w+2456LDGxFhnMSqxY
++g347axiVxlIdqOopMhi4WXG2P3Y6702jCmcjvm3hbOj05Onp2MmLBSjPm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