<?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.23 (Ruby 3.3.6) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-gakiwate-dnssd-use-svcb-00" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.27.0 -->
  <front>
    <title>Use SVCB with DNS Service Discovery</title>
    <seriesInfo name="Internet-Draft" value="draft-gakiwate-dnssd-use-svcb-00"/>
    <author fullname="Gautam Akiwate">
      <organization>Apple Inc</organization>
      <address>
        <email>gakiwate@apple.com</email>
      </address>
    </author>
    <author fullname="Tommy Pauly">
      <organization>Apple Inc</organization>
      <address>
        <email>tpauly@apple.com</email>
      </address>
    </author>
    <date year="2025" month="March" day="01"/>
    <area/>
    <workgroup>Extensions for Scalable DNS Service Discovery</workgroup>
    <abstract>
      <?line 36?>

<t>DNS Service Discovery (DNS-SD) relies on a sequence of steps to enable the
discovery and connection to local network services. The use of Service Binding
(SVCB) resource records during the service discovery process enables service
instances to advertise properties such as Application-Layer Protocol Negotiation
(ALPN) identifiers and other endpoint configuration options. This document
describes the use of SVCB / HTTPS RRs in the DNS Service Discovery process as an
additional step to allow clients to connect to service instances optimally.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://gakiwate.github.io/draft-gakiwate-dnssd-use-svcb/draft-gakiwate-dnssd-use-svcb.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-gakiwate-dnssd-use-svcb/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Extensions for Scalable DNS Service Discovery  mailing list (<eref target="mailto:dnssd@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/dnssd/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/dnssd/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/gakiwate/draft-gakiwate-dnssd-use-svcb"/>.</t>
    </note>
  </front>
  <middle>
    <?line 46?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>This document describes the use of Service Binding (SVCB) resource records in
the DNS Service Discovery process. The use of SVCB records alongside SRV records
during service discovery enables richer metadata exchange, enhancing the ability
to identify and select optimal connection parameters.  Specifically, SVCB
records allow service instances to advertise properties such as
Application-Layer Protocol Negotiation (ALPN) identifiers and other endpoint
configuration options which streamlines client connections by providing
essential information for protocol negotiation and connection setup during the
discovery phase.</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>
      <?line -18?>

</section>
    <section anchor="motivation">
      <name>Motivation</name>
      <t>The DNS Service Discovery, with the SRV and TXT records, provides some metadata
about the service instance. The TXT records specifically are designed to give
additional information about the service itself. The specific nature of the
additional data in TXT records, and how it is to be used, is service-dependent.
However, additional properties which are not service-specific, like supported
protocols, or privacy requirements which speed up connection establishment and
improve user privacy do not fit naturally in this scheme.</t>
      <t>This documents describes how with the use of SVCB / HTTPS resource records
<xref target="SVCB"/> in the DNS service discovery process we can support these non
service specific properties such as Application-Layer Protocol Negotiation
(ALPN) <xref target="ALPN"/> identifiers and other endpoint configuration options
such as Encrypted Client Hello (ECH) <xref target="ECH"/> so that a
client can select its preferred options to optimally initiate the connection
to the service instance.</t>
    </section>
    <section anchor="use-of-svcb-with-service-instance-resolution">
      <name>Use of SVCB with Service Instance Resolution</name>
      <t>Typically, the DNS-SD <xref target="DNSSD"/> process begins with a client
enumerating service instance names using a PTR record query. The result of this
PTR query is a list of zero or more PTR records each pointing to a unique
service instance. For example, a query for <tt>_foo._tcp.example.com</tt> might return
multiple PTR records, each corresponding to a specific service instances, such
as <tt>service1._foo._tcp.example.com</tt> and <tt>service2._foo._tcp.example.com</tt>.</t>
      <t>Once the client identifies the exact service instance it wants to connect to,
the client issues an SRV query for the service instance. The SRV record for the
service instance includes the hostname of the service instance, the port number
on which the service is listening, and priority and weight fields for load
balancing or failover. For example, querying the SRV record for
<tt>service1._foo._tcp.example.com</tt> might return a hostname like <tt>host1.example.com</tt>
and a port number, such as <tt>8080</tt>.</t>
      <t>After resolving the SRV record, the client issues A and AAAA queries to map the
hostname in the SRV record to an IP address. For example, querying for
<tt>host1.example.com</tt> might return an A record with the IPv4 address <tt>192.0.2.3</tt> or an
AAAA record with the IPv6 address <tt>2001:db8::1</tt>. Once the IP address is obtained,
the client can initiate a connection to the desired service instance using the
port number specified in the SRV record.</t>
      <t>Once the client has resolved the SRV record to identify the hostname and the port
of the service instance, and along with or before the A and AAAA queries are issued,
the client can issue a query for an SVCB or HTTPS record, depending on the relevant
URI scheme the application is using. The client is expected to use "Port Prefix
Naming" <xref target="SVCB"/> to encode the port learned from the SRV response, and the scheme
from the URI being accessed by the application. If there is no notion of a URI
scheme for the application, then SVCB or HTTPS queries <bcp14>SHOULD NOT</bcp14> be made. If the
URI scheme is "http" or "https", the client will issue a query for an HTTPS record;
and if the port learned from the SRV response is the same as the default port
(443), it will leave off the port prefix.</t>
      <section anchor="example-use-of-svcb-rrs">
        <name>Example Use of SVCB RRs</name>
        <t>Consider an example where the client application starts with a service name
<tt>service1._foo._tcp.local</tt> and expects to use a URI scheme of "https".
The client first queries the SRV record for <tt>service1._foo._tcp.example.com</tt>,
which returns a hostname <tt>host1.example.com</tt> and port number 8080.</t>
        <artwork><![CDATA[
service1._foo._tcp.example.com  3600  IN  SRV   (
    0  0  8080  host1.example.com )
]]></artwork>
        <t>The client application then can synthesize the URI "https://host1.example.com:8080".</t>
        <t>The client then issues issue an HTTPS query for <tt>_8080.host1.example.com</tt>, and
A and AAAA queries for <tt>host1.example.com</tt>.</t>
        <t>The service instance operator can publish this HTTPS record:</t>
        <artwork><![CDATA[
_8080.host1.example.com  7200  IN HTTPS  1  .  (
    alpn=h2,h3 )
]]></artwork>
        <t>All put together, the client in this case with the <tt>alpn</tt> values learns that the
service instance supports h3 (which the client may prefer over h2) speeding
up connection establishment with the service with its preferred protocol. Other
SvcParamKeys such as <tt>ipv4hint</tt> and  <tt>ipv6hint</tt> can also be present in the HTTPS
record.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>TODO</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <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>
        <reference anchor="SVCB">
          <front>
            <title>Service Binding and Parameter Specification via the DNS (SVCB and HTTPS Resource Records)</title>
            <author fullname="B. Schwartz" initials="B." surname="Schwartz"/>
            <author fullname="M. Bishop" initials="M." surname="Bishop"/>
            <author fullname="E. Nygren" initials="E." surname="Nygren"/>
            <date month="November" year="2023"/>
            <abstract>
              <t>This document specifies the "SVCB" ("Service Binding") and "HTTPS" DNS resource record (RR) types to facilitate the lookup of information needed to make connections to network services, such as for HTTP origins. SVCB records allow a service to be provided from multiple alternative endpoints, each with associated parameters (such as transport protocol configuration), and are extensible to support future uses (such as keys for encrypting the TLS ClientHello). They also enable aliasing of apex domains, which is not possible with CNAME. The HTTPS RR is a variation of SVCB for use with HTTP (see RFC 9110, "HTTP Semantics"). By providing more information to the client before it attempts to establish a connection, these records offer potential benefits to both performance and privacy.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9460"/>
          <seriesInfo name="DOI" value="10.17487/RFC9460"/>
        </reference>
        <reference anchor="DNSSD">
          <front>
            <title>DNS-Based Service Discovery</title>
            <author fullname="S. Cheshire" initials="S." surname="Cheshire"/>
            <author fullname="M. Krochmal" initials="M." surname="Krochmal"/>
            <date month="February" year="2013"/>
            <abstract>
              <t>This document specifies how DNS resource records are named and structured to facilitate service discovery. Given a type of service that a client is looking for, and a domain in which the client is looking for that service, this mechanism allows clients to discover a list of named instances of that desired service, using standard DNS queries. This mechanism is referred to as DNS-based Service Discovery, or DNS-SD.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6763"/>
          <seriesInfo name="DOI" value="10.17487/RFC6763"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="ALPN">
          <front>
            <title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
            <author fullname="S. Friedl" initials="S." surname="Friedl"/>
            <author fullname="A. Popov" initials="A." surname="Popov"/>
            <author fullname="A. Langley" initials="A." surname="Langley"/>
            <author fullname="E. Stephan" initials="E." surname="Stephan"/>
            <date month="July" year="2014"/>
            <abstract>
              <t>This document describes a Transport Layer Security (TLS) extension for application-layer protocol negotiation within the TLS handshake. For instances in which multiple application protocols are supported on the same TCP or UDP port, this extension allows the application layer to negotiate which protocol will be used within the TLS connection.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7301"/>
          <seriesInfo name="DOI" value="10.17487/RFC7301"/>
        </reference>
        <reference anchor="ECH">
          <front>
            <title>TLS Encrypted Client Hello</title>
            <author fullname="Eric Rescorla" initials="E." surname="Rescorla">
              <organization>Independent</organization>
            </author>
            <author fullname="Kazuho Oku" initials="K." surname="Oku">
              <organization>Fastly</organization>
            </author>
            <author fullname="Nick Sullivan" initials="N." surname="Sullivan">
              <organization>Cryptography Consulting LLC</organization>
            </author>
            <author fullname="Christopher A. Wood" initials="C. A." surname="Wood">
              <organization>Cloudflare</organization>
            </author>
            <date day="19" month="February" year="2025"/>
            <abstract>
              <t>   This document describes a mechanism in Transport Layer Security (TLS)
   for encrypting a ClientHello message under a server public key.

Discussion Venues

   This note is to be removed before publishing as an RFC.

   Source for this draft and an issue tracker can be found at
   https://github.com/tlswg/draft-ietf-tls-esni
   (https://github.com/tlswg/draft-ietf-tls-esni).

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-tls-esni-23"/>
        </reference>
      </references>
    </references>
    <?line 173?>

<section anchor="acknowledgments">
      <name>Acknowledgments</name>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA6VZ63LbNhb+j6c4q/xxdiTZsj1Jqm3aKrb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