idnits 2.17.1 draft-ietf-dprive-xfr-over-tls-04.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 (November 23, 2020) is 1251 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 1540 -- Looks like a reference, but probably isn't: '2' on line 1542 == Missing Reference: 'OPEN QUESTION' is mentioned on line 884, but not defined -- Looks like a reference, but probably isn't: '3' on line 1544 ** 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-08 Summary: 4 errors (**), 0 flaws (~~), 5 warnings (==), 5 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: May 27, 2021 S. Sahib 7 P. Aras 8 A. Mankin 9 Salesforce 10 November 23, 2020 12 DNS Zone Transfer-over-TLS 13 draft-ietf-dprive-xfr-over-tls-04 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 May 27, 2021. 44 Copyright Notice 46 Copyright (c) 2020 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 . . . . . . . . . . . . . . . . . . . . . 28 113 15. Security Considerations . . . . . . . . . . . . . . . . . . . 28 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 . . . . . . . . . . . . . . . . . 32 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 . . . . . . . 34 123 A.2. Client specific TLS acceptance . . . . . . . . . . . . . 34 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 . . . . . . . . . . . . . . . . . . . . . . . 36 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 | <-------------------------------- | UPD 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 | <-------------------------------- | UPD 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. 608 [OPEN QUESTION] Testing has shown that BIND returns SERVFAIL if the 609 limit on concurrent transfers is reached since this is regarded as a 610 soft limit and a retry can/should succeed. Should there be a 611 specific recommendation here about what is returned re: SERVFAIL vs 612 REFUSED? 614 [OPEN QUESTION] Is there a desire to define an additional XFR 615 specific EDE code so that a client can determine why a specific XFR 616 request was declined in this case e.g., Max concurrent XFR: too may 617 concurrent transfers in progress. It could potentially contain a 618 retry delay, or at least clients can apply a reasonable back-off for 619 the retry. This could avoid retry storms which have been observed to 620 actually increase the load on primaries in certain scenarios. 622 6.3.4. The edns-tcp-keepalive EDNS0 Option 624 XFR clients that send the edns-tcp-keepalive EDNS0 option on every 625 XFR request provide the server with maximum opportunity to update the 626 edns-tcp-keepalive timeout. The XFR server may use the frequency of 627 recent XFRs to calculate an average update rate as input to the 628 decision of what edns-tcp-keepalive timeout to use. If the server 629 does not support edns-tcp-keepalive the client MAY keep the 630 connection open for a few seconds ([RFC7766] recommends that servers 631 use timeouts of at least a few seconds). 633 Whilst the specification for EDNS0 [RFC6891] does not specifically 634 mention AXFRs, it does say 636 "If an OPT record is present in a received request, compliant 637 responders MUST include an OPT record in their respective 638 responses." 640 We clarify here that if an OPT record is present in a received AXFR 641 request, compliant responders MUST include an OPT record in each of 642 the subsequent AXFR responses. Note that this requirement, combined 643 with the use of edns-tcp-keepalive, enables AXFR servers to signal 644 the desire to close a connection (when existing transactions have 645 competed) due to low resources by sending an edns-tcp-keepalive EDNS0 646 option with a timeout of 0 on any AXFR response. This does not 647 signal that the AXFR is aborted, just that the server wishes to close 648 the connection as soon as possible. 650 6.3.5. Backwards compatibility 652 Certain legacy behaviors were noted in [RFC5936], with provisos that 653 implementations may want to offer options to fallback to legacy 654 behavior when interoperating with servers known not to support 655 [RFC5936]. For purposes of interoperability, IXFR and AXFR 656 implementations may want to continue offering such configuration 657 options, as well as supporting some behaviors that were 658 underspecified prior to this work (e.g. performing IXFR and AXFRs on 659 separate connections). However, XoT implementations should have no 660 need to do so. 662 6.4. Update to RFC7766 664 [RFC7766] made general implementation recommendations with regard to 665 TCP/TLS connection handling: 667 "To mitigate the risk of unintentional server overload, DNS 668 clients MUST take care to minimize the number of concurrent TCP 669 connections made to any individual server. It is RECOMMENDED 670 that for any given client/server interaction there SHOULD be no 671 more than one connection for regular queries, one for zone 672 transfers, and one for each protocol that is being used on top 673 of TCP (for example, if the resolver was using TLS). However, 674 it is noted that certain primary/ secondary configurations with 675 many busy zones might need to use more than one TCP connection 676 for zone transfers for operational reasons (for example, to 677 support concurrent transfers of multiple zones)." 679 Whilst this recommends a particular behavior for the clients using 680 TCP, it does not relax the requirement for servers to handle 'mixed' 681 traffic (regular queries and zone transfers) on any open TCP/TLS 682 connection. It also overlooks the potential that other transports 683 might want to take the same approach with regard to using separate 684 connections for different purposes. 686 This specification for XoT updates the guidance in [RFC7766] to 687 provide the same separation of connection purpose (regular queries 688 and zone transfers) for all transports being used on top of TCP. 690 Therefore, it is RECOMMENDED that for each protocol used on top of 691 TCP in any given client/server interaction there SHOULD be no more 692 than one connection for regular queries and one for zone transfers. 694 As an illustration, it could be imagined that in future such an 695 interaction could hypothetically include one or all of the following: 697 o one TCP connection for regular queries 699 o one TCP connection for zone transfers 701 o one TLS connection for regular queries 703 o one TLS connection for zone transfers 705 o one DoH connection for regular queries 707 o one DoH connection for zone transfers 709 We provide specific details in the later sections of reasons where 710 more than one connection for a given transport might be required for 711 zone transfers from a particular client. 713 7. XoT specification 715 7.1. TLS versions 717 For improved security all implementations of this specification MUST 718 use only TLS 1.3 [RFC8446] or later. 720 7.2. Port selection 722 The connection for XoT SHOULD be established using port 853, as 723 specified in [RFC7858], unless there is mutual agreement between the 724 secondary and primary to use a port other than port 853 for XoT. 725 There MAY be agreement to use different ports for AXoT and IXoT, or 726 for different zones. 728 7.3. High level XoT descriptions 730 It is useful to note that in XoT it is the secondary that initiates 731 the TLS connection to the primary for a XFR request, so that in terms 732 of connectivity the secondary is the TLS client and the primary the 733 TLS server. 735 The figure below provides an outline of the AXoT mechanism including 736 NOTIFYs. 738 Secondary Primary 740 | NOTIFY | 741 | <-------------------------------- | UPD 742 | --------------------------------> | 743 | NOTIFY Response | 744 | | 745 | | 746 | SOA Request | 747 | --------------------------------> | UDP (or part of 748 | <-------------------------------- | a TCP/TLS session) 749 | SOA Response | 750 | | 751 | | 752 | | 753 | AXFR Request | --- 754 | --------------------------------> | | 755 | <-------------------------------- | | 756 | AXFR Response 1 | | 757 | (Zone data) | | 758 | | | 759 | <-------------------------------- | | TLS 760 | AXFR Response 2 | | Session 761 | (Zone data) | | 762 | | | 763 | <-------------------------------- | | 764 | AXFR Response 3 | | 765 | (Zone data) | --- 766 | | 768 Figure 3. AXoT Mechanism 770 The figure below provides an outline of the IXoT mechanism including 771 NOTIFYs. 773 Secondary Primary 775 | NOTIFY | 776 | <-------------------------------- | UPD 777 | --------------------------------> | 778 | NOTIFY Response | 779 | | 780 | | 781 | SOA Request | 782 | --------------------------------> | UDP (or part of 783 | <-------------------------------- | a TCP/TLS session) 784 | SOA Response | 785 | | 786 | | 787 | | 788 | IXFR Request | --- 789 | --------------------------------> | | 790 | <-------------------------------- | | 791 | IXFR Response | | 792 | (Zone data) | | 793 | | | TLS 794 | | | session 795 | IXFR Request | | 796 | --------------------------------> | | 797 | <-------------------------------- | | 798 | IXFR Response | | 799 | (Zone data) | --- 801 Figure 1. IXoT Mechanism 803 7.4. XoT transfers 805 For a zone transfer between two end points to be considered protected 806 with XoT all XFR requests and response for that zone MUST be sent 807 over TLS connections where at a minimum: 809 o the client MUST authenticate the server by use of an 810 authentication domain name using a Strict Privacy Profile as 811 described in [RFC8310] 813 o the server MUST validate the client is authorized to request or 814 proxy a zone transfer by using one or both of the following: 816 * an IP based ACL (which can be either per-message or per- 817 connection) 819 * Mutual TLS (mTLS) 821 The server MAY also require a valid TSIG/SIG(0) signature, but this 822 alone is not sufficient to authenticate the client or server. 824 Authentication mechanisms are discussed in full in Section 9 and the 825 rationale for the above requirement in Section 10. Transfer group 826 policies are discussed in Section 11. 828 7.5. XoT connections 830 The details in Section 6 about e.g., persistent connections and XFR 831 message handling are fully applicable to XoT connections as well. 832 However any behavior specified here takes precedence for XoT. 834 If no TLS connections are currently open, XoT clients MAY send SOA 835 queries over UDP or TCP, or TLS. 837 7.6. XoT vs ADoT 839 As noted earlier, there is currently no specification for encryption 840 of connections from recursive resolvers to authoritative servers. 841 Some authoritatives are experimenting with ADoT and opportunistic 842 encryption has also been raised as a possibility; it is therefore 843 highly likely that use of encryption by authoritative servers will 844 evolve in the coming years. 846 This raises questions in the short term,S.S. with regard to TLS 847 connection and message handling for authoritative servers. In 848 particular, there is likely to be a class of authoritatives that wish 849 to use XoT in the near future with a small number of configured 850 secondaries but that do wish to support DoT for regular queries from 851 recursive in that same time frame. These servers have to potentially 852 cope with probing and direct queries from recursives and from test 853 servers, and also potential attacks that might wish to make use of 854 TLS to overload the server. 856 [RFC5936] clearly states that non-AXFR session traffic can use an 857 open TCP connection, however, this requirement needs to be re- 858 evaluated when considering applying the same model to XoT. Proposing 859 that a server should also start responding to all queries received 860 over TLS just because it has enabled XoT would be equivalent to 861 defining a form of authoritative DoT. This specification does not 862 propose that, but it also does not prohibit servers from answering 863 queries unrelated to XFR exchanges over TLS. Rather, this 864 specification simply outlines in later sections: 866 o how XoT implementations should utilize EDE codes in response to 867 queries on TLS connections they are not willing to answer (see 868 Section 7.7) 870 o the operational and policy options that a XoT server operator has 871 with regard to managing TLS connections and messages (see 872 Appendix A) 874 7.7. Response RCODES 876 XoT clients and servers MUST implement EDE codes. If a XoT server 877 receives non-XoT traffic it is not willing to answer on a TLS 878 connection it SHOULD respond with the extended DNS error code 21 - 879 Not Supported [RFC8914]. XoT clients should not send any further 880 queries of this type to the server for a reasonable period of time 881 (for example, one hour) i.e., long enough that the server 882 configuration or policy might be updated. 884 [OPEN QUESTION] Should this instead be Prohibited (by policy), or 885 should a new EDE be created for this case? 887 Historically servers have used the REFUSED RCODE for many situations, 888 and so clients often had no detailed information on which to base an 889 error or fallback path when queries were refused. As a result the 890 client behavior could vary significantly. XoT servers that refuse 891 queries must cater for the fact that client behavior might vary from 892 continually retrying queries regardless of receiving REFUSED to every 893 query, or at the other extreme clients may decide to stop using the 894 server over any transport. This might be because those clients are 895 either non-XoT clients or do not implement EDE codes. 897 7.8. AXoT specifics 899 7.8.1. Padding AXoT responses 901 The goal of padding AXoT responses would be two fold: 903 o to obfuscate the actual size of the transferred zone to minimize 904 information leakage about the entire contents of the zone. 906 o to obfuscate the incremental changes to the zone between SOA 907 updates to minimize information leakage about zone update activity 908 and growth. 910 Note that the re-use of XoT connections for transfers of multiple 911 different zones complicates any attempt to analyze the traffic size 912 and timing to extract information. 914 It is noted here that, depending on the padding policies eventually 915 developed for XoT, the requirement to obfuscate the total zone size 916 might require a server to create 'empty' AXoT responses. That is, 917 AXoT responses that contain no RR's apart from an OPT RR containing 918 the EDNS(0) option for padding. For example, without this capability 919 the maximum size that a tiny zone could be padded to would 920 theoretically be limited if there had to be a minimum of 1 RR per 921 packet. 923 However, as with existing AXFR, the last AXoT response message sent 924 MUST contain the same SOA that was in the first message of the AXoT 925 response series in order to signal the conclusion of the zone 926 transfer. 928 [RFC5936] says: 930 "Each AXFR response message SHOULD contain a sufficient number 931 of RRs to reasonably amortize the per-message overhead, up to 932 the largest number that will fit within a DNS message (taking 933 the required content of the other sections into account, as 934 described below)." 936 'Empty' AXoT responses generated in order to meet a padding 937 requirement will be exceptions to the above statement. For 938 flexibility, future proofing and in order to guarantee support for 939 future padding policies, we state here that secondary implementations 940 MUST be resilient to receiving padded AXoT responses, including 941 'empty' AXoT responses that contain only an OPT RR containing the 942 EDNS(0) option for padding. 944 Recommendation of specific policies for padding AXoT responses are 945 out of scope for this specification. Detailed considerations of such 946 policies and the trade-offs involved are expected to be the subject 947 of future work. 949 7.9. IXoT specifics 951 7.9.1. Condensation of responses 953 [RFC1995] says condensation of responses is optional and MAY be done. 954 Whilst it does add complexity to generating responses it can 955 significantly reduce the size of responses. However any such 956 reduction might be offset by increased message size due to padding. 957 This specification does not update the optionality of condensation 958 for XoT responses. 960 7.9.2. Fallback to AXFR 962 Fallback to AXFR can happen, for example, if the server is not able 963 to provide an IXFR for the requested SOA. Implementations differ in 964 how long they store zone deltas and how many may be stored at any one 965 time. 967 Just as with IXFR-over-TCP, after a failed IXFR a IXoT client SHOULD 968 request the AXFR on the already open XoT connection. 970 7.9.3. Padding of IXoT responses 972 The goal of padding IXoT responses would be to obfuscate the 973 incremental changes to the zone between SOA updates to minimize 974 information leakage about zone update activity and growth. Both the 975 size and timing of the IXoT responses could reveal information. 977 IXFR responses can vary in size greatly from the order of 100 bytes 978 for one or two record updates, to tens of thousands of bytes for 979 large dynamic DNSSEC signed zones. The frequency of IXFR responses 980 can also depend greatly on if and how the zone is DNSSEC signed. 982 In order to guarantee support for future padding policies, we state 983 here that secondary implementations MUST be resilient to receiving 984 padded IXoT responses. 986 Recommendation of specific policies for padding IXoT responses are 987 out of scope for this specification. Detailed considerations of such 988 policies and the trade-offs involved are expected to be the subject 989 of future work. 991 7.10. Name compression and maximum payload sizes 993 It is noted here that name compression [RFC1035] can be used in XFR 994 responses to reduce the size of the payload, however the maximum 995 value of the offset that can be used in the name compression pointer 996 structure is 16384. For some DNS implementations this limits the 997 size of an individual XFR response used in practice to something 998 around the order of 16kB. In principle, larger payload sizes can be 999 supported for some responses with more sophisticated approaches (e.g. 1000 by pre-calculating the maximum offset required). 1002 Implementations may wish to offer options to disable name compression 1003 for XoT responses to enable larger payloads. This might be 1004 particularly helpful when padding is used since minimizing the 1005 payload size is not necessarily a useful optimization in this case 1006 and disabling name compression will reduce the resources required to 1007 construct the payload. 1009 8. Multi-primary Configurations 1011 Also known as multi-master configurations this model can provide 1012 flexibility and redundancy particularly for IXFR. A secondary will 1013 receive one or more NOTIFY messages and can send an SOA to all of the 1014 configured primaries. It can then choose to send an XFR request to 1015 the primary with the highest SOA (or other criteria, e.g., RTT). 1017 When using persistent connections the secondary may have a XoT 1018 connection already open to one or more primaries. Should a secondary 1019 preferentially request an XFR from a primary to which it already has 1020 an open XoT connection or the one with the highest SOA (assuming it 1021 doesn't have a connection open to it already)? 1023 Two extremes can be envisaged here. The first one can be considered 1024 a 'preferred primary connection' model. In this case the secondary 1025 continues to use one persistent connection to a single primary until 1026 it has reason not to. Reasons not to might include the primary 1027 repeatedly closing the connection, long RTTs on transfers or the SOA 1028 of the primary being an unacceptable lag behind the SOA of an 1029 alternative primary. 1031 The other extreme can be considered a 'parallel primary connection' 1032 model. Here a secondary could keep multiple persistent connections 1033 open to all available primaries and only request XFRs from the 1034 primary with the highest serial number. Since normally the number of 1035 secondaries and primaries in direct contact in a transfer group is 1036 reasonably low this might be feasible if latency is the most 1037 significant concern. 1039 Recommendation of a particular scheme is out of scope of this 1040 document but implementations are encouraged to provide configuration 1041 options that allow operators to make choices about this behavior. 1043 9. Authentication mechanisms 1045 To provide context to the requirements in section Section 7.4, this 1046 section provides a brief summary of some of the existing 1047 authentication and validation mechanisms (both transport independent 1048 and TLS specific) that are available when performing zone transfers. 1049 Section 10 then discusses in more details specifically how a 1050 combination of TLS authentication, TSIG and IP based ACLs interact 1051 for XoT. 1053 We classify the mechanisms based on the following properties: 1055 o 'Data Origin Authentication' (DO): Authentication that the DNS 1056 message originated from the party with whom credentials were 1057 shared, and of the data integrity of the message contents (the 1058 originating party may or may not be party operating the far end of 1059 a TCP/TLS connection in a 'proxy' scenario). 1061 o 'Channel Confidentiality' (CC): Confidentiality of the 1062 communication channel between the client and server (i.e. the two 1063 end points of a TCP/TLS connection) from passive surveillance. 1065 o 'Channel Authentication' (CA): Authentication of the identity of 1066 party to whom a TCP/TLS connection is made (this might not be a 1067 direct connection between the primary and secondary in a proxy 1068 scenario). 1070 9.1. TSIG 1072 TSIG [RFC2845] provides a mechanism for two or more parties to use 1073 shared secret keys which can then be used to create a message digest 1074 to protect individual DNS messages. This allows each party to 1075 authenticate that a request or response (and the data in it) came 1076 from the other party, even if it was transmitted over an unsecured 1077 channel or via a proxy. 1079 Properties: Data origin authentication 1081 9.2. SIG(0) 1083 SIG(0) [RFC2931] similarly also provides a mechanism to digitally 1084 sign a DNS message but uses public key authentication, where the 1085 public keys are stored in DNS as KEY RRs and a private key is stored 1086 at the signer. 1088 Properties: Data origin authentication 1090 9.3. TLS 1092 9.3.1. Opportunistic TLS 1094 Opportunistic TLS for DoT is defined in [RFC8310] and can provide a 1095 defense against passive surveillance, providing on-the-wire 1096 confidentiality. Essentially 1098 o clients that know authentication information for a server SHOULD 1099 try to authenticate the server 1101 o however they MAY fallback to using TLS without authentication and 1103 o they MAY fallback to using cleartext if TLS is not available. 1105 As such it does not offer a defense against active attacks (e.g. a 1106 MitM attack on the connection from client to server), and is not 1107 considered as useful for XoT. 1109 Properties: None guaranteed. 1111 9.3.2. Strict TLS 1113 Strict TLS for DoT [RFC8310] requires that a client is configured 1114 with an authentication domain name (and/or SPKI pinset) that MUST be 1115 used to authenticate the TLS handshake with the server. If 1116 authentication of the server fails, the client will not proceed with 1117 the connection. This provides a defense for the client against 1118 active surveillance, providing client-to-server authentication and 1119 end-to-end channel confidentiality. 1121 Properties: Channel confidentiality and authentication (of the 1122 server). 1124 9.3.3. Mutual TLS 1126 This is an extension to Strict TLS [RFC8310] which requires that a 1127 client is configured with an authentication domain name (and/or SPKI 1128 pinset) and a client certificate. The client offers the certificate 1129 for authentication by the server and the client can authentic the 1130 server the same way as in Strict TLS. This provides a defense for 1131 both parties against active surveillance, providing bi-directional 1132 authentication and end-to-end channel confidentiality. 1134 Properties: Channel confidentiality and mutual authentication. 1136 9.4. IP Based ACL on the Primary 1138 Most DNS server implementations offer an option to configure an IP 1139 based Access Control List (ACL), which is often used in combination 1140 with TSIG based ACLs to restrict access to zone transfers on primary 1141 servers on a per query basis. 1143 This is also possible with XoT but it must be noted that, as with 1144 TCP, the implementation of such an ACL cannot be enforced on the 1145 primary until an XFR request is received on an established 1146 connection. 1148 As discussed in Appendix A an IP based per connection ACL could also 1149 be implemented where only TLS connections from recognized secondaries 1150 are accepted. 1152 Properties: Channel authentication of the client. 1154 9.5. ZONEMD 1156 For completeness, we also describe Message Digest for DNS Zones 1157 (ZONEMD) [I-D.ietf-dnsop-dns-zone-digest] here. The message digest 1158 is a mechanism that can be used to verify the content of a standalone 1159 zone. It is designed to be independent of the transmission channel 1160 or mechanism, allowing a general consumer of a zone to do origin 1161 authentication of the entire zone contents. Note that the current 1162 version of [I-D.ietf-dnsop-dns-zone-digest] states: 1164 "As specified herein, ZONEMD is impractical for large, dynamic zones 1165 due to the time and resources required for digest calculation. 1166 However, The ZONEMD record is extensible so that new digest schemes 1167 may be added in the future to support large, dynamic zones." 1169 It is complementary but orthogonal the above mechanisms; and can be 1170 used in conjunction with XoT but is not considered further here. 1172 10. XoT authentication 1174 It is noted that zone transfer scenarios can vary from a simple 1175 single primary/secondary relationship where both servers are under 1176 the control of a single operator to a complex hierarchical structure 1177 which includes proxies and multiple operators. Each deployment 1178 scenario will require specific analysis to determine which 1179 combination of authentication methods are best suited to the 1180 deployment model in question. 1182 The XoT authentication requirement specified in Section 7.4 addresses 1183 the issue of ensuring that the transfers is encrypted between the two 1184 endpoints directly involved in the current transfers. The following 1185 table summarized the properties of a selection of the mechanisms 1186 discussed in Section 9. The two letter acronyms for the properties 1187 are used below and (S) indicates the secondary and (P) indicates the 1188 primary. 1190 +----------------+-------+-------+-------+-------+-------+-------+ 1191 | Method | DO(S) | CC(S) | CA(S) | DO(P) | CC(P) | CA(P) | 1192 +----------------+-------+-------+-------+-------+-------+-------+ 1193 | Strict TLS | | Y | Y | | Y | | 1194 | Mutual TLS | | Y | Y | | Y | Y | 1195 | ACL on primary | | | | | | Y | 1196 | TSIG | Y | | | Y | | | 1197 +----------------+-------+-------+-------+-------+-------+-------+ 1199 Table 1: Properties of Authentication methods for XoT 1201 Based on this analysis it can be seen that: 1203 o Using just mutual TLS can be considered a standalone solution 1204 since both end points are authenticated 1206 o Using Strict TLS and an IP based ACL on the primary also provides 1207 authentication of both end points 1209 o Additional use of TSIG (or equally SIG(0)) can also provide data 1210 origin authentication which might be desirable for deployments 1211 that include a proxy between the secondary and primary, but is not 1212 part of the XoT requirement because it does nothing to guarantee 1213 channel confidentiality or authentication. 1215 11. Policies for Both AXoT and IXoT 1217 Whilst the protection of the zone contents in a transfer between two 1218 end points can be provided by the XoT protocol, the protection of all 1219 the transfers of a given zone requires operational administration and 1220 policy management. 1222 We call the entire group of servers involved in XFR for a particular 1223 set of zones (all the primaries and all the secondaries) the 1224 'transfer group'. 1226 Within any transfer group both AXFRs and IXFRs for a zone MUST all 1227 use the same policy, e.g., if AXFRs use AXoT all IXFRs MUST use IXoT. 1229 In order to assure the confidentiality of the zone information, the 1230 entire transfer group MUST have a consistent policy of requiring 1231 confidentiality. If any do not, this is a weak link for attackers to 1232 exploit. 1234 An individual zone transfer is not considered protected by XoT unless 1235 both the client and server are configured to use only XoT and the 1236 overall zone transfer is not considered protected until all members 1237 of the transfer group are configured to use only XoT with all other 1238 transfers servers (see Section 12). 1240 A XoT policy should specify 1242 o What kind of TLS is required (Strict or Mutual TLS) 1244 o or if an IP based ACL is required. 1246 o (optionally) if TSIG/SIG(0) is required 1248 Since this may require configuration of a number of servers who may 1249 be under the control of different operators the desired consistency 1250 could be hard to enforce and audit in practice. 1252 Certain aspects of the Policies can be relatively easily tested 1253 independently, e.g., by requesting zone transfers without TSIG, from 1254 unauthorized IP addresses or over cleartext DNS. Other aspects such 1255 as if a secondary will accept data without a TSIG digest or if 1256 secondaries are using Strict as opposed to Opportunistic TLS are more 1257 challenging. 1259 The mechanics of co-ordinating or enforcing such policies are out of 1260 the scope of this document but may be the subject of future 1261 operational guidance. 1263 12. Implementation Considerations 1265 Server implementations may want to also offer options that allow ACLs 1266 on a zone to specify that a specific client can use either XoT or 1267 TCP. This would allow for flexibility while clients are migrating to 1268 XoT. 1270 Client implementations may similarly want to offer options to cater 1271 for the multi-primary case where the primaries are migrating to XoT. 1273 Such configuration options MUST only be used in a 'migration mode' 1274 though and therefore should be used with care. 1276 13. Implementation Status 1278 The 1.9.2 version of Unbound [3] includes an option to perform AXoT 1279 (instead of AXFR-over-TCP). This requires the client (secondary) to 1280 authenticate the server (primary) using a configured authentication 1281 domain name. 1283 It is noted that use of a TLS proxy in front of the primary server is 1284 a simple deployment solution that can enable server side XoT. 1286 14. IANA Considerations 1288 15. Security Considerations 1290 This document specifies a security measure against a DNS risk: the 1291 risk that an attacker collects entire DNS zones through eavesdropping 1292 on clear text DNS zone transfers. 1294 This does not mitigate: 1296 o the risk that some level of zone activity might be inferred by 1297 observing zone transfer sizes and timing on encrypted connections 1298 (even with padding applied), in combination with obtaining SOA 1299 records by directly querying authoritative servers. 1301 o the risk that hidden primaries might be inferred or identified via 1302 observation of encrypted connections. 1304 o the risk of zone contents being obtained via zone enumeration 1305 techniques. 1307 Security concerns of DoT are outlined in [RFC7858] and [RFC8310]. 1309 16. Acknowledgements 1311 The authors thank Tony Finch, Peter van Dijk, Benno Overeinder, 1312 Shumon Huque and Tim Wicinski for review and discussions. 1314 17. Contributors 1316 Significant contributions to the document were made by: 1318 Han Zhang 1319 Salesforce 1320 San Francisco, CA 1321 United States 1323 Email: hzhang@salesforce.com 1325 18. Changelog 1327 draft-ietf-dprive-xfr-over-tls-04 1329 o Add Github repository 1331 o Fix typos 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 1349 o Add appendix discussion TLS connection management 1351 draft-ietf-dprive-xfr-over-tls-02 1353 o Significantly update descriptions for both AXoT and IXoT for 1354 message and connection handling taking into account previous 1355 specifications in more detail 1357 o Add use of APLN and limitations on traffic on XoT connections. 1359 o Add new discussions of padding for both AXoT and IXoT 1361 o Add text on SIG(0) 1363 o Update security considerations 1365 o Move multi-primary considerations to earlier as they are related 1366 to connection handling 1368 draft-ietf-dprive-xfr-over-tls-01 1370 o Minor editorial updates 1372 o Add requirement for TLS 1.3. or later 1374 draft-ietf-dprive-xfr-over-tls-00 1376 o Rename after adoption and reference update. 1378 o Add placeholder for SIG(0) discussion 1380 o Update section on ZONEMD 1382 draft-hzpa-dprive-xfr-over-tls-02 1384 o Substantial re-work of the document. 1386 draft-hzpa-dprive-xfr-over-tls-01 1388 o Editorial changes, updates to references. 1390 draft-hzpa-dprive-xfr-over-tls-00 1392 o Initial commit 1394 19. References 1396 19.1. Normative References 1398 [I-D.vcelak-nsec5] 1399 Vcelak, J., Goldberg, S., Papadopoulos, D., Huque, S., and 1400 D. Lawrence, "NSEC5, DNSSEC Authenticated Denial of 1401 Existence", draft-vcelak-nsec5-08 (work in progress), 1402 December 2018. 1404 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1405 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1406 . 1408 [RFC1035] Mockapetris, P., "Domain names - implementation and 1409 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1410 November 1987, . 1412 [RFC1995] Ohta, M., "Incremental Zone Transfer in DNS", RFC 1995, 1413 DOI 10.17487/RFC1995, August 1996, . 1416 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 1417 Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996, 1418 August 1996, . 1420 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1421 Requirement Levels", BCP 14, RFC 2119, 1422 DOI 10.17487/RFC2119, March 1997, . 1425 [RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. 1426 Wellington, "Secret Key Transaction Authentication for DNS 1427 (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000, 1428 . 1430 [RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol 1431 (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010, 1432 . 1434 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1435 Morris, J., Hansen, M., and R. Smith, "Privacy 1436 Considerations for Internet Protocols", RFC 6973, 1437 DOI 10.17487/RFC6973, July 2013, . 1440 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 1441 DOI 10.17487/RFC7626, August 2015, . 1444 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 1445 D. Wessels, "DNS Transport over TCP - Implementation 1446 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 1447 . 1449 [RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 1450 edns-tcp-keepalive EDNS0 Option", RFC 7828, 1451 DOI 10.17487/RFC7828, April 2016, . 1454 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1455 and P. Hoffman, "Specification for DNS over Transport 1456 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1457 2016, . 1459 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1460 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1461 May 2017, . 1463 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 1464 for DNS over TLS and DNS over DTLS", RFC 8310, 1465 DOI 10.17487/RFC8310, March 2018, . 1468 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1469 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1470 . 1472 [RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1473 Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, 1474 January 2019, . 1476 [RFC8914] Kumari, W., Hunt, E., Arends, R., Hardaker, W., and D. 1477 Lawrence, "Extended DNS Errors", RFC 8914, 1478 DOI 10.17487/RFC8914, October 2020, . 1481 19.2. Informative References 1483 [I-D.ietf-dnsop-dns-zone-digest] 1484 Wessels, D., Barber, P., Weinberg, M., Kumari, W., and W. 1485 Hardaker, "Message Digest for DNS Zones", draft-ietf- 1486 dnsop-dns-zone-digest-14 (work in progress), October 2020. 1488 [I-D.ietf-dprive-dnsoquic] 1489 Huitema, C., Mankin, A., and S. Dickinson, "Specification 1490 of DNS over Dedicated QUIC Connections", draft-ietf- 1491 dprive-dnsoquic-01 (work in progress), October 2020. 1493 [I-D.ietf-dprive-phase2-requirements] 1494 Livingood, J., Mayrhofer, A., and B. Overeinder, "DNS 1495 Privacy Requirements for Exchanges between Recursive 1496 Resolvers and Authoritative Servers", draft-ietf-dprive- 1497 phase2-requirements-02 (work in progress), November 2020. 1499 [I-D.ietf-tls-esni] 1500 Rescorla, E., Oku, K., Sullivan, N., and C. Wood, "TLS 1501 Encrypted Client Hello", draft-ietf-tls-esni-08 (work in 1502 progress), October 2020. 1504 [I-D.vandijk-dprive-ds-dot-signal-and-pin] 1505 Dijk, P., Geuze, R., and E. Bretelle, "Signalling 1506 Authoritative DoT support in DS records, with key 1507 pinning", draft-vandijk-dprive-ds-dot-signal-and-pin-01 1508 (work in progress), July 2020. 1510 [nist-guide] 1511 Chandramouli, R. and S. Rose, "Secure Domain Name System 1512 (DNS) Deployment Guide", 2013, 1513 . 1516 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 1517 DOI 10.17487/RFC1982, August 1996, . 1520 [RFC2931] Eastlake 3rd, D., "DNS Request and Transaction Signatures 1521 ( SIG(0)s )", RFC 2931, DOI 10.17487/RFC2931, September 1522 2000, . 1524 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS 1525 Security (DNSSEC) Hashed Authenticated Denial of 1526 Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008, 1527 . 1529 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 1530 for DNS (EDNS(0))", STD 75, RFC 6891, 1531 DOI 10.17487/RFC6891, April 2013, . 1534 [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 1535 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 1536 . 1538 19.3. URIs 1540 [1] https://www.isc.org/bind/ 1542 [2] https://www.nlnetlabs.nl/projects/nsd/about/ 1544 [3] https://github.com/NLnetLabs/unbound/blob/release-1.9.2/doc/ 1545 Changelog 1547 Appendix A. XoT server connection handling 1549 For completeness, it is noted that an earlier version of the 1550 specification suggested using a XoT specific ALPN to negotiate TLS 1551 connections that supported only a limited set of queries (SOA, XRFs) 1552 however this did not gain support. Reasons given included additional 1553 code complexity and proxies having no natural way to forward the ALPN 1554 signal to DNS nameservers over TCP connections. 1556 A.1. Only listen on TLS on a specific IP address 1558 Obviously a nameserver which hosts a zone and services queries for 1559 the zone on an IP address published in an NS record may wish to use a 1560 separate IP address for listening on TLS for XoT, only publishing 1561 that address to its secondaries. 1563 Pros: Probing of the public IP address will show no support for TLS. 1564 ACLs will prevent zone transfer on all transports on a per query 1565 basis. 1567 Cons: Attackers passively observing traffic will still be able to 1568 observe TLS connections to the separate address. 1570 A.2. Client specific TLS acceptance 1572 Primaries that include IP based ACLs and/or mutual TLS in their 1573 authentication models have the option of only accepting TLS 1574 connections from authorized clients. This could be implemented using 1575 a proxy or directly in DNS implementation. 1577 Pros: Connection management happens at setup time. The maximum 1578 number of TLS connections a server will have to support can be easily 1579 assessed. Once the connection is accepted the server might well be 1580 willing to answer any query on that connection since it is coming 1581 from a configured secondary and a specific response policy on the 1582 connection may not be needed (see below). 1584 Cons: Currently, none of the major open source DNS authoritative 1585 implementations support such an option. 1587 A.3. SNI based TLS acceptance 1589 Primaries could also choose to only accept TLS connections based on 1590 an SNI that was published only to their secondaries. 1592 Pros: Reduces the number of accepted connections. 1594 Cons: As above. For SNIs sent in the clear, this would still allow 1595 attackers passively observing traffic to potentially abuse this 1596 mechanism. The use of Encrypted Client Hello [I-D.ietf-tls-esni] may 1597 be of use here. 1599 A.4. TLS specific response policies 1601 Some primaries might rely on TSIG/SIG(0) combined with per-query IP 1602 based ACLs to authenticate secondaries. In this case the primary 1603 must accept all incoming TLS connections and then apply a TLS 1604 specific response policy on a per query basis. 1606 As an aside, whilst [RFC7766] makes a general purpose distinction to 1607 clients in the usage of connections (between regular queries and zone 1608 transfers) this is not strict and nothing in the DNS protocol 1609 prevents using the same connection for both types of traffic. Hence 1610 a server cannot know the intention of any client that connects to it, 1611 it can only inspect the messages it receives on such a connection and 1612 make per query decisions about whether or not to answer those 1613 queries. 1615 Example policies a XoT server might implement are: 1617 o strict: REFUSE all queries on TLS connections except SOA and 1618 authorized XFR requests 1620 o moderate: REFUSE all queries on TLS connections until one is 1621 received that is signed by a recognized TSIG/SIG(0) key, then 1622 answer all queries on the connection after that 1624 o complex: apply a heuristic to determine which queries on a TLS 1625 connections to REFUSE 1627 o relaxed: answer all non-XoT queries on all TLS connections with 1628 the same policy applied to TCP queries 1630 Pros: Allows for flexible behavior by the server that could be 1631 changed over time. 1633 Cons: The server must handle the burden of accepting all TLS 1634 connections just to perform XFRs with a small number of secondaries. 1635 Client behavior to REFUSED response is not clearly defined (see 1636 below). Currently, none of the major open source DNS authoritative 1637 implementations offer an option for different response policies in 1638 different transports (but could potentially be implemented using a 1639 proxy). 1641 A.4.1. SNI based response policies 1643 In a similar fashion, XoT servers might use the presence of an SNI in 1644 the client hello to determine which response policy to initially 1645 apply to the TLS connections. 1647 Pros: This has to potential to allow a clean distinction between a 1648 XoT service and any future DoT based service for answering recursive 1649 queries. 1651 Cons: As above. 1653 Authors' Addresses 1655 Willem Toorop 1656 NLnet Labs 1657 Science Park 400 1658 Amsterdam 1098 XH 1659 The Netherlands 1661 Email: willem@nlnetlabs.nl 1663 Sara Dickinson 1664 Sinodun IT 1665 Magdalen Centre 1666 Oxford Science Park 1667 Oxford OX4 4GA 1668 United Kingdom 1670 Email: sara@sinodun.com 1671 Shivan Sahib 1672 Salesforce 1673 Vancouver, BC 1674 Canada 1676 Email: ssahib@salesforce.com 1678 Pallavi Aras 1679 Salesforce 1680 Herndon, VA 1681 United States 1683 Email: paras@salesforce.com 1685 Allison Mankin 1686 Salesforce 1687 Herndon, VA 1688 United States 1690 Email: allison.mankin@gmail.com