<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-reddy-add-resolver-info-05"
     ipr="trust200902">
  <front>
    <title abbrev="DNS Resolver Information">DNS Resolver Information</title>

    <author fullname="Tirumaleswar Reddy" initials="T." surname="Reddy">
      <organization>Akamai</organization>

      <address>
        <postal>
          <street>Embassy Golf Link Business Park</street>

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560071</code>

          <country>India</country>
        </postal>

        <email>kondtir@gmail.com</email>
      </address>
    </author>

    <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
      <organization>Orange</organization>

      <address>
        <postal>
          <street></street>

          <city>Rennes</city>

          <code>35000</code>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <date />

    <workgroup>ADD WG</workgroup>

    <abstract>
      <t>This document specifies a method for DNS resolvers to publish
      information about themselves. Clients can use the resolver information
      to identify the capabilities of DNS resolvers.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>Historically, DNS stub resolvers communicated with recursive
      resolvers without needing to know anything about the features supported
      by these recursive resolvers. As more and more recursive resolvers
      expose different features that may impact the delivered DNS service,
      means to help stub resolvers to identify the capabilities of the
      resolver are valuable. Typically, stub resolvers can discover and
      authenticate encrypted DNS servers provided by a local network, for
      example, using the techniques specified in <xref
      target="I-D.ietf-add-dnr"></xref> and <xref
      target="I-D.ietf-add-ddr"></xref>. However, these stub resolvers need a
      means to retrieve information from the discovered recursive resolvers
      about their capabilities.</t>

      <t>This document fills that void by specifying a method for stub
      resolvers to retrieve such information. To that aim, a new RRtype is
      defined for stub resolvers to query the recursive resolvers. The
      information that a resolver might want to give is defined in <xref
      target="attributes"></xref>.</t>

      <t>Retrieved information can be used to feed the server selection
      procedure.</t>
    </section>

    <section anchor="notation" title="Terminology">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119"></xref><xref target="RFC8174"></xref> when, and
      only when, they appear in all capitals, as shown here.</t>

      <t>This document makes use of the terms defined in <xref
      target="RFC8499"></xref>.</t>

      <t>'Encrypted DNS' refers to a DNS protocol that provides an encrypted
      channel between a DNS client and server (e.g., DoT, DoH, or DoQ).</t>
    </section>

    <section anchor="resolver-info" title="Retrieving Resolver Information">
      <t>A stub resolver that wants to retrieve the resolver information may
      use the RRtype "RESINFO" defined in this document (see <xref
      target="RESINFO"></xref>).</t>

      <t>The content of the RDATA in a response to RRtype query is defined in
      <xref target="attributes"></xref>. If the resolver understands the
      RESINFO RRtype, the RRset in the Answer section MUST have exactly one
      record.</t>

      <t>The client can retrieve the resolver information using the RESINFO
      RRtype and QNAME of the domain name that is used to authenticate the DNS
      server (referred to as ADN in <xref
      target="I-D.ietf-add-dnr"></xref>).</t>

      <t>If the special use domain name "resolver.arpa" defined in <xref
      target="I-D.ietf-add-ddr"></xref> is used to discover the Encrypted DNS
      server, the client can retrieve the resolver information using the
      RESINFO RRtype and QNAME of the designated resolver.</t>
    </section>

    <section anchor="content-format"
             title="Format of the Resolver Information">
      <t>The resolver information is returned as a JSON object. Precisely, the
      JSON object MUST use the I-JSON message format <xref
      target="RFC7493"></xref>. <list style="empty">
          <t>Note that <xref target="RFC7493"></xref> was based on <xref
          target="RFC7159"></xref>, but <xref target="RFC7159"></xref> was
          replaced by <xref target="RFC8259"></xref>. Requiring the use of
          I-JSON instead of more general JSON format greatly increases the
          likelihood of interoperability.</t>
        </list></t>

      <t>The JSON object returned by a DNS query may contain any name/value
      pairs. All names MUST consist only of lower-case ASCII characters,
      digits, and hyphens (that is, Unicode characters U+0061 through 007A,
      U+0030 through U+0039, and U+002D). These names MUST be 63 characters or
      shorter.</t>

      <t>All names in the returned object MUST either be defined in the IANA
      registry <xref target="resolver-information"></xref> or begin with the
      substring "temp-" for names defined for local use only.</t>
    </section>

    <section anchor="attributes" title="Resolver Information">
      <t>The resolver information includes the following attributes:</t>

      <t><list style="hanging">
          <t hangText="qnameminimization:">If the DNS server supports QNAME
          minimisation <xref target="RFC7816"></xref> to improve DNS privacy,
          the parameter value is set to true. This is a mandatory
          attribute.</t>

          <t hangText="extendeddnserror:">If the DNS server supports extended
          DNS error (EDE) <xref target="RFC8914"></xref> to return additional
          information about the cause of DNS errors, the parameter lists the
          possible extended DNS error codes that can be returned by the DNS
          server. This is an optional attribute.</t>

          <t hangText="resinfourl:">An URL that points to the generic
          unstructured resolver information (e.g., DoH APIs supported,
          possible HTTP status codes returned by the DoH server, how to report
          a problem) for troubleshooting purpose. The server MUST support the
          content-type 'text/html'. The DNS client MUST reject the URL if the
          scheme is not "https". The client MUST validate that both the
          encrypted DNS server and the resolver information server are owned
          and managed by the same entity by establishing a TLS connection to
          the domain name in the URL and checking if the subjectAltName entry
          in the server certificate includes the name of the encrypted DNS
          server. If this match fails, the client MUST ignore the resolver
          information. As such, the URL should be treated only as diagnostic
          information for IT staff. This is a mandatory attribute.</t>
        </list></t>

      <t>New attributes can be defined as per the procedure defined in <xref
      target="resolver-information"></xref>.</t>

      <t>As specified in <xref target="RFC7493"></xref>, the I-JSON object is
      encoded as UTF8. <xref target="RFC7493"></xref> explicitly allows the
      returned objects to be in any order.</t>

      <t><xref target="poex"></xref> shows an example of resolver
      information.</t>

      <figure anchor="poex" title="An Example of Resolver Information">
        <artwork><![CDATA[{
  "qnameminimization": true,
  "extendeddnserror": [
    15,
    16,
    17
  ],
  "resinfourl": "https://resolver.example.com/guide",
} ]]></artwork>
      </figure>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Unless a DNS request to retrieve the resolver information is
      encrypted (e.g., sent over DNS-over-TLS (DoT) <xref
      target="RFC7858"></xref> or DNS-over- HTTPS (DoH)) <xref
      target="RFC8484"></xref>, the response is susceptible to forgery. The
      DNS resolver information can be retrieved after the encrypted connection
      is established to the DNS server or retrieved before the encrypted
      connection is established to the DNS server by using local DNSSEC
      validation.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t><list style="empty">
          <t>Note to the RFC Editor: Please update [RFCXXXX] with the RFC
          number to be assigned to this document.</t>
        </list></t>

      <section anchor="RESINFO" title="RESINFO RRtype">
        <t>This document requests IANA to register a new value from the
        "Resource Record (RR) TYPEs" subregistry of the "Domain Name System
        (DNS) Parameters" registry available at <xref
        target="RRTYPE"></xref>:</t>

        <t><figure>
            <artwork><![CDATA[Type: RESINFO 
Value: TBD 
Meaning: Resolver Information as an I-JSON
Reference: [RFCXXXX] 
]]></artwork>
          </figure></t>
      </section>

      <section anchor="resolver-information"
               title="DNS Resolver Information Registration">
        <t>This document requests IANA to create a new registry entitled "DNS
        Resolver Information". This registry contains definitions of the names
        that can be used to provide the resolver information.</t>

        <t>The registration procedure is Specification Required (Section 4.6
        of <xref target="RFC8126"></xref>).</t>

        <t>The structure of the registry is as follows:<list style="hanging">
            <t hangText="Name:">The name to be used in the JSON object. The
            name MUST conform to the definition of "string" in I-JSON message
            format. The IANA registry MUST NOT register names that begin with
            "temp-", so these names can be used freely by any implementer.</t>

            <t hangText="Value Type:">The type of data to be used in the JSON
            object.</t>

            <t hangText="Description:">Provides a description of the
            attribute</t>

            <t hangText="Specification:">The reference specification for the
            registered element.</t>
          </list></t>

        <t>The initial content of this registry is provided in <xref
        target="initial"></xref>.</t>

        <texttable anchor="initial" title="Initial RESINFO Registry">
          <ttcol>Name</ttcol>

          <ttcol>Value Type</ttcol>

          <ttcol>Specification</ttcol>

          <ttcol>Specification</ttcol>

          <c>qnameminimization</c>

          <c>boolean</c>

          <c>Indicates whether qnameminimization is enabled or not</c>

          <c>[RFCXXXX]</c>

          <c>extendeddnserror</c>

          <c>number</c>

          <c>Lists the set of extended DNS errors</c>

          <c>[RFCXXXX]</c>

          <c>resinfourl</c>

          <c>string</c>

          <c>Provides an unstructured resolver information that is used for
          troubleshooting</c>

          <c>[RFCXXXX]</c>
        </texttable>

        <t></t>
      </section>
    </section>

    <section anchor="acknowledgments" title="Acknowledgments">
      <t>This specification leverages the work that has been documented in
      <xref target="I-D.pp-add-resinfo"></xref>.</t>

      <t>Thanks to Tommy Jensen, Vittorio Bertola, Vinny Parla, Chris Box, Ben
      Schwartz, Tony Finch, Daniel Kahn Gillmor, Eric Rescorla and Shashank
      Jain for the discussion and comments.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include="reference.RFC.7493"?>

      <?rfc include='reference.RFC.7159' ?>

      <?rfc include="reference.RFC.7816"?>

      <?rfc include="reference.RFC.8126"?>

      <?rfc include='reference.RFC.8914' ?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.8499"?>

      <?rfc include="reference.RFC.7858"?>

      <?rfc include="reference.RFC.8484"?>

      <?rfc include='reference.I-D.pp-add-resinfo'?>

      <?rfc include='reference.I-D.ietf-add-dnr'?>

      <?rfc include='reference.I-D.ietf-add-ddr'?>

      <?rfc include='reference.RFC.8259' ?>

      <reference anchor="RRTYPE"
                 target="http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4">
        <front>
          <title>Resource Record (RR) TYPEs</title>

          <author>
            <organization>IANA</organization>
          </author>

          <date />
        </front>
      </reference>
    </references>
  </back>
</rfc>
