idnits 2.17.1 draft-ietf-dprive-xfr-over-tls-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). (Using the creation date from RFC1995, updated by this document, for RFC5378 checks: 1994-11-23) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 6, 2021) is 1117 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 1620 -- Looks like a reference, but probably isn't: '2' on line 1624 -- Looks like a reference, but probably isn't: '3' on line 1627 -- Looks like a reference, but probably isn't: '4' on line 1629 -- Looks like a reference, but probably isn't: '5' on line 1631 == Outdated reference: A later version (-09) exists of draft-ietf-dprive-rfc7626-bis-08 ** Downref: Normative reference to an Informational draft: draft-ietf-dprive-rfc7626-bis (ref. 'I-D.ietf-dprive-rfc7626-bis') ** Downref: Normative reference to an Informational RFC: RFC 6973 ** Obsolete normative reference: RFC 8499 (Obsoleted by RFC 9499) == Outdated reference: A later version (-12) exists of draft-ietf-dprive-dnsoquic-01 == Outdated reference: A later version (-18) exists of draft-ietf-tls-esni-09 Summary: 3 errors (**), 0 flaws (~~), 5 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 dprive W. Toorop 3 Internet-Draft NLnet Labs 4 Updates: 1995, 5936, 7766 (if approved) S. Dickinson 5 Intended status: Standards Track Sinodun IT 6 Expires: October 8, 2021 S. Sahib 7 P. Aras 8 A. Mankin 9 Salesforce 10 April 6, 2021 12 DNS Zone Transfer-over-TLS 13 draft-ietf-dprive-xfr-over-tls-09 15 Abstract 17 DNS zone transfers are transmitted in clear text, which gives 18 attackers the opportunity to collect the content of a zone by 19 eavesdropping on network connections. The DNS Transaction Signature 20 (TSIG) mechanism is specified to restrict direct zone transfer to 21 authorized clients only, but it does not add confidentiality. This 22 document specifies the use of TLS, rather than clear text, to prevent 23 zone content collection via passive monitoring of zone transfers: 24 XFR-over-TLS (XoT). Additionally, this specification updates 25 RFC1995, RFC5936 and RFC7766. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on October 8, 2021. 44 Copyright Notice 46 Copyright (c) 2021 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. Document work via GitHub . . . . . . . . . . . . . . . . . . 5 63 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 64 4. Threat Model . . . . . . . . . . . . . . . . . . . . . . . . 6 65 5. Design Considerations for XoT . . . . . . . . . . . . . . . . 6 66 6. Connection and Data Flows in Existing XFR Mechanisms . . . . 7 67 6.1. AXFR Mechanism . . . . . . . . . . . . . . . . . . . . . 8 68 6.2. IXFR Mechanism . . . . . . . . . . . . . . . . . . . . . 9 69 6.3. Data Leakage of NOTIFY and SOA Message Exchanges . . . . 11 70 6.3.1. NOTIFY . . . . . . . . . . . . . . . . . . . . . . . 11 71 6.3.2. SOA . . . . . . . . . . . . . . . . . . . . . . . . . 11 72 7. Updates to existing specifications . . . . . . . . . . . . . 11 73 7.1. Update to RFC1995 for IXFR-over-TCP . . . . . . . . . . . 13 74 7.2. Update to RFC5936 for AXFR-over-TCP . . . . . . . . . . . 13 75 7.3. Updates to RFC1995 and RFC5936 for XFR-over-TCP . . . . . 13 76 7.3.1. Connection reuse . . . . . . . . . . . . . . . . . . 13 77 7.3.2. AXFRs and IXFRs on the same connection . . . . . . . 14 78 7.3.3. XFR limits . . . . . . . . . . . . . . . . . . . . . 14 79 7.3.4. The edns-tcp-keepalive EDNS0 Option . . . . . . . . . 15 80 7.3.5. Backwards compatibility . . . . . . . . . . . . . . . 15 81 7.4. Update to RFC7766 . . . . . . . . . . . . . . . . . . . . 15 82 8. XoT specification . . . . . . . . . . . . . . . . . . . . . . 17 83 8.1. TLS versions . . . . . . . . . . . . . . . . . . . . . . 17 84 8.2. Port selection . . . . . . . . . . . . . . . . . . . . . 17 85 8.3. High level XoT descriptions . . . . . . . . . . . . . . . 17 86 8.4. XoT transfers . . . . . . . . . . . . . . . . . . . . . . 19 87 8.5. XoT connections . . . . . . . . . . . . . . . . . . . . . 20 88 8.6. XoT vs ADoT . . . . . . . . . . . . . . . . . . . . . . . 20 89 8.7. Response RCODES . . . . . . . . . . . . . . . . . . . . . 21 90 8.8. AXoT specifics . . . . . . . . . . . . . . . . . . . . . 21 91 8.8.1. Padding AXoT responses . . . . . . . . . . . . . . . 21 92 8.9. IXoT specifics . . . . . . . . . . . . . . . . . . . . . 22 93 8.9.1. Condensation of responses . . . . . . . . . . . . . . 22 94 8.9.2. Fallback to AXFR . . . . . . . . . . . . . . . . . . 22 95 8.9.3. Padding of IXoT responses . . . . . . . . . . . . . . 23 96 8.10. Name compression and maximum payload sizes . . . . . . . 23 98 9. Multi-primary Configurations . . . . . . . . . . . . . . . . 23 99 10. Authentication mechanisms . . . . . . . . . . . . . . . . . . 24 100 10.1. TSIG . . . . . . . . . . . . . . . . . . . . . . . . . . 25 101 10.2. SIG(0) . . . . . . . . . . . . . . . . . . . . . . . . . 25 102 10.3. TLS . . . . . . . . . . . . . . . . . . . . . . . . . . 25 103 10.3.1. Opportunistic TLS . . . . . . . . . . . . . . . . . 25 104 10.3.2. Strict TLS . . . . . . . . . . . . . . . . . . . . . 26 105 10.3.3. Mutual TLS . . . . . . . . . . . . . . . . . . . . . 26 106 10.4. IP Based ACL on the Primary . . . . . . . . . . . . . . 26 107 10.5. ZONEMD . . . . . . . . . . . . . . . . . . . . . . . . . 27 108 11. XoT authentication . . . . . . . . . . . . . . . . . . . . . 27 109 12. Policies for Both AXoT and IXoT . . . . . . . . . . . . . . . 28 110 13. Implementation Considerations . . . . . . . . . . . . . . . . 29 111 14. Operational Considerations . . . . . . . . . . . . . . . . . 29 112 15. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 113 16. Implementation Status . . . . . . . . . . . . . . . . . . . . 29 114 17. Security Considerations . . . . . . . . . . . . . . . . . . . 30 115 18. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 30 116 19. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 31 117 20. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 31 118 21. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 119 21.1. Normative References . . . . . . . . . . . . . . . . . . 33 120 21.2. Informative References . . . . . . . . . . . . . . . . . 35 121 21.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 36 122 Appendix A. XoT server connection handling . . . . . . . . . . . 36 123 A.1. Only listen on TLS on a specific IP address . . . . . . . 37 124 A.2. Client specific TLS acceptance . . . . . . . . . . . . . 37 125 A.3. SNI based TLS acceptance . . . . . . . . . . . . . . . . 37 126 A.4. TLS specific response policies . . . . . . . . . . . . . 37 127 A.4.1. SNI based response policies . . . . . . . . . . . . . 38 128 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 39 130 1. Introduction 132 DNS has a number of privacy vulnerabilities, as discussed in detail 133 in [I-D.ietf-dprive-rfc7626-bis]. Stub client to recursive resolver 134 query privacy has received the most attention to date, with standards 135 track documents for both DNS-over-TLS (DoT) [RFC7858] and DNS-over- 136 HTTPS (DoH) [RFC8484], and a proposal for DNS-over-QUIC 137 [I-D.ietf-dprive-dnsoquic]. There is ongoing work on DNS privacy 138 requirements for exchanges between recursive resolvers and 139 authoritative servers [I-D.ietf-dprive-phase2-requirements] and some 140 suggestions for how signaling of DoT support by authoritatives might 141 work. However there is currently no RFC that specifically defines 142 recursive to authoritative DNS-over-TLS (ADoT). 144 [I-D.ietf-dprive-rfc7626-bis] established that stub client DNS query 145 transactions are not public and needed protection, but on zone 146 transfer [RFC1995] [RFC5936] it says only: 148 "Privacy risks for the holder of a zone (the risk that someone 149 gets the data) are discussed in [RFC5936] and [RFC5155]." 151 In what way is exposing the full contents of a zone a privacy risk? 152 The contents of the zone could include information such as names of 153 persons used in names of hosts. Best practice is not to use personal 154 information for domain names, but many such domain names exist. The 155 contents of the zone could also include references to locations that 156 allow inference about location information of the individuals 157 associated with the zone's organization. It could also include 158 references to other organizations. Examples of this could be: 160 o Person-laptop.example.org 162 o MX-for-Location.example.org 164 o Service-tenant-from-another-org.example.org 166 Additionally, the full zone contents expose all the IP addresses of 167 endpoints held in the DNS records which can make reconnaissance 168 trivial, particularly for IPv6 addresses. There may also be 169 regulatory, policy or other reasons why the zone contents in full 170 must be treated as private. 172 Neither of the RFCs mentioned in [I-D.ietf-dprive-rfc7626-bis] 173 contemplates the risk that someone gets the data through 174 eavesdropping on network connections, only via enumeration or 175 unauthorized transfer as described in the following paragraphs. 177 Zone enumeration is trivially possible for DNSSEC zones which use 178 NSEC; i.e. queries for the authenticated denial of existences 179 records allow a client to walk through the entire zone contents. 180 [RFC5155] specifies NSEC3, a mechanism to provide measures against 181 zone enumeration for DNSSEC signed zones (a goal was to make it as 182 hard to enumerate an DNSSEC signed zone as an unsigned zone). Whilst 183 this is widely used, zone walking is now possible with NSEC3 due to 184 crypto-breaking advances. This has prompted further work on an 185 alternative mechanism for DNSSEC authenticated denial of existence - 186 NSEC5 [I-D.vcelak-nsec5] - however questions remain over the 187 practicality of this mechanism. 189 [RFC5155] does not address data obtained outside zone enumeration 190 (nor does [I-D.vcelak-nsec5]). Preventing eavesdropping of zone 191 transfers (this draft) is orthogonal to preventing zone enumeration, 192 though they aim to protect the same information. 194 [RFC5936] specifies using TSIG [RFC8945] for authorization of the 195 clients of a zone transfer and for data integrity, but does not 196 express any need for confidentiality, and TSIG does not offer 197 encryption. 199 Section 8 of the NIST guide on 'Secure Domain Name System (DNS) 200 Deployment' [nist-guide] discusses restricting access for zone 201 transfers using ACLs and TSIG in more detail. It also discusses the 202 possibility that specific deployments might choose to use a lower 203 level network layer to protect zone transfers, e.g., IPSec. 205 It is noted that in all the common open source implementations such 206 ACLs are applied on a per query basis. Since requests typically 207 occur on TCP connections authoritatives must cater for accepting any 208 TCP connection and then handling the authentication of each XFR 209 request individually. 211 Because both AXFR and IXFR zone transfers are typically carried out 212 over TCP from authoritative DNS protocol implementations, encrypting 213 zone transfers using TLS, based closely on DoT [RFC7858], seems like 214 a simple step forward. This document specifies how to use TLS as a 215 transport to prevent zone collection from zone transfers. 217 2. Document work via GitHub 219 [THIS SECTION TO BE REMOVED BEFORE PUBLICATION] The Github repository 220 for this document is at . Proposed text and editorial changes are very much 222 welcomed there, but any functional changes should always first be 223 discussed on the IETF DPRIVE WG (dns-privacy) mailing list. 225 3. Terminology 227 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 228 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 229 "OPTIONAL" in this document are to be interpreted as described in BCP 230 14 [RFC2119] and [RFC8174] when, and only when, they appear in all 231 capitals, as shown here. 233 Privacy terminology is as described in Section 3 of [RFC6973]. 235 DNS terminology is as described in [RFC8499]. Note that as in 236 [RFC8499], the terms 'primary' and 'secondary' are used for two 237 servers engaged in zone transfers. 239 DoT: DNS-over-TLS as specified in [RFC7858] 241 XFR-over-TCP: Used to mean both IXFR-over-TCP [RFC1995] and AXFR- 242 over-TCP [RFC5936]. 244 XoT: Generic XFR-over-TLS mechanisms as specified in this document 246 AXoT: AXFR-over-TLS 248 IXoT: IXFR over-TLS 250 4. Threat Model 252 The threat model considered here is one where the current contents 253 and size of the zone are considered sensitive and should be protected 254 during transfer. 256 The threat model does not, however, consider the existence of a zone, 257 the act of zone transfer between two entities, nor the identities of 258 the nameservers hosting a zone (including both those acting as hidden 259 primaries/secondaries or directly serving the zone) as sensitive 260 information. The proposed mechanisms does not attempt to obscure 261 such information. The reasons for this include: 263 o much of this information can be obtained by various methods 264 including active scanning of the DNS 266 o an attacker who can monitor network traffic can relatively easily 267 infer relations between nameservers simply from traffic patterns, 268 even when some or all of the traffic is encrypted 270 It is noted that simply using XoT will indicate a desire by the zone 271 owner that the contents of the zone remain confidential and so could 272 be subject to blocking (e.g., via blocking of port 853) if an 273 attacker had such capabilities. However this threat is likely true 274 of any such mechanism that attempts to encrypt data passed between 275 nameservers, e.g., IPsec. 277 5. Design Considerations for XoT 279 o Confidentiality. Clearly using an encrypted transport for zone 280 transfers will defeat zone content leakage that can occur via 281 passive surveillance. 283 o Authentication. Use of single or mutual TLS (mTLS) authentication 284 (in combination with ACLs) can complement and potentially be an 285 alternative to TSIG. 287 o Performance. Existing AXFR and IXFR mechanisms have the burden of 288 backwards compatibility with older implementations based on the 289 original specifications in [RFC1034] and [RFC1035]. For example, 290 some older AXFR servers don't support using a TCP connection for 291 multiple AXFR sessions or XFRs of different zones because they 292 have not been updated to follow the guidance in [RFC5936]. Any 293 implementation of XoT would obviously be required to implement 294 optimized and interoperable transfers as described in [RFC5936], 295 e.g., transfer of multiple zones over one connection. 297 o Performance. Current usage of TCP for IXFR is sub-optimal in some 298 cases i.e. connections are frequently closed after a single IXFR. 300 6. Connection and Data Flows in Existing XFR Mechanisms 302 The original specification for zone transfers in [RFC1034] and 303 [RFC1035] was based on a polling mechanism: a secondary performed a 304 periodic SOA query (based on the refresh timer) to determine if an 305 AXFR was required. 307 [RFC1995] and [RFC1996] introduced the concepts of IXFR and NOTIFY 308 respectively, to provide for prompt propagation of zone updates. 309 This has largely replaced AXFR where possible, particularly for 310 dynamically updated zones. 312 [RFC5936] subsequently redefined the specification of AXFR to improve 313 performance and interoperability. 315 In this document we use the term "XFR mechanism" to describe the 316 entire set of message exchanges between a secondary and a primary 317 that concludes in a successful AXFR or IXFR request/response. This 318 set may or may not include 320 o NOTIFY messages 322 o SOA queries 324 o Fallback from IXFR to AXFR 326 o Fallback from IXFR-over-UDP to IXFR-over-TCP 328 The term is used to encompasses the range of permutations that are 329 possible and is useful to distinguish the 'XFR mechanism' from a 330 single XFR request/response exchange. 332 6.1. AXFR Mechanism 334 The figure below provides an outline of an AXFR mechanism including 335 NOTIFYs. 337 Secondary Primary 339 | NOTIFY | 340 | <-------------------------------- | UDP 341 | --------------------------------> | 342 | NOTIFY Response | 343 | | 344 | | 345 | SOA Request | 346 | --------------------------------> | UDP (or part of 347 | <-------------------------------- | a TCP session) 348 | SOA Response | 349 | | 350 | | 351 | | 352 | AXFR Request | --- 353 | --------------------------------> | | 354 | <-------------------------------- | | 355 | AXFR Response 1 | | 356 | (Zone data) | | 357 | | | 358 | <-------------------------------- | | TCP 359 | AXFR Response 2 | | Session 360 | (Zone data) | | 361 | | | 362 | <-------------------------------- | | 363 | AXFR Response 3 | | 364 | (Zone data) | --- 365 | | 367 Figure 1. AXFR Mechanism 369 1. An AXFR is often (but not always) preceded by a NOTIFY (over UDP) 370 from the primary to the secondary. A secondary may also initiate 371 an AXFR based on a refresh timer or scheduled/triggered zone 372 maintenance. 374 2. The secondary will normally (but not always) make a SOA query to 375 the primary to obtain the serial number of the zone held by the 376 primary. 378 3. If the primary serial is higher than the secondaries serial 379 (using Serial Number Arithmetic [RFC1982]), the secondary makes 380 an AXFR request (over TCP) to the primary after which the AXFR 381 data flows in one or more AXFR responses on the TCP connection. 382 [RFC5936] defines this specific step as an 'AXFR session' i.e. as 383 an AXFR query message and the sequence of AXFR response messages 384 returned for it. 386 [RFC5936] re-specified AXFR providing additional guidance beyond that 387 provided in [RFC1034] and [RFC1035] and importantly specified that 388 AXFR must use TCP as the transport protocol. 390 Additionally, sections 4.1, 4.1.1 and 4.1.2 of [RFC5936] provide 391 improved guidance for AXFR clients and servers with regard to re-use 392 of TCP connections for multiple AXFRs and AXFRs of different zones. 393 However [RFC5936] was constrained by having to be backwards 394 compatible with some very early basic implementations of AXFR. For 395 example, it outlines that the SOA query can also happen on this 396 connection. However, this can cause interoperability problems with 397 older implementations that support only the trivial case of one AXFR 398 per connection. 400 6.2. IXFR Mechanism 402 The figure below provides an outline of the IXFR mechanism including 403 NOTIFYs. 405 Secondary Primary 407 | NOTIFY | 408 | <-------------------------------- | UDP 409 | --------------------------------> | 410 | NOTIFY Response | 411 | | 412 | | 413 | SOA Request | 414 | --------------------------------> | UDP or TCP 415 | <-------------------------------- | 416 | SOA Response | 417 | | 418 | | 419 | | 420 | IXFR Request | 421 | --------------------------------> | UDP or TCP 422 | <-------------------------------- | 423 | IXFR Response | 424 | (Zone data) | 425 | | 426 | | --- 427 | IXFR Request | | 428 | --------------------------------> | | Retry over 429 | <-------------------------------- | | TCP if 430 | IXFR Response | | required 431 | (Zone data) | --- 433 Figure 2. IXFR Mechanism 435 1. An IXFR is normally (but not always) preceded by a NOTIFY (over 436 UDP) from the primary to the secondary. A secondary may also 437 initiate an IXFR based on a refresh timer or scheduled/triggered 438 zone maintenance. 440 2. The secondary will normally (but not always) make a SOA query to 441 the primary to obtain the serial number of the zone held by the 442 primary. 444 3. If the primary serial is higher than the secondaries serial 445 (using Serial Number Arithmetic [RFC1982]), the secondary makes 446 an IXFR request to the primary after which the primary sends an 447 IXFR response. 449 [RFC1995] specifies that Incremental Transfer may use UDP if the 450 entire IXFR response can be contained in a single DNS packet, 451 otherwise, TCP is used. In fact it says: 453 "Thus, a client should first make an IXFR query using UDP." 455 So there may be a fourth step above where the client falls back to 456 IXFR-over-TCP. There may also be a fourth step where the secondary 457 must fall back to AXFR because, e.g., the primary does not support 458 IXFR. 460 However it is noted that most widely used open source authoritative 461 nameserver implementations (including both [BIND] and [NSD]) do IXFR 462 using TCP by default in their latest releases. For BIND TCP 463 connections are sometimes used for SOA queries but in general they 464 are not used persistently and close after an IXFR is completed. 466 6.3. Data Leakage of NOTIFY and SOA Message Exchanges 468 This section attempts to presents a rationale for considering 469 encrypting the other messages in the XFR mechanism. 471 Since the SOA of the published zone can be trivially discovered by 472 simply querying the publicly available authoritative servers leakage 473 of this RR is not discussed in the following sections. 475 6.3.1. NOTIFY 477 Unencrypted NOTIFY messages identify configured secondaries on the 478 primary. 480 [RFC1996] also states: 482 "If ANCOUNT>0, then the answer section represents an 483 unsecure hint at the new RRset for this (QNAME,QCLASS,QTYPE). 485 But since the only supported QTYPE for NOTIFY is SOA, this does not 486 pose a potential leak. 488 6.3.2. SOA 490 For hidden primaries or secondaries the SOA response leaks only the 491 degree of SOA serial number lag of any downstream secondary. 493 7. Updates to existing specifications 495 For convenience, the term 'XFR-over-TCP' is used in this document to 496 mean both IXFR-over-TCP and AXFR-over-TCP and therefore statements 497 that use that term update both [RFC1995] and [RFC5936], and 498 implicitly also apply to XoT. Differences in behavior specific to 499 XoT are discussed in Section 8. 501 Both [RFC1995] and [RFC5936] were published sometime before TCP was 502 considered a first class transport for DNS. [RFC1995], in fact, says 503 nothing with respect to optimizing IXFRs over TCP or re-using already 504 open TCP connections to perform IXFRs or other queries. Therefore, 505 there arguably is an implicit assumption that a TCP connection is 506 used for one and only one IXFR request. Indeed, many major open 507 source implementations currently take this approach. And whilst 508 [RFC5936] gives guidance on connection re-use for AXFR, it pre-dates 509 more recent specifications describing persistent TCP connections, 510 e.g., [RFC7766], [RFC7828] and AXFR implementations again often make 511 less than optimal use of open connections. 513 Given this, new implementations of XoT will clearly benefit from 514 specific guidance on TCP/TLS connection usage for XFR because this 515 will: 517 o result in more consistent XoT implementations with better 518 interoperability 520 o remove any need for XoT implementations to support legacy behavior 521 that XFR-over-TCP implementations have historically often 522 supported 524 Therefore this document updates both the previous specifications for 525 XFR-over-TCP to clarify that 527 o Implementations MUST use [RFC7766] (DNS Transport over TCP - 528 Implementation Requirements) to optimize the use of TCP 529 connections. 531 o Whilst RFC7766 states that 'DNS clients SHOULD pipeline their 532 queries' on TCP connections, it did not distinguish between XFRs 533 and other queries for this behavior. It is now recognized that 534 XFRs are not as latency sensitive as other queries, and can be 535 significantly more complex for clients to handle both because of 536 the large amount of state that must be kept and because there may 537 be multiple messages in the responses. For these reasons it is 538 clarified here that a valid reason for not pipelining queries is 539 when they are all XFR queries i.e. clients sending multiple XFRs 540 MAY choose not to pipeline those queries. Clients that do not 541 pipeline XFR queries, therefore, have no additional requirements 542 to handle out-of-order or intermingled responses (as described 543 later) since they will never receive them. 545 o Implementations SHOULD use [RFC7828] (The edns-tcp-keepalive EDNS0 546 Option) to manage persistent connections. 548 The following sections include detailed clarifications on the updates 549 to XFR behavior implied in [RFC7766] and how the use of [RFC7828] 550 applies specifically to XFR exchanges. It also discusses how IXFR 551 and AXFR can reuse the same TCP connection. 553 For completeness, we also mention here the recent specification of 554 extended DNS error (EDE) codes [RFC8914]. For zone transfers, when 555 returning REFUSED to a zone transfer request from an 'unauthorized' 556 client (e.g., where the client is not listed in an ACL for zone 557 transfers or does not sign the request with the correct TSIG key), 558 the extended DNS error code 18 (Prohibited) can also be sent. 560 7.1. Update to RFC1995 for IXFR-over-TCP 562 For clarity - an IXFR-over-TCP server compliant with this 563 specification MUST be able to handle multiple concurrent IXoT 564 requests on a single TCP connection (for the same and different 565 zones) and SHOULD send the responses as soon as they are available, 566 which might be out-of-order compared to the requests. 568 7.2. Update to RFC5936 for AXFR-over-TCP 570 For clarity - an AXFR-over-TCP server compliant with this 571 specification MUST be able to handle multiple concurrent AXoT 572 sessions on a single TCP connection (for the same and different 573 zones). The response streams for concurrent AXFRs MAY be 574 intermingled and AXFR-over-TCP clients compliant with this 575 specification which pipeline AXFR requests MUST be able to handle 576 this. 578 7.3. Updates to RFC1995 and RFC5936 for XFR-over-TCP 580 7.3.1. Connection reuse 582 As specified, XFR-over-TCP clients SHOULD re-use any existing open 583 TCP connection when starting any new XFR request to the same primary, 584 and for issuing SOA queries, instead of opening a new connection. 585 The number of TCP connections between a secondary and primary SHOULD 586 be minimized (also see Section 7.4). 588 Valid reasons for not re-using existing connections might include: 590 o as already noted in [RFC7766], separate connections for different 591 zones might be preferred for operational reasons. In this case 592 the number of concurrent connections for zone transfers SHOULD be 593 limited to the total number of zones transferred between the 594 client and server. 596 o reaching a configured limit for the number of outstanding queries 597 or XFR requests allowed on a single TCP connection 599 o the message ID pool has already been exhausted on an open 600 connection 602 o a large number of timeouts or slow responses have occurred on an 603 open connection 605 o an edns-tcp-keepalive EDNS0 option with a timeout of 0 has been 606 received from the server and the client is in the process of 607 closing the connection (see Section 7.3.4) 609 If no TCP connections are currently open, XFR clients MAY send SOA 610 queries over UDP or a new TCP connection. 612 7.3.2. AXFRs and IXFRs on the same connection 614 Neither [RFC1995] nor [RFC5936] explicitly discuss the use of a 615 single TCP connection for both IXFR and AXFR requests. [RFC5936] 616 does make the general statement: 618 "Non-AXFR session traffic can also use an open TCP connection." 620 We clarify here that implementations capable of both AXFR and IXFR 621 and compliant with this specification SHOULD 623 o use the same TCP connection for both AXFR and IXFR requests to the 624 same primary 626 o pipeline such requests (if they pipeline XFR requests in general) 627 and MAY intermingle them 629 o send the response(s) for each request as soon as they are 630 available i.e. responses MAY be sent intermingled 632 7.3.3. XFR limits 634 The server MAY limit the number of concurrent IXFRs, AXFRs or total 635 XFR transfers in progress, or from a given secondary, to protect 636 server resources. Servers SHOULD return SERVFAIL if this limit is 637 hit, since it is a transient error and a retry at a later time might 638 succeed. 640 7.3.4. The edns-tcp-keepalive EDNS0 Option 642 XFR clients that send the edns-tcp-keepalive EDNS0 option on every 643 XFR request provide the server with maximum opportunity to update the 644 edns-tcp-keepalive timeout. The XFR server may use the frequency of 645 recent XFRs to calculate an average update rate as input to the 646 decision of what edns-tcp-keepalive timeout to use. If the server 647 does not support edns-tcp-keepalive the client MAY keep the 648 connection open for a few seconds ([RFC7766] recommends that servers 649 use timeouts of at least a few seconds). 651 Whilst the specification for EDNS0 [RFC6891] does not specifically 652 mention AXFRs, it does say 654 "If an OPT record is present in a received request, compliant 655 responders MUST include an OPT record in their respective 656 responses." 658 We clarify here that if an OPT record is present in a received AXFR 659 request, compliant responders MUST include an OPT record in each of 660 the subsequent AXFR responses. Note that this requirement, combined 661 with the use of edns-tcp-keepalive, enables AXFR servers to signal 662 the desire to close a connection (when existing transactions have 663 competed) due to low resources by sending an edns-tcp-keepalive EDNS0 664 option with a timeout of 0 on any AXFR response. This does not 665 signal that the AXFR is aborted, just that the server wishes to close 666 the connection as soon as possible. 668 7.3.5. Backwards compatibility 670 Certain legacy behaviors were noted in [RFC5936], with provisions 671 that implementations may want to offer options to fallback to legacy 672 behavior when interoperating with servers known not to support 673 [RFC5936]. For purposes of interoperability, IXFR and AXFR 674 implementations may want to continue offering such configuration 675 options, as well as supporting some behaviors that were 676 underspecified prior to this work (e.g., performing IXFR and AXFRs on 677 separate connections). However, XoT implementations should have no 678 need to do so. 680 7.4. Update to RFC7766 682 [RFC7766] made general implementation recommendations with regard to 683 TCP/TLS connection handling: 685 "To mitigate the risk of unintentional server overload, DNS 686 clients MUST take care to minimize the number of concurrent TCP 687 connections made to any individual server. It is RECOMMENDED 688 that for any given client/server interaction there SHOULD be no 689 more than one connection for regular queries, one for zone 690 transfers, and one for each protocol that is being used on top 691 of TCP (for example, if the resolver was using TLS). However, 692 it is noted that certain primary/ secondary configurations with 693 many busy zones might need to use more than one TCP connection 694 for zone transfers for operational reasons (for example, to 695 support concurrent transfers of multiple zones)." 697 Whilst this recommends a particular behavior for the clients using 698 TCP, it does not relax the requirement for servers to handle 'mixed' 699 traffic (regular queries and zone transfers) on any open TCP/TLS 700 connection. It also overlooks the potential that other transports 701 might want to take the same approach with regard to using separate 702 connections for different purposes. 704 This specification for XoT updates the guidance in [RFC7766] to 705 provide the same separation of connection purpose (regular queries 706 and zone transfers) for all transports being used on top of TCP. 708 Therefore, it is RECOMMENDED that for each protocol used on top of 709 TCP in any given client/server interaction there SHOULD be no more 710 than one connection for regular queries and one for zone transfers. 712 As an illustration, it could be imagined that in future such an 713 interaction could hypothetically include one or all of the following: 715 o one TCP connection for regular queries 717 o one TCP connection for zone transfers 719 o one TLS connection for regular queries 721 o one TLS connection for zone transfers 723 o one DoH connection for regular queries 725 o one DoH connection for zone transfers 727 Section 7.3.1 has provided specific details of reasons where more 728 than one connection for a given transport might be required for zone 729 transfers from a particular client. 731 8. XoT specification 733 8.1. TLS versions 735 For improved security all implementations of this specification MUST 736 use only TLS 1.3 [RFC8446] or later. 738 8.2. Port selection 740 The connection for XoT SHOULD be established using port 853, as 741 specified in [RFC7858], unless there is mutual agreement between the 742 secondary and primary to use a port other than port 853 for XoT. 743 There MAY be agreement to use different ports for AXoT and IXoT, or 744 for different zones. 746 8.3. High level XoT descriptions 748 It is useful to note that in XoT it is the secondary that initiates 749 the TLS connection to the primary for a XFR request, so that in terms 750 of connectivity the secondary is the TLS client and the primary the 751 TLS server. 753 The figure below provides an outline of the AXoT mechanism including 754 NOTIFYs. 756 Secondary Primary 758 | NOTIFY | 759 | <-------------------------------- | UDP 760 | --------------------------------> | 761 | NOTIFY Response | 762 | | 763 | | 764 | SOA Request | 765 | --------------------------------> | UDP (or part of 766 | <-------------------------------- | a TCP/TLS session) 767 | SOA Response | 768 | | 769 | | 770 | | 771 | AXFR Request | --- 772 | --------------------------------> | | 773 | <-------------------------------- | | 774 | AXFR Response 1 | | 775 | (Zone data) | | 776 | | | 777 | <-------------------------------- | | TLS 778 | AXFR Response 2 | | Session 779 | (Zone data) | | 780 | | | 781 | <-------------------------------- | | 782 | AXFR Response 3 | | 783 | (Zone data) | --- 784 | | 786 Figure 3. AXoT Mechanism 788 The figure below provides an outline of the IXoT mechanism including 789 NOTIFYs. 791 Secondary Primary 793 | NOTIFY | 794 | <-------------------------------- | UDP 795 | --------------------------------> | 796 | NOTIFY Response | 797 | | 798 | | 799 | SOA Request | 800 | --------------------------------> | UDP (or part of 801 | <-------------------------------- | a TCP/TLS session) 802 | SOA Response | 803 | | 804 | | 805 | | 806 | IXFR Request | --- 807 | --------------------------------> | | 808 | <-------------------------------- | | 809 | IXFR Response | | 810 | (Zone data) | | 811 | | | TLS 812 | | | session 813 | IXFR Request | | 814 | --------------------------------> | | 815 | <-------------------------------- | | 816 | IXFR Response | | 817 | (Zone data) | --- 819 Figure 4. IXoT Mechanism 821 8.4. XoT transfers 823 For a zone transfer between two end points to be considered protected 824 with XoT all XFR requests and response for that zone MUST be sent 825 over TLS connections where at a minimum: 827 o the client MUST authenticate the server by use of an 828 authentication domain name using a Strict Privacy Profile as 829 described in [RFC8310] 831 o the server MUST validate the client is authorized to request or 832 proxy a zone transfer by using one or both of the following: 834 * an IP based ACL (which can be either per-message or per- 835 connection) 837 * Mutual TLS (mTLS) 839 The server MAY also require a valid TSIG/SIG(0) signature, but this 840 alone is not sufficient to authenticate the client or server. 842 Authentication mechanisms are discussed in full in Section 10 and the 843 rationale for the above requirement in Section 11. Transfer group 844 policies are discussed in Section 12. 846 8.5. XoT connections 848 The details in Section 7 about, e.g., persistent connections and XFR 849 message handling are fully applicable to XoT connections as well. 850 However any behavior specified here takes precedence for XoT. 852 If no TLS connections are currently open, XoT clients MAY send SOA 853 queries over UDP or TCP, or TLS. 855 8.6. XoT vs ADoT 857 As noted earlier, there is currently no specification for encryption 858 of connections from recursive resolvers to authoritative servers. 859 Some authoritatives are experimenting with ADoT and opportunistic 860 encryption has also been raised as a possibility; it is therefore 861 highly likely that use of encryption by authoritative servers will 862 evolve in the coming years. 864 This raises questions in the short term with regard to TLS connection 865 and message handling for authoritative servers. In particular, there 866 is likely to be a class of authoritatives that wish to use XoT in the 867 near future with a small number of configured secondaries but that do 868 wish to support DoT for regular queries from recursive in that same 869 time frame. These servers have to potentially cope with probing and 870 direct queries from recursives and from test servers, and also 871 potential attacks that might wish to make use of TLS to overload the 872 server. 874 [RFC5936] clearly states that non-AXFR session traffic can use an 875 open TCP connection, however, this requirement needs to be re- 876 evaluated when considering applying the same model to XoT. Proposing 877 that a server should also start responding to all queries received 878 over TLS just because it has enabled XoT would be equivalent to 879 defining a form of authoritative DoT. This specification does not 880 propose that, but it also does not prohibit servers from answering 881 queries unrelated to XFR exchanges over TLS. Rather, this 882 specification simply outlines in later sections: 884 o how XoT implementations should utilize EDE codes in response to 885 queries on TLS connections they are not willing to answer (see 886 Section 8.7) 888 o the operational and policy options that a XoT server operator has 889 with regard to managing TLS connections and messages (see 890 Appendix A) 892 8.7. Response RCODES 894 XoT clients and servers MUST implement EDE codes. If a XoT server 895 receives non-XoT traffic it is not willing to answer on a TLS 896 connection it SHOULD respond with the extended DNS error code 21 - 897 Not Supported [RFC8914]. XoT clients should not send any further 898 queries of this type to the server for a reasonable period of time 899 (for example, one hour) i.e., long enough that the server 900 configuration or policy might be updated. 902 Historically servers have used the REFUSED RCODE for many situations, 903 and so clients often had no detailed information on which to base an 904 error or fallback path when queries were refused. As a result the 905 client behavior could vary significantly. XoT servers that refuse 906 queries must cater for the fact that client behavior might vary from 907 continually retrying queries regardless of receiving REFUSED to every 908 query, or at the other extreme clients may decide to stop using the 909 server over any transport. This might be because those clients are 910 either non-XoT clients or do not implement EDE codes. 912 8.8. AXoT specifics 914 8.8.1. Padding AXoT responses 916 The goal of padding AXoT responses would be two fold: 918 o to obfuscate the actual size of the transferred zone to minimize 919 information leakage about the entire contents of the zone. 921 o to obfuscate the incremental changes to the zone between SOA 922 updates to minimize information leakage about zone update activity 923 and growth. 925 Note that the re-use of XoT connections for transfers of multiple 926 different zones complicates any attempt to analyze the traffic size 927 and timing to extract information. 929 It is noted here that, depending on the padding policies eventually 930 developed for XoT, the requirement to obfuscate the total zone size 931 might require a server to create 'empty' AXoT responses. That is, 932 AXoT responses that contain no RR's apart from an OPT RR containing 933 the EDNS(0) option for padding. For example, without this capability 934 the maximum size that a tiny zone could be padded to would 935 theoretically be limited if there had to be a minimum of 1 RR per 936 packet. 938 However, as with existing AXFR, the last AXoT response message sent 939 MUST contain the same SOA that was in the first message of the AXoT 940 response series in order to signal the conclusion of the zone 941 transfer. 943 [RFC5936] says: 945 "Each AXFR response message SHOULD contain a sufficient number 946 of RRs to reasonably amortize the per-message overhead, up to 947 the largest number that will fit within a DNS message (taking 948 the required content of the other sections into account, as 949 described below)." 951 'Empty' AXoT responses generated in order to meet a padding 952 requirement will be exceptions to the above statement. For 953 flexibility, future proofing and in order to guarantee support for 954 future padding policies, we state here that secondary implementations 955 MUST be resilient to receiving padded AXoT responses, including 956 'empty' AXoT responses that contain only an OPT RR containing the 957 EDNS(0) option for padding. 959 Recommendation of specific policies for padding AXoT responses are 960 out of scope for this specification. Detailed considerations of such 961 policies and the trade-offs involved are expected to be the subject 962 of future work. 964 8.9. IXoT specifics 966 8.9.1. Condensation of responses 968 [RFC1995] says condensation of responses is optional and MAY be done. 969 Whilst it does add complexity to generating responses it can 970 significantly reduce the size of responses. However any such 971 reduction might be offset by increased message size due to padding. 972 This specification does not update the optionality of condensation 973 for XoT responses. 975 8.9.2. Fallback to AXFR 977 Fallback to AXFR can happen, for example, if the server is not able 978 to provide an IXFR for the requested SOA. Implementations differ in 979 how long they store zone deltas and how many may be stored at any one 980 time. 982 Just as with IXFR-over-TCP, after a failed IXFR a IXoT client SHOULD 983 request the AXFR on the already open XoT connection. 985 8.9.3. Padding of IXoT responses 987 The goal of padding IXoT responses would be to obfuscate the 988 incremental changes to the zone between SOA updates to minimize 989 information leakage about zone update activity and growth. Both the 990 size and timing of the IXoT responses could reveal information. 992 IXFR responses can vary in size greatly from the order of 100 bytes 993 for one or two record updates, to tens of thousands of bytes for 994 large dynamic DNSSEC signed zones. The frequency of IXFR responses 995 can also depend greatly on if and how the zone is DNSSEC signed. 997 In order to guarantee support for future padding policies, we state 998 here that secondary implementations MUST be resilient to receiving 999 padded IXoT responses. 1001 Recommendation of specific policies for padding IXoT responses are 1002 out of scope for this specification. Detailed considerations of such 1003 policies and the trade-offs involved are expected to be the subject 1004 of future work. 1006 8.10. Name compression and maximum payload sizes 1008 It is noted here that name compression [RFC1035] can be used in XFR 1009 responses to reduce the size of the payload, however the maximum 1010 value of the offset that can be used in the name compression pointer 1011 structure is 16384. For some DNS implementations this limits the 1012 size of an individual XFR response used in practice to something 1013 around the order of 16kB. In principle, larger payload sizes can be 1014 supported for some responses with more sophisticated approaches 1015 (e.g., by pre-calculating the maximum offset required). 1017 Implementations may wish to offer options to disable name compression 1018 for XoT responses to enable larger payloads. This might be 1019 particularly helpful when padding is used since minimizing the 1020 payload size is not necessarily a useful optimization in this case 1021 and disabling name compression will reduce the resources required to 1022 construct the payload. 1024 9. Multi-primary Configurations 1026 Also known as multi-master configurations this model can provide 1027 flexibility and redundancy particularly for IXFR. A secondary will 1028 receive one or more NOTIFY messages and can send an SOA to all of the 1029 configured primaries. It can then choose to send an XFR request to 1030 the primary with the highest SOA (or other criteria, e.g., RTT). 1032 When using persistent connections the secondary may have a XoT 1033 connection already open to one or more primaries. Should a secondary 1034 preferentially request an XFR from a primary to which it already has 1035 an open XoT connection or the one with the highest SOA (assuming it 1036 doesn't have a connection open to it already)? 1038 Two extremes can be envisaged here. The first one can be considered 1039 a 'preferred primary connection' model. In this case the secondary 1040 continues to use one persistent connection to a single primary until 1041 it has reason not to. Reasons not to might include the primary 1042 repeatedly closing the connection, long query/response RTTs on 1043 transfers or the SOA of the primary being an unacceptable lag behind 1044 the SOA of an alternative primary. 1046 The other extreme can be considered a 'parallel primary connection' 1047 model. Here a secondary could keep multiple persistent connections 1048 open to all available primaries and only request XFRs from the 1049 primary with the highest serial number. Since normally the number of 1050 secondaries and primaries in direct contact in a transfer group is 1051 reasonably low this might be feasible if latency is the most 1052 significant concern. 1054 Recommendation of a particular scheme is out of scope of this 1055 document but implementations are encouraged to provide configuration 1056 options that allow operators to make choices about this behavior. 1058 10. Authentication mechanisms 1060 To provide context to the requirements in section Section 8.4, this 1061 section provides a brief summary of some of the existing 1062 authentication and validation mechanisms (both transport independent 1063 and TLS specific) that are available when performing zone transfers. 1064 Section 11 then discusses in more details specifically how a 1065 combination of TLS authentication, TSIG and IP based ACLs interact 1066 for XoT. 1068 We classify the mechanisms based on the following properties: 1070 o 'Data Origin Authentication' (DO): Authentication that the DNS 1071 message originated from the party with whom credentials were 1072 shared, and of the data integrity of the message contents (the 1073 originating party may or may not be party operating the far end of 1074 a TCP/TLS connection in a 'proxy' scenario). 1076 o 'Channel Confidentiality' (CC): Confidentiality of the 1077 communication channel between the client and server (i.e. the two 1078 end points of a TCP/TLS connection) from passive surveillance. 1080 o 'Channel Authentication' (CA): Authentication of the identity of 1081 party to whom a TCP/TLS connection is made (this might not be a 1082 direct connection between the primary and secondary in a proxy 1083 scenario). 1085 10.1. TSIG 1087 TSIG [RFC8945] provides a mechanism for two or more parties to use 1088 shared secret keys which can then be used to create a message digest 1089 to protect individual DNS messages. This allows each party to 1090 authenticate that a request or response (and the data in it) came 1091 from the other party, even if it was transmitted over an unsecured 1092 channel or via a proxy. 1094 Properties: Data origin authentication 1096 10.2. SIG(0) 1098 SIG(0) [RFC2931] similarly also provides a mechanism to digitally 1099 sign a DNS message but uses public key authentication, where the 1100 public keys are stored in DNS as KEY RRs and a private key is stored 1101 at the signer. 1103 Properties: Data origin authentication 1105 10.3. TLS 1107 10.3.1. Opportunistic TLS 1109 Opportunistic TLS for DoT is defined in [RFC8310] and can provide a 1110 defense against passive surveillance, providing on-the-wire 1111 confidentiality. Essentially 1113 o clients that know authentication information for a server SHOULD 1114 try to authenticate the server 1116 o however they MAY fallback to using TLS without authentication and 1118 o they MAY fallback to using cleartext if TLS is not available. 1120 As such it does not offer a defense against active attacks (e.g., an 1121 on path active attacker on the connection from client to server), and 1122 is not considered as useful for XoT. 1124 Properties: None guaranteed. 1126 10.3.2. Strict TLS 1128 Strict TLS for DoT [RFC8310] requires that a client is configured 1129 with an authentication domain name (and/or SPKI pinset) that MUST be 1130 used to authenticate the TLS handshake with the server. If 1131 authentication of the server fails, the client will not proceed with 1132 the connection. This provides a defense for the client against 1133 active surveillance, providing client-to-server authentication and 1134 end-to-end channel confidentiality. 1136 Properties: Channel confidentiality and authentication (of the 1137 server). 1139 10.3.3. Mutual TLS 1141 This is an extension to Strict TLS [RFC8310] which requires that a 1142 client is configured with an authentication domain name (and/or SPKI 1143 pinset) and a client certificate. The client offers the certificate 1144 for authentication by the server and the client can authenticate the 1145 server the same way as in Strict TLS. This provides a defense for 1146 both parties against active surveillance, providing bi-directional 1147 authentication and end-to-end channel confidentiality. 1149 Properties: Channel confidentiality and mutual authentication. 1151 10.4. IP Based ACL on the Primary 1153 Most DNS server implementations offer an option to configure an IP 1154 based Access Control List (ACL), which is often used in combination 1155 with TSIG based ACLs to restrict access to zone transfers on primary 1156 servers on a per query basis. 1158 This is also possible with XoT but it must be noted that, as with 1159 TCP, the implementation of such an ACL cannot be enforced on the 1160 primary until an XFR request is received on an established 1161 connection. 1163 As discussed in Appendix A an IP based per connection ACL could also 1164 be implemented where only TLS connections from recognized secondaries 1165 are accepted. 1167 Properties: Channel authentication of the client. 1169 10.5. ZONEMD 1171 For completeness, we also describe Message Digest for DNS Zones 1172 (ZONEMD) [RFC8976] here. The message digest is a mechanism that can 1173 be used to verify the content of a standalone zone. It is designed 1174 to be independent of the transmission channel or mechanism, allowing 1175 a general consumer of a zone to do origin authentication of the 1176 entire zone contents. Note that the current version of [RFC8976] 1177 states: 1179 "As specified herein, ZONEMD is impractical for large, dynamic zones 1180 due to the time and resources required for digest calculation. 1181 However, The ZONEMD record is extensible so that new digest schemes 1182 may be added in the future to support large, dynamic zones." 1184 It is complementary but orthogonal the above mechanisms; and can be 1185 used in conjunction with XoT but is not considered further here. 1187 11. XoT authentication 1189 It is noted that zone transfer scenarios can vary from a simple 1190 single primary/secondary relationship where both servers are under 1191 the control of a single operator to a complex hierarchical structure 1192 which includes proxies and multiple operators. Each deployment 1193 scenario will require specific analysis to determine which 1194 combination of authentication methods are best suited to the 1195 deployment model in question. 1197 The XoT authentication requirement specified in Section 8.4 addresses 1198 the issue of ensuring that the transfers is encrypted between the two 1199 endpoints directly involved in the current transfers. The following 1200 table summarized the properties of a selection of the mechanisms 1201 discussed in Section 10. The two letter acronyms for the properties 1202 are used below and (S) indicates the secondary and (P) indicates the 1203 primary. 1205 +----------------+-------+-------+-------+-------+-------+-------+ 1206 | Method | DO(S) | CC(S) | CA(S) | DO(P) | CC(P) | CA(P) | 1207 +----------------+-------+-------+-------+-------+-------+-------+ 1208 | Strict TLS | | Y | Y | | Y | | 1209 | Mutual TLS | | Y | Y | | Y | Y | 1210 | ACL on primary | | | | | | Y | 1211 | TSIG | Y | | | Y | | | 1212 +----------------+-------+-------+-------+-------+-------+-------+ 1214 Table 1: Properties of Authentication methods for XoT 1216 Based on this analysis it can be seen that: 1218 o Using just mutual TLS can be considered a standalone solution 1219 since both end points are authenticated 1221 o Using Strict TLS and an IP based ACL on the primary also provides 1222 authentication of both end points 1224 o Additional use of TSIG (or equally SIG(0)) can also provide data 1225 origin authentication which might be desirable for deployments 1226 that include a proxy between the secondary and primary, but is not 1227 part of the XoT requirement because it does nothing to guarantee 1228 channel confidentiality or authentication. 1230 12. Policies for Both AXoT and IXoT 1232 Whilst the protection of the zone contents in a transfer between two 1233 end points can be provided by the XoT protocol, the protection of all 1234 the transfers of a given zone requires operational administration and 1235 policy management. 1237 We call the entire group of servers involved in XFR for a particular 1238 set of zones (all the primaries and all the secondaries) the 1239 'transfer group'. 1241 Within any transfer group both AXFRs and IXFRs for a zone MUST all 1242 use the same policy, e.g., if AXFRs use AXoT then all IXFRs MUST use 1243 IXoT. 1245 In order to assure the confidentiality of the zone information, the 1246 entire transfer group MUST have a consistent policy of requiring 1247 confidentiality. If any do not, this is a weak link for attackers to 1248 exploit. 1250 An individual zone transfer is not considered protected by XoT unless 1251 both the client and server are configured to use only XoT and the 1252 overall zone transfer is not considered protected until all members 1253 of the transfer group are configured to use only XoT with all other 1254 transfers servers (see Section 13). 1256 A XoT policy should specify 1258 o What kind of TLS is required (Strict or Mutual TLS) 1260 o or if an IP based ACL is required. 1262 o (optionally) if TSIG/SIG(0) is required 1263 Since this may require configuration of a number of servers who may 1264 be under the control of different operators the desired consistency 1265 could be hard to enforce and audit in practice. 1267 Certain aspects of the Policies can be relatively easily tested 1268 independently, e.g., by requesting zone transfers without TSIG, from 1269 unauthorized IP addresses or over cleartext DNS. Other aspects such 1270 as if a secondary will accept data without a TSIG digest or if 1271 secondaries are using Strict as opposed to Opportunistic TLS are more 1272 challenging. 1274 The mechanics of co-ordinating or enforcing such policies are out of 1275 the scope of this document but may be the subject of future 1276 operational guidance. 1278 13. Implementation Considerations 1280 Server implementations may want to also offer options that allow ACLs 1281 on a zone to specify that a specific client can use either XoT or 1282 TCP. This would allow for flexibility while clients are migrating to 1283 XoT. 1285 Client implementations may similarly want to offer options to cater 1286 for the multi-primary case where the primaries are migrating to XoT. 1288 14. Operational Considerations 1290 If the options described in Section 13 are available, such 1291 configuration options MUST only be used in a 'migration mode', and 1292 therefore should be used with great care. 1294 It is noted that use of a TLS proxy in front of the primary server is 1295 a simple deployment solution that can enable server side XoT. 1297 15. IANA Considerations 1299 None. 1301 16. Implementation Status 1303 [THIS SECTION TO BE REMOVED BEFORE PUBLICATION] This section records 1304 the status of known implementations of the protocol defined by this 1305 specification at the time of posting of this Internet-Draft, and is 1306 based on a proposal described in [RFC7942]. 1308 A summary of current behavior and implementation status can be found 1309 here: XoT implementation status [1] 1310 Specific recent activity includes: 1312 1. The 1.9.2 version of Unbound [2] includes an option to perform 1313 AXoT (instead of AXFR-over-TCP). 1315 2. There are currently open pull requests against NSD to implement 1317 1. Connection re-use by default during XFR-over-TCP [3] 1319 2. Client side XoT [4] 1321 3. Version 9.17.7 of BIND contained an initial implementation of 1322 DoT, implementation of XoT is planned for early 2021 [5] 1324 Both items 1. and 2.2. listed above require the client (secondary) to 1325 authenticate the server (primary) using a configured authentication 1326 domain name if XoT is used. 1328 17. Security Considerations 1330 This document specifies a security measure against a DNS risk: the 1331 risk that an attacker collects entire DNS zones through eavesdropping 1332 on clear text DNS zone transfers. 1334 This does not mitigate: 1336 o the risk that some level of zone activity might be inferred by 1337 observing zone transfer sizes and timing on encrypted connections 1338 (even with padding applied), in combination with obtaining SOA 1339 records by directly querying authoritative servers. 1341 o the risk that hidden primaries might be inferred or identified via 1342 observation of encrypted connections. 1344 o the risk of zone contents being obtained via zone enumeration 1345 techniques. 1347 Security concerns of DoT are outlined in [RFC7858] and [RFC8310]. 1349 18. Acknowledgements 1351 The authors thank Tony Finch, Benno Overeinder, Shumon Huque and Tim 1352 Wicinski and many other members of DPRIVE for review and discussions. 1354 The authors particularly thank Peter van Dijk, Ondrej Sury, Brian 1355 Dickson and several other open source DNS implementers for valuable 1356 discussion and clarification on the issue associated with pipelining 1357 XFR queries and handling out-of-order/intermingled responses. 1359 19. Contributors 1361 Significant contributions to the document were made by: 1363 Han Zhang 1364 Salesforce 1365 San Francisco, CA 1366 United States 1368 Email: hzhang@salesforce.com 1370 20. Changelog 1372 draft-ietf-dprive-xfr-over-tls-09 1374 o Address issued raised in the AD review 1376 draft-ietf-dprive-xfr-over-tls-08 1378 o RFC2845 -> (obsoleted by) RFC8945 1380 o I-D.ietf-dnsop-dns-zone-digest -> RFC8976 1382 o Minor editorial changes + email update 1384 draft-ietf-dprive-xfr-over-tls-07 1386 o Reference RFC7942 in the implementation status section 1388 o Convert the URIs that will remain on publication to references 1390 o Correct typos in acknowledgments 1392 draft-ietf-dprive-xfr-over-tls-06 1394 o Update text relating to pipelining and connection reuse after WGLC 1395 comments. 1397 o Add link to implementation status matrix 1399 o Various typos 1401 draft-ietf-dprive-xfr-over-tls-05 1403 o Remove the open questions that received no comments. 1405 o Add more detail to the implementation section 1406 o Add Github repository 1408 o Fix typos and references and improve layout. 1410 draft-ietf-dprive-xfr-over-tls-03 1412 o Remove propose to use ALPN 1414 o Clarify updates to both RFC1995 and RFC5936 by adding specific 1415 sections on this 1417 o Add a section on the threat model 1419 o Convert all SVG diagrams to ASCII art 1421 o Add discussions on concurrency limits 1423 o Add discussions on Extended DNS error codes 1425 o Re-work authentication requirements and discussion 1427 o Add appendix discussion TLS connection management 1429 draft-ietf-dprive-xfr-over-tls-02 1431 o Significantly update descriptions for both AXoT and IXoT for 1432 message and connection handling taking into account previous 1433 specifications in more detail 1435 o Add use of APLN and limitations on traffic on XoT connections. 1437 o Add new discussions of padding for both AXoT and IXoT 1439 o Add text on SIG(0) 1441 o Update security considerations 1443 o Move multi-primary considerations to earlier as they are related 1444 to connection handling 1446 draft-ietf-dprive-xfr-over-tls-01 1448 o Minor editorial updates 1450 o Add requirement for TLS 1.3. or later 1451 o Rename after adoption and reference update. 1453 o Add placeholder for SIG(0) discussion 1455 o Update section on ZONEMD 1457 draft-hzpa-dprive-xfr-over-tls-02 1459 o Substantial re-work of the document. 1461 draft-hzpa-dprive-xfr-over-tls-01 1463 o Editorial changes, updates to references. 1465 draft-hzpa-dprive-xfr-over-tls-00 1467 o Initial commit 1469 21. References 1471 21.1. Normative References 1473 [I-D.ietf-dprive-rfc7626-bis] 1474 Wicinski, T., "DNS Privacy Considerations", draft-ietf- 1475 dprive-rfc7626-bis-08 (work in progress), October 2020. 1477 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1478 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1479 . 1481 [RFC1035] Mockapetris, P., "Domain names - implementation and 1482 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1483 November 1987, . 1485 [RFC1995] Ohta, M., "Incremental Zone Transfer in DNS", RFC 1995, 1486 DOI 10.17487/RFC1995, August 1996, . 1489 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 1490 Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996, 1491 August 1996, . 1493 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1494 Requirement Levels", BCP 14, RFC 2119, 1495 DOI 10.17487/RFC2119, March 1997, . 1498 [RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol 1499 (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010, 1500 . 1502 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1503 Morris, J., Hansen, M., and R. Smith, "Privacy 1504 Considerations for Internet Protocols", RFC 6973, 1505 DOI 10.17487/RFC6973, July 2013, . 1508 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 1509 D. Wessels, "DNS Transport over TCP - Implementation 1510 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 1511 . 1513 [RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 1514 edns-tcp-keepalive EDNS0 Option", RFC 7828, 1515 DOI 10.17487/RFC7828, April 2016, . 1518 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1519 and P. Hoffman, "Specification for DNS over Transport 1520 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1521 2016, . 1523 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1524 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1525 May 2017, . 1527 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 1528 for DNS over TLS and DNS over DTLS", RFC 8310, 1529 DOI 10.17487/RFC8310, March 2018, . 1532 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1533 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1534 . 1536 [RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1537 Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, 1538 January 2019, . 1540 [RFC8914] Kumari, W., Hunt, E., Arends, R., Hardaker, W., and D. 1541 Lawrence, "Extended DNS Errors", RFC 8914, 1542 DOI 10.17487/RFC8914, October 2020, . 1545 [RFC8945] Dupont, F., Morris, S., Vixie, P., Eastlake 3rd, D., 1546 Gudmundsson, O., and B. Wellington, "Secret Key 1547 Transaction Authentication for DNS (TSIG)", STD 93, 1548 RFC 8945, DOI 10.17487/RFC8945, November 2020, 1549 . 1551 21.2. Informative References 1553 [BIND] ISC, "BIND 9", 2021, . 1555 [I-D.ietf-dprive-dnsoquic] 1556 Huitema, C., Mankin, A., and S. Dickinson, "Specification 1557 of DNS over Dedicated QUIC Connections", draft-ietf- 1558 dprive-dnsoquic-01 (work in progress), October 2020. 1560 [I-D.ietf-dprive-phase2-requirements] 1561 Livingood, J., Mayrhofer, A., and B. Overeinder, "DNS 1562 Privacy Requirements for Exchanges between Recursive 1563 Resolvers and Authoritative Servers", draft-ietf-dprive- 1564 phase2-requirements-02 (work in progress), November 2020. 1566 [I-D.ietf-tls-esni] 1567 Rescorla, E., Oku, K., Sullivan, N., and C. Wood, "TLS 1568 Encrypted Client Hello", draft-ietf-tls-esni-09 (work in 1569 progress), December 2020. 1571 [I-D.vcelak-nsec5] 1572 Vcelak, J., Goldberg, S., Papadopoulos, D., Huque, S., and 1573 D. Lawrence, "NSEC5, DNSSEC Authenticated Denial of 1574 Existence", draft-vcelak-nsec5-08 (work in progress), 1575 December 2018. 1577 [nist-guide] 1578 Chandramouli, R. and S. Rose, "Secure Domain Name System 1579 (DNS) Deployment Guide", 2013, 1580 . 1583 [NSD] NLnet Labs, "NSD", 2021, 1584 . 1586 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 1587 DOI 10.17487/RFC1982, August 1996, . 1590 [RFC2931] Eastlake 3rd, D., "DNS Request and Transaction Signatures 1591 ( SIG(0)s )", RFC 2931, DOI 10.17487/RFC2931, September 1592 2000, . 1594 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS 1595 Security (DNSSEC) Hashed Authenticated Denial of 1596 Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008, 1597 . 1599 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 1600 for DNS (EDNS(0))", STD 75, RFC 6891, 1601 DOI 10.17487/RFC6891, April 2013, . 1604 [RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 1605 Code: The Implementation Status Section", BCP 205, 1606 RFC 7942, DOI 10.17487/RFC7942, July 2016, 1607 . 1609 [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 1610 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 1611 . 1613 [RFC8976] Wessels, D., Barber, P., Weinberg, M., Kumari, W., and W. 1614 Hardaker, "Message Digest for DNS Zones", RFC 8976, 1615 DOI 10.17487/RFC8976, February 2021, . 1618 21.3. URIs 1620 [1] https://dnsprivacy.org/wiki/display/DP/ 1621 DNS+Privacy+Implementation+Status#DNSPrivacyImplementationStatus- 1622 XFR/XoTImplementationstatus 1624 [2] https://github.com/NLnetLabs/unbound/blob/release-1.9.2/doc/ 1625 Changelog 1627 [3] https://github.com/NLnetLabs/nsd/pull/145 1629 [4] https://github.com/NLnetLabs/nsd/pull/149 1631 [5] https://gitlab.isc.org/isc-projects/bind9/-/issues/1784 1633 Appendix A. XoT server connection handling 1635 For completeness, it is noted that an earlier version of the 1636 specification suggested using a XoT specific ALPN to negotiate TLS 1637 connections that supported only a limited set of queries (SOA, XRFs) 1638 however this did not gain support. Reasons given included additional 1639 code complexity and proxies having no natural way to forward the ALPN 1640 signal to DNS nameservers over TCP connections. 1642 A.1. Only listen on TLS on a specific IP address 1644 Obviously a nameserver which hosts a zone and services queries for 1645 the zone on an IP address published in an NS record may wish to use a 1646 separate IP address for listening on TLS for XoT, only publishing 1647 that address to its secondaries. 1649 Pros: Probing of the public IP address will show no support for TLS. 1650 ACLs will prevent zone transfer on all transports on a per query 1651 basis. 1653 Cons: Attackers passively observing traffic will still be able to 1654 observe TLS connections to the separate address. 1656 A.2. Client specific TLS acceptance 1658 Primaries that include IP based ACLs and/or mutual TLS in their 1659 authentication models have the option of only accepting TLS 1660 connections from authorized clients. This could be implemented using 1661 a proxy or directly in DNS implementation. 1663 Pros: Connection management happens at setup time. The maximum 1664 number of TLS connections a server will have to support can be easily 1665 assessed. Once the connection is accepted the server might well be 1666 willing to answer any query on that connection since it is coming 1667 from a configured secondary and a specific response policy on the 1668 connection may not be needed (see below). 1670 Cons: Currently, none of the major open source DNS authoritative 1671 implementations support such an option. 1673 A.3. SNI based TLS acceptance 1675 Primaries could also choose to only accept TLS connections based on 1676 an SNI that was published only to their secondaries. 1678 Pros: Reduces the number of accepted connections. 1680 Cons: As above. For SNIs sent in the clear, this would still allow 1681 attackers passively observing traffic to potentially abuse this 1682 mechanism. The use of Encrypted Client Hello [I-D.ietf-tls-esni] may 1683 be of use here. 1685 A.4. TLS specific response policies 1687 Some primaries might rely on TSIG/SIG(0) combined with per-query IP 1688 based ACLs to authenticate secondaries. In this case the primary 1689 must accept all incoming TLS connections and then apply a TLS 1690 specific response policy on a per query basis. 1692 As an aside, whilst [RFC7766] makes a general purpose distinction to 1693 clients in the usage of connections (between regular queries and zone 1694 transfers) this is not strict and nothing in the DNS protocol 1695 prevents using the same connection for both types of traffic. Hence 1696 a server cannot know the intention of any client that connects to it, 1697 it can only inspect the messages it receives on such a connection and 1698 make per query decisions about whether or not to answer those 1699 queries. 1701 Example policies a XoT server might implement are: 1703 o strict: REFUSE all queries on TLS connections except SOA and 1704 authorized XFR requests 1706 o moderate: REFUSE all queries on TLS connections until one is 1707 received that is signed by a recognized TSIG/SIG(0) key, then 1708 answer all queries on the connection after that 1710 o complex: apply a heuristic to determine which queries on a TLS 1711 connections to REFUSE 1713 o relaxed: answer all non-XoT queries on all TLS connections with 1714 the same policy applied to TCP queries 1716 Pros: Allows for flexible behavior by the server that could be 1717 changed over time. 1719 Cons: The server must handle the burden of accepting all TLS 1720 connections just to perform XFRs with a small number of secondaries. 1721 Client behavior to REFUSED response is not clearly defined (see 1722 below). Currently, none of the major open source DNS authoritative 1723 implementations offer an option for different response policies in 1724 different transports (but could potentially be implemented using a 1725 proxy). 1727 A.4.1. SNI based response policies 1729 In a similar fashion, XoT servers might use the presence of an SNI in 1730 the client hello to determine which response policy to initially 1731 apply to the TLS connections. 1733 Pros: This has to potential to allow a clean distinction between a 1734 XoT service and any future DoT based service for answering recursive 1735 queries. 1737 Cons: As above. 1739 Authors' Addresses 1741 Willem Toorop 1742 NLnet Labs 1743 Science Park 400 1744 Amsterdam 1098 XH 1745 The Netherlands 1747 Email: willem@nlnetlabs.nl 1749 Sara Dickinson 1750 Sinodun IT 1751 Magdalen Centre 1752 Oxford Science Park 1753 Oxford OX4 4GA 1754 United Kingdom 1756 Email: sara@sinodun.com 1758 Shivan Sahib 1759 Salesforce 1760 Vancouver, BC 1761 Canada 1763 Email: shivankaulsahib@gmail.com 1765 Pallavi Aras 1766 Salesforce 1767 Herndon, VA 1768 United States 1770 Email: paras@salesforce.com 1772 Allison Mankin 1773 Salesforce 1774 Herndon, VA 1775 United States 1777 Email: allison.mankin@gmail.com