<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" consensus="true"
     docName="draft-wing-dnsop-structured-dns-error-page-05" ipr="trust200902"
     obsoletes="" sortRefs="true" submissionType="IETF" symRefs="true"
     tocDepth="4" tocInclude="true" updates="8914" version="3" xml:lang="en">
  <!-- xml2rfc v2v3 conversion 3.9.1 -->

  <front>
    <title abbrev="Data for Filtered DNS">Structured Data for Filtered
    DNS</title>

    <seriesInfo name="Internet-Draft" value="" />

    <author fullname="Dan Wing" initials="D." surname="Wing">
      <organization abbrev="Citrix">Citrix Systems, Inc.</organization>

      <address>
        <postal>
          <street />

          <country>United States of America</country>
        </postal>

        <email>dwing-ietf@fuggles.com</email>
      </address>
    </author>

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

      <address>
        <postal>
          <street />

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code />

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

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

    <author fullname="Neil Cook" initials="N." surname="Cook">
      <organization>Open-Xchange</organization>

      <address>
        <postal>
          <street />

          <country>United Kingdom</country>
        </postal>

        <email>neil.cook@noware.co.uk</email>
      </address>
    </author>

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

      <address>
        <postal>
          <street />

          <city>Rennes</city>

          <region />

          <code>35000</code>

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

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

    <date />

    <workgroup>DNSOP WG</workgroup>

    <abstract>
      <t>DNS filtering is widely deployed for network security, but filtered
      DNS responses lack information for the end user to understand the reason
      for the filtering. Existing mechanisms to provide detail to end users
      cause harm especially if the blocked DNS response is to an HTTPS
      website.</t>

      <t>This document updates the EXTRA-TEXT field of Extended DNS Error to
      provide details on the DNS filtering. This information can be parsed by
      the client and displayed, logged, or used for other purposes.</t>

      <t>This document updates RFC 8914.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>

      <t>DNS filters are deployed for a variety of reasons including endpoint
      security, parental filtering, and filtering required by law enforcement.
      Network-based security solutions such as firewalls and Intrusion
      Prevention Systems (IPS) rely upon network traffic inspection to
      implement perimeter-based security policies and operate by filtering DNS
      responses. In a home, DNS filtering is used for the same reasons as
      above and additionally for parental control. Internet Service Providers
      typically block access to some DNS domains due to a requirement imposed
      by an external entity (e.g., law enforcement agency) also performed
      using DNS-based content filtering.</t>

      <t>Users of DNS services which perform filtering may wish to receive
      more information about such filtering to resolve problems with the
      filter -- for example to contact the administrator to allowlist a domain
      that was erroneously filtered or to understand the reason a particular
      domain was filtered. With that information, the user can choose another
      network, open a trouble ticket with the DNS administrator to resolve
      erroneous filtering, log the information, or other uses.</t>

      <!--

** removing this text as it is duplicated with the text pulled from draft-reddy-dnsop-error-page, which 
** has its copied text starting just below this



      <t>Two DNS filtering mechanisms are widely deployed today but are
      harmful:</t>
      <dl newline="false" spacing="normal">
        <dt>empty answer or NXDOMAIN:</dt>
        <dd>The simplest mechanism is simply returning an empty
	    answer or NXDOMAIN.  This provides no information to the
	    client and makes the network or its DNS feel broken
	    because of the 'host not found' error messages typically
	    presented to the user.  This mechanism also interferes
	    with client DNSSEC-validating DNS resolvers because the
	    empty answer has an invalid (or missing) signature.</dd>
        <dt>Forged response:</dt>
        <dd>This mechanism returns a forged A (or AAAA) response
      pointing at a host operated by the DNS operator.  The
      expectation is the user's browser will visit the server over
      HTTP and a suitable explanation will be displayed to the user.
      As HTTPS is now commonplace, this expectation breaks down because
      clients are presented with a warning about visiting an
      un-trusted site (because of an un-trusted certificate), or those
      users are encouraged to install the certificate as an additional
      trusted root, eroding their security for all TLS connections.
      Furthermore, for the user to see the DNS filtering explanation
      the user needs a web browser which visits the server and often
      require JavaScript, creating a wider attack surface.  The
      requirement for a web browser is, itself, a problem on some
      devices (e.g., IoT or headless devices).  Finally, this mechanism
      interferes with client DNSSEC-validating DNS resolvers because
      the forged response has an invalid (or missing) signature.</dd>
      </dl>
      -->

      <t />

      <ol>
        <li>
          <!--  Neil suggested removing these couple of sentences

Most importantly, EDE option does not offer
   authenticated information; it can thus be spoofed by an attacker.
   In addition, the additional textual information may not be able to
   convey all of the required information about the cause of the DNS
   error because lengthy EXTRA-TEXT content would be truncated to
   prevent fragmentation (<xref target="RFC8914">Section 3 of </xref>).
-->
        </li>
      </ol>

      <t>For both DNS filtering mechanisms described in <xref
      target="filtering">Section 4 of</xref>, the DNS server can return
      extended error codes Blocked, Censored, Filtered, or Forged Answer
      defined in <xref target="RFC8914">Section 4 of</xref>. However, these
      codes only explain that filtering occurred but lack detail for the user
      to diagnose erroneous filtering.</t>

      <t>No matter which type of response is generated (forged IP address(es),
      NXDOMAIN or empty answer, even with an extended error code), the user
      who triggered the DNS query has little chance to understand which entity
      filtered the query, how to report a mistake in the filter, or why the
      entity filtered it at all. This document describes a mechanism to
      provide such detail.</t>

      <t>One of the other benefits of this approach is to eliminate the need
      to "spoof" block pages for HTTPS resources. This is achieved since
      clients implementing this approach would be able to display a meaningful
      error message, and would not need to connect to such a block page. This
      approach thus avoids the need to install a local root certificate
      authority on those IT-managed devices.</t>

      <t>This document describes a format for computer-parsable data in the
      EXTRA-TEXT field of <xref target="RFC8914">Extended DNS
      Errors</xref>.</t>

      <t>This document does not recommend DNS filtering but provides a
      mechanism for better transparency to explain to the users why some DNS
      queries are filtered.</t>
    </section>

    <section anchor="notation" numbered="true" toc="default">
      <name>Terminology</name>

      <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 format="default" target="RFC2119" /><xref format="default"
      target="RFC8174" /> when, and only when, they appear in all capitals, as
      shown here.</t>

      <t>This document uses terms defined in <xref format="default"
      target="RFC8499">DNS Terminology</xref>.</t>

      <t>"Requestor" refers to the side that sends a request. "Responder"
      refers to an authoritative, recursive resolver or other DNS component
      that responds to questions. Other terminology is used here as defined in
      the RFCs cited by this document.</t>

      <t>"Encrypted DNS" refers to any encrypted scheme to convey DNS
      messages, for example, DNS-over-HTTPS <xref format="default"
      target="RFC8484" />, DNS-over-TLS <xref format="default"
      target="RFC7858" />, or DNS-over-QUIC <xref format="default"
      target="RFC9250" />.</t>
    </section>

    <section anchor="filtering">
      <name>Limitations of Filtering techniques</name>

      <t>DNS responses can be filtered by sending a bogus (also called,
      "forged") A or AAAA response, NXDOMAIN error or empty answer, or an
      extended DNS error (EDE) code defined in <xref target="RFC8914" />. Each
      of these methods have advantages and disadvantages that are discussed
      below:</t>

      <ol>
        <li>
          <t>The DNS response is forged to provide a list of IP addresses that
          points to an HTTP(S) server alerting the end user about the reason
          for blocking access to the requested domain (e.g., malware). When an
          HTTP(S) enabled domain name is blocked, the network security device
          (e.g., CPE, firewall) presents a block page instead of the HTTP
          response from the content provider hosting that domain. If an HTTP
          enabled domain name is blocked, the network security device
          intercepts the HTTP request and returns a block page over HTTP. If
          an HTTPS enabled domain is blocked, the block page is also served
          over HTTPS. In order to return a block page over HTTPS, man in the
          middle (MITM) is enabled on endpoints by generating a local root
          certificate and an accompanying (local) public/private key pair. The
          local root certificate is installed on the endpoint while the
          network security device(s) stores a copy of the private key. During
          the TLS handshake, the network security device modifies the
          certificate provided by the server and (re)signs it using the
          private key from the local root certificate.</t>

          <ul spacing="normal">
            <li>
              <t>However, configuring the local root certificate on endpoints
              is not a viable option in several deployments like home
              networks, schools, Small Office/Home Office (SOHO), and Small/
              Medium Enterprise (SME). In these cases, the typical behavior is
              that the filtered DNS response points to a server that will
              display the block page. If the client is using HTTPS (via web
              browser or another application) this results in a certificate
              validation error which gives no information to the end-user
              about the reason for the DNS filtering. Browsers will display
              errors such as "The security certificate presented by this
              website was not issued by a trusted certificate authority"
              (Internet Explorer/Edge"), "The site's security certificate is
              not trusted" (Chrome), "This Connection is Untrusted" (Firefox),
              "Safari can't verify the identity of the website..." (Safari on
              MacOS). Applications might display even more cryptic error
              messages.</t>
            </li>

            <li>Enterprise networks do not assume that all the connected
            devices are managed by the IT team or Mobile Device Management
            (MDM) devices, especially in the quite common Bring Your Own
            Device (BYOD) scenario. In addition, the local root certificate
            cannot be installed on IoT devices without a device management
            tool.</li>

            <li>An end user does not know why the connection was prevented
            and, consequently, may repeatedly try to reach the domain but with
            no success. Frustrated, the end user may switch to an alternate
            network that offers no DNS filtering against malware and phishing,
            potentially compromising both security and privacy. Furthermore,
            certificate errors train users to click through certificate
            errors, which is a bad security practice. To eliminate the need
            for an end user to click through certificate errors, an end user
            may manually install a local root certificate on a host device.
            Doing so, however, is also a bad security practice as it creates a
            security vulnerability that may be exploited by a MITM attack.
            When a manually installed local root certificate expires, the user
            has to (again) manually install the new local root
            certificate.</li>
          </ul>
        </li>

        <li>The DNS response is forged to provide a NXDOMAIN response to cause
        the DNS lookup to terminate in failure. In this case, an end user does
        not know why the domain cannot be reached and may repeatedly try to
        reach the domain but with no success. Frustrated, the end user may use
        insecure connections to reach the domain, potentially compromising
        both security and privacy.</li>

        <li>The extended error codes Blocked, Censored, and Filtered defined
        in <xref target="RFC8914">Section 4 of</xref> can be returned by a DNS
        server to provide additional information about the cause of an DNS
        error. If the extended error code "Forged Answer" defined in <xref
        target="RFC8914">Section 4.5 of</xref> is returned by the DNS server,
        the client can identify the DNS response is forged together with the
        reason for HTTPS certificate error.</li>

        <li>These extended error codes do not suffer from the limitations
        discussed in bullets (1) and (2), but the user still does not know the
        exact reason nor he/she is aware of the exact entity blocking the
        access to the domain. For example, a DNS server may block access to a
        domain based on the content category such as "Malware" to protect the
        endpoint from malicious software, "Phishing" to prevent the user from
        revealing sensitive information to the attacker, etc. A user needs to
        know the contact details of the IT/InfoSec team to raise a
        complaint.</li>

        <li>When a resolver or forwarder forwards the received EDE option, the
        EXTRA-TEXT field only conveys the source of the error (Section 3 of
        [RFC8914]) and does not provide additional textual information about
        the cause of the error.</li>
      </ol>

      <aside />

    </section>

    <section anchor="option-code">
      <name>I-JSON in EXTRA-TEXT field</name>

      <t>Servers that are compliant with this specification send I-JSON data
      in the <xref target="RFC8914">EXTRA-TEXT field</xref> using the <xref
      target="RFC7493">Internet JSON (I-JSON) message format</xref>.</t>

      <aside>
        <t>Note that <xref target="RFC7493" /> was based on <xref
        target="RFC7159" />, but <xref target="RFC7159" /> was replaced by
        <xref target="RFC8259" />.</t>
      </aside>

      <t>This document defines the following JSON names:</t>

      <dl newline="false" spacing="normal">
        <dt>c: (contact)</dt>

        <dd>The contact details of the IT/InfoSec team to report
        mis-classified DNS filtering. This field is structured as an array of
        contact URIs (e.g., tel, sips, https). At least one contact URI MUST
        be included. This field is mandatory.</dd>

        <dt>j: (justification)</dt>

        <dd>the textual justification for this particular DNS filtering. The
        field should be treated only as diagnostic information for IT staff.
        This field is mandatory.</dd>

        <dt>s: (suberror)</dt>

        <dd>the suberror code for this particular DNS filtering. This field is
        optional.</dd>

        <dt>o: (organization)</dt>

        <dd>human-friendly name of the organization that filtered this
        particular DNS query. This field is optional.</dd>
      </dl>

      <t>New JSON names MUST be defined in the <xref target="IANA">IANA
      registry</xref>, 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 and it is RECOMMENDED they be as short as possible.</t>

      <t>To reduce packet overhead the generated JSON SHOULD be as short as
      possible: short domain names, concise text in the values for the "j" and
      "o" names, and minified JSON (that is, without spaces or line breaks
      between JSON elements).</t>

      <t>The JSON data can be parsed to display to the user, logged, or
      otherwise used to assist the end-user or IT staff with troubleshooting
      and diagnosing the cause of the DNS filtering.</t>
    </section>

    <section anchor="operation" numbered="true" toc="default">
      <name>Protocol Operation</name>

      <section anchor="generate-request">
        <name>Client Generating Request</name>

        <t>When generating a DNS query, the client includes the Extended DNS
        Error option <xref target="RFC8914">Section 2 of</xref> in the <xref
        target="RFC6891">OPT pseudo-RR</xref> to elicit the Extended DNS Error
        option in the DNS response.</t>
      </section>

      <section>
        <name>Server Generating Response</name>

        <t>When the DNS server filters its DNS response to an A or AAAA record
        query, the DNS response MAY contain an empty answer, NXDOMAIN, or a
        forged A or AAAA response, as desired by the DNS server. In addition,
        if the query contained the OPT pseudo-RR the DNS server MAY return
        more detail in the EXTRA-TEXT field as described in <xref
        target="process-response" />.</t>

        <t>Servers may decide to return small TTL values in filtered DNS
        responses (e.g., 2 seconds) to handle domain category and reputation
        updates.</t>
      </section>

      <section anchor="process-response">
        <name>Client Processing Response</name>

        <t>On receipt of a DNS response with an Extended DNS Error option, the
        following actions are performed if the EXTRA-TEXT field contains valid
        JSON:</t>

        <ul>
          <li>The response MUST be received over an encrypted DNS channel. If
          not, the requestor MUST discard data in the EXTRA-TEXT field.</li>

          <li>The response MUST be received from a DNS server which advertised
          EDE support via a trusted channel, e.g., <xref
          target="I-D.reddy-add-resolver-info">RESINFO</xref>.</li>

          <li>Servers which don't support this specification might use plain
          text in the EXTRA-TEXT field so that requestors SHOULD properly
          handle both plaintext and JSON text in the EXTRA-TEXT field.</li>

          <li>The DNS response MUST also contain an extended error code of
          <xref target="RFC8914">"Censored", "Blocked", "Filtered" or
          "Forged"</xref>, otherwise the EXTRA-TEXT field is discarded.</li>

          <li>If either of the mandatory JSON names "c" and "j" are missing or
          have empty values in the EXTRA-TEXT field, the entire JSON is
          discarded.</li>

          <li>The JSON name "s" MUST NOT be present with the extended error
          code "Censored".</li>
        </ul>

        <ul>
          <li>If a DNS client has enabled opportunistic privacy profile (<xref
          target="RFC8310">Section 5 of</xref>) for DoT, the DNS client will
          either fallback to an encrypted connection without authenticating
          the DNS server provided by the local network or fallback to clear
          text DNS, and cannot exchange encrypted DNS messages. Both of these
          fallback mechanisms adversely impacts security and privacy. If the
          DNS client has enabled opportunistic privacy profile for DoT, the
          DNS client MUST ignore the EXTRA-TEXT field of the EDE responses,
          but SHOULD process other parts of the response.</li>

          <li>If a DNS client has enabled strict privacy profile (<xref
          target="RFC8310">Section 5 of</xref>) for DoT, the DNS client
          requires an encrypted connection and successful authentication of
          the DNS server; this mitigates both passive eavesdropping and client
          redirection (at the expense of providing no DNS service if an
          encrypted, authenticated connection is not available). If the DNS
          client has enabled strict privacy profile for DoT, the client MAY
          process the EXTRA-TEXT field of the DNS response. Note that the
          strict and opportunistic privacy profiles as defined in <xref
          target="RFC8310" /> only apply to DoT; there has been no such
          distinction made for DoH.</li>

          <li>If the DNS client determines that the encrypted DNS server does
          not offer DNS filtering service, it MUST discard the EXTRA-TEXT
          field of the EDE response. For example, the DNS client can learn
          whether the encrypted DNS resolver performs DNS-based content
          filtering or not by retrieving resolver information using the method
          defined in <xref target="I-D.reddy-add-resolver-info" />.</li>

          <li>When a forwarder receives an EDE option, whether or not (and
          how) to pass along JSON information in the EXTRA-TEXT on to their
          client is implementation dependent <xref target="RFC5625" />.
          Implementations MAY choose to not forward the JSON information, or
          they MAY choose to create a new EDE option that conveys the
          information in the "c", "s" and "j" fields encoded in the JSON
          object.</li>
        </ul>
      </section>
    </section>

    <section numbered="true" toc="default">
      <name>Interoperation with RPZ Servers</name>

      <t>This section discusses operation with an <xref target="RPZ">RPZ
      server</xref> that indicates filtering with a NXDOMAIN response with the
      Recursion Available bit cleared (RA=0).</t>

      <t>When the DNS client supports this specification but the server does
      not, the server will continue replying when a query is RPZ filtered with
      NXDOMAIN and RA=0. An DNS client upgraded to support this specification
      can continue to accept responses with NXDOMAIN and RA=0 from the RPZ
      server that does not support this specification.</t>

      <t>When the DNS client supports this specification and the server
      supports this specification, the client learns of the server's support
      via <xref target="I-D.reddy-add-resolver-info" /> and the client
      includes the EDE OPT pseudo-RR in the query. This allows the server to
      differentiate EDE-aware clients from EDE-unaware clients and respond
      appropriately.</t>
    </section>

    <section numbered="true" toc="default">
      <name>Examples</name>

      <t>An example showing the nameserver at 'ns.example.net' that filtered a
      DNS "A" record query for 'example.org' is shown in <xref
      format="default" target="example-json" />.</t>

      <figure anchor="example-json">
        <name>JSON returned in EXTRA-TEXT field of Extended DNS Error
        response</name>

        <artwork align="left" alt="" name="" type=""><![CDATA[  
  {
  "c": ["tel:+358-555-1234567", "sips:bob@bobphone.example.com",
        "https://ticket.example.com?d=example.org&t=1650560748"],
    "j": "malware present for 23 days",
    "s": 1,
    "o": "example.net Filtering Service"
  }]]></artwork>
      </figure>

      <t>In <xref target="example-minified" /> the same content is shown with
      minified JSON (no whitespace, no blank lines) with '\' line wrapping per
      <xref format="default" target="RFC8792" />.</t>

      <figure anchor="example-minified">
        <name>Minified response</name>

        <artwork align="left" alt="" name="" type=""><![CDATA[
  ============== NOTE: '\' line wrapping per RFC 8792 ===============

  {"c":["tel:+358-555-1234567","sips:bob@bobphone.example.com", \
  "https://ticket.example.com?d=example.org&t=1650560748"],"s":1, \
  "j":"malware present for 23 days","o":"example.net Filtering \
  Service"}]]></artwork>
      </figure>
    </section>

    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>

      <t>Security considerations in Section 6 of <xref target="RFC8914" />
      apply to this document.</t>

      <t>To minimize impact of active on-path attacks on the DNS channel, the
      client validates the response as described in <xref
      target="process-response" />.</t>

      <t>A client might choose to display the information in the EXTRA-TEXT
      field if and only if the encrypted resolver has sufficient reputation,
      according to some local policy (e.g. user configuration, administrative
      configuration, or a built-in list of respectable resolvers). This limits
      the ability of a malicious encrypted resolver to cause harm. If the
      client decides not to display the all of the information in the
      EXTRA-TEXT field, it can be logged for diagnostics purpose and the
      client can only display the resolver hostname that blocked the domain,
      error description for the EDE code and the suberror description for the
      "s'" field to the end-user.</t>

      <t>When displaying the free-form text of "c" and "o", the browser SHOULD
      NOT make any of those elements into actionable (clickable) links.</t>

      <t>An attacker might inject (or modify) the EDE EXTRA-TEXT field with an
      DNS proxy or DNS forwarder that is unaware of EDE. Such a DNS proxy or
      DNS forwarder will forward that attacker-controlled EDE option. To
      prevent such an attack, clients supporting this document MUST discard
      the EDE option if their DNS server does not signal EDE support via
      RESINFO <xref target="I-D.reddy-add-resolver-info" />. As recommended in
      <xref target="I-D.reddy-add-resolver-info" />, RESINFO should be
      retrieved over an encrypted DNS channel or integrity protected with
      DNSSEC.</t>

      <!--
      <t>Because this specification still allows DNS filtering to
      respond with an empty answer, NXDOMAIN, or forged answer (as the
      DNS server sees fit), this specification remains incompatible
      with client-based DNSSEC validation. However, it is possible to
      maintain compatibility with DNSSEC by returning the real (unfiltered)
      answer with its DNSSEC signature intact. By also returning the
      EDNS(0) Structured Error, the DNS requestor can be informed of
      the filtering (from the DNS responder).</t>
-->

      <!--
      <t>The client knows it is connecting to an HTTPS server returning the
      error page. To reduce threat surface the client can retrieve the Error
      Page URL using, for example, an isolated environment and take other
      precautions such as clearly labeling the page as untrusted or prevent
      user interaction with the page. Such isolation should prevent
      transmitting cookies, block JavaScript, block auto-fill of credentials
      or personal information, and be isolated from the user's normal
      environment.</t>

      <t>Browsers perform some of the above restrictions when accessing
      captive portals (Section 5 of <xref target="RFC8910"></xref> or <xref
      target="Safari-Cookie"></xref>), during private browsing, or using
      containerization <xref target="Facebook-Container"></xref>.</t>

      <t>Note that the means to use a sandbox environment and a user interface
      presenting the error page are not covered in this document. By its
      nature, these aspects are implementation specific and best left to the
      application and user interface designers.</t>
-->
    </section>

    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerationsd</name>

      <t>This document requests IANA to register the
      "application/json+structured-dns-error" media type in the "Media Types"
      registry <xref format="default" target="IANA-MediaTypes" />. This
      registration follows the procedures specified in <xref format="default"
      target="RFC6838" />:</t>

      <artwork align="left" alt="" name="" type=""><![CDATA[   Type name: application

   Subtype name: json+structured-dns-error

   Required parameters: N/A

   Optional parameters: N/A

   Encoding considerations: as defined in Section NN of [RFCXXXX].

   Security considerations: See Section NNN of [RFCXXXX].

   Interoperability considerations: N/A

   Published specification: [RFCXXXX]

   Applications that use this media type: Section NNNN of [RFCXXXX].

   Fragment identifier considerations: N/A

   Additional information: N/A

   Person & email address to contact for further information: IETF,
      iesg@ietf.org

   Intended usage: COMMON

   Restrictions on usage: none

   Author: See Authors' Addresses section.

   Change controller: IESG

   Provisional registration?  No]]></artwork>

      <section anchor="procedure">
        <name>New registry for SubError Codes</name>

        <t>IANA is requested to create a new registry, entitled "SubError
        Codes" under "Domain Name System (DNS) Parameters, Extended DNS Error
        Codes" registry. A registration procedure for suberror codes MUST
        include the following fields:</t>

        <ul spacing="normal">
          <li>Number: wire format suberror code (range 0-255)</li>

          <li>Meaning: a short description</li>

          <li>Reference: pointer to the specification text</li>

          <li>Change Controller: Person or entity, with contact information if
          appropriate.</li>
        </ul>

        <t>New entries in this registry are subject to an Expert Review
        registration policy <xref target="RFC8126" />. The designated expert
        MUST ensure that the Reference is stable and publicly available, and
        that it specifies the suberror code and a short description. The
        Format Reference may be any individual's Internet-Draft, or a document
        from any other source with similar assurances of stability and
        availability.</t>
      </section>
    </section>

    <section anchor="iana-keys">
      <name>Initial Sub-errors</name>

      <t>The registry shall initially be populated with the following suberror
      codes. :</t>

      <table>
        <thead>
          <tr>
            <th align="left">Number</th>

            <th align="left">Meaning</th>

            <th align="left">Reference</th>

            <th align="left">Change Controller</th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <td align="left">0</td>

            <td align="left">Reserved</td>

            <td align="left">This document</td>

            <td align="left">IETF</td>
          </tr>

          <tr>
            <td align="left">1</td>

            <td align="left">Malware</td>

            <td align="left">This document</td>

            <td align="left">IETF</td>
          </tr>

          <tr>
            <td align="left">2</td>

            <td align="left">Phishing</td>

            <td align="left">This document</td>

            <td align="left">IETF</td>
          </tr>

          <tr>
            <td align="left">3</td>

            <td align="left">Spam</td>

            <td align="left">This document</td>

            <td align="left">IETF</td>
          </tr>

          <tr>
            <td align="left">4</td>

            <td align="left">Spyware</td>

            <td align="left">This document</td>

            <td align="left">IETF</td>
          </tr>

          <tr>
            <td align="left">5</td>

            <td align="left">Adware</td>

            <td align="left">This document</td>

            <td align="left">IETF</td>
          </tr>

          <tr>
            <td align="left">6</td>

            <td align="left">Network policy imposed by the operator of the
            network</td>

            <td align="left">This document</td>

            <td align="left">IETF</td>
          </tr>
        </tbody>
      </table>
    </section>

    <!--
</section>
-->

    <section numbered="true" removeInRFC="true" toc="default">
      <name>Changes</name>

      <section numbered="true" toc="exclude">
        <name>Changes from 03 to 04</name>

        <ul>
          <li>Clarified text content is for IT staff</li>

          <li>Introduced 'suberror' terminology and associated IANA
          registration</li>
        </ul>
      </section>

      <section numbered="true" toc="exclude">
        <name>Changes from 02 to 03</name>

        <ul>
          <li>Require using <xref
          target="I-D.reddy-add-resolver-info">RESINFO</xref> in client
          processing and added discussion of attack mitigation of using
          RESINFO.</li>

          <li>Removed validation of URI domain suffix, which we can't do for
          some URLs (e.g., tel:), is difficult/impossible for others when 3rd
          party is handling level one support (e.g., sips:). Instead rely on
          RESINFO telling us if EDE is supported by the DNS server and, if so,
          expect it to properly support EDE rather than blindly forward an
          unknown DNS option.</li>

          <li>Removed 'partial URI' text</li>
        </ul>
      </section>

      <section numbered="true" toc="exclude">
        <name>Changes from 01 to 02</name>

        <ul>
          <li>repurpose Extended DNS Error's EXTRA-TEXT field to carry JSON,
          which also means this document updates RFC8914</li>

          <li>clarified DNS forwarders might forward EXTRA-TEXT without change
          or might rewrite "j" and "d"</li>
        </ul>
      </section>

      <section numbered="true" toc="exclude">
        <name>Changes from 00 to 01</name>

        <ul>
          <li>removed support for multiple responsible parties</li>

          <li>one-character JSON names to minimize JSON length</li>

          <li>partial URI sent in "c" and "r" names, combined with "d" name
          sent in JSON to minimize attack surface and minimize JSON
          length</li>

          <li>moved EDNS(0) forgery-mitigation text, some Security
          Considerations text, and some other text from <xref
          target="I-D.reddy-dnsop-error-page" /> to this document</li>
        </ul>
      </section>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <references>
      <name>References</name>

      <references>
        <name>Normative References</name>

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7493.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7159.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6838.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6891.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8310.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />
      </references>

      <references>
        <name>Informative References</name>

        <reference anchor="IANA-MediaTypes"
                   target="https://www.iana.org/assignments/media-types">
          <front>
            <title>Media Types</title>

            <author fullname="IANA">
              <organization />
            </author>

            <date />
          </front>
        </reference>

        <reference anchor="RPZ" target="https://en.wikipedia.org/w/index.php">
          <front>
            <title>Response policy zone</title>

            <author fullname="Wikipedia">
              <organization />
            </author>

            <date />
          </front>
        </reference>

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5625.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7858.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8484.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8499.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8792.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8914.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8259.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9250.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.reddy-add-resolver-info.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.reddy-dnsop-error-page.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />
      </references>
    </references>
  </back>
</rfc>
