Skip to main content

The "ZONEVERSION" EDNS option for the version token of a Resource Record's zone
draft-ietf-dnsop-zoneversion-04

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Active".
Authors Hugo Salgado , Mauricio Vergara Ereche
Last updated 2023-12-11 (Latest revision 2023-08-03)
Replaces draft-ietf-dnsop-rrserial
RFC stream Internet Engineering Task Force (IETF)
Formats
Reviews
Additional resources Mailing list discussion
Stream WG state WG Document
Document shepherd Tim Wicinski
Shepherd write-up Show Last changed 2023-09-27
IESG IESG state AD is watching
Consensus boilerplate Unknown
Telechat date (None)
Responsible AD Warren "Ace" Kumari
Send notices to tjw.ietf@gmail.com
draft-ietf-dnsop-zoneversion-04
Internet Engineering Task Force                               H. Salgado
Internet-Draft                                                 NIC Chile
Intended status: Informational                                M. Vergara
Expires: 4 February 2024                                    DigitalOcean
                                                           3 August 2023

   The "ZONEVERSION" EDNS option for the version token of a Resource
                             Record's zone
                    draft-ietf-dnsop-zoneversion-04

Abstract

   The "ZONEVERSION" EDNS option allows a DNS querier to request a DNS
   authoritative server to add an EDNS option in the answer of such
   query with a token field representing the version of the zone which
   contains the answered Resource Record ("RR"), such as the Start Of
   Authority ("SOA") serial field in zones when this number corresponds
   to the zone version.

   This "ZONEVERSION" data allows to debug and diagnose problems by
   helping to recognize the data source of an answer in an atomic single
   DNS query, by associating the response with a respective zone version
   of such domain name.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 4 February 2024.

Copyright Notice

   Copyright (c) 2023 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

Salgado & Vergara        Expires 4 February 2024                [Page 1]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   3
   2.  The ZONEVERSION Option  . . . . . . . . . . . . . . . . . . .   3
     2.1.  The ZONEVERSION Option Presentation Format  . . . . . . .   4
   3.  ZONEVERSION Processing  . . . . . . . . . . . . . . . . . . .   5
     3.1.  Initiator . . . . . . . . . . . . . . . . . . . . . . . .   5
     3.2.  Responder . . . . . . . . . . . . . . . . . . . . . . . .   5
   4.  Type Definition for SOA-SERIAL  . . . . . . . . . . . . . . .   6
     4.1.  Type SOA-SERIAL Presentation Format . . . . . . . . . . .   6
   5.  Example usage . . . . . . . . . . . . . . . . . . . . . . . .   6
   6.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   7
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
     7.1.  DNS EDNS0 Option Code Registration  . . . . . . . . . . .   8
     7.2.  ZONEVERSION Registry  . . . . . . . . . . . . . . . . . .   8
       7.2.1.  Expert Review Directives  . . . . . . . . . . . . . .   9
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .   9
   9.  Normative References  . . . . . . . . . . . . . . . . . . . .  10
   10. Informative References  . . . . . . . . . . . . . . . . . . .  10
   Appendix A.  Implementation Considerations  . . . . . . . . . . .  11
   Appendix B.  Implementation References  . . . . . . . . . . . . .  11
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  11

1.  Introduction

   The "ZONEVERSION" EDNS option [RFC6891] allows a DNS querier to
   request to a DNS authoritative server to add an EDNS option in the
   answer of such query with a token field representing the version of
   the zone associated to the answered Resource Record (RR), such as the
   SOA serial field in zones when this number corresponds to the zone
   version.

   This "ZONEVERSION" data allows to help debug by recognizing the data
   source of an answer, associating this answer with a respective zone
   version.

Salgado & Vergara        Expires 4 February 2024                [Page 2]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

   DNS data is of loose coherent nature, meaning that a record obtained
   by a response could be out-of-sync with other authoritative sources
   of the same data.  This makes it difficult to debug responses,
   because you'd need to couple an answer with the same version of the
   zone used to obtain such data.  Even when in zones where the SOA
   serial field have the meaning of zone version you could use a
   separate query to ask for the SOA RR of the zone and therefore know
   its SOA serial, but such separate query is performed in a different
   time and could arrive from another authoritative source (for example,
   in the case the server is anycasted as described in Section 4.9 of
   [RFC4786]), so it's not directly correlated with the original query.

   This EDNS option is aimed to be used only on authoritative servers
   for a zone.  It's intended for hop-to-hop communication (not
   transitive).

   The ZONEVERSION EDNS extension can have different meaning depending
   on the semantics of the zone maintainer and implementation of
   nameservers.  This document defines one possible value, when the zone
   version corresponds to the serial field of the SOA RR of the zone, a
   classic behaviour defined in Section 4.3.5 of [RFC1034].

   As of the writing of this document, we recognize there are cases
   where nameservers use different backends for its data sources (like
   relational databases or by using a different off-DNS synchronicity
   among others) therefore, the SOA version field doesn't offer much
   relevance as a versioning to its content, and in those cases the
   ZONEVERSION EDNS extension SHOULD be extended with a different type
   and have an opaque value for its data token.

1.1.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

2.  The ZONEVERSION Option

   The variable part of RDATA in the OPT RR Section 6.1.2 of [RFC6891]
   for ZONEVERSION is defined as follows:

   *  The OPTION-CODE for the ZONEVERSION option is <TBD>.

   *  The OPTION-LENGTH for the ZONEVERSION option MUST have a value of
      0 for queries, and MUST have the value of the length in octets for
      the next OPTION-DATA for responses.

Salgado & Vergara        Expires 4 February 2024                [Page 3]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

   *  The OPTION-DATA for the ZONEVERSION option is composed of the
      concatenation of

      -  An unsigned 1 byte Label Count number (LABELCOUNT) indicating
         the number of labels in the QNAME owner name this answer's zone
         name refers to

      -  An unsigned 1 byte type number (TYPE) that distingishes the
         format and meaning of TYPEDATA

      -  And the final Data value of the ZONEVERSION field as an opaque
         bit value (TYPEDATA).

                    +0 (MSB)                       +1 (LSB)
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    0: |           LABELCOUNT          |            TYPE               |
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    2: |                           TYPEDATA                            |
       /                                                               /
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

 Figure 1: Diagram with the OPTION-DATA format for ZONEVERSION option

   The LABELCOUNT number helps to disambiguate the name of the zone that
   this ZONEVERSION refers to.  For example if the response is a
   downward referral and the server is authoritative for some portion of
   the QNAME that differs from a server that is below the zone cut and
   is completely authoritative for a longer match of the labels in the
   QNAME.  Also, if the ANSWER section has more than one RR set with
   different zones (like a CNAME and a target name in another zone) the
   number of labels in the QNAME disambiguate such situation.

   The value of the LABELCOUNT field MUST NOT count the null (root)
   label that terminates the QNAME owner name.  The value of the
   LABELCOUNT field MUST be less than or equal to the number of labels
   in the QNAME owner name.  For example, a QNAME "www.example.com." or
   "a.b.example.com" or "a.b.c.example.com" inside a "example.com."
   zone, that is not delegated not authoritative for those sub-zones in
   the same nameserver, has a LABELCOUNT field value of 2 for all such
   cases.  Root zone (".") has a LABELCOUNT field value of 0.

   [RFC Editor: change <TBD> to the proper code when assigned by IANA.]

2.1.  The ZONEVERSION Option Presentation Format

   The presentation format of the RDATA portion is as follows:

Salgado & Vergara        Expires 4 February 2024                [Page 4]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

   The OPTION-CODE field MUST be represented as the mnemonic value
   "ZONEVERSION".

   The OPTION-LENGTH field could be omitted in presentation format, but
   if used it MUST be represented as an unsigned decimal integer.

   The LABELCOUNT value of OPTION-DATA field could be omitted in
   presentation format, but if used it MUST be represented as an
   unsigned decimal integer.  It's RECOMMENDED to display the zone name
   that represents this number of labels of the QNAME owner name, for a
   simpler human consumption.

   The TYPE, TYPEDATA values of OPTION-DATA field should be represented
   following its own format, as specified in the corresponding type's
   specification.

3.  ZONEVERSION Processing

3.1.  Initiator

   The EDNS ZONEVERSION option MAY be included on any QUERY, by adding a
   zero-length EDNS ZONEVERSION option to the options field of the OPT
   record when the query is made.

3.2.  Responder

   If an EDNS ZONEVERSION option is sent to a server that is
   Authoritative for the zone, then a name server that understands the
   ZONEVERSION option and chooses to honor a particular ZONEVERSION
   request, MUST put in the OPTION-DATA a type and value that
   corresponds to the properly semantic of such type number, and
   corresponds to a zone versioning value of the zone that holds the
   original QNAME of the reply (as per Section 4 of [RFC8499]).

   Otherwise, the answer MUST NOT add an EDNS ZONEVERSION option to the
   response.

   In case of a downward referral response, even when the Authoritative
   Answer bit is not set, this specification considers that the Answer
   holds data that is authoritative for some portion of the QNAME (see
   "Referrals" in Section 4 of [RFC8499]).  Given this, a ZONEVERSION
   option MUST be present as indicated in the paragraph above, with the
   zone versioning value that holds that portion of the QNAME where it
   is completely authoritative.

Salgado & Vergara        Expires 4 February 2024                [Page 5]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

4.  Type Definition for SOA-SERIAL

   The first and only ZONEVERSION type defined in this document for the
   ZONEVERSION Option has the TYPE of 0, and its corresponding TYPEDATA
   MUST be a copy of the unsigned 32 bit version number as defined in
   the SERIAL field of the "SOA RDATA Format" in Section 3.3.13 of
   [RFC1035].

   The mnemonic of this type is SOA-SERIAL.

   The OPTION-LENGTH for this ZONEVERSION type MUST have a value of 6
   for responses.

   Note that in the case of a SERVFAIL RCODE the responder MAY include
   the ZONEVERSION EDNS Option if the QNAME still belongs to an
   authoritative zone of the server, in which case that value MUST be
   the one included in the answer.

   Note that a NODATA response code as defined in Section 3 of [RFC8499]
   MUST also include the ZONEVERSION answer even when there's no ANSWER
   data for the QNAME, since the RCODE is NOERROR.

4.1.  Type SOA-SERIAL Presentation Format

   The presentation format of this type content is as follows:

   The TYPE field MUST be represented as the mnemonic value "SOA-
   SERIAL".

   The TYPEDATA field MUST be represented as an unsigned decimal
   integer.

5.  Example usage

   A zone which utilizes the serial field of the SOA RR as a number of
   the zone version release, should answer a ZONEVERSION request with an
   EDNS option code ZONEVERSION, an OPTION-LENGTH with value 6, and an
   OPTION-DATA with a 1-byte LABELCOUNT with the number of labels that
   corresponds to the zone apex name, a 1-byte TYPE with value 0, and a
   copy of the unsigned 32 bit version number of the SERIAL field of its
   SOA zone Resource Record.

   An example of a proper diagnostic tool that implements ZONEVERSION
   EDNS extension towards a compliant authoritative DNS server could be:

Salgado & Vergara        Expires 4 February 2024                [Page 6]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

  $ dig @ns.example.com www.example.com aaaa +zoneversion

  ; <<>> DiG 9.17.14-patched <<>> @ns.example.com www.example.com aaaa +zoneversion
  ; (1 server found)
  ;; global options: +cmd
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7077
  ;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 1232
  ; ZONEVERSION: 02 00 00 04 78 95 a4 e9 ("SOA-SERIAL: 2023073001 (example.com.)")
  ;; QUESTION SECTION:
  ;www.example.com.    IN  AAAA

  ;; ANSWER SECTION:
  www.example.com.  43200  IN  AAAA  2001:db8::80

  ;; AUTHORITY SECTION:
  example.com.    43200  IN  NS  ns.example.com.

  ;; ADDITIONAL SECTION:
  ns.example.com.    43200  IN  AAAA  2001:db8::53

  ;; Query time: 15 msec
  ;; SERVER: 2001:db8::53#53(2001:db8::53) (UDP)
  ;; WHEN: dom jul 30 19:51:04 -04 2023
  ;; MSG SIZE  rcvd: 129

                Figure 2: Example usage and dig output

6.  Acknowledgements

   The authors thanks all the comments and support made in the DNSOP
   mailing list, chats and discussions.  In special for the suggestions
   to generalize the option using a registry of types from Petr Špaček
   and Florian Obser, suggestions for implementation from Stéphane
   Bortzmeyer, security clarifications from George Michaelson, zone name
   disambiguation from Joe Abley and Brian Dickson, and reviews from Tim
   Wicinski and Peter Thomassen.

7.  IANA Considerations

Salgado & Vergara        Expires 4 February 2024                [Page 7]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

7.1.  DNS EDNS0 Option Code Registration

   This document defines a new EDNS0 option, entitled "ZONEVERSION" (see
   Section 2), and assigns a value of <TBD> from the DNS EDNS0 Option
   Codes (OPT) Option space:

           +=======+=============+==========+=================+
           | Value | Name        | Status   | Reference       |
           +=======+=============+==========+=================+
           | <TBD> | ZONEVERSION | Standard | [this document] |
           +=======+=============+==========+=================+

                      Table 1: DNS EDNS0 Option code

   [RFC Editor: change <TBD> to the proper code when assigned by IANA.]

   [RFC Editor: change "this document" with the proper RFC number for
   this document when assigned by IANA.]

7.2.  ZONEVERSION Registry

   The ZONEVERSION EDNS Option also defines a 8-bit TYPE field, for
   which IANA is requested to create and maintain a new registry
   entitled "DNS EDNS0 ZONEVERSION TYPE Values" (abbreviation
   "ZONEVERSION") used by the ZONEVERSION Option, inside the "Domain
   Name System (DNS) Parameters" group.  Initial values for the DNS
   EDNS0 ZONEVERSION TYPE values registry are given below; future
   assignments in the 1-245 values are to be made through Specification
   Required Review [BCP26].  Assignments consist of a TYPE value as an
   unsigned 8-bit integer recorded in decimal, a Mnemonic name as an
   uppercase ASCII string with maximum length of 15 characters, and the
   required document reference.

       +==================+=====================+=================+
       | ZONEVERSION TYPE | Mnemonic            | Reference       |
       +==================+=====================+=================+
       | 0                | SOA-SERIAL          | [this document] |
       +==================+=====================+=================+
       | 1-245            | Unassigned          |                 |
       +==================+=====================+=================+
       | 246-254          | Reserved for Local/ | [this document] |
       |                  | Experimental Use    |                 |
       +==================+=====================+=================+
       | 255              | Reserved for future | [this document] |
       |                  | expansion           |                 |
       +==================+=====================+=================+

                      Table 2: ZONEVERSION Registry

Salgado & Vergara        Expires 4 February 2024                [Page 8]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

   [RFC Editor: change "this document" with the proper RFC number for
   this document when assigned by IANA.]

   The change control for this registry should be by means of an
   Standard action.

7.2.1.  Expert Review Directives

   Allocation procedures for new code points in the ZONEVERSION TYPE
   registry require Specification Required review, and so it requires
   Expert Reviews as stated in [BCP26].

   The expert should consider the following points:

   *  Duplication of code point allocations should be avoided.

   *  A Presentation Format section should be provided, with a clear
      code point mnemonic.

   *  The referenced document and stated use of the new code point
      should be appropriate for the intended use of a ZONEVERSION TYPE
      assignment.  In particular the reference should state clear
      instructions for implementers about the syntax and semantic of the
      data.  Also the Length of the Data must have proper limits.

   The expert reviewing the request MUST approve or disapprove the
   request within 10 business days from when she or he received the
   expert review request.

8.  Security Considerations

   The EDNS extension data it's not covered by RRSIG records, so there's
   no way to verify its authenticity nor integrity using DNSSEC and
   could theoretically be tampered by a person-in-the-middle if the
   transport is made by insecure means.  Caution should be taken to use
   the EDNS ZONEVERSION data for any means besides troubleshooting and
   debugging.

   If there's a need to certify the ZONEVERSION trustworthiness, it will
   be necessary to use an encrypted and authenticated DNS transport.

   If there's a need to authenticate data origin for the ZONEVERSION
   value, an answer with the SOA-SERIAL type as defined above could be
   compared to a separate regular SOA query with DO flag, whose answer
   shall be DNSSEC signed, with the cautions about Anycast and others as
   already stated in Introduction.

Salgado & Vergara        Expires 4 February 2024                [Page 9]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

   With the SOA-SERIAL type defined above, there's no risk on disclosure
   of private information, as the SERIAL of the SOA record is already
   publicly available.

   Please note that the ZONEVERSION option can not be used for checking
   the correctness of an entire zone in a server.  For such cases, the
   ZONEMD record [RFC8976] might be better suited at such task.
   ZONEVERSION can help identify and correlate a certain specific answer
   with a version of a zone, but it has no special integrity or
   verification function besides a normal field value inside a zone, as
   stated above.

9.  Normative References

   [BCP26]    Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing an IANA Considerations Section in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

   [RFC1034]  Mockapetris, P., "Domain names - concepts and facilities",
              STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987,
              <https://www.rfc-editor.org/info/rfc1034>.

   [RFC1035]  Mockapetris, P., "Domain names - implementation and
              specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
              November 1987, <https://www.rfc-editor.org/info/rfc1035>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC6891]  Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms
              for DNS (EDNS(0))", STD 75, RFC 6891,
              DOI 10.17487/RFC6891, April 2013,
              <https://www.rfc-editor.org/info/rfc6891>.

10.  Informative References

   [ImplRef]  Salgado, H., "Zoneversion Implementations", 2023,
              <https://github.com/huguei/rrserial>.

   [RFC4786]  Abley, J. and K. Lindqvist, "Operation of Anycast
              Services", BCP 126, RFC 4786, DOI 10.17487/RFC4786,
              December 2006, <https://www.rfc-editor.org/info/rfc4786>.

Salgado & Vergara        Expires 4 February 2024               [Page 10]
Internet-Draft         The ZONEVERSION EDNS option           August 2023

   [RFC8499]  Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS
              Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499,
              January 2019, <https://www.rfc-editor.org/info/rfc8499>.

   [RFC8976]  Wessels, D., Barber, P., Weinberg, M., Kumari, W., and W.
              Hardaker, "Message Digest for DNS Zones", RFC 8976,
              DOI 10.17487/RFC8976, February 2021, <httpss://www.rfc-
              editor.org/info/rfc8976>.

Appendix A.  Implementation Considerations

   With very few exceptions, EDNS options which elicit an EDNS option in
   the response are independent of the QNAME.  This is not the case of
   ZONEVERSION, so its implementation may be more or less difficult
   depending on how EDNS options are handled in the name server.

Appendix B.  Implementation References

   There's a patched NSD server version 4.7.0 with support for
   ZONEVERSION with an experimental opcode, with live test servers
   installed for compliance tests.  Also there is a client command "dig"
   with added zoneversion support, along with test libraries in Perl,
   Python and Go.  More information in the working document [ImplRef].

Authors' Addresses

   Hugo Salgado
   NIC Chile
   Miraflores 222, piso 14
   CP 8320198 Santiago
   Chile
   Phone: +56 2 29407700
   Email: hsalgado@nic.cl

   Mauricio Vergara Ereche
   DigitalOcean
   101 6th Ave
   New York,  NY 10013
   United States of America
   Email: mvergara@digitalocean.com

Salgado & Vergara        Expires 4 February 2024               [Page 11]