RFC 9103 | XFR over TLS | August 2021 |
Toorop, et al. | Standards Track | [Page] |
DNS zone transfers are transmitted in cleartext, which gives attackers the opportunity to collect the content of a zone by eavesdropping on network connections. The DNS Transaction Signature (TSIG) mechanism is specified to restrict direct zone transfer to authorized clients only, but it does not add confidentiality. This document specifies the use of TLS, rather than cleartext, to prevent zone content collection via passive monitoring of zone transfers: XFR over TLS (XoT). Additionally, this specification updates RFC 1995 and RFC 5936 with respect to efficient use of TCP connections and RFC 7766 with respect to the recommended number of connections between a client and server for each transport.¶
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9103.¶
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.¶
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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
DNS has a number of privacy vulnerabilities, as discussed in detail in [RFC9076]. Query privacy between stub resolvers and recursive resolvers has received the most attention to date, with Standards Track documents for both DNS over TLS (DoT) [RFC7858] and DNS over HTTPS (DoH) [RFC8484] and a proposal for DNS over QUIC [DPRIVE-DNSOQUIC]. There is ongoing work on DNS privacy requirements for exchanges between recursive resolvers and authoritative servers and some suggestions for how signaling of DoT support by authoritative name servers might work. However, there is currently no RFC that specifically defines recursive-to-authoritative DNS over TLS (ADoT).¶
[RFC9076] establishes that a stub resolver's DNS query transactions are not public and that they need protection, but, on zone transfer [RFC1995] [RFC5936], it says only:¶
Privacy risks for the holder of a zone (the risk that someone gets the data) are discussed in [RFC5155] and [RFC5936].¶
In what way is exposing the full contents of a zone a privacy risk? The contents of the zone could include information such as names of persons used in names of hosts. Best practice is not to use personal information for domain names, but many such domain names exist. The contents of the zone could also include references to locations that allow inference about location information of the individuals associated with the zone's organization. It could also include references to other organizations. Examples of this could be:¶
Additionally, the full zone contents expose all the IP addresses of endpoints held in the DNS records, which can make reconnaissance and attack targeting easier, particularly for IPv6 addresses or private networks. There may also be regulatory, policy, or other reasons why the zone contents in full must be treated as private.¶
Neither of the RFCs mentioned in [RFC9076] contemplate the risk that someone gets the data through eavesdropping on network connections, only via enumeration or unauthorized transfer, as described in the following paragraphs.¶
Zone enumeration is trivially possible for DNSSEC zones that use NSEC, i.e., queries for the authenticated denial-of-existence records allow a client to walk through the entire zone contents. [RFC5155] specifies NSEC3, a mechanism to provide measures against zone enumeration for DNSSEC-signed zones (a goal was to make it as hard to enumerate a DNSSEC-signed zone as an unsigned zone). Whilst this is widely used, it has been demonstrated that zone walking is possible for precomputed NSEC3 using attacks, such as those described in [NSEC3-attacks]. This prompted further work on an alternative mechanism for DNSSEC-authenticated denial of existence (NSEC5 [NSEC5]); however, questions remain over the practicality of this mechanism.¶
[RFC5155] does not address data obtained outside zone enumeration (nor does [NSEC5]). Preventing eavesdropping of zone transfers (as described in this document) is orthogonal to preventing zone enumeration, though they aim to protect the same information.¶
[RFC5936] specifies using TSIG [RFC8945] for authorization of the clients of a zone transfer and for data integrity but does not express any need for confidentiality, and TSIG does not offer encryption.¶
Section 8 of the NIST document "Secure Domain Name System (DNS) Deployment Guide" [NIST-GUIDE] discusses restricting access for zone transfers using Access Control Lists (ACLs) and TSIG in more detail. It also discusses the possibility that specific deployments might choose to use a lower-level network layer to protect zone transfers, e.g., IPsec.¶
It is noted that in all the common open-source implementations such ACLs are applied on a per-query basis (at the time of writing). Since requests typically occur on TCP connections, authoritative servers must therefore accept any TCP connection and then handle the authentication of each zone transfer (XFR) request individually.¶
Because both AXFR (authoritative transfer) and IXFR (incremental zone transfer) are typically carried out over TCP from authoritative DNS protocol implementations, encrypting zone transfers using TLS [RFC8499] -- based closely on DoT [RFC7858] -- seems like a simple step forward. This document specifies how to use TLS (1.3 or later) as a transport to prevent zone collection from zone transfers.¶
This document also updates the previous specifications for zone transfers to clarify and extend them, mainly with respect to TCP usage:¶
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Privacy terminology is as described in Section 3 of [RFC6973].¶
DNS terminology is as described in [RFC8499]. Note that, as in [RFC8499], the terms 'primary' and 'secondary' are used for two servers engaged in zone transfers.¶
The threat model considered here is one where the current contents and size of the zone are considered sensitive and should be protected during transfer.¶
The threat model does not, however, consider the existence of a zone, the act of zone transfer between two entities, nor the identities of the name servers hosting a zone (including both those acting as hidden primaries/secondaries or directly serving the zone) as sensitive information. The proposed mechanism does not attempt to obscure such information. The reasons for this include:¶
The model does not consider attacks on the mechanisms that trigger a zone transfer, e.g., NOTIFY messages.¶
It is noted that simply using XoT will indicate a desire by the zone owner that the contents of the zone remain confidential and so could be subject to blocking (e.g., via blocking of port 853) if an attacker had such capabilities. However, this threat is likely true of any such mechanism that attempts to encrypt data passed between name servers, e.g., IPsec.¶
The following principles were considered in the design for XoT:¶
The original specification for zone transfers in [RFC1034] and [RFC1035] was based on a polling mechanism: a secondary performed a periodic query for the SOA (start of zone authority) record (based on the refresh timer) to determine if an AXFR was required.¶
[RFC1995] and [RFC1996] introduced the concepts of IXFR and NOTIFY, respectively, to provide for prompt propagation of zone updates. This has largely replaced AXFR where possible, particularly for dynamically updated zones.¶
[RFC5936] subsequently redefined the specification of AXFR to improve performance and interoperability.¶
In this document, the term 'XFR mechanism' is used to describe the entire set of message exchanges between a secondary and a primary that concludes with a successful AXFR or IXFR request/response. This set may or may not include:¶
The term is used to encompass the range of permutations that are possible and is useful to distinguish the 'XFR mechanism' from a single XFR request/response exchange.¶
The figure below provides an outline of an AXFR mechanism including NOTIFYs.¶
[RFC5936] re-specified AXFR, providing additional guidance beyond that provided in [RFC1034] and [RFC1035] and importantly specified that AXFR must use TCP as the transport protocol.¶
Additionally, Sections 4.1, 4.1.1, and 4.1.2 of [RFC5936] provide improved guidance for AXFR clients and servers with regard to reuse of TCP connections for multiple AXFRs and AXFRs of different zones. However, [RFC5936] was constrained by having to be backwards compatible with some very early basic implementations of AXFR. For example, it outlines that the SOA query can also happen on this connection. However, this can cause interoperability problems with older implementations that support only the trivial case of one AXFR per connection.¶
The figure below provides an outline of the IXFR mechanism including NOTIFYs.¶
[RFC1995] specifies that IXFR may use UDP if the entire IXFR response can be contained in a single DNS packet, otherwise, TCP is used. In fact, it says:¶
Thus, a client should first make an IXFR query using UDP.¶
So there may be a fourth step above where the client falls back to IXFR over TCP. There may also be an additional step where the secondary must fall back to AXFR because, e.g., the primary does not support IXFR.¶
However, it is noted that most of the widely used open-source implementations of authoritative name servers (including both [BIND] and [NSD]) do IXFR using TCP by default in their latest releases. For BIND, TCP connections are sometimes used for SOA queries, but, in general, they are not used persistently and are closed after an IXFR is completed.¶
This section presents a rationale for considering the encryption of the other messages in the XFR mechanism.¶
Since the SOA of the published zone can be trivially discovered by simply querying the publicly available authoritative servers, leakage of this resource record (RR) via such a direct query is not discussed in the following sections.¶
Unencrypted NOTIFY messages identify configured secondaries on the primary.¶
If ANCOUNT>0, then the answer section represents an unsecure hint at the new RRset for this <QNAME,QCLASS,QTYPE>.¶
But since the only query type (QTYPE) for NOTIFY defined at the time of this writing is SOA, this does not pose a potential leak.¶
For convenience, the term 'XFR over TCP' is used in this document to mean both IXFR over TCP and AXFR over TCP; therefore, statements that use that term update both [RFC1995] and [RFC5936] and implicitly also apply to XoT. Differences in behavior specific to XoT are discussed in Section 7.¶
Both [RFC1995] and [RFC5936] were published sometime before TCP became a widely supported transport for DNS. [RFC1995], in fact, says nothing with respect to optimizing IXFRs over TCP or reusing already open TCP connections to perform IXFRs or other queries. Therefore, there arguably is an implicit assumption that a TCP connection is used for one and only one IXFR request. Indeed, many major open-source implementations take this approach (at the time of this writing). And whilst [RFC5936] gives guidance on connection reuse for AXFR, it predates more recent specifications describing persistent TCP connections (e.g., [RFC7766], [RFC7828]), and AXFR implementations again often make less-than-optimal use of open connections.¶
Given this, new implementations of XoT will clearly benefit from specific guidance on TCP/TLS connection usage for XFR, because this will:¶
Therefore, this document updates both the previous specifications for XFR over TCP ([RFC1995] and [RFC5936]) to clarify that:¶
The following sections include detailed clarifications on the updates to XFR behavior implied in [RFC7766] and how the use of [RFC7828] applies specifically to XFR exchanges. They also discuss how IXFR and AXFR can reuse the same TCP connection.¶
For completeness, the recent specification of extended DNS error (EDE) codes [RFC8914] is also mentioned here. For zone transfers, when returning REFUSED to a zone transfer request from an 'unauthorized' client (e.g., where the client is not listed in an ACL for zone transfers or does not sign the request with a valid TSIG key), the extended DNS error code 18 - Prohibited can also be sent.¶
For clarity, an IXFR-over-TCP server compliant with this specification MUST be able to handle multiple concurrent IXoT requests on a single TCP connection (for the same and different zones) and SHOULD send the responses as soon as they are available, which might be out of order compared to the requests.¶
For clarity, an AXFR-over-TCP server compliant with this specification MUST be able to handle multiple concurrent AXoT sessions on a single TCP connection (for the same and different zones). The response streams for concurrent AXFRs MAY be intermingled, and AXFR-over-TCP clients compliant with this specification, which pipeline AXFR requests, MUST be able to handle this.¶
As specified, XFR-over-TCP clients SHOULD reuse any existing open TCP connection when starting any new XFR request to the same primary, and for issuing SOA queries, instead of opening a new connection. The number of TCP connections between a secondary and primary SHOULD be minimized (also see Section 6.4).¶
Valid reasons for not reusing existing connections might include:¶
If no TCP connections are currently open, XFR clients MAY send SOA queries over UDP or a new TCP connection.¶
Neither [RFC1995] nor [RFC5936] explicitly discuss the use of a single TCP connection for both IXFR and AXFR requests. [RFC5936] does make the general statement:¶
Non-AXFR session traffic can also use an open connection.¶
In this document, the above is clarified to indicate that implementations capable of both AXFR and IXFR and compliant with this specification SHOULD:¶
For some current implementations, adding all the above functionality would introduce significant code complexity. In such a case, there will need to be an assessment of the trade-off between that and the performance benefits of the above for XFR.¶
The server MAY limit the number of concurrent IXFRs, AXFRs, or total XFR transfers in progress (or from a given secondary) to protect server resources. Servers SHOULD return SERVFAIL if this limit is hit, since it is a transient error and a retry at a later time might succeed (there is no previous specification for this behavior).¶
XFR clients that send the edns-tcp-keepalive EDNS(0) option on every XFR request provide the server with maximum opportunity to update the edns-tcp-keepalive timeout. The XFR server may use the frequency of recent XFRs to calculate an average update rate as input to the decision of what edns-tcp-keepalive timeout to use. If the server does not support edns-tcp-keepalive, the client MAY keep the connection open for a few seconds ([RFC7766] recommends that servers use timeouts of at least a few seconds).¶
Whilst the specification for EDNS(0) [RFC6891] does not specifically mention AXFRs, it does say:¶
If an OPT record is present in a received request, compliant responders MUST include an OPT record in their respective responses.¶
In this document, the above is clarified to indicate that if an OPT record is present in a received AXFR request, compliant responders MUST include an OPT record in each of the subsequent AXFR responses. Note that this requirement, combined with the use of edns-tcp-keepalive, enables AXFR servers to signal the desire to close a connection (when existing transactions have competed) due to low resources by sending an edns-tcp-keepalive EDNS(0) option with a timeout of 0 on any AXFR response. This does not signal that the AXFR is aborted, just that the server wishes to close the connection as soon as possible.¶
Certain legacy behaviors were noted in [RFC5936], with provisions that implementations may want to offer options to fallback to legacy behavior when interoperating with servers known to not support [RFC5936]. For purposes of interoperability, IXFR and AXFR implementations may want to continue offering such configuration options, as well as supporting some behaviors that were underspecified prior to this work (e.g., performing IXFR and AXFRs on separate connections). However, XoT connections should have no need to do so.¶
[RFC7766] made general implementation recommendations with regard to TCP/TLS connection handling:¶
To mitigate the risk of unintentional server overload, DNS clients MUST take care to minimize the number of concurrent TCP connections made to any individual server. It is RECOMMENDED that for any given client/server interaction there SHOULD be no more than one connection for regular queries, one for zone transfers, and one for each protocol that is being used on top of TCP (for example, if the resolver was using TLS). However, it is noted that certain primary/ secondary configurations with many busy zones might need to use more than one TCP connection for zone transfers for operational reasons (for example, to support concurrent transfers of multiple zones).¶
Whilst this recommends a particular behavior for the clients using TCP, it does not relax the requirement for servers to handle 'mixed' traffic (regular queries and zone transfers) on any open TCP/TLS connection. It also overlooks the potential that other transports might want to take the same approach with regard to using separate connections for different purposes.¶
This specification updates the above general guidance in [RFC7766] to provide the same separation of connection purpose (regular queries and zone transfers) for all transports being used on top of TCP.¶
Therefore, it is RECOMMENDED that for each protocol used on top of TCP in any given client/server interaction there SHOULD be no more than one connection for regular queries and one for zone transfers.¶
As an illustration, it could be imagined that in the future such an interaction could hypothetically include one or all of the following:¶
Section 6.3.1 provides specific details of the reasons why more than one connection for a given transport might be required for zone transfers from a particular client.¶
During connection establishment, the Application-Layer Protocol Negotiation (ALPN) token "dot" [DoT-ALPN] MUST be selected in the TLS handshake.¶
All implementations of this specification MUST use only TLS 1.3 [RFC8446] or later.¶
The connection for XoT SHOULD be established using port 853, as specified in [RFC7858], unless there is mutual agreement between the primary and secondary to use a port other than port 853 for XoT. There MAY be agreement to use different ports for AXoT and IXoT or for different zones.¶
It is useful to note that in XoT it is the secondary that initiates the TLS connection to the primary for an XFR request so that, in terms of connectivity, the secondary is the TLS client and the primary is the TLS server.¶
The figure below provides an outline of the AXoT mechanism including NOTIFYs.¶
The figure below provides an outline of the IXoT mechanism including NOTIFYs.¶
For a zone transfer between two endpoints to be considered protected with XoT, all XFR requests and responses for that zone MUST be sent over TLS connections, where at a minimum:¶
The server MUST validate the client is authorized to request or proxy a zone transfer by using one or both of the following methods:¶
If only one method is selected, then mTLS is preferred because it provides strong cryptographic protection at both endpoints.¶
Authentication mechanisms are discussed in full in Section 9, and the rationale for the above requirement is discussed in Section 10. Transfer group policies are discussed in Section 11.¶
The details in Section 6 about, e.g., persistent connections and XFR message handling, are fully applicable to XoT connections as well. However, any behavior specified here takes precedence for XoT.¶
If no TLS connections are currently open, XoT clients MAY send SOA queries over UDP, TCP, or TLS.¶
As noted earlier, there is currently no specification for encryption of connections from recursive resolvers to authoritative servers. Some authoritative servers are experimenting with ADoT, and opportunistic encryption has also been raised as a possibility; therefore, it is highly likely that use of encryption by authoritative servers will evolve in the coming years.¶
This raises questions in the short term with regard to TLS connection and message handling for authoritative servers. In particular, there is likely to be a class of authoritative servers that wish to use XoT in the near future with a small number of configured secondaries but that do not wish to support DoT for regular queries from recursives in that same time frame. These servers have to potentially cope with probing and direct queries from recursives and from test servers and also potential attacks that might wish to make use of TLS to overload the server.¶
[RFC5936] clearly states that non-AXFR session traffic can use an open connection; however, this requirement needs to be reevaluated when considering the application of the same model to XoT. Proposing that a server should also start responding to all queries received over TLS just because it has enabled XoT would be equivalent to defining a form of authoritative DoT. This specification does not propose that, but it also does not prohibit servers from answering queries unrelated to XFR exchanges over TLS. Rather, this specification simply outlines in later sections:¶
XoT clients and servers MUST implement EDE codes. If a XoT server receives non-XoT traffic it is not willing to answer on a TLS connection, it SHOULD respond with REFUSED and the extended DNS error code 21 - Not Supported [RFC8914]. XoT clients should not send any further queries of this type to the server for a reasonable period of time (for example, one hour), i.e., long enough that the server configuration or policy might be updated.¶
Historically, servers have used the REFUSED RCODE for many situations; therefore, clients often had no detailed information on which to base an error or fallback path when queries were refused. As a result, the client behavior could vary significantly. XoT servers that refuse queries must cater to the fact that client behavior might vary from continually retrying queries regardless of receiving REFUSED to every query or, at the other extreme, clients may decide to stop using the server over any transport. This might be because those clients are either non-XoT clients or do not implement EDE codes.¶
The goal of padding AXoT responses is two fold:¶
Note that the reuse of XoT connections for transfers of multiple different zones slightly complicates any attempt to analyze the traffic size and timing to extract information. Also, effective padding may require the state to be kept because zones may grow and/or shrink over time.¶
It is noted here that, depending on the padding policies eventually developed for XoT, the requirement to obfuscate the total zone size might require a server to create 'empty' AXoT responses, that is, AXoT responses that contain no RRs apart from an OPT RR containing the EDNS(0) option for padding. For example, without this capability, the maximum size that a tiny zone could be padded to would theoretically be limited if there had to be a minimum of 1 RR per packet.¶
However, as with existing AXFR, the last AXoT response message sent MUST contain the same SOA that was in the first message of the AXoT response series in order to signal the conclusion of the zone transfer.¶
Each AXFR response message SHOULD contain a sufficient number of RRs to reasonably amortize the per-message overhead, up to the largest number that will fit within a DNS message (taking the required content of the other sections into account, as described below).¶
'Empty' AXoT responses generated in order to meet a padding requirement will be exceptions to the above statement. For flexibility, for future proofing, and in order to guarantee support for future padding policies, it is stated here that secondary implementations MUST be resilient to receiving padded AXoT responses, including 'empty' AXoT responses that contain only an OPT RR containing the EDNS(0) option for padding.¶
Recommendations of specific policies for padding AXoT responses are out of scope for this specification. Detailed considerations of such policies and the trade-offs involved are expected to be the subject of future work.¶
[RFC1995] says that condensation of responses is optional and MAY be done. Whilst it does add complexity to generating responses, it can significantly reduce the size of responses. However, any such reduction might be offset by increased message size due to padding. This specification does not update the optionality of condensation for XoT responses.¶
Fallback to AXFR can happen, for example, if the server is not able to provide an IXFR for the requested SOA. Implementations differ in how long they store zone deltas and how many may be stored at any one time.¶
Just as with IXFR over TCP, after a failed IXFR, an IXoT client SHOULD request the AXFR on the already open XoT connection.¶
The goal of padding IXoT responses is to obfuscate the incremental changes to the zone between SOA updates to minimize information leakage about zone update activity and growth. Both the size and timing of the IXoT responses could reveal information.¶
IXFR responses can vary greatly in size from the order of 100 bytes for one or two record updates to tens of thousands of bytes for large, dynamic DNSSEC-signed zones. The frequency of IXFR responses can also depend greatly on if and how the zone is DNSSEC signed.¶
In order to guarantee support for future padding policies, it is stated here that secondary implementations MUST be resilient to receiving padded IXoT responses.¶
Recommendation of specific policies for padding IXoT responses are out of scope for this specification. Detailed considerations of such padding policies, the use of traffic obfuscation techniques (such as generating fake XFR traffic), and the trade-offs involved are expected to be the subject of future work.¶
It is noted here that name compression [RFC1035] can be used in XFR responses to reduce the size of the payload; however, the maximum value of the offset that can be used in the name compression pointer structure is 16384. For some DNS implementations, this limits the size of an individual XFR response used in practice to something around the order of 16 KB. In principle, larger payload sizes can be supported for some responses with more sophisticated approaches (e.g., by precalculating the maximum offset required).¶
Implementations may wish to offer options to disable name compression for XoT responses to enable larger payloads. This might be particularly helpful when padding is used, since minimizing the payload size is not necessarily a useful optimization in this case and disabling name compression will reduce the resources required to construct the payload.¶
This model can provide flexibility and redundancy, particularly for IXFR. A secondary will receive one or more NOTIFY messages and can send an SOA to all of the configured primaries. It can then choose to send an XFR request to the primary with the highest SOA (or based on other criteria, e.g., RTT).¶
When using persistent connections, the secondary may have a XoT connection already open to one or more primaries. Should a secondary preferentially request an XFR from a primary to which it already has an open XoT connection or the one with the highest SOA (assuming it doesn't have a connection open to it already)?¶
Two extremes can be envisaged here. The first one can be considered a 'preferred primary connection' model. In this case, the secondary continues to use one persistent connection to a single primary until it has reason not to. Reasons not to might include the primary repeatedly closing the connection, long query/response RTTs on transfers, or the SOA of the primary being an unacceptable lag behind the SOA of an alternative primary.¶
The other extreme can be considered a 'parallel primary connection' model. Here, a secondary could keep multiple persistent connections open to all available primaries and only request XFRs from the primary with the highest serial number. Since normally the number of secondaries and primaries in direct contact in a transfer group is reasonably low, this might be feasible if latency is the most significant concern.¶
Recommendation of a particular scheme is out of scope of this document, but implementations are encouraged to provide configuration options that allow operators to make choices about this behavior.¶
To provide context to the requirements in Section 7.5, this section provides a brief summary of some of the existing authentication and validation mechanisms (both transport independent and TLS specific) that are available when performing zone transfers. Section 10 then discusses in more detail specifically how a combination of TLS authentication, TSIG, and IP-based ACLs interact for XoT.¶
In this document, the mechanisms are classified based on the following properties:¶
TSIG [RFC8945] provides a mechanism for two or more parties to use shared secret keys that can then be used to create a message digest to protect individual DNS messages. This allows each party to authenticate that a request or response (and the data in it) came from the other party, even if it was transmitted over an unsecured channel or via a proxy.¶
SIG(0) [RFC2931] similarly provides a mechanism to digitally sign a DNS message but uses public key authentication, where the public keys are stored in DNS as KEY RRs and a private key is stored at the signer.¶
Opportunistic TLS for DoT is defined in [RFC8310] and can provide a defense against passive surveillance, providing on-the-wire confidentiality. Essentially:¶
As such, it does not offer a defense against active attacks (e.g., an on-path active attacker on the connection from client to server) and is not considered as useful for XoT.¶
Strict TLS for DoT [RFC8310] requires that a client is configured with an authentication domain name (and/or Subject Public Key Info (SPKI) pin set) that MUST be used to authenticate the TLS handshake with the server. If authentication of the server fails, the client will not proceed with the connection. This provides a defense for the client against active surveillance, providing client-to-server authentication and end-to-end channel confidentiality.¶
This is an extension to Strict TLS [RFC8310] that requires that a client is configured with an authentication domain name (and/or SPKI pin set) and a client certificate. The client offers the certificate for authentication by the server, and the client can authenticate the server the same way as in Strict TLS. This provides a defense for both parties against active surveillance, providing bidirectional authentication and end-to-end channel confidentiality.¶
Most DNS server implementations offer an option to configure an IP-based ACL, which is often used in combination with TSIG-based ACLs to restrict access to zone transfers on primary servers on a per-query basis.¶
This is also possible with XoT, but it must be noted that, as with TCP, the implementation of such an ACL cannot be enforced on the primary until an XFR request is received on an established connection.¶
As discussed in Appendix A, an IP-based per-connection ACL could also be implemented where only TLS connections from recognized secondaries are accepted.¶
For completeness, ZONEMD [RFC8976] ("Message Digest for DNS Zones") is described here. The ZONEMD message digest is a mechanism that can be used to verify the content of a standalone zone. It is designed to be independent of the transmission channel or mechanism, allowing a general consumer of a zone to do origin authentication of the entire zone contents. Note that the current version of [RFC8976] states:¶
As specified herein, ZONEMD is impractical for large, dynamic zones due to the time and resources required for digest calculation. However, the ZONEMD record is extensible so that new digest schemes may be added in the future to support large, dynamic zones.¶
It is complementary but orthogonal to the above mechanisms and can be used in conjunction with XoT but is not considered further here.¶
It is noted that zone transfer scenarios can vary from a simple single primary/secondary relationship where both servers are under the control of a single operator to a complex hierarchical structure that includes proxies and multiple operators. Each deployment scenario will require specific analysis to determine which combination of authentication methods are best suited to the deployment model in question.¶
The XoT authentication requirement specified in Section 7.5 addresses the issue of ensuring that the transfers are encrypted between the two endpoints directly involved in the current transfers. The following table summarizes the properties of a selection of the mechanisms discussed in Section 9. The two-letter abbreviations for the properties are used below: (S) indicates the secondary and (P) indicates the primary.¶
Method | DO(S) | CC(S) | CA(S) | DO(P) | CC(P) | CA(P) |
---|---|---|---|---|---|---|
Strict TLS | Y | Y | Y | |||
Mutual TLS | Y | Y | Y | Y | ||
ACL on primary | Y | |||||
TSIG | Y | Y |
Based on this analysis, it can be seen that:¶
Using just an IP-based ACL could be susceptible to attacks that can spoof TCP IP addresses; using TSIG/SIG(0) alone could be susceptible to attacks that were able to capture such messages should they be accidentally sent in cleartext by any server with the key.¶
Whilst the protection of the zone contents in a transfer between two endpoints can be provided by the XoT protocol, the protection of all the transfers of a given zone requires operational administration and policy management.¶
The entire group of servers involved in XFR for a particular set of zones (all the primaries and all the secondaries) is called the 'transfer group'.¶
In order to assure the confidentiality of the zone information, the entire transfer group MUST have a consistent policy of using XoT. If any do not, this is a weak link for attackers to exploit. For clarification, this means that within any transfer group both AXFRs and IXFRs for a zone MUST all use XoT.¶
An individual zone transfer is not considered protected by XoT unless both the client and server are configured to use only XoT, and the overall zone transfer is not considered protected until all members of the transfer group are configured to use only XoT with all other transfers servers (see Section 12).¶
A XoT policy MUST specify if:¶
Since this may require configuration of a number of servers who may be under the control of different operators, the desired consistency could be hard to enforce and audit in practice.¶
Certain aspects of the policies can be relatively easy to test independently, e.g., by requesting zone transfers without TSIG, from unauthorized IP addresses or over cleartext DNS. Other aspects, such as if a secondary will accept data without a TSIG digest or if secondaries are using Strict as opposed to Opportunistic TLS, are more challenging.¶
The mechanics of coordinating or enforcing such policies are out of the scope of this document but may be the subject of future operational guidance.¶
Server implementations may want to also offer options that allow ACLs on a zone to specify that a specific client can use either XoT or TCP. This would allow for flexibility while clients are migrating to XoT.¶
Client implementations may similarly want to offer options to cater to the multi-primary case where the primaries are migrating to XoT.¶
If the options described in Section 12 are available, such configuration options MUST only be used in a 'migration mode' and therefore should be used with great care.¶
It is noted that use of a TLS proxy in front of the primary server is a simple deployment solution that can enable server-side XoT.¶
This document has no IANA actions.¶
This document specifies a security measure against a DNS risk: the risk that an attacker collects entire DNS zones through eavesdropping on cleartext DNS zone transfers.¶
This does not mitigate:¶
Security concerns of DoT are outlined in [RFC7858] and [RFC8310].¶
This appendix provides a non-normative outline of the pros and cons of XoT server connection-handling options.¶
For completeness, it is noted that an earlier draft version of this document
suggested using a XoT-specific ALPN to negotiate TLS connections that supported
only a limited set of queries (SOA, XFRs); however, this did not gain support.
Reasons given included additional code complexity and the fact that XoT and ADoT are both
DNS wire format and so should share the dot
ALPN.¶
Obviously, a name server that hosts a zone and services queries for the zone on an IP address published in an NS record may wish to use a separate IP address for XoT to listen for TLS, only publishing that address to its secondaries.¶
Primaries that include IP-based ACLs and/or mutual TLS in their authentication models have the option of only accepting TLS connections from authorized clients. This could be implemented either using a proxy or directly in the DNS implementation.¶
Primaries could also choose to only accept TLS connections based on a Server Name Indication (SNI) that was published only to their secondaries.¶
Some primaries might rely on TSIG/SIG(0) combined with per-query, IP-based ACLs to authenticate secondaries. In this case, the primary must accept all incoming TLS/TCP connections and then apply a transport-specific response policy on a per-query basis.¶
As an aside, whilst [RFC7766] makes a general purpose distinction in the advice to clients about their usage of connections (between regular queries and zone transfers), this is not strict, and nothing in the DNS protocol prevents using the same connection for both types of traffic. Hence, a server cannot know the intention of any client that connects to it; it can only inspect the messages it receives on such a connection and make per-query decisions about whether or not to answer those queries.¶
Example policies a XoT server might implement are:¶
In a similar fashion, XoT servers might use the presence of an SNI in the Client Hello to determine which response policy to initially apply to the TLS connections.¶
The authors thank Tony Finch, Benno Overeinder, Shumon Huque, Tim Wicinski, and many other members of DPRIVE for review and discussions.¶
The authors particularly thank Peter van Dijk, Ondrej Sury, Brian Dickson, and several other open-source DNS implementers for valuable discussion and clarification on the issue associated with pipelining XFR queries and handling out-of-order/intermingled responses.¶
Significant contributions to the document were made by:¶