idnits 2.17.1 draft-ietf-dprive-xfr-over-tls-05.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 (January 20, 2021) is 1186 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 1538 -- Looks like a reference, but probably isn't: '2' on line 1540 -- Looks like a reference, but probably isn't: '3' on line 1542 -- Looks like a reference, but probably isn't: '4' on line 1545 -- Looks like a reference, but probably isn't: '5' on line 1547 -- Looks like a reference, but probably isn't: '6' on line 1549 ** Obsolete normative reference: RFC 2845 (Obsoleted by RFC 8945) ** Downref: Normative reference to an Informational RFC: RFC 6973 ** Obsolete normative reference: RFC 7626 (Obsoleted by RFC 9076) ** 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: 4 errors (**), 0 flaws (~~), 4 warnings (==), 8 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: July 24, 2021 S. Sahib 7 P. Aras 8 A. Mankin 9 Salesforce 10 January 20, 2021 12 DNS Zone Transfer-over-TLS 13 draft-ietf-dprive-xfr-over-tls-05 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 use of TLS, rather then 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 July 24, 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. Use Cases for XFR-over-TLS . . . . . . . . . . . . . . . . . 6 65 4.1. Threat model . . . . . . . . . . . . . . . . . . . . . . 6 66 5. Connection and Data Flows in Existing XFR Mechanisms . . . . 7 67 5.1. AXFR Mechanism . . . . . . . . . . . . . . . . . . . . . 7 68 5.2. IXFR Mechanism . . . . . . . . . . . . . . . . . . . . . 9 69 5.3. Data Leakage of NOTIFY and SOA Message Exchanges . . . . 11 70 5.3.1. NOTIFY . . . . . . . . . . . . . . . . . . . . . . . 11 71 5.3.2. SOA . . . . . . . . . . . . . . . . . . . . . . . . . 11 72 6. Updates to existing specifications . . . . . . . . . . . . . 11 73 6.1. Update to RFC1995 for IXFR-over-TCP . . . . . . . . . . . 12 74 6.2. Update to RFC5936 for AXFR-over-TCP . . . . . . . . . . . 13 75 6.3. Updates to RFC1995 and RFC5936 for XFR-over-TCP . . . . . 13 76 6.3.1. Connection reuse . . . . . . . . . . . . . . . . . . 13 77 6.3.2. AXFRs and IXFRs on the same connection . . . . . . . 13 78 6.3.3. XFR limits . . . . . . . . . . . . . . . . . . . . . 14 79 6.3.4. The edns-tcp-keepalive EDNS0 Option . . . . . . . . . 14 80 6.3.5. Backwards compatibility . . . . . . . . . . . . . . . 15 81 6.4. Update to RFC7766 . . . . . . . . . . . . . . . . . . . . 15 82 7. XoT specification . . . . . . . . . . . . . . . . . . . . . . 16 83 7.1. TLS versions . . . . . . . . . . . . . . . . . . . . . . 16 84 7.2. Port selection . . . . . . . . . . . . . . . . . . . . . 16 85 7.3. High level XoT descriptions . . . . . . . . . . . . . . . 16 86 7.4. XoT transfers . . . . . . . . . . . . . . . . . . . . . . 18 87 7.5. XoT connections . . . . . . . . . . . . . . . . . . . . . 19 88 7.6. XoT vs ADoT . . . . . . . . . . . . . . . . . . . . . . . 19 89 7.7. Response RCODES . . . . . . . . . . . . . . . . . . . . . 20 90 7.8. AXoT specifics . . . . . . . . . . . . . . . . . . . . . 20 91 7.8.1. Padding AXoT responses . . . . . . . . . . . . . . . 20 92 7.9. IXoT specifics . . . . . . . . . . . . . . . . . . . . . 21 93 7.9.1. Condensation of responses . . . . . . . . . . . . . . 21 94 7.9.2. Fallback to AXFR . . . . . . . . . . . . . . . . . . 21 95 7.9.3. Padding of IXoT responses . . . . . . . . . . . . . . 22 96 7.10. Name compression and maximum payload sizes . . . . . . . 22 98 8. Multi-primary Configurations . . . . . . . . . . . . . . . . 22 99 9. Authentication mechanisms . . . . . . . . . . . . . . . . . . 23 100 9.1. TSIG . . . . . . . . . . . . . . . . . . . . . . . . . . 24 101 9.2. SIG(0) . . . . . . . . . . . . . . . . . . . . . . . . . 24 102 9.3. TLS . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 103 9.3.1. Opportunistic TLS . . . . . . . . . . . . . . . . . . 24 104 9.3.2. Strict TLS . . . . . . . . . . . . . . . . . . . . . 25 105 9.3.3. Mutual TLS . . . . . . . . . . . . . . . . . . . . . 25 106 9.4. IP Based ACL on the Primary . . . . . . . . . . . . . . . 25 107 9.5. ZONEMD . . . . . . . . . . . . . . . . . . . . . . . . . 26 108 10. XoT authentication . . . . . . . . . . . . . . . . . . . . . 26 109 11. Policies for Both AXoT and IXoT . . . . . . . . . . . . . . . 27 110 12. Implementation Considerations . . . . . . . . . . . . . . . . 28 111 13. Implementation Status . . . . . . . . . . . . . . . . . . . . 28 112 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 113 15. Security Considerations . . . . . . . . . . . . . . . . . . . 29 114 16. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 29 115 17. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 29 116 18. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 29 117 19. References . . . . . . . . . . . . . . . . . . . . . . . . . 31 118 19.1. Normative References . . . . . . . . . . . . . . . . . . 31 119 19.2. Informative References . . . . . . . . . . . . . . . . . 33 120 19.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 34 121 Appendix A. XoT server connection handling . . . . . . . . . . . 34 122 A.1. Only listen on TLS on a specific IP address . . . . . . . 35 123 A.2. Client specific TLS acceptance . . . . . . . . . . . . . 35 124 A.3. SNI based TLS acceptance . . . . . . . . . . . . . . . . 35 125 A.4. TLS specific response policies . . . . . . . . . . . . . 35 126 A.4.1. SNI based response policies . . . . . . . . . . . . . 36 127 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 129 1. Introduction 131 DNS has a number of privacy vulnerabilities, as discussed in detail 132 in [RFC7626]. Stub client to recursive resolver query privacy has 133 received the most attention to date, with standards track documents 134 for both DNS-over-TLS (DoT) [RFC7858] and DNS-over-HTTPS (DoH) 135 [RFC8484], and a proposal for DNS-over-QUIC 136 [I-D.ietf-dprive-dnsoquic]. There is ongoing work on DNS privacy 137 requirements for exchanges between recursive resolvers and 138 authoritative servers [I-D.ietf-dprive-phase2-requirements] and some 139 suggestions for how signaling of DoT support by authoritatives might 140 work, e.g., [I-D.vandijk-dprive-ds-dot-signal-and-pin]. However 141 there is currently no RFC that specifically defines recursive to 142 authoritative DNS-over-TLS (ADoT). 144 [RFC7626] established that stub client DNS query transactions are not 145 public and needed protection, but on zone transfer [RFC1995] 146 [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 There may also be regulatory, policy or other reasons why the zone 167 contents in full must be treated as private. 169 Neither of the RFCs mentioned in [RFC7626] contemplates the risk that 170 someone gets the data through eavesdropping on network connections, 171 only via enumeration or unauthorized transfer as described in the 172 following paragraphs. 174 Zone enumeration is trivially possible for DNSSEC zones which use 175 NSEC; i.e. queries for the authenticated denial of existences 176 records allow a client to walk through the entire zone contents. 177 [RFC5155] specifies NSEC3, a mechanism to provide measures against 178 zone enumeration for DNSSEC signed zones (a goal was to make it as 179 hard to enumerate an DNSSEC signed zone as an unsigned zone). Whilst 180 this is widely used, zone walking is now possible with NSEC3 due to 181 crypto-breaking advances. This has prompted further work on an 182 alternative mechanism for DNSSEC authenticated denial of existence - 183 NSEC5 [I-D.vcelak-nsec5] - however questions remain over the 184 practicality of this mechanism. 186 [RFC5155] does not address data obtained outside zone enumeration 187 (nor does [I-D.vcelak-nsec5]). Preventing eavesdropping of zone 188 transfers (this draft) is orthogonal to preventing zone enumeration, 189 though they aim to protect the same information. 191 [RFC5936] specifies using TSIG [RFC2845] for authorization of the 192 clients of a zone transfer and for data integrity, but does not 193 express any need for confidentiality, and TSIG does not offer 194 encryption. Some operators use SSH tunneling or IPSec to encrypt the 195 transfer data. 197 Section 8 of the NIST guide on 'Secure Domain Name System (DNS) 198 Deployment' [nist-guide] discusses restricting access for zone 199 transfers using ACLs and TSIG in more detail. It is noted that in 200 all the common open source implementations such ACLs are applied on a 201 per query basis. Since requests typically occur on TCP connections 202 authoritatives must cater for accepting any TCP connection and then 203 handling the authentication of each XFR request individually. 205 Because both AXFR and IXFR zone transfers are typically carried out 206 over TCP from authoritative DNS protocol implementations, encrypting 207 zone transfers using TLS, based closely on DoT [RFC7858], seems like 208 a simple step forward. This document specifies how to use TLS as a 209 transport to prevent zone collection from zone transfers. 211 2. Document work via GitHub 213 [THIS SECTION TO BE REMOVED BEFORE PUBLICATION] The Github repository 214 for this document is at . Proposed text and editorial changes are very much 216 welcomed there, but any functional changes should always first be 217 discussed on the IETF DPRIVE WG (dns-privacy) mailing list. 219 3. Terminology 221 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 222 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 223 "OPTIONAL" in this document are to be interpreted as described in BCP 224 14 [RFC2119] and [RFC8174] when, and only when, they appear in all 225 capitals, as shown here. 227 Privacy terminology is as described in Section 3 of [RFC6973]. 229 Note that in this document we choose to use the terms 'primary' and 230 'secondary' for two servers engaged in zone transfers. 232 DNS terminology is as described in [RFC8499]. 234 DoT: DNS-over-TLS as specified in [RFC7858] 236 XFR-over-TCP: Used to mean both IXFR-over-TCP [RFC1995] and AXFR- 237 over-TCP [RFC5936]. 239 XoT: Generic XFR-over-TLS mechanisms as specified in this document 241 AXoT: AXFR-over-TLS 243 IXoT: IXFR over-TLS 245 4. Use Cases for XFR-over-TLS 247 o Confidentiality. Clearly using an encrypted transport for zone 248 transfers will defeat zone content leakage that can occur via 249 passive surveillance. 251 o Authentication. Use of single or mutual TLS (mTLS) authentication 252 (in combination with ACLs) can complement and potentially be an 253 alternative to TSIG. 255 o Performance. Existing AXFR and IXFR mechanisms have the burden of 256 backwards compatibility with older implementations based on the 257 original specifications in [RFC1034] and [RFC1035]. For example, 258 some older AXFR servers don't support using a TCP connection for 259 multiple AXFR sessions or XFRs of different zones because they 260 have not been updated to follow the guidance in [RFC5936]. Any 261 implementation of XFR-over-TLS (XoT) would obviously be required 262 to implement optimized and interoperable transfers as described in 263 [RFC5936], e.g., transfer of multiple zones over one connection. 265 o Performance. Current usage of TCP for IXFR is sub-optimal in some 266 cases i.e. connections are frequently closed after a single IXFR. 268 4.1. Threat model 270 The threat model considered here is one where the current contents 271 and size of the zone are considered sensitive and should be protected 272 during transfer. 274 The threat model does not, however, consider the existence of a zone, 275 the act of zone transfer between two entities, nor the identities of 276 the nameservers hosting a zone (including both those acting as hidden 277 primaries/secondaries or directly serving the zone) as sensitive 278 information. The proposed mechanisms does not attempt to obscure 279 such information. The reasons for this include: 281 o much of this information can be obtained by various methods 282 including active scanning of the DNS 284 o an attacker who can monitor network traffic can relatively easily 285 infer relations between nameservers simply from traffic patterns, 286 even when some or all of the traffic is encrypted 288 It is noted that simply using XoT will indicate a desire by the zone 289 owner that the contents of the zone remain confidential and so could 290 be subject to blocking (e.g. via blocking of port 853) if an attacker 291 had such capabilities. However this threat is likely true of any 292 such mechanism that attempts to encrypt data passed between 293 nameservers e.g. IPsec. 295 5. Connection and Data Flows in Existing XFR Mechanisms 297 The original specification for zone transfers in [RFC1034] and 298 [RFC1035] was based on a polling mechanism: a secondary performed a 299 periodic SOA query (based on the refresh timer) to determine if an 300 AXFR was required. 302 [RFC1995] and [RFC1996] introduced the concepts of IXFR and NOTIFY 303 respectively, to provide for prompt propagation of zone updates. 304 This has largely replaced AXFR where possible, particularly for 305 dynamically updated zones. 307 [RFC5936] subsequently redefined the specification of AXFR to improve 308 performance and interoperability. 310 In this document we use the phrase "XFR mechanism" to describe the 311 entire set of message exchanges between a secondary and a primary 312 that concludes in a successful AXFR or IXFR request/response. This 313 set may or may not include 315 o NOTIFY messages 317 o SOA queries 319 o Fallback from IXFR to AXFR 321 o Fallback from IXFR-over-UDP to IXFR-over-TCP 323 The term is used to encompasses the range of permutations that are 324 possible and is useful to distinguish the 'XFR mechanism' from a 325 single XFR request/response exchange. 327 5.1. AXFR Mechanism 329 The figure below provides an outline of an AXFR mechanism including 330 NOTIFYs. 332 Secondary Primary 334 | NOTIFY | 335 | <-------------------------------- | UDP 336 | --------------------------------> | 337 | NOTIFY Response | 338 | | 339 | | 340 | SOA Request | 341 | --------------------------------> | UDP (or part of 342 | <-------------------------------- | a TCP session) 343 | SOA Response | 344 | | 345 | | 346 | | 347 | AXFR Request | --- 348 | --------------------------------> | | 349 | <-------------------------------- | | 350 | AXFR Response 1 | | 351 | (Zone data) | | 352 | | | 353 | <-------------------------------- | | TCP 354 | AXFR Response 2 | | Session 355 | (Zone data) | | 356 | | | 357 | <-------------------------------- | | 358 | AXFR Response 3 | | 359 | (Zone data) | --- 360 | | 362 Figure 1. AXFR Mechanism 364 1. An AXFR is often (but not always) preceded by a NOTIFY (over UDP) 365 from the primary to the secondary. A secondary may also initiate 366 an AXFR based on a refresh timer or scheduled/triggered zone 367 maintenance. 369 2. The secondary will normally (but not always) make a SOA query to 370 the primary to obtain the serial number of the zone held by the 371 primary. 373 3. If the primary serial is higher than the secondaries serial 374 (using Serial Number Arithmetic [RFC1982]), the secondary makes 375 an AXFR request (over TCP) to the primary after which the AXFR 376 data flows in one or more AXFR responses on the TCP connection. 377 [RFC5936] defines this specific step as an 'AXFR session' i.e. as 378 an AXFR query message and the sequence of AXFR response messages 379 returned for it. 381 [RFC5936] re-specified AXFR providing additional guidance beyond that 382 provided in [RFC1034] and [RFC1035] and importantly specified that 383 AXFR must use TCP as the transport protocol. 385 Additionally, sections 4.1, 4.1.1 and 4.1.2 of [RFC5936] provide 386 improved guidance for AXFR clients and servers with regard to re-use 387 of TCP connections for multiple AXFRs and AXFRs of different zones. 388 However [RFC5936] was constrained by having to be backwards 389 compatible with some very early basic implementations of AXFR. For 390 example, it outlines that the SOA query can also happen on this 391 connection. However, this can cause interoperability problems with 392 older implementations that support only the trivial case of one AXFR 393 per connection. 395 5.2. IXFR Mechanism 397 The figure below provides an outline of the IXFR mechanism including 398 NOTIFYs. 400 Secondary Primary 402 | NOTIFY | 403 | <-------------------------------- | UDP 404 | --------------------------------> | 405 | NOTIFY Response | 406 | | 407 | | 408 | SOA Request | 409 | --------------------------------> | UDP or TCP 410 | <-------------------------------- | 411 | SOA Response | 412 | | 413 | | 414 | | 415 | IXFR Request | 416 | --------------------------------> | UDP or TCP 417 | <-------------------------------- | 418 | IXFR Response | 419 | (Zone data) | 420 | | 421 | | --- 422 | IXFR Request | | 423 | --------------------------------> | | Retry over 424 | <-------------------------------- | | TCP if 425 | IXFR Response | | required 426 | (Zone data) | --- 428 Figure 1. IXFR Mechanism 430 1. An IXFR is normally (but not always) preceded by a NOTIFY (over 431 UDP) from the primary to the secondary. A secondary may also 432 initiate an IXFR based on a refresh timer or scheduled/triggered 433 zone maintenance. 435 2. The secondary will normally (but not always) make a SOA query to 436 the primary to obtain the serial number of the zone held by the 437 primary. 439 3. If the primary serial is higher than the secondaries serial 440 (using Serial Number Arithmetic [RFC1982]), the secondary makes 441 an IXFR request to the primary after the primary sends an IXFR 442 response. 444 [RFC1995] specifies that Incremental Transfer may use UDP if the 445 entire IXFR response can be contained in a single DNS packet, 446 otherwise, TCP is used. In fact it says: 448 "Thus, a client should first make an IXFR query using UDP." 450 So there may be a fourth step above where the client falls back to 451 IXFR-over-TCP. There may also be a fourth step where the secondary 452 must fall back to AXFR because, e.g., the primary does not support 453 IXFR. 455 However it is noted that most widely used open source authoritative 456 nameserver implementations (including both BIND [1] and NSD [2]) do 457 IXFR using TCP by default in their latest releases. For BIND TCP 458 connections are sometimes used for SOA queries but in general they 459 are not used persistently and close after an IXFR is completed. 461 5.3. Data Leakage of NOTIFY and SOA Message Exchanges 463 This section attempts to presents a rationale for considering 464 encrypting the other messages in the XFR mechanism. 466 Since the SOA of the published zone can be trivially discovered by 467 simply querying the publicly available authoritative servers leakage 468 of this RR is not discussed in the following sections. 470 5.3.1. NOTIFY 472 Unencrypted NOTIFY messages identify configured secondaries on the 473 primary. 475 [RFC1996] also states: 477 "If ANCOUNT>0, then the answer section represents an 478 unsecure hint at the new RRset for this (QNAME,QCLASS,QTYPE). 480 But since the only supported QTYPE for NOTIFY is SOA, this does not 481 pose a potential leak. 483 5.3.2. SOA 485 For hidden primaries or secondaries the SOA response leaks only the 486 degree of lag of any downstream secondary. 488 6. Updates to existing specifications 490 For convenience, the phrase 'XFR-over-TCP' is used in this document 491 to mean both IXFR-over-TCP and AXFR-over-TCP and therefore statements 492 that use it update both [RFC1995] and [RFC5936], and implicitly also 493 apply to XoT. Differences in behavior specific to XoT are discussed 494 in Section 7. 496 Both [RFC1995] and [RFC5936] were published sometime before TCP was 497 considered a first class transport for DNS. [RFC1995], in fact, says 498 nothing with respect to optimizing IXFRs over TCP or re-using already 499 open TCP connections to perform IXFRs or other queries. Therefore, 500 there arguably is an implicit assumption (probably unintentional) 501 that a TCP connection is used for one and only one IXFR request. 502 Indeed, several open source implementations currently take this 503 approach. And whilst [RFC5936] gives guidance on connection re-use 504 for AXFR, it pre-dates more recent specifications describing 505 persistent TCP connections e.g. [RFC7766], [RFC7828] and AXFR 506 implementations again often make less than optimal use of open 507 connections. 509 Given this, new implementations of XoT will clearly benefit from 510 specific guidance on TCP/TLS connection usage for XFR because this 511 will: 513 o result in more consistent XoT implementations with better 514 interoperability 516 o remove any need for XoT implementations to support legacy behavior 517 that XFR-over-TCP implementations have historically often 518 supported 520 Therefore this document updates both the previous specifications for 521 XFR-over-TCP to clarify that implementations MUST use [RFC7766] (DNS 522 Transport over TCP - Implementation Requirements) to optimize the use 523 of TCP connections and SHOULD use [RFC7828] (The edns-tcp-keepalive 524 EDNS0 Option) to manage persistent connections. 526 The following sections include detailed clarifications on the updates 527 to XFR behavior implied in [RFC7766] and how the use of [RFC7828] 528 applies specifically to XFR exchanges. It also discusses how IXFR 529 and AXFR can reuse the same TCP connection. 531 For completeness, we also mention here the recent specification of 532 extended DNS error (EDE) codes [RFC8914]. For zone transfers, when 533 returning REFUSED to a zone transfer request to an 'unauthorized' 534 client (e.g. where the client is not listed in an ACL for zone 535 transfers or does not sign the request with the correct TSIG key), 536 the extended DNS error code 18 (Prohibited) can also be sent. 538 6.1. Update to RFC1995 for IXFR-over-TCP 540 For clarity - an IXFR-over-TCP server compliant with this 541 specification MUST be able to handle multiple concurrent IXoT 542 requests on a single TCP connection (for the same and different 543 zones) and SHOULD send the responses as soon as they are available, 544 which might be out-of-order compared to the requests. 546 6.2. Update to RFC5936 for AXFR-over-TCP 548 For clarity - an AXFR-over-TCP server compliant with this 549 specification MUST be able to handle multiple concurrent AXoT 550 sessions on a single TCP connection (for the same and different 551 zones). The response streams for concurrent AXFRs MAY be 552 intermingled and AXFR-over-TCP clients compliant with this 553 specification MUST be able to handle this. 555 6.3. Updates to RFC1995 and RFC5936 for XFR-over-TCP 557 6.3.1. Connection reuse 559 As specified, XFR-over-TCP clients SHOULD re-use any existing open 560 TCP connection when starting any new XFR request to the same primary, 561 and for issuing SOA queries, instead of opening a new connection. 562 The number of TCP connections between a secondary and primary SHOULD 563 be minimized (also see Section 6.4). 565 Valid reasons for not re-using existing connections might include: 567 o reaching a configured limit for the number of outstanding queries 568 or XFR requests allowed on a single TCP connection 570 o the message ID pool has already been exhausted on an open 571 connection 573 o a large number of timeouts or slow responses have occurred on an 574 open connection 576 o an edns-tcp-keepalive EDNS0 option with a timeout of 0 has been 577 received from the server and the client is in the process of 578 closing the connection (see Section 6.3.4) 580 If no TCP connections are currently open, XFR clients MAY send SOA 581 queries over UDP or a new TCP connection. 583 6.3.2. AXFRs and IXFRs on the same connection 585 Neither [RFC1995] nor [RFC5936] explicitly discuss the use of a 586 single TCP connection for both IXFR and AXFR requests. [RFC5936] 587 does make the general state: 589 "Non-AXFR session traffic can also use an open TCP connection." 591 We clarify here that implementations capable of both AXFR and IXFR 592 and compliant with this specification SHOULD 594 o use the same TCP connection for both AXFR and IXFR requests to the 595 same primary 597 o pipeline such request and MAY intermingle them 599 o send the response(s) for each request as soon as they are 600 available i.e. responses MAY be sent intermingled 602 6.3.3. XFR limits 604 The server MAY limit the number of concurrent IXFRs, AXFRs or total 605 XFR transfers in progress, or from a given secondary, to protect 606 server resources. Servers SHOULD return SERVFAIL if this limit is 607 hit, since it is a transient error and a retry at a later time might 608 succeed. 610 6.3.4. The edns-tcp-keepalive EDNS0 Option 612 XFR clients that send the edns-tcp-keepalive EDNS0 option on every 613 XFR request provide the server with maximum opportunity to update the 614 edns-tcp-keepalive timeout. The XFR server may use the frequency of 615 recent XFRs to calculate an average update rate as input to the 616 decision of what edns-tcp-keepalive timeout to use. If the server 617 does not support edns-tcp-keepalive the client MAY keep the 618 connection open for a few seconds ([RFC7766] recommends that servers 619 use timeouts of at least a few seconds). 621 Whilst the specification for EDNS0 [RFC6891] does not specifically 622 mention AXFRs, it does say 624 "If an OPT record is present in a received request, compliant 625 responders MUST include an OPT record in their respective 626 responses." 628 We clarify here that if an OPT record is present in a received AXFR 629 request, compliant responders MUST include an OPT record in each of 630 the subsequent AXFR responses. Note that this requirement, combined 631 with the use of edns-tcp-keepalive, enables AXFR servers to signal 632 the desire to close a connection (when existing transactions have 633 competed) due to low resources by sending an edns-tcp-keepalive EDNS0 634 option with a timeout of 0 on any AXFR response. This does not 635 signal that the AXFR is aborted, just that the server wishes to close 636 the connection as soon as possible. 638 6.3.5. Backwards compatibility 640 Certain legacy behaviors were noted in [RFC5936], with provisions 641 that implementations may want to offer options to fallback to legacy 642 behavior when interoperating with servers known not to support 643 [RFC5936]. For purposes of interoperability, IXFR and AXFR 644 implementations may want to continue offering such configuration 645 options, as well as supporting some behaviors that were 646 underspecified prior to this work (e.g. performing IXFR and AXFRs on 647 separate connections). However, XoT implementations should have no 648 need to do so. 650 6.4. Update to RFC7766 652 [RFC7766] made general implementation recommendations with regard to 653 TCP/TLS connection handling: 655 "To mitigate the risk of unintentional server overload, DNS 656 clients MUST take care to minimize the number of concurrent TCP 657 connections made to any individual server. It is RECOMMENDED 658 that for any given client/server interaction there SHOULD be no 659 more than one connection for regular queries, one for zone 660 transfers, and one for each protocol that is being used on top 661 of TCP (for example, if the resolver was using TLS). However, 662 it is noted that certain primary/ secondary configurations with 663 many busy zones might need to use more than one TCP connection 664 for zone transfers for operational reasons (for example, to 665 support concurrent transfers of multiple zones)." 667 Whilst this recommends a particular behavior for the clients using 668 TCP, it does not relax the requirement for servers to handle 'mixed' 669 traffic (regular queries and zone transfers) on any open TCP/TLS 670 connection. It also overlooks the potential that other transports 671 might want to take the same approach with regard to using separate 672 connections for different purposes. 674 This specification for XoT updates the guidance in [RFC7766] to 675 provide the same separation of connection purpose (regular queries 676 and zone transfers) for all transports being used on top of TCP. 678 Therefore, it is RECOMMENDED that for each protocol used on top of 679 TCP in any given client/server interaction there SHOULD be no more 680 than one connection for regular queries and one for zone transfers. 682 As an illustration, it could be imagined that in future such an 683 interaction could hypothetically include one or all of the following: 685 o one TCP connection for regular queries 686 o one TCP connection for zone transfers 688 o one TLS connection for regular queries 690 o one TLS connection for zone transfers 692 o one DoH connection for regular queries 694 o one DoH connection for zone transfers 696 We provide specific details in the later sections of reasons where 697 more than one connection for a given transport might be required for 698 zone transfers from a particular client. 700 7. XoT specification 702 7.1. TLS versions 704 For improved security all implementations of this specification MUST 705 use only TLS 1.3 [RFC8446] or later. 707 7.2. Port selection 709 The connection for XoT SHOULD be established using port 853, as 710 specified in [RFC7858], unless there is mutual agreement between the 711 secondary and primary to use a port other than port 853 for XoT. 712 There MAY be agreement to use different ports for AXoT and IXoT, or 713 for different zones. 715 7.3. High level XoT descriptions 717 It is useful to note that in XoT it is the secondary that initiates 718 the TLS connection to the primary for a XFR request, so that in terms 719 of connectivity the secondary is the TLS client and the primary the 720 TLS server. 722 The figure below provides an outline of the AXoT mechanism including 723 NOTIFYs. 725 Secondary Primary 727 | NOTIFY | 728 | <-------------------------------- | UDP 729 | --------------------------------> | 730 | NOTIFY Response | 731 | | 732 | | 733 | SOA Request | 734 | --------------------------------> | UDP (or part of 735 | <-------------------------------- | a TCP/TLS session) 736 | SOA Response | 737 | | 738 | | 739 | | 740 | AXFR Request | --- 741 | --------------------------------> | | 742 | <-------------------------------- | | 743 | AXFR Response 1 | | 744 | (Zone data) | | 745 | | | 746 | <-------------------------------- | | TLS 747 | AXFR Response 2 | | Session 748 | (Zone data) | | 749 | | | 750 | <-------------------------------- | | 751 | AXFR Response 3 | | 752 | (Zone data) | --- 753 | | 755 Figure 3. AXoT Mechanism 757 The figure below provides an outline of the IXoT mechanism including 758 NOTIFYs. 760 Secondary Primary 762 | NOTIFY | 763 | <-------------------------------- | UDP 764 | --------------------------------> | 765 | NOTIFY Response | 766 | | 767 | | 768 | SOA Request | 769 | --------------------------------> | UDP (or part of 770 | <-------------------------------- | a TCP/TLS session) 771 | SOA Response | 772 | | 773 | | 774 | | 775 | IXFR Request | --- 776 | --------------------------------> | | 777 | <-------------------------------- | | 778 | IXFR Response | | 779 | (Zone data) | | 780 | | | TLS 781 | | | session 782 | IXFR Request | | 783 | --------------------------------> | | 784 | <-------------------------------- | | 785 | IXFR Response | | 786 | (Zone data) | --- 788 Figure 1. IXoT Mechanism 790 7.4. XoT transfers 792 For a zone transfer between two end points to be considered protected 793 with XoT all XFR requests and response for that zone MUST be sent 794 over TLS connections where at a minimum: 796 o the client MUST authenticate the server by use of an 797 authentication domain name using a Strict Privacy Profile as 798 described in [RFC8310] 800 o the server MUST validate the client is authorized to request or 801 proxy a zone transfer by using one or both of the following: 803 * an IP based ACL (which can be either per-message or per- 804 connection) 806 * Mutual TLS (mTLS) 808 The server MAY also require a valid TSIG/SIG(0) signature, but this 809 alone is not sufficient to authenticate the client or server. 811 Authentication mechanisms are discussed in full in Section 9 and the 812 rationale for the above requirement in Section 10. Transfer group 813 policies are discussed in Section 11. 815 7.5. XoT connections 817 The details in Section 6 about e.g., persistent connections and XFR 818 message handling are fully applicable to XoT connections as well. 819 However any behavior specified here takes precedence for XoT. 821 If no TLS connections are currently open, XoT clients MAY send SOA 822 queries over UDP or TCP, or TLS. 824 7.6. XoT vs ADoT 826 As noted earlier, there is currently no specification for encryption 827 of connections from recursive resolvers to authoritative servers. 828 Some authoritatives are experimenting with ADoT and opportunistic 829 encryption has also been raised as a possibility; it is therefore 830 highly likely that use of encryption by authoritative servers will 831 evolve in the coming years. 833 This raises questions in the short term,S.S. with regard to TLS 834 connection and message handling for authoritative servers. In 835 particular, there is likely to be a class of authoritatives that wish 836 to use XoT in the near future with a small number of configured 837 secondaries but that do wish to support DoT for regular queries from 838 recursive in that same time frame. These servers have to potentially 839 cope with probing and direct queries from recursives and from test 840 servers, and also potential attacks that might wish to make use of 841 TLS to overload the server. 843 [RFC5936] clearly states that non-AXFR session traffic can use an 844 open TCP connection, however, this requirement needs to be re- 845 evaluated when considering applying the same model to XoT. Proposing 846 that a server should also start responding to all queries received 847 over TLS just because it has enabled XoT would be equivalent to 848 defining a form of authoritative DoT. This specification does not 849 propose that, but it also does not prohibit servers from answering 850 queries unrelated to XFR exchanges over TLS. Rather, this 851 specification simply outlines in later sections: 853 o how XoT implementations should utilize EDE codes in response to 854 queries on TLS connections they are not willing to answer (see 855 Section 7.7) 857 o the operational and policy options that a XoT server operator has 858 with regard to managing TLS connections and messages (see 859 Appendix A) 861 7.7. Response RCODES 863 XoT clients and servers MUST implement EDE codes. If a XoT server 864 receives non-XoT traffic it is not willing to answer on a TLS 865 connection it SHOULD respond with the extended DNS error code 21 - 866 Not Supported [RFC8914]. XoT clients should not send any further 867 queries of this type to the server for a reasonable period of time 868 (for example, one hour) i.e., long enough that the server 869 configuration or policy might be updated. 871 Historically servers have used the REFUSED RCODE for many situations, 872 and so clients often had no detailed information on which to base an 873 error or fallback path when queries were refused. As a result the 874 client behavior could vary significantly. XoT servers that refuse 875 queries must cater for the fact that client behavior might vary from 876 continually retrying queries regardless of receiving REFUSED to every 877 query, or at the other extreme clients may decide to stop using the 878 server over any transport. This might be because those clients are 879 either non-XoT clients or do not implement EDE codes. 881 7.8. AXoT specifics 883 7.8.1. Padding AXoT responses 885 The goal of padding AXoT responses would be two fold: 887 o to obfuscate the actual size of the transferred zone to minimize 888 information leakage about the entire contents of the zone. 890 o to obfuscate the incremental changes to the zone between SOA 891 updates to minimize information leakage about zone update activity 892 and growth. 894 Note that the re-use of XoT connections for transfers of multiple 895 different zones complicates any attempt to analyze the traffic size 896 and timing to extract information. 898 It is noted here that, depending on the padding policies eventually 899 developed for XoT, the requirement to obfuscate the total zone size 900 might require a server to create 'empty' AXoT responses. That is, 901 AXoT responses that contain no RR's apart from an OPT RR containing 902 the EDNS(0) option for padding. For example, without this capability 903 the maximum size that a tiny zone could be padded to would 904 theoretically be limited if there had to be a minimum of 1 RR per 905 packet. 907 However, as with existing AXFR, the last AXoT response message sent 908 MUST contain the same SOA that was in the first message of the AXoT 909 response series in order to signal the conclusion of the zone 910 transfer. 912 [RFC5936] says: 914 "Each AXFR response message SHOULD contain a sufficient number 915 of RRs to reasonably amortize the per-message overhead, up to 916 the largest number that will fit within a DNS message (taking 917 the required content of the other sections into account, as 918 described below)." 920 'Empty' AXoT responses generated in order to meet a padding 921 requirement will be exceptions to the above statement. For 922 flexibility, future proofing and in order to guarantee support for 923 future padding policies, we state here that secondary implementations 924 MUST be resilient to receiving padded AXoT responses, including 925 'empty' AXoT responses that contain only an OPT RR containing the 926 EDNS(0) option for padding. 928 Recommendation of specific policies for padding AXoT responses are 929 out of scope for this specification. Detailed considerations of such 930 policies and the trade-offs involved are expected to be the subject 931 of future work. 933 7.9. IXoT specifics 935 7.9.1. Condensation of responses 937 [RFC1995] says condensation of responses is optional and MAY be done. 938 Whilst it does add complexity to generating responses it can 939 significantly reduce the size of responses. However any such 940 reduction might be offset by increased message size due to padding. 941 This specification does not update the optionality of condensation 942 for XoT responses. 944 7.9.2. Fallback to AXFR 946 Fallback to AXFR can happen, for example, if the server is not able 947 to provide an IXFR for the requested SOA. Implementations differ in 948 how long they store zone deltas and how many may be stored at any one 949 time. 951 Just as with IXFR-over-TCP, after a failed IXFR a IXoT client SHOULD 952 request the AXFR on the already open XoT connection. 954 7.9.3. Padding of IXoT responses 956 The goal of padding IXoT responses would be to obfuscate the 957 incremental changes to the zone between SOA updates to minimize 958 information leakage about zone update activity and growth. Both the 959 size and timing of the IXoT responses could reveal information. 961 IXFR responses can vary in size greatly from the order of 100 bytes 962 for one or two record updates, to tens of thousands of bytes for 963 large dynamic DNSSEC signed zones. The frequency of IXFR responses 964 can also depend greatly on if and how the zone is DNSSEC signed. 966 In order to guarantee support for future padding policies, we state 967 here that secondary implementations MUST be resilient to receiving 968 padded IXoT responses. 970 Recommendation of specific policies for padding IXoT responses are 971 out of scope for this specification. Detailed considerations of such 972 policies and the trade-offs involved are expected to be the subject 973 of future work. 975 7.10. Name compression and maximum payload sizes 977 It is noted here that name compression [RFC1035] can be used in XFR 978 responses to reduce the size of the payload, however the maximum 979 value of the offset that can be used in the name compression pointer 980 structure is 16384. For some DNS implementations this limits the 981 size of an individual XFR response used in practice to something 982 around the order of 16kB. In principle, larger payload sizes can be 983 supported for some responses with more sophisticated approaches (e.g. 984 by pre-calculating the maximum offset required). 986 Implementations may wish to offer options to disable name compression 987 for XoT responses to enable larger payloads. This might be 988 particularly helpful when padding is used since minimizing the 989 payload size is not necessarily a useful optimization in this case 990 and disabling name compression will reduce the resources required to 991 construct the payload. 993 8. Multi-primary Configurations 995 Also known as multi-master configurations this model can provide 996 flexibility and redundancy particularly for IXFR. A secondary will 997 receive one or more NOTIFY messages and can send an SOA to all of the 998 configured primaries. It can then choose to send an XFR request to 999 the primary with the highest SOA (or other criteria, e.g., RTT). 1001 When using persistent connections the secondary may have a XoT 1002 connection already open to one or more primaries. Should a secondary 1003 preferentially request an XFR from a primary to which it already has 1004 an open XoT connection or the one with the highest SOA (assuming it 1005 doesn't have a connection open to it already)? 1007 Two extremes can be envisaged here. The first one can be considered 1008 a 'preferred primary connection' model. In this case the secondary 1009 continues to use one persistent connection to a single primary until 1010 it has reason not to. Reasons not to might include the primary 1011 repeatedly closing the connection, long RTTs on transfers or the SOA 1012 of the primary being an unacceptable lag behind the SOA of an 1013 alternative primary. 1015 The other extreme can be considered a 'parallel primary connection' 1016 model. Here a secondary could keep multiple persistent connections 1017 open to all available primaries and only request XFRs from the 1018 primary with the highest serial number. Since normally the number of 1019 secondaries and primaries in direct contact in a transfer group is 1020 reasonably low this might be feasible if latency is the most 1021 significant concern. 1023 Recommendation of a particular scheme is out of scope of this 1024 document but implementations are encouraged to provide configuration 1025 options that allow operators to make choices about this behavior. 1027 9. Authentication mechanisms 1029 To provide context to the requirements in section Section 7.4, this 1030 section provides a brief summary of some of the existing 1031 authentication and validation mechanisms (both transport independent 1032 and TLS specific) that are available when performing zone transfers. 1033 Section 10 then discusses in more details specifically how a 1034 combination of TLS authentication, TSIG and IP based ACLs interact 1035 for XoT. 1037 We classify the mechanisms based on the following properties: 1039 o 'Data Origin Authentication' (DO): Authentication that the DNS 1040 message originated from the party with whom credentials were 1041 shared, and of the data integrity of the message contents (the 1042 originating party may or may not be party operating the far end of 1043 a TCP/TLS connection in a 'proxy' scenario). 1045 o 'Channel Confidentiality' (CC): Confidentiality of the 1046 communication channel between the client and server (i.e. the two 1047 end points of a TCP/TLS connection) from passive surveillance. 1049 o 'Channel Authentication' (CA): Authentication of the identity of 1050 party to whom a TCP/TLS connection is made (this might not be a 1051 direct connection between the primary and secondary in a proxy 1052 scenario). 1054 9.1. TSIG 1056 TSIG [RFC2845] provides a mechanism for two or more parties to use 1057 shared secret keys which can then be used to create a message digest 1058 to protect individual DNS messages. This allows each party to 1059 authenticate that a request or response (and the data in it) came 1060 from the other party, even if it was transmitted over an unsecured 1061 channel or via a proxy. 1063 Properties: Data origin authentication 1065 9.2. SIG(0) 1067 SIG(0) [RFC2931] similarly also provides a mechanism to digitally 1068 sign a DNS message but uses public key authentication, where the 1069 public keys are stored in DNS as KEY RRs and a private key is stored 1070 at the signer. 1072 Properties: Data origin authentication 1074 9.3. TLS 1076 9.3.1. Opportunistic TLS 1078 Opportunistic TLS for DoT is defined in [RFC8310] and can provide a 1079 defense against passive surveillance, providing on-the-wire 1080 confidentiality. Essentially 1082 o clients that know authentication information for a server SHOULD 1083 try to authenticate the server 1085 o however they MAY fallback to using TLS without authentication and 1087 o they MAY fallback to using cleartext if TLS is not available. 1089 As such it does not offer a defense against active attacks (e.g. a 1090 MitM attack on the connection from client to server), and is not 1091 considered as useful for XoT. 1093 Properties: None guaranteed. 1095 9.3.2. Strict TLS 1097 Strict TLS for DoT [RFC8310] requires that a client is configured 1098 with an authentication domain name (and/or SPKI pinset) that MUST be 1099 used to authenticate the TLS handshake with the server. If 1100 authentication of the server fails, the client will not proceed with 1101 the connection. This provides a defense for the client against 1102 active surveillance, providing client-to-server authentication and 1103 end-to-end channel confidentiality. 1105 Properties: Channel confidentiality and authentication (of the 1106 server). 1108 9.3.3. Mutual TLS 1110 This is an extension to Strict TLS [RFC8310] which requires that a 1111 client is configured with an authentication domain name (and/or SPKI 1112 pinset) and a client certificate. The client offers the certificate 1113 for authentication by the server and the client can authentic the 1114 server the same way as in Strict TLS. This provides a defense for 1115 both parties against active surveillance, providing bi-directional 1116 authentication and end-to-end channel confidentiality. 1118 Properties: Channel confidentiality and mutual authentication. 1120 9.4. IP Based ACL on the Primary 1122 Most DNS server implementations offer an option to configure an IP 1123 based Access Control List (ACL), which is often used in combination 1124 with TSIG based ACLs to restrict access to zone transfers on primary 1125 servers on a per query basis. 1127 This is also possible with XoT but it must be noted that, as with 1128 TCP, the implementation of such an ACL cannot be enforced on the 1129 primary until an XFR request is received on an established 1130 connection. 1132 As discussed in Appendix A an IP based per connection ACL could also 1133 be implemented where only TLS connections from recognized secondaries 1134 are accepted. 1136 Properties: Channel authentication of the client. 1138 9.5. ZONEMD 1140 For completeness, we also describe Message Digest for DNS Zones 1141 (ZONEMD) [I-D.ietf-dnsop-dns-zone-digest] here. The message digest 1142 is a mechanism that can be used to verify the content of a standalone 1143 zone. It is designed to be independent of the transmission channel 1144 or mechanism, allowing a general consumer of a zone to do origin 1145 authentication of the entire zone contents. Note that the current 1146 version of [I-D.ietf-dnsop-dns-zone-digest] states: 1148 "As specified herein, ZONEMD is impractical for large, dynamic zones 1149 due to the time and resources required for digest calculation. 1150 However, The ZONEMD record is extensible so that new digest schemes 1151 may be added in the future to support large, dynamic zones." 1153 It is complementary but orthogonal the above mechanisms; and can be 1154 used in conjunction with XoT but is not considered further here. 1156 10. XoT authentication 1158 It is noted that zone transfer scenarios can vary from a simple 1159 single primary/secondary relationship where both servers are under 1160 the control of a single operator to a complex hierarchical structure 1161 which includes proxies and multiple operators. Each deployment 1162 scenario will require specific analysis to determine which 1163 combination of authentication methods are best suited to the 1164 deployment model in question. 1166 The XoT authentication requirement specified in Section 7.4 addresses 1167 the issue of ensuring that the transfers is encrypted between the two 1168 endpoints directly involved in the current transfers. The following 1169 table summarized the properties of a selection of the mechanisms 1170 discussed in Section 9. The two letter acronyms for the properties 1171 are used below and (S) indicates the secondary and (P) indicates the 1172 primary. 1174 +----------------+-------+-------+-------+-------+-------+-------+ 1175 | Method | DO(S) | CC(S) | CA(S) | DO(P) | CC(P) | CA(P) | 1176 +----------------+-------+-------+-------+-------+-------+-------+ 1177 | Strict TLS | | Y | Y | | Y | | 1178 | Mutual TLS | | Y | Y | | Y | Y | 1179 | ACL on primary | | | | | | Y | 1180 | TSIG | Y | | | Y | | | 1181 +----------------+-------+-------+-------+-------+-------+-------+ 1183 Table 1: Properties of Authentication methods for XoT 1185 Based on this analysis it can be seen that: 1187 o Using just mutual TLS can be considered a standalone solution 1188 since both end points are authenticated 1190 o Using Strict TLS and an IP based ACL on the primary also provides 1191 authentication of both end points 1193 o Additional use of TSIG (or equally SIG(0)) can also provide data 1194 origin authentication which might be desirable for deployments 1195 that include a proxy between the secondary and primary, but is not 1196 part of the XoT requirement because it does nothing to guarantee 1197 channel confidentiality or authentication. 1199 11. Policies for Both AXoT and IXoT 1201 Whilst the protection of the zone contents in a transfer between two 1202 end points can be provided by the XoT protocol, the protection of all 1203 the transfers of a given zone requires operational administration and 1204 policy management. 1206 We call the entire group of servers involved in XFR for a particular 1207 set of zones (all the primaries and all the secondaries) the 1208 'transfer group'. 1210 Within any transfer group both AXFRs and IXFRs for a zone MUST all 1211 use the same policy, e.g., if AXFRs use AXoT all IXFRs MUST use IXoT. 1213 In order to assure the confidentiality of the zone information, the 1214 entire transfer group MUST have a consistent policy of requiring 1215 confidentiality. If any do not, this is a weak link for attackers to 1216 exploit. 1218 An individual zone transfer is not considered protected by XoT unless 1219 both the client and server are configured to use only XoT and the 1220 overall zone transfer is not considered protected until all members 1221 of the transfer group are configured to use only XoT with all other 1222 transfers servers (see Section 12). 1224 A XoT policy should specify 1226 o What kind of TLS is required (Strict or Mutual TLS) 1228 o or if an IP based ACL is required. 1230 o (optionally) if TSIG/SIG(0) is required 1232 Since this may require configuration of a number of servers who may 1233 be under the control of different operators the desired consistency 1234 could be hard to enforce and audit in practice. 1236 Certain aspects of the Policies can be relatively easily tested 1237 independently, e.g., by requesting zone transfers without TSIG, from 1238 unauthorized IP addresses or over cleartext DNS. Other aspects such 1239 as if a secondary will accept data without a TSIG digest or if 1240 secondaries are using Strict as opposed to Opportunistic TLS are more 1241 challenging. 1243 The mechanics of co-ordinating or enforcing such policies are out of 1244 the scope of this document but may be the subject of future 1245 operational guidance. 1247 12. Implementation Considerations 1249 Server implementations may want to also offer options that allow ACLs 1250 on a zone to specify that a specific client can use either XoT or 1251 TCP. This would allow for flexibility while clients are migrating to 1252 XoT. 1254 Client implementations may similarly want to offer options to cater 1255 for the multi-primary case where the primaries are migrating to XoT. 1257 Such configuration options MUST only be used in a 'migration mode' 1258 though, and therefore should be used with care. 1260 13. Implementation Status 1262 1. The 1.9.2 version of Unbound [3] includes an option to perform 1263 AXoT (instead of AXFR-over-TCP). 1265 2. There are currently open pull requests against NSD to implement 1267 1. Connection re-use by default during XFR-over-TCP [4] 1269 2. Client side XFR-over-TLS [5] 1271 3. Version 9.17.7 of BIND contained an initial implementation of 1272 DoT, implementation of XoT is planned for early 2021 [6] 1274 Both items 1. and 2.2. listed above require the client (secondary) to 1275 authenticate the server (primary) using a configured authentication 1276 domain name if XoT is used. 1278 It is noted that use of a TLS proxy in front of the primary server is 1279 a simple deployment solution that can enable server side XoT. 1281 14. IANA Considerations 1283 None. 1285 15. Security Considerations 1287 This document specifies a security measure against a DNS risk: the 1288 risk that an attacker collects entire DNS zones through eavesdropping 1289 on clear text DNS zone transfers. 1291 This does not mitigate: 1293 o the risk that some level of zone activity might be inferred by 1294 observing zone transfer sizes and timing on encrypted connections 1295 (even with padding applied), in combination with obtaining SOA 1296 records by directly querying authoritative servers. 1298 o the risk that hidden primaries might be inferred or identified via 1299 observation of encrypted connections. 1301 o the risk of zone contents being obtained via zone enumeration 1302 techniques. 1304 Security concerns of DoT are outlined in [RFC7858] and [RFC8310]. 1306 16. Acknowledgements 1308 The authors thank Tony Finch, Peter van Dijk, Benno Overeinder, 1309 Shumon Huque and Tim Wicinski for review and discussions. 1311 17. Contributors 1313 Significant contributions to the document were made by: 1315 Han Zhang 1316 Salesforce 1317 San Francisco, CA 1318 United States 1320 Email: hzhang@salesforce.com 1322 18. Changelog 1324 draft-ietf-dprive-xfr-over-tls-05 1326 o Remove the open questions that received no comments. 1328 o Add more detail to the implementation section 1329 o Add Github repository 1331 o Fix typos and references and improve layout. 1333 draft-ietf-dprive-xfr-over-tls-03 1335 o Remove propose to use ALPN 1337 o Clarify updates to both RFC1995 and RFC5936 by adding specific 1338 sections on this 1340 o Add a section on the threat model 1342 o Convert all SVG diagrams to ASCII art 1344 o Add discussions on concurrency limits 1346 o Add discussions on Extended DNS error codes 1348 o Re-work authentication requirements and discussion 1350 o Add appendix discussion TLS connection management 1352 draft-ietf-dprive-xfr-over-tls-02 1354 o Significantly update descriptions for both AXoT and IXoT for 1355 message and connection handling taking into account previous 1356 specifications in more detail 1358 o Add use of APLN and limitations on traffic on XoT connections. 1360 o Add new discussions of padding for both AXoT and IXoT 1362 o Add text on SIG(0) 1364 o Update security considerations 1366 o Move multi-primary considerations to earlier as they are related 1367 to connection handling 1369 draft-ietf-dprive-xfr-over-tls-01 1371 o Minor editorial updates 1373 o Add requirement for TLS 1.3. or later 1374 o Rename after adoption and reference update. 1376 o Add placeholder for SIG(0) discussion 1378 o Update section on ZONEMD 1380 draft-hzpa-dprive-xfr-over-tls-02 1382 o Substantial re-work of the document. 1384 draft-hzpa-dprive-xfr-over-tls-01 1386 o Editorial changes, updates to references. 1388 draft-hzpa-dprive-xfr-over-tls-00 1390 o Initial commit 1392 19. References 1394 19.1. Normative References 1396 [I-D.vcelak-nsec5] 1397 Vcelak, J., Goldberg, S., Papadopoulos, D., Huque, S., and 1398 D. Lawrence, "NSEC5, DNSSEC Authenticated Denial of 1399 Existence", draft-vcelak-nsec5-08 (work in progress), 1400 December 2018. 1402 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1403 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1404 . 1406 [RFC1035] Mockapetris, P., "Domain names - implementation and 1407 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1408 November 1987, . 1410 [RFC1995] Ohta, M., "Incremental Zone Transfer in DNS", RFC 1995, 1411 DOI 10.17487/RFC1995, August 1996, . 1414 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 1415 Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996, 1416 August 1996, . 1418 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1419 Requirement Levels", BCP 14, RFC 2119, 1420 DOI 10.17487/RFC2119, March 1997, . 1423 [RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. 1424 Wellington, "Secret Key Transaction Authentication for DNS 1425 (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000, 1426 . 1428 [RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol 1429 (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010, 1430 . 1432 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1433 Morris, J., Hansen, M., and R. Smith, "Privacy 1434 Considerations for Internet Protocols", RFC 6973, 1435 DOI 10.17487/RFC6973, July 2013, . 1438 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 1439 DOI 10.17487/RFC7626, August 2015, . 1442 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 1443 D. Wessels, "DNS Transport over TCP - Implementation 1444 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 1445 . 1447 [RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 1448 edns-tcp-keepalive EDNS0 Option", RFC 7828, 1449 DOI 10.17487/RFC7828, April 2016, . 1452 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1453 and P. Hoffman, "Specification for DNS over Transport 1454 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1455 2016, . 1457 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1458 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1459 May 2017, . 1461 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 1462 for DNS over TLS and DNS over DTLS", RFC 8310, 1463 DOI 10.17487/RFC8310, March 2018, . 1466 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1467 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1468 . 1470 [RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1471 Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, 1472 January 2019, . 1474 [RFC8914] Kumari, W., Hunt, E., Arends, R., Hardaker, W., and D. 1475 Lawrence, "Extended DNS Errors", RFC 8914, 1476 DOI 10.17487/RFC8914, October 2020, . 1479 19.2. Informative References 1481 [I-D.ietf-dnsop-dns-zone-digest] 1482 Wessels, D., Barber, P., Weinberg, M., Kumari, W., and W. 1483 Hardaker, "Message Digest for DNS Zones", draft-ietf- 1484 dnsop-dns-zone-digest-14 (work in progress), October 2020. 1486 [I-D.ietf-dprive-dnsoquic] 1487 Huitema, C., Mankin, A., and S. Dickinson, "Specification 1488 of DNS over Dedicated QUIC Connections", draft-ietf- 1489 dprive-dnsoquic-01 (work in progress), October 2020. 1491 [I-D.ietf-dprive-phase2-requirements] 1492 Livingood, J., Mayrhofer, A., and B. Overeinder, "DNS 1493 Privacy Requirements for Exchanges between Recursive 1494 Resolvers and Authoritative Servers", draft-ietf-dprive- 1495 phase2-requirements-02 (work in progress), November 2020. 1497 [I-D.ietf-tls-esni] 1498 Rescorla, E., Oku, K., Sullivan, N., and C. Wood, "TLS 1499 Encrypted Client Hello", draft-ietf-tls-esni-09 (work in 1500 progress), December 2020. 1502 [I-D.vandijk-dprive-ds-dot-signal-and-pin] 1503 Dijk, P., Geuze, R., and E. Bretelle, "Signalling 1504 Authoritative DoT support in DS records, with key 1505 pinning", draft-vandijk-dprive-ds-dot-signal-and-pin-01 1506 (work in progress), July 2020. 1508 [nist-guide] 1509 Chandramouli, R. and S. Rose, "Secure Domain Name System 1510 (DNS) Deployment Guide", 2013, 1511 . 1514 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 1515 DOI 10.17487/RFC1982, August 1996, . 1518 [RFC2931] Eastlake 3rd, D., "DNS Request and Transaction Signatures 1519 ( SIG(0)s )", RFC 2931, DOI 10.17487/RFC2931, September 1520 2000, . 1522 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS 1523 Security (DNSSEC) Hashed Authenticated Denial of 1524 Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008, 1525 . 1527 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 1528 for DNS (EDNS(0))", STD 75, RFC 6891, 1529 DOI 10.17487/RFC6891, April 2013, . 1532 [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 1533 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 1534 . 1536 19.3. URIs 1538 [1] https://www.isc.org/bind/ 1540 [2] https://www.nlnetlabs.nl/projects/nsd/about/ 1542 [3] https://github.com/NLnetLabs/unbound/blob/release-1.9.2/doc/ 1543 Changelog 1545 [4] https://github.com/NLnetLabs/nsd/pull/145 1547 [5] https://github.com/NLnetLabs/nsd/pull/149 1549 [6] https://gitlab.isc.org/isc-projects/bind9/-/issues/1784 1551 Appendix A. XoT server connection handling 1553 For completeness, it is noted that an earlier version of the 1554 specification suggested using a XoT specific ALPN to negotiate TLS 1555 connections that supported only a limited set of queries (SOA, XRFs) 1556 however this did not gain support. Reasons given included additional 1557 code complexity and proxies having no natural way to forward the ALPN 1558 signal to DNS nameservers over TCP connections. 1560 A.1. Only listen on TLS on a specific IP address 1562 Obviously a nameserver which hosts a zone and services queries for 1563 the zone on an IP address published in an NS record may wish to use a 1564 separate IP address for listening on TLS for XoT, only publishing 1565 that address to its secondaries. 1567 Pros: Probing of the public IP address will show no support for TLS. 1568 ACLs will prevent zone transfer on all transports on a per query 1569 basis. 1571 Cons: Attackers passively observing traffic will still be able to 1572 observe TLS connections to the separate address. 1574 A.2. Client specific TLS acceptance 1576 Primaries that include IP based ACLs and/or mutual TLS in their 1577 authentication models have the option of only accepting TLS 1578 connections from authorized clients. This could be implemented using 1579 a proxy or directly in DNS implementation. 1581 Pros: Connection management happens at setup time. The maximum 1582 number of TLS connections a server will have to support can be easily 1583 assessed. Once the connection is accepted the server might well be 1584 willing to answer any query on that connection since it is coming 1585 from a configured secondary and a specific response policy on the 1586 connection may not be needed (see below). 1588 Cons: Currently, none of the major open source DNS authoritative 1589 implementations support such an option. 1591 A.3. SNI based TLS acceptance 1593 Primaries could also choose to only accept TLS connections based on 1594 an SNI that was published only to their secondaries. 1596 Pros: Reduces the number of accepted connections. 1598 Cons: As above. For SNIs sent in the clear, this would still allow 1599 attackers passively observing traffic to potentially abuse this 1600 mechanism. The use of Encrypted Client Hello [I-D.ietf-tls-esni] may 1601 be of use here. 1603 A.4. TLS specific response policies 1605 Some primaries might rely on TSIG/SIG(0) combined with per-query IP 1606 based ACLs to authenticate secondaries. In this case the primary 1607 must accept all incoming TLS connections and then apply a TLS 1608 specific response policy on a per query basis. 1610 As an aside, whilst [RFC7766] makes a general purpose distinction to 1611 clients in the usage of connections (between regular queries and zone 1612 transfers) this is not strict and nothing in the DNS protocol 1613 prevents using the same connection for both types of traffic. Hence 1614 a server cannot know the intention of any client that connects to it, 1615 it can only inspect the messages it receives on such a connection and 1616 make per query decisions about whether or not to answer those 1617 queries. 1619 Example policies a XoT server might implement are: 1621 o strict: REFUSE all queries on TLS connections except SOA and 1622 authorized XFR requests 1624 o moderate: REFUSE all queries on TLS connections until one is 1625 received that is signed by a recognized TSIG/SIG(0) key, then 1626 answer all queries on the connection after that 1628 o complex: apply a heuristic to determine which queries on a TLS 1629 connections to REFUSE 1631 o relaxed: answer all non-XoT queries on all TLS connections with 1632 the same policy applied to TCP queries 1634 Pros: Allows for flexible behavior by the server that could be 1635 changed over time. 1637 Cons: The server must handle the burden of accepting all TLS 1638 connections just to perform XFRs with a small number of secondaries. 1639 Client behavior to REFUSED response is not clearly defined (see 1640 below). Currently, none of the major open source DNS authoritative 1641 implementations offer an option for different response policies in 1642 different transports (but could potentially be implemented using a 1643 proxy). 1645 A.4.1. SNI based response policies 1647 In a similar fashion, XoT servers might use the presence of an SNI in 1648 the client hello to determine which response policy to initially 1649 apply to the TLS connections. 1651 Pros: This has to potential to allow a clean distinction between a 1652 XoT service and any future DoT based service for answering recursive 1653 queries. 1655 Cons: As above. 1657 Authors' Addresses 1659 Willem Toorop 1660 NLnet Labs 1661 Science Park 400 1662 Amsterdam 1098 XH 1663 The Netherlands 1665 Email: willem@nlnetlabs.nl 1667 Sara Dickinson 1668 Sinodun IT 1669 Magdalen Centre 1670 Oxford Science Park 1671 Oxford OX4 4GA 1672 United Kingdom 1674 Email: sara@sinodun.com 1676 Shivan Sahib 1677 Salesforce 1678 Vancouver, BC 1679 Canada 1681 Email: ssahib@salesforce.com 1683 Pallavi Aras 1684 Salesforce 1685 Herndon, VA 1686 United States 1688 Email: paras@salesforce.com 1690 Allison Mankin 1691 Salesforce 1692 Herndon, VA 1693 United States 1695 Email: allison.mankin@gmail.com