<?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.17 (Ruby 3.1.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-schwartz-masque-access-descriptions-03" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.15.1 -->
  <front>
    <title abbrev="HTTP Access Descriptions">HTTP Access Service Description Objects</title>
    <seriesInfo name="Internet-Draft" value="draft-schwartz-masque-access-descriptions-03"/>
    <author fullname="Benjamin M. Schwartz">
      <organization>Google LLC</organization>
      <address>
        <email>bemasc@google.com</email>
      </address>
    </author>
    <date year="2022" month="October" day="18"/>
    <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, 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="RFC9298"/></li>
        <li>CONNECT-IP <xref target="I-D.draft-ietf-masque-connect-ip"/></li>
        <li>Modern HTTP Proxies <xref target="I-D.draft-schwartz-modern-http-proxies"/></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 initially defined keys are "http", tcp", "dns", "udp", and "ip".  Each of these keys holds a JSON dictionary containing the key "template" with a value that is a URI template suitable for configuring a Modern HTTP proxy, Modern TCP Transport Proxy, DNS over HTTPS, CONNECT-UDP, or CONNECT-IP, respectively.  (Future keys might hold other JSON types.)</t>
      <t>If the Access Description is for a general-purpose proxy, all proxy targets are presumed to be supported.  Otherwise, the supported targets must be understood from context.</t>
      <figure>
        <name>An example proxy with many supported services</name>
        <sourcecode type="JSON"><![CDATA[
{
  "http": {
    "template": "https://proxy.example.org/http{?target_uri}"
  },
  "tcp": {
    "template":
        "https://proxy.example.org/tcp{?target_host,tcp_port}"
  },
  "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}"
  }
}
]]></sourcecode>
      </figure>
    </section>
    <section anchor="client-authentication">
      <name>Client Authentication</name>
      <t>General-purpose clients of this specification <bcp14>SHOULD</bcp14> also implement support for Popup Authentication <xref target="I-D.draft-schwartz-httpapi-popup-authentication"/> when fetching the Access Description.  If Popup Authentication produced any Authorization or Cookie headers for the Access Description, the client <bcp14>MUST</bcp14> also apply those headers to any HTTP requests made using the included templates (subject to proxy-specific modifications, see <xref section="4.3" sectionFormat="of" target="I-D.draft-schwartz-httpapi-popup-authentication"/>).  These headers are applied even if the Access Description and the included services are on different HTTP origins.</t>
      <t>This arrangement allows the use of Access Descriptions to describe access-controlled services, and avoids asking the user to authenticate separately with each service.</t>
    </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>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">http</td>
            <td align="left">(This document)</td>
          </tr>
          <tr>
            <td align="left">tcp</td>
            <td align="left">(This document)</td>
          </tr>
          <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>
        </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="RFC9298">
        <front>
          <title>Proxying UDP in HTTP</title>
          <author fullname="D. Schinazi" initials="D." surname="Schinazi">
            <organization/>
          </author>
          <date month="August" 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="RFC" value="9298"/>
        <seriesInfo name="DOI" value="10.17487/RFC9298"/>
      </reference>
      <reference anchor="I-D.draft-ietf-masque-connect-ip">
        <front>
          <title>IP Proxying Support for HTTP</title>
          <author fullname="Tommy Pauly" initials="T." surname="Pauly">
            <organization>Apple Inc.</organization>
          </author>
          <author fullname="David Schinazi" initials="D." surname="Schinazi">
            <organization>Google LLC</organization>
          </author>
          <author fullname="Alex Chernyakhovsky" initials="A." surname="Chernyakhovsky">
            <organization>Google LLC</organization>
          </author>
          <author fullname="Mirja Kühlewind" initials="M." surname="Kühlewind">
            <organization>Ericsson</organization>
          </author>
          <author fullname="Magnus Westerlund" initials="M." surname="Westerlund">
            <organization>Ericsson</organization>
          </author>
          <date day="27" month="September" 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-03"/>
      </reference>
      <reference anchor="I-D.draft-schwartz-modern-http-proxies">
        <front>
          <title>Modernizing HTTP Forward Proxy Functionality</title>
          <author fullname="Benjamin M. Schwartz" initials="B. M." surname="Schwartz">
            <organization>Google LLC</organization>
          </author>
          <date day="14" month="October" year="2022"/>
          <abstract>
            <t>   HTTP proxying features have long been part of the core HTTP
   specification.  However, the core proxying functionality has several
   important deficiencies in modern HTTP environments.  This
   specification defines alternative proxy service configurations for
   HTTP requests and TCP connections.  These services are identified by
   URI Templates and designed for parallelism with DoH, MASQUE, and
   Oblivious HTTP.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-schwartz-modern-http-proxies-00"/>
      </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>
      <reference anchor="I-D.draft-schwartz-httpapi-popup-authentication">
        <front>
          <title>Interactive Authentication of Non-Interactive HTTP Requests</title>
          <author fullname="Benjamin M. Schwartz" initials="B. M." surname="Schwartz">
            <organization>Google LLC</organization>
          </author>
          <date day="17" month="October" year="2022"/>
          <abstract>
            <t>   On the World Wide Web, a rich ecosystem of authentication options has
   been developed to support access control for HTTP resources.
   However, non-interactive usage of HTTP remains limited to the simple
   authentication mechanisms defined in the HTTP standards.  This
   specification allows non-interactive HTTP contexts to open a browser-
   like authentication context when necessary, and close it when
   authentication is complete.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-schwartz-httpapi-popup-authentication-00"/>
      </reference>
    </references>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA51YbXPbxhH+jl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