<?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.6.11 (Ruby 3.1.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-schwartz-masque-access-descriptions-02" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.10 -->
  <front>
    <title abbrev="HTTP Access Descriptions">HTTP Access Service Description Objects</title>
    <seriesInfo name="Internet-Draft" value="draft-schwartz-masque-access-descriptions-02"/>
    <author fullname="Benjamin M. Schwartz">
      <organization>Google LLC</organization>
      <address>
        <email>bemasc@google.com</email>
      </address>
    </author>
    <date year="2022" month="July" day="01"/>
    <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>.  The corresponding media type is <tt>application/access-services+json</tt>.</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>"relay", containing a dictionary with a "template" key indicating the Oblivious Relay's resource mapping.  The template <bcp14>MUST</bcp14> contain a "gateway_uri" variable indicating the Oblivious Gateway Resource.</li>
        <li>"gateway", containing a dictionary with a "uri" key indicating the Oblivious Gateway 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 Gateways and proxy targets (respectively) are presumed to be supported; otherwise the supported Gateways 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": {
    "relay": {
      "template": "https://proxy.example.org/ohttp{?gateway_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": {
    "gateway": {
      "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/access-services+json".</t>
      <t>When the "ohttp.gateway" URI appears in an Access Description at this location, all URIs on this origin (except the Oblivious Gateway URI) are presumed to be reachable as Oblivious 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>
      <t>IANA is requested to add the following entry to the "application" sub-registry of the "Media Types" registry:</t>
      <table>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Template</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">access-services+json</td>
            <td align="left">application/access-services+json</td>
            <td align="left">(This document)</td>
          </tr>
        </tbody>
      </table>
      <ul empty="true">
        <li>
          <t>TODO: Full registration template for this Media Type.</t>
        </li>
      </ul>
    </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>Proxying UDP in HTTP</title>
          <author fullname="David Schinazi">
            <organization>Google LLC</organization>
          </author>
          <date day="17" month="June" year="2022"/>
          <abstract>
            <t>   This document describes how to proxy UDP in HTTP, similar to how the
   HTTP CONNECT method allows proxying TCP in HTTP.  More specifically,
   this document defines a protocol that allows an HTTP client to create
   a tunnel for UDP communications through an HTTP server that acts as a
   proxy.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-masque-connect-udp-15"/>
      </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:
H4sIAAAAAAAAA7VY23LbyBF9x1dM4IdIG4GKNqpkw2TXkUl5zawkOiJdrq1U
yjsEhuRY4AwWGIiiJfpb8i35spzuAUCQomRXqsIHkphL3/t0N6IoCpx2qeqK
8M14/FacxbEqCjFS+a2OleirIs515rQ1Yjj5qGJXhIGcTHJ1u3OjdRJHYunU
zOarrihcEgSJjY1cgEmSy6mLini+lLn7FC1k8WupIskkoqRFIvr9twFY/CGQ
uZJgNc6lKTKbuzBY2vxmltsyw/JlmTqdpepOJeIsy1INxiTrqJwULocQwt6q
XPzj3aAnzk2cr5h6GNyoFcgkXTEwTuVGuahPkgW3ypSqGwgx025eTsBhoiBk
fFyJWHi7QMNAlm5uc5yNcFyIaZmmXsdXynyUC23EZUeMKk35iM1n0uhPLGFX
/GjtLFXi4qLHm2Cj067w7P42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