In the DNS, a zone is the collection of authoritative resource records (RRs) sharing a common origin ([
RFC 8499]). Zones are often stored as files in the so-called "master file format" ([
RFC 1034]). Zones are generally distributed among name servers using the zone transfer (AXFR) ([
RFC 5936]) and incremental zone transfer (IXFR) ([
RFC 1995]) protocols. They can also be distributed outside of the DNS with any file transfer protocol such as FTP, HTTP, and rsync, or even as email attachments. Currently, there is no standard way to compute a hash or message digest for a stand-alone zone.
This document specifies an RR type that provides a cryptographic message digest of the data in a zone. It allows a receiver of the zone to verify the zone's integrity and authenticity when used in combination with DNSSEC. The digest RR is a part of the zone itself, allowing verification of the zone, no matter how it is transmitted. The digest uses the wire format of zone data in a canonical ordering. Thus, it is independent of presentation format such as whitespace, capitalization, and comments.
This specification is
OPTIONAL to implement by both publishers and consumers of zone data.
The primary motivation for this protocol enhancement is the desire to verify the data integrity and origin authenticity of a stand-alone zone, regardless of how it is transmitted. A consumer of zone data should be able to verify that it is as published by the zone operator.
Note, however, that integrity and authenticity can only be assured when the zone is signed. DNSSEC provides three strong security guarantees relevant to this protocol:
-
whether or not to expect DNSSEC records in the zone,
-
whether or not to expect a ZONEMD record in a signed zone, and
-
whether or not the ZONEMD record has been altered since it was signed.
A secondary motivation is to provide the equivalent of a checksum, allowing a zone recipient to check for unintended changes and operational errors such as accidental truncation.
One approach to preventing data tampering and corruption is to secure the distribution channel. The DNS has a number of features that are already used for channel security. Perhaps the most widely used is DNS transaction signatures (TSIGs) ([
RFC 8945]). A TSIG uses shared secret keys and a message digest to protect individual query and response messages. It is generally used to authenticate and validate UPDATE ([
RFC 2136]), AXFR ([
RFC 5936]), and IXFR ([
RFC 1995]) messages.
DNS Request and Transaction Signatures (SIG(0)) ([
RFC 2931]) is another protocol extension that authenticates individual DNS transactions. Whereas SIG records normally cover specific RR types, SIG(0) is used to sign an entire DNS message. Unlike TSIG, SIG(0) uses public key cryptography rather than shared secrets.
The Transport Layer Security protocol suite also provides channel security. The DPRIVE Working Group is in the process of specifying DNS Zone Transfer-over-TLS ([
DPRIVE-XFR-OVER-TLS]). One can also easily imagine the distribution of zones over HTTPS-enabled web servers as well as DNS-over-HTTPS ([
RFC 8484]).
Unfortunately, the protections provided by these channel security techniques are (in practice) ephemeral and are not retained after the data transfer is complete. They ensure that the client receives the data from the expected server and that the data sent by the server is not modified during transmission. However, they do not guarantee that the server transmits the data as originally published and do not provide any methods to verify data that is read after transmission is complete. For example, a name server loading saved zone data upon restart cannot guarantee that the on-disk data has not been modified. Such modification could be the result of an accidental corruption of the file or perhaps an incomplete saving of the file ([
DISK-FULL-FAILURE]). For these reasons, it is preferable to protect the integrity of the data itself.
Why not simply rely on DNSSEC, which provides certain data security guarantees? For zones that are signed, a recipient could validate all of the signed RRsets. Additionally, denial-of-existence records prove that RRsets have not been added or removed. However, delegations (non-apex NS records) are not signed by DNSSEC and neither are any glue records. ZONEMD protects the integrity of delegation, glue, and other records that are not otherwise covered by DNSSEC. Furthermore, zones that employ NSEC3 with Opt-Out ([
RFC 5155]) are susceptible to the removal or addition of names between the signed nodes. Whereas DNSSEC primarily protects consumers of DNS response messages, this protocol protects consumers of zones.
There are existing tools and protocols that provide data security, such as OpenPGP ([
RFC 4880]) and S/MIME ([
RFC 8551]). In fact, the internic.net site publishes Pretty Good Privacy (PGP) signatures alongside the root zone and other files available there. However, this is a detached signature with no strong association to the corresponding zone file other than its timestamp. Attached signatures are of course possible, but these necessarily change the format of the file being distributed; a zone signed with OpenPGP or S/MIME no longer looks like a DNS zone and could not directly be loaded into a name server. Once loaded, the signature data is lost, so it cannot be further propagated.
It seems the desire for data security in DNS zones was envisioned as far back as 1997. [
RFC 2065] is an obsoleted specification of the first generation DNSSEC Security Extensions. It describes a zone transfer signature, identified as the AXFR SIG, which is similar to the technique proposed by this document. That is, it proposes ordering all (signed) RRsets in a zone, hashing their contents, and then signing the zone hash. The AXFR SIG is described only for use during zone transfers. It did not postulate the need to validate zone data distributed outside of the DNS. Furthermore, its successor, [
RFC 2535], omits the AXFR SIG while at the same time introducing an IXFR SIG. (Note:
RFC 2535 was obsoleted by [
RFC 4033], [
RFC 4034], and [
RFC 4035].)
This document specifies a new Resource Record type to convey a message digest of the content of a zone. The digest is calculated at the time of zone publication. If the zone is signed with DNSSEC, any modifications of the digest can be detected. The procedures for digest calculation and DNSSEC signing are similar. Both require data to be processed in a well-defined order and format. It may be possible to perform DNSSEC signing and digest calculation in parallel.
The zone digest is designed to be used on zones that have infrequent updates. As specified herein, the digest is recalculated over the entire zone content each time the zone is updated. This specification does not provide an efficient mechanism for updating the digest on incremental updates of zone data. It is, however, extensible so that future schemes may be defined to support efficient incremental digest updates.
It is expected that verification of a zone digest will be implemented in name server software. That is, a name server can verify the zone data it was given and refuse to serve a zone that fails verification. For signed zones, the name server needs a trust anchor to perform DNSSEC validation. For signed non-root zones, the name server may need to send queries to validate a chain of trust. Digest verification could also be performed externally.
The root zone ([
InterNIC]) is one of the most widely distributed DNS zones on the Internet, served by more than 1000 separate instances ([
ROOT-SERVERS]) at the time of this writing. Additionally, many organizations configure their own name servers to serve the root zone locally. Reasons for doing so include privacy and reduced access time. [
RFC 8806] describes one way to do this. As the root zone spreads beyond its traditional deployment boundaries, the verification of the completeness of the zone contents becomes more important.
Since its very early days, the developers of the DNS recognized the importance of secondary name servers and service diversity. However, modern DNS service has complex provisioning that includes multiple third-party providers ([
RFC 8901]) and hundreds of anycast instances ([
RFC 3258]). Instead of a simple primary-to-secondary zone distribution system, today it is possible to have multiple levels, multiple parties, and multiple protocols involved in the distribution of zone data. This complexity introduces new places for problems to arise. The zone digest protects the integrity of data that flows through such systems.
A Response Policy Zone (RPZ) is "a mechanism to introduce a customized policy in Domain Name System servers, so that recursive resolvers return possibly modified results" ([
RPZ]). The policy information is carried inside specially constructed DNS zones. A number of companies provide RPZ feeds, which are consumed by name server and firewall products. While RPZs can be signed with DNSSEC, the data is not queried directly and would not be subject to DNSSEC validation.
ICANN operates the Centralized Zone Data Service ([
CZDS]), which is a repository of top-level domain zone files. Users that have been granted access are then able to download zone data. Adding a zone digest to these would provide CZDS users with assurances that the data has not been modified between origination and retrieval. Note that ZONEMD could be added to zone data supplied to CZDS without requiring it to be present in the zone data served by production name servers, since the digest is inherently attached to the specific copy of the zone.
Since the zone digest calculation does not depend on presentation format, it could be used to compare multiple copies of a zone received from different sources, or copies generated by different processes. In this case, it serves as a checksum and can be useful even for unsigned zones.
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 [
RFC 2119] [
RFC 8174] when, and only when, they appear in all capitals, as shown here.
The terms Private Use, Reserved, Unassigned, and Specification Required are to be interpreted as defined in [
RFC 8126].