<?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-01" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.10 -->
  <front>
    <title abbrev="HTTP Access Service Descriptions">HTTP Access Service Description Objects</title>
    <seriesInfo name="Internet-Draft" value="draft-schwartz-masque-access-descriptions-01"/>
    <author fullname="Benjamin M. Schwartz">
      <organization>Google LLC</organization>
      <address>
        <email>bemasc@google.com</email>
      </address>
    </author>
    <date year="2022" month="June" day="28"/>
    <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>"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/access-services+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>
      <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:
H4sIAAAAAAAAA7VY23LbyBF9x1dM4IdIG4GKNq5ko2R3I1NyzKwkOiJdrq1U
yjsEhuRY4AyCGYiiJflb8i35spzuAUCQomRXqsIHkphL3/t0N5Ikibz2uToW
8Zvx+K04SVPlnBip8kanSpwql5a68NoaMZx8VKl3cSQnk1LdfPkGjqbSq5kt
V8fC+SyKMpsauQCzrJRTn7h0vpSl/5QspPtXpRLJpJKsQyL57VEEVr+LZKkk
WI5LaVxhSx9HS1tez0pbFVi+qHKvi1zdqkycFEWuwZhkHlUT50sIIeyNKsXf
3w364syk5Yqpx9G1WoFMdiwGxqvSKJ+ckmTRjTKVOo6EmGk/rybgMFEQMj2s
RXRBW2gYycrPbYmzCY4LMa3yPOj4SpmPcqGNuOiJUa0pH7HlTBr9iSU8Fn+1
dpYrcX7e502w0fmxCOz+MuPNXm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