<?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-rfc2629 version 1.6.5 (Ruby 3.0.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-schwartz-masque-access-descriptions-00" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.3 -->
  <front>
    <title abbrev="HTTP Access Service Descriptions">HTTP Access Service Description Objects</title>
    <seriesInfo name="Internet-Draft" value="draft-schwartz-masque-access-descriptions-00"/>
    <author fullname="Benjamin M. Schwartz">
      <organization>Google LLC</organization>
      <address>
        <email>bemasc@google.com</email>
      </address>
    </author>
    <date year="2022" month="April" day="07"/>
    <area>Transport</area>
    <workgroup>Multiplexed Application Substrate over QUIC Encryption</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>HTTP proxies can operate several different kinds of access services.  This specification provides a format for identifying a collection of such services.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-schwartz-masque-access-descriptions/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/bemasc/access-services"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>In HTTP/1.1, forward proxy service was originally defined in two ways: absolute-uri request form (encrypted at most hop-by-hop), and HTTP CONNECT (potentially encrypted end-to-end).  Both of these services were effectively origin-scoped: the access service was a property of the origin, not associated with any particular path.</t>
      <t>Recently, a variety of new standardized proxy-like services have emerged for HTTP.  These new services are defined by a URI template or path, allowing distinct instances of the same service type to be served by a single origin.  These services include:</t>
      <ul spacing="normal">
        <li>DNS over HTTPS <xref target="RFC8484"/></li>
        <li>CONNECT-UDP <xref target="I-D.draft-ietf-masque-connect-udp"/></li>
        <li>CONNECT-IP <xref target="I-D.draft-ietf-masque-connect-ip"/></li>
        <li>Oblivious HTTP <xref target="I-D.draft-ietf-ohai-ohttp"/></li>
      </ul>
      <t>This specification provides a unified format for describing a collection of such access services, and a mechanism for reaching such services when the initial information contains only an HTTP origin.</t>
    </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>
    </section>
    <section anchor="format">
      <name>Format</name>
      <t>An access service collection is defined by a JSON dictionary containing keys specified in the corresponding registry (<xref target="iana"/>).  Inclusion of each key is <bcp14>OPTIONAL</bcp14>.</t>
      <t>The "dns", "udp", and "ip" keys are each defined to hold a JSON dictionary containing the key "template" with a value that is a URI template suitable for configuring DNS over HTTPS, CONNECT-UDP, or CONNECT-IP, respectively.</t>
      <t>The "ohttp" key contains a dictionary with either or both of these keys:</t>
      <ul spacing="normal">
        <li>"proxy", containing a dictionary with a "template" key indicating the Oblivious Proxy's resource mapping.  The template <bcp14>MUST</bcp14> contain a "request_uri" variable indicating the Oblivious Request Resource.</li>
        <li>"request", containing a dictionary with a "uri" key indicating the Oblivious Request Resource and a "key" key conveying its KeyConfig in base64.</li>
      </ul>
      <t>If the Access Description is for a general-purpose proxy, all Oblivious Request Resources and Targets (respectively) are presumed to be supported; otherwise the supported Resources and Targets must be understood from context (but see <xref target="well-known"/>).</t>
      <section anchor="examples">
        <name>Examples</name>
        <figure>
          <name>A proxy with UDP, IP, DNS, and Oblivious HTTP support</name>
          <sourcecode type="JSON"><![CDATA[
{
  "dns": {
    "template": "https://doh.example.com/dns-query{?dns}",
  },
  "udp": {
    "template":
        "https://proxy.example.org/masque{?target_host,target_port}"
  },
  "ip": {
    "template": "https://proxy.example.org/masque{?target,ip_proto}"
  },
  "ohttp": {
    "proxy": {
      "template": "https://proxy.example.org/ohttp{?request_uri}"
    }
  }
}
]]></sourcecode>
        </figure>
        <figure>
          <name>An Oblivious DNS over HTTPS service</name>
          <sourcecode type="JSON"><![CDATA[
{
  "dns": {
    "template": "https://doh.example.com/dns-query{?dns}",
  },
  "ohttp": {
    "request": {
      "uri": "https://example.com/ohttp/",
      "key": "(KeyConfig in Base64)"
    }
  }
}
]]></sourcecode>
        </figure>
      </section>
    </section>
    <section anchor="well-known">
      <name>Discovery from an Origin</name>
      <t>In cases where the HTTP access service is identified only by an origin (e.g. when configured as a Secure Web Proxy), operators can publish an associated access service collection at the path "/.well-known/access-services", with the Content-Type "application/json".</t>
      <t>When the "ohttp.request" URI appears in an Access Description at this location, all URIs on this origin (except the Oblivious Request URI) are presumed to be reachable as Oblivious Request Targets.</t>
      <t>Clients <bcp14>MAY</bcp14> fetch this Access Description and use the indicated services (in addition to any origin-scoped services) automatically.  Clients <bcp14>SHOULD</bcp14> use the description only while it is fresh according to its HTTP cache lifetime, refreshing it as needed.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>TODO Security</t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>IANA is requested to open a Specification Required registry entitled "HTTP Access Service Descriptors", with the following initial contents:</t>
      <table>
        <thead>
          <tr>
            <th align="left">Key</th>
            <th align="left">Specification</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">dns</td>
            <td align="left">(This document)</td>
          </tr>
          <tr>
            <td align="left">udp</td>
            <td align="left">(This document)</td>
          </tr>
          <tr>
            <td align="left">ip</td>
            <td align="left">(This document)</td>
          </tr>
          <tr>
            <td align="left">ohttp</td>
            <td align="left">(This document)</td>
          </tr>
        </tbody>
      </table>
      <t>IANA is requested to add the following entry to the "Well-Known URIs" registry</t>
      <table>
        <thead>
          <tr>
            <th align="left">URI Suffix</th>
            <th align="left">Change Controller</th>
            <th align="left">Reference</th>
            <th align="left">Status</th>
            <th align="left">Related Information</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">access-services</td>
            <td align="left">IETF</td>
            <td align="left">(This document)</td>
            <td align="left">provisional</td>
            <td align="left">Sub-registry at (link)</td>
          </tr>
        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC8484">
        <front>
          <title>DNS Queries over HTTPS (DoH)</title>
          <author fullname="P. Hoffman" initials="P." surname="Hoffman">
            <organization/>
          </author>
          <author fullname="P. McManus" initials="P." surname="McManus">
            <organization/>
          </author>
          <date month="October" year="2018"/>
          <abstract>
            <t>This document defines a protocol for sending DNS queries and getting DNS responses over HTTPS.  Each DNS query-response pair is mapped into an HTTP exchange.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8484"/>
        <seriesInfo name="DOI" value="10.17487/RFC8484"/>
      </reference>
      <reference anchor="I-D.draft-ietf-masque-connect-udp">
        <front>
          <title>UDP Proxying Support for HTTP</title>
          <author fullname="David Schinazi">
            <organization>Google LLC</organization>
          </author>
          <date day="21" month="March" year="2022"/>
          <abstract>
            <t>   This document describes how to proxy UDP over HTTP.  Similar to how
   the CONNECT method allows proxying TCP over HTTP, this document
   defines a new mechanism to proxy UDP.  It is built using HTTP
   Extended CONNECT.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-masque-connect-udp-08"/>
      </reference>
      <reference anchor="I-D.draft-ietf-masque-connect-ip">
        <front>
          <title>IP Proxying Support for HTTP</title>
          <author fullname="Tommy Pauly">
            <organization>Apple Inc.</organization>
          </author>
          <author fullname="David Schinazi">
            <organization>Google LLC</organization>
          </author>
          <author fullname="Alex Chernyakhovsky">
            <organization>Google LLC</organization>
          </author>
          <author fullname="Mirja Kuehlewind">
            <organization>Ericsson</organization>
          </author>
          <author fullname="Magnus Westerlund">
            <organization>Ericsson</organization>
          </author>
          <date day="4" month="March" year="2022"/>
          <abstract>
            <t>   This document describes a method of proxying IP packets over HTTP.
   This protocol is similar to CONNECT-UDP, but allows transmitting
   arbitrary IP packets, without being limited to just TCP like CONNECT
   or UDP like CONNECT-UDP.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-masque-connect-ip-01"/>
      </reference>
      <reference anchor="I-D.draft-ietf-ohai-ohttp">
        <front>
          <title>Oblivious HTTP</title>
          <author fullname="Martin Thomson">
            <organization>Mozilla</organization>
          </author>
          <author fullname="Christopher A. Wood">
            <organization>Cloudflare</organization>
          </author>
          <date day="15" month="February" year="2022"/>
          <abstract>
            <t>   This document describes a system for the forwarding of encrypted HTTP
   messages.  This allows a client to make multiple requests of a server
   without the server being able to link those requests to the client or
   to identify the requests as having come from the same client.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-ohai-ohttp-01"/>
      </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">
            <organization/>
          </author>
          <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">
            <organization/>
          </author>
          <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>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAERHT2IAA7VY3XIayRW+n6fojC8ibWnQKnElGyWbjQxyTFYWjsDl2kql
XM1MA20N3ZPpHhDG+FnyLHmyfOf0DAwIKb4JFzDTP+f/fOcckiSJvPa5uhTx
m9HonbhKU+WcGKpyoVMlesqlpS68tkYMxp9U6l0cyfG4VIv/fQNHU+nV1Jar
S+F8FkWZTY2cg1lWyolPXDpbytJ/TubS/atSiWRSSdYikXz/fQRWv41kqSRY
jkppXGFLH0dLW95PS1sVWH5b5V4XuXpQmbgqilyDMck8rMbOlxBC2IUqxd/f
97vi2qTliqnH0b1agUx2KfrGq9Ion/RIsmihTKUuIyGm2s+qMTiMFYRMz2sR
XdAWGkay8jNb4myC40JMqjwPOr5S5pOcayPedsSw1pSP2HIqjf7MEl6Kv1o7
zZW4uenyJtjo/FIEdn+Z8mYntfMoMrac484CckXaTFpvUZIkQrKmqY8idktR
2getnEilEbZQbAOnYASZi0xPJqpUxot7bTIn7EQEvUSjV0eI0UzjvVCpnjTW
BM2FhneEFIE9/QisGK8nK22m2EhtniNM6DjIuiqd7YjWks51luUqil6Q1Uub
VXw8ivpGkOjnF52LM6IMi2Wsx6ohIZYS0pZ6qo3M85XI1EQbuBxG9kuL3ZW7
JEPYvPIqqUotSoXAcizoXJyo4HrcgOxzi/WZLZLxKsHP6ZmQJmMJRHdwe3vd
HYmTwnpSjpntLiuTJd4m+DmFoV5ZPy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