<?xml version='1.0' encoding='UTF-8'?>

<!-- draft submitted in xml v3 -->

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-add-resolver-info-13" number="9606" updates="" obsoletes="" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3" xml:lang="en">

  <front>
    <title abbrev="DNS Resolver Information">DNS Resolver Information</title>
    <seriesInfo name="RFC" value="9606"/>
    <author fullname="Tirumaleswar Reddy.K" initials="T." surname="Reddy.K">
      <organization>Nokia</organization>
      <address>
        <postal>
          <country>India</country>
        </postal>
        <email>kondtir@gmail.com</email>
      </address>
    </author>
    <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
      <organization>Orange</organization>
      <address>
        <postal>
          <city>Rennes</city>
          <code>35000</code>
          <country>France</country>
        </postal>
        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>
    <date year="2024" month="June"/>

    <area>INT</area>
    <workgroup>add</workgroup>

    <keyword>Transparency</keyword>
    <keyword>User Experience</keyword>
    <keyword>DNS server selection</keyword>
    <abstract>

<t>This document specifies a method for DNS resolvers to publish
information about themselves.  DNS clients can use the resolver
   information to identify the capabilities of DNS resolvers. How DNS clients use such information is beyond the scope of this document.</t>
    </abstract>
  </front>
  <middle>
    <?line 56?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Historically, DNS clients communicated with recursive
   resolvers without needing to know anything about the features
   supported by these resolvers. However, more and more recursive resolvers expose different features that may impact delivered DNS
   services (privacy preservation, filtering, transparent behavior, etc.). DNS clients
   can discover and authenticate encrypted DNS resolvers provided by a
   local network, for example, using the Discovery of Network-designated
   Resolvers (DNR) <xref target="RFC9463"/> and the Discovery of Designated Resolvers
   (DDR) <xref target="RFC9462"/>. However, these DNS clients can't retrieve
   information from the discovered recursive resolvers about their capabilities to feed the resolver selection process. Instead of depending on opportunistic approaches, DNS clients need a more reliable mechanism to discover the features that are configured on these resolvers.</t>
      <t>This document fills that void by specifying a mechanism that allows communication of DNS resolver
information to DNS clients for use in resolver selection decisions. For example, the resolver selection procedure may use the retrieved
resolver information to prioritize privacy-preserving resolvers over those that don't enable QNAME minimisation <xref target="RFC9156"/>. Another
example is when a DNS client selects a resolver based on its filtering capability. For instance, a DNS client can choose a resolver that
filters domains according to a security policy using the Blocked (15) Extended DNS Error (EDE) <xref target="RFC8914"/>. Alternatively, the client may
have a policy not to select a resolver that forges responses using the Forged Answer (4) EDE. However, it is out of the scope of this
document to define the selection procedure and policies. Once a resolver is selected by a DNS client, and unless explicitly mentioned, this
document does not interfere with that resolver's DNS operations.</t>
      <t>Specifically, this document defines a new resource record (RR) type for DNS clients to query the recursive resolvers. The initial information that a resolver might want to expose is defined in
<xref target="key-val"/>. That information is scoped to cover properties that are used to infer privacy and transparency policies of a resolver. Other information can be registered in the future per the guidance in <xref target="key-reg"/>. The information is not intended for end-user consumption.</t>
    </section>
    <section anchor="terminology">
      <name>Terminology</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>

<t>This document makes use of the terms defined in <xref target="RFC9499"/>. The following additional terms are used:</t>
      <dl>
        <dt>Encrypted DNS:</dt>
        <dd>Refers to a DNS scheme where DNS exchanges are
 transported over an encrypted channel between a DNS client and server (e.g.,
 DNS over HTTPS (DoH) <xref target="RFC8484"/>, DNS over TLS (DoT) <xref target="RFC7858"/>, or
 DNS over QUIC (DoQ) <xref target="RFC9250"/>).
        </dd>
        <dt>Encrypted DNS resolver:</dt>
        <dd>Refers to a DNS resolver that supports any encrypted DNS scheme.
        </dd>
        <dt>Reputation:</dt>
        <dd>Defined as "the estimation in which an identifiable actor is held, especially by the
 community or the Internet public generally" per <xref section="1" sectionFormat="of" target="RFC7070"/>.
        </dd>
      </dl>
    </section>
    <section anchor="retreive">
      <name>Retrieving Resolver Information</name>
      <t>A DNS client that wants to retrieve the resolver information may
   use the RR type "RESINFO" defined in this document. The content of the RDATA in a
   response to a query for RESINFO RR QTYPE is defined in <xref target="key-val"/>. If the resolver understands the
   RESINFO RR type, the RRset <bcp14>MUST</bcp14> have exactly one record. Invalid records <bcp14>MUST</bcp14> be silently ignored by DNS clients. RESINFO is a property of the resolver and is not subject to recursive resolution.</t>
      <t>A DNS client can retrieve the resolver information using the RESINFO
   RR type and the QNAME of the domain name that is used to authenticate the
   DNS resolver (referred to as the Authentication Domain Name (ADN) in DNR <xref target="RFC9463"/>).</t>
      <t>If the Special-Use Domain Name "resolver.arpa", defined in <xref target="RFC9462"/>, is used to
   discover an encrypted DNS resolver, the client can retrieve the resolver information
   using the RESINFO RR type and QNAME of "resolver.arpa". In this case, a client has to contend with the risk that a resolver does not support RESINFO. The resolver might
   pass the query upstream, and then the client can receive a positive RESINFO response from either
   a legitimate DNS resolver or an attacker.</t>
      <t>The DNS client <bcp14>MUST</bcp14> set the Recursion Desired (RD) bit of
   the query to 0. The DNS client <bcp14>MUST</bcp14> discard the response if the AA flag in the response is set to 0,
   indicating that the DNS resolver is not authoritative for the response.</t>
      <t>If a group of resolvers is sharing the same ADN and/or anycast address, then these instances <bcp14>SHOULD</bcp14> expose a consistent RESINFO.</t>
    </section>
    <section anchor="format">
      <name>Format of the Resolver Information</name>
      <t>The resolver information record uses the same format as DNS TXT records.
   The format rules for TXT records are defined in
   the base DNS specification (<xref section="3.3.14" sectionFormat="of" target="RFC1035"/>) and are further
   elaborated in the DNS-based Service Discovery (DNS-SD) specification
   (<xref section="6.1" sectionFormat="of" target="RFC6763"/>). The recommendations to limit the TXT record size are
      discussed in <xref section="6.1" sectionFormat="of" target="RFC6763"/>.</t>
      <t>Similar to DNS-SD, the RESINFO RR type uses "key/value" pairs to
   convey the resolver information.  Each key/value pair is encoded
   using the format rules defined in <xref section="6.3" sectionFormat="of" target="RFC6763"/>.  Using
   standardized key/value syntax within the RESINFO RR type makes it
   easier for future keys to be defined.  If a DNS client sees unknown
   keys in a RESINFO RR type, it <bcp14>MUST</bcp14> silently ignore them. The same rules for the keys, as defined in <xref section="6.4" sectionFormat="of" target="RFC6763"/>, <bcp14>MUST</bcp14> be followed for RESINFO.</t>
      <t>Resolver information keys <bcp14>MUST</bcp14> either be defined in the IANA registry (<xref target="key-reg"/>) or begin
   with the substring "temp-" for names defined for local use only.</t>
    </section>
    <section anchor="key-val">
      <name>Resolver Information Keys/Values</name>
      <t>The following resolver information keys are defined:</t>
      <dl>
        <dt>qnamemin:</dt>
        <dd>
          <t>The presence of this key indicates that the DNS resolver supports QNAME minimisation <xref target="RFC9156"/>
 to improve DNS privacy.  Note that, per the
 rules for the keys defined in <xref section="6.4" sectionFormat="of" target="RFC6763"/>, if there
 is no '=' in a key, then it is a boolean attribute, simply
 identified as being present, with no value.
</t>
          <t>The presence of this key indicates that the DNS resolver is configured to minimise the amount of privacy-sensitive data sent to an authoritative name server.</t>
          <t>This is an optional attribute.</t>
        </dd>
        <dt>exterr:</dt>
        <dd>
          <t>If the DNS resolver supports the EDE option defined in
 <xref target="RFC8914"/> to return additional information about the cause of DNS
 errors, the value of this key lists the possible EDE codes that can be returned by this DNS resolver. A value can be an individual EDE or a range of EDEs. Range values <bcp14>MUST</bcp14> be identified by "-".  When
 multiple non-contiguous values are present, these values <bcp14>MUST</bcp14> be comma-separated.
</t>
          <t>Returned EDEs (e.g., Blocked (15), Censored (16), and Filtered (17)) indicate whether the DNS resolver is configured to reveal the reason why a query was filtered/blocked when such an event happens. If the resolver's capabilities are updated to include new similar
 error codes, the resolver can terminate the TLS session, prompting the client to initiate a new TLS connection and retrieve the
 resolver information again. This allows the client to become aware of the resolver's updated capabilities. Alternatively, if the
 client receives an EDE for a DNS request, but that EDE was not listed in  the "exterr", the client can query the resolver again to
 learn about the updated resolver's capabilities to return new error codes. If a mismatch still exists, the client can identify that
 the resolver information is inaccurate and discard it.</t>
          <t>This is an optional attribute.</t>
        </dd>
        <dt>infourl:</dt>
        <dd>
          <t>A URL that points to the generic unstructured resolver
 information (e.g., DoH APIs supported, possible HTTP status codes
 returned by the DoH server, or how to report a problem) for
 troubleshooting purposes. The server that exposes such information is called "resolver information server".
</t>
          <t>The resolver information server <bcp14>MUST</bcp14> support only the content-type "text/html" for the resolver information. The DNS
 client <bcp14>MUST</bcp14> reject the URL as invalid if the scheme is not "https". Invalid URLs <bcp14>MUST</bcp14> be ignored.  The URL
 <bcp14>MUST</bcp14> be treated only as diagnostic information for IT staff.  It
 is not intended for end-user consumption as the URL can possibly provide misleading information.</t>
          <t>This key can be used by IT staff to retrieve other useful information about the resolver and also the procedure to report problems (e.g., invalid filtering).</t>
          <t>This is an optional attribute.</t>
        </dd>
      </dl>
      <t>New keys can be defined as per the procedure defined in <xref target="key-reg"/>.</t>
    </section>
    <section anchor="an-example">
      <name>An Example</name>
      <t><xref target="ex-1"/> shows an example of a published resolver information record.</t>
      <figure anchor="ex-1">
        <name>An Example of a Resolver Information Record</name>
        <artwork align="center"><![CDATA[
resolver.example.net. 7200 IN RESINFO qnamemin exterr=15-17
                      infourl=https://resolver.example.com/guide
]]></artwork>
      </figure>
      <t>As mentioned in <xref target="retreive"/>, a DNS client that discovers the ADN "resolver.example.net"
of its resolver using DNR will issue a query for RESINFO RR QTYPE for that ADN and will learn that:</t>
      <ul spacing="normal">
        <li>the resolver enables QNAME minimisation,
        </li>
        <li>the resolver can return Blocked (15), Censored (16), and Filtered (17) EDEs, and
        </li>
        <li>more information can be retrieved from "https://resolver.example.com/guide".
        </li>
      </ul>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>DNS clients communicating with discovered DNS resolvers <bcp14>MUST</bcp14> use one of the following measures
to prevent DNS response forgery attacks:</t>
      <ol spacing="normal" type="1">
        <li> Establish an authenticated secure connection to the DNS resolver.
        </li>
        <li>Implement local DNSSEC validation (<xref section="10" sectionFormat="of" target="RFC9499"/>) to verify the authenticity of the resolver information.
        </li>
      </ol>
      <t>It is important to note that, of these two measures, only the first one can apply to queries for "resolver.arpa".</t>
      <t>An encrypted resolver may return incorrect information in RESINFO. If the client cannot validate the attributes received from the resolver, which will be used for resolver selection or displayed to the end user, the client should process those attributes only if the encrypted resolver has sufficient reputation according to local policy (e.g., user configuration, administrative configuration, or a built-in list of reputable resolvers). This approach limits the ability of a malicious encrypted resolver to cause harm with false claims.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="resinfo-rr-type">
        <name>RESINFO RR Type</name>
        <t>IANA has updated the "Resource Record (RR) TYPEs" registry under the "Domain Name System
   (DNS) Parameters" registry group <xref target="RRTYPE"/> as follows:</t>
<dl spacing="compact">
<dt>Type:</dt><dd>RESINFO</dd>
<dt>Value:</dt><dd>261</dd>
<dt>Meaning:</dt><dd>Resolver Information as Key/Value Pairs</dd>
<dt>Reference:</dt><dd>RFC 9606</dd>
</dl>
      </section>
      <section anchor="key-reg">
        <name>DNS Resolver Information Keys Registration</name>
        <t>IANA has created a new registry called "DNS Resolver Information Keys" under the "Domain Name System (DNS) Parameters" registry group <xref target="IANA-DNS"/>.  This new registry contains definitions of the keys that can be used to provide the resolver information.</t>
        <t>The registration procedure is Specification Required (<xref section="4.6" sectionFormat="of" target="RFC8126"/>). Designated experts should carefully
   consider the security implications of allowing a resolver to include new keys in this registry. Additional considerations are provided in <xref target="sec-de"/>.</t>
        <t>The structure of the registry is as follows:</t>
        <dl>
          <dt>Name:</dt>
          <dd>The key name.  The name <bcp14>MUST</bcp14> conform to the definition in
 <xref target="format"/> of this document.  The IANA registry <bcp14>MUST NOT</bcp14> register names that begin
 with "temp-" so that these names can be used freely by any
 implementer.
          </dd>
          <dt>Description:</dt>
          <dd>A description of the registered key.
          </dd>
          <dt>Reference:</dt>
          <dd>The reference specification for the registered element.
          </dd>
        </dl>
        <t>The initial contents of this registry are provided in <xref target="initial"/>.</t>
        <table anchor="initial">
          <name>Initial Contents of the DNS Resolver Information Keys Registry</name>
          <thead>
            <tr>
              <th align="left">Name</th>
              <th align="left">Description</th>
              <th align="center">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">qnamemin</td>
              <td align="left">The presence of the key name indicates that QNAME minimisation is enabled.</td>
              <td align="center">RFC 9606</td>
            </tr>
            <tr>
              <td align="left">exterr</td>
              <td align="left">Lists the set of enabled extended DNS errors. It must be an INFO-CODE decimal value in the "Extended DNS Error Codes" registry <eref target="https://www.iana.org/assignments/dns-parameters/" brackets="angle" />. </td>
              <td align="center">RFC 9606</td>
            </tr>
            <tr>
              <td align="left">infourl</td>
              <td align="left">Provides a URL that points to unstructured resolver information that is used for troubleshooting.</td>
              <td align="center">RFC 9606</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="sec-de">
        <name>Guidelines for the Designated Experts</name>
        <t>It is suggested that multiple designated experts be appointed for
   registry change requests.</t>
        <t>Criteria that should be applied by the designated experts include
   determining whether the proposed registration duplicates existing
   entries and whether the registration description is clear and fits
   the purpose of this registry.</t>
        <t>Registration requests are evaluated within a two-week review period on the advice of
   one or more designated experts.  Within the review period, the
   designated experts will either approve or deny the registration
   request, communicating this decision to IANA.
   Denials should include an explanation and, if applicable, suggestions
   as to how to make the request successful.</t>
      </section>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.pp-add-resinfo" to="RESINFO"/>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>

	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9463.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9462.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9156.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1035.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6763.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8914.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>

      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>

        <reference anchor="RRTYPE" target="https://www.iana.org/assignments/dns-parameters/">
          <front>
            <title>Resource Record (RR) TYPEs</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>

        <reference anchor="IANA-DNS" target="https://www.iana.org/assignments/dns-parameters/">
          <front>
            <title>Domain Name System (DNS) Parameters</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>

	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9499.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8484.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7858.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9250.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7070.xml"/>


<!-- [I-D.pp-add-resinfo] IESG state: Expired as of 06/27/24; entered the long way to get the correct initials and date-->
<reference anchor="I-D.pp-add-resinfo" target="https://datatracker.ietf.org/doc/html/draft-pp-add-resinfo-02">
  <front>
    <title>DNS Resolver Information Self-publication</title>
    <author fullname="Puneet Sood" initials="P." surname="Sood">
      <organization>Google</organization>
    </author>
    <author fullname="Paul Hoffman" initials="P." surname="Hoffman">
      <organization>ICANN</organization>
    </author>
    <date day="27" month="June" year="2020"/>
  </front>
  <seriesInfo name="Internet-Draft" value="draft-pp-add-resinfo-02"/>
</reference>

      </references>
    </references>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>This specification leverages the work that has been documented in
   <xref target="I-D.pp-add-resinfo"/>.</t>
      <t>Thanks to <contact fullname="Tommy Jensen"/>, <contact fullname="Vittorio Bertola"/>, <contact fullname="Vinny Parla"/>, <contact fullname="Chris Box"/>, <contact fullname="Ben Schwartz"/>, <contact fullname="Tony Finch"/>, <contact fullname="Daniel Kahn Gillmor"/>, <contact fullname="Eric Rescorla"/>, <contact fullname="Shashank Jain"/>, <contact fullname="Florian Obser"/>, <contact fullname="Richard Baldry"/>, and <contact fullname="Martin Thomson"/> for the discussion and comments.</t>
      <t>Thanks to <contact fullname="Mark Andrews"/>, <contact fullname="Joe Abley"/>, <contact fullname="Paul Wouters"/>, and <contact fullname="Tim Wicinski"/> for the discussion on RR formatting rules.</t>
      <t>Special thanks to <contact fullname="Tommy Jensen"/> for the careful and thoughtful Shepherd review.</t>
      <t>Thanks to <contact fullname="Johan Stenstam"/> and <contact fullname="Jim Reid"/> for the dns-dir reviews, <contact fullname="Ray Bellis"/> for the RRTYPE allocation review, <contact fullname="Arnt Gulbrandsen"/> for the ART review, and <contact fullname="Mallory Knodel"/> for the gen-art review.</t>
      <t>Thanks to <contact fullname="Éric Vyncke"/> for the AD review.</t>
      <t>Thanks to <contact fullname="Gunter Van de Velde"/>, <contact fullname="Erik Kline"/>, <contact fullname="Paul Wouters"/>, <contact fullname="Orie Steele"/>, <contact fullname="Warren Kumari"/>, <contact fullname="Roman Danyliw"/>, and <contact fullname="Murray Kucherawy"/> for the IESG review.</t>
    </section>
  </back>
</rfc>
