idnits 2.17.1 draft-ietf-dprive-unauth-to-authoritative-03.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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([FULL-AUTH]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. 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). -- The document date (July 12, 2021) is 1009 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Outdated reference: A later version (-04) exists of draft-schwartz-svcb-dns-03 == Outdated reference: A later version (-10) exists of draft-ietf-dnsop-rfc8499bis-02 == Outdated reference: A later version (-12) exists of draft-ietf-dnsop-svcb-https-06 == Outdated reference: A later version (-12) exists of draft-ietf-dprive-dnsoquic-02 Summary: 1 error (**), 0 flaws (~~), 6 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Hoffman 3 Internet-Draft ICANN 4 Intended status: Experimental P. van Dijk 5 Expires: January 13, 2022 PowerDNS 6 July 12, 2021 8 Recursive to Authoritative DNS with Unauthenticated Encryption 9 draft-ietf-dprive-unauth-to-authoritative-03 11 Abstract 13 This document describes a use case and a method for a DNS recursive 14 resolver to use unauthenticated encryption when communicating with 15 authoritative servers. The motivating use case for this method is 16 that more encryption on the Internet is better, and some resolver 17 operators believe that unauthenticated encryption is better than no 18 encryption at all. The method described here is optional for both 19 the recursive resolver and the authoritative server. This method 20 supports unauthenticated encryption using the same mechanism for 21 discovery of encryption support for the server as [FULL-AUTH]. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at https://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on January 13, 2022. 40 Copyright Notice 42 Copyright (c) 2021 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (https://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 58 1.1. Use Case for Unauthenticated Encryption . . . . . . . . . 3 59 1.2. Summary of Protocol . . . . . . . . . . . . . . . . . . . 3 60 1.3. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4 61 2. Discovery of Authoritative Server Encryption . . . . . . . . 4 62 3. Processing Discovery Responses . . . . . . . . . . . . . . . 5 63 3.1. Resolver Process as Pseudocode . . . . . . . . . . . . . 6 64 3.2. Resolver Session Failures . . . . . . . . . . . . . . . . 7 65 4. Serving with Encryption . . . . . . . . . . . . . . . . . . . 7 66 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 67 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 68 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 69 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 70 8.1. Normative References . . . . . . . . . . . . . . . . . . 8 71 8.2. Informative References . . . . . . . . . . . . . . . . . 9 72 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 74 1. Introduction 76 A recursive resolver using traditional DNS over port 53 may wish 77 instead to use encrypted communication with authoritative servers in 78 order to limit snooping of its DNS traffic by passive or on-path 79 attackers. The recursive resolver can use unauthenticated encryption 80 (defined in [OPPORTUN]) to achieve this goal. 82 This document describes the use case for unauthenticated encryption 83 in recursive resolvers in Section 1.1. The encryption method with 84 authoritative servers can be DNS-over-TLS [DNSOTLS] (DoT), DNS-over- 85 HTTPS [DNSOHTTPS] (DoH), and/or DNS-over-QUIC [DNSOQUIC] (DoQ). 87 The document also describes a discovery method that shows if an 88 authoritative server supports encryption in Section 2. 90 See [FULL-AUTH] for a description of the use case and a proposed 91 mechanism for fully-authenticated encryption. 93 NOTE: The draft uses the SVCB record as a discovery mechanism for 94 encryption by a particular authoritative server. Any record type 95 that can show multiple types of encryption (currently DoT, DoH, and 96 DoQ) can be used for discovery. Thus, this record type might change 97 in the future, depending on the discussion in the DPRIVE WG. 99 1.1. Use Case for Unauthenticated Encryption 101 The use case in this document for unauthenticated encryption is 102 recursive resolver operators who are happy to use encryption with 103 authoritative servers if doing so doesn't significantly slow down 104 getting answers, and authoritative server operators that are happy to 105 use encryption with recursive resolvers if it doesn't cost much. In 106 this use case, resolvers do not want to return an error for requests 107 that were sent over an encrypted channel if they would have been able 108 to give a correct answer using unencrypted transport. 110 Resolvers and authoritative servers understand that using encryption 111 costs something, but are willing to absorb the costs for the benefit 112 of more Internet traffic being encrypted. The extra costs (compared 113 to using traditional DNS on port 53) include: 115 o Extra round trips to establish TCP for every session (but not 116 necessarily for every query) 118 o Extra round trips for TLS establishment 120 o Greater CPU use for TLS establishment 122 o Greater CPU use for encryption after TLS establishment 124 o Greater memory use for holding TLS state 126 This use case is not expected to apply to all resolvers or 127 authoritative servers. For example, according to [RSO_STATEMENT], 128 some root server operators do not want to be the early adopters for 129 DNS with encryption. The protocol in this document explicitly allows 130 authoritative servers to signal when they are ready to begin offering 131 DNS with encryption. 133 1.2. Summary of Protocol 135 This summary gives an overview of how the parts of the protocol work 136 together. 138 o The resolver discovers whether any authoritative server of 139 interest supports DNS with encryption by querying for the SVCB 140 records [SVCB]. As described in [DNS-SVCB], SVCB records can 141 indicate that a server supports encrypted transport of DNS 142 queries. 144 NOTE: In this document, the term "SVCB record" is used _only_ for 145 SVCB records that indicate encryption as described in [DNS-SVCB]. 146 SVCB records that do not have these indicators in the RDATA are 147 not included in the term "SVCB record" in this document. 149 o The resolver uses any authoritative server with a SVCB record that 150 indicates encryption to perform unauthenticated encryption. 152 o The resolver does not fail to set up encryption if the 153 authentication in the TLS session fails. 155 1.3. Definitions 157 The terms "recursive resolver", "authoritative server", and "classic 158 DNS" are defined in [DNS-TERM]. 160 "DNS with encryption" means transport of DNS over any of DoT, DoH, or 161 DoQ. A server that supports DNS with encryption supports transport 162 over one or more of DoT, DoH, or DoQ. 164 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 165 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 166 "OPTIONAL" in this document are to be interpreted as described in BCP 167 14 [MUSTSHOULD1] [MUSTSHOULD2] when, and only when, they appear in 168 all capitals, as shown here. 170 2. Discovery of Authoritative Server Encryption 172 An authoritative server that supports DNS with encryption makes 173 itself discoverable by publishing one or more DNS SVCB records that 174 contain "alpn" parameter keys. SVCB records are defined in [SVCB], 175 and the DNS extension to those records is defined in [DNS-SVCB]. 177 A recursive resolver discovers whether an authoritative server 178 supports DNS with encryption by looking for cached SVCB records for 179 the name of the authoritative server with a positive answer. A 180 cached DNS SVCB record with a negative answer indicates that the 181 authoritative server does not support any encrypted transport. 183 A resolver MAY also use port probing, although the mechanism for that 184 is not described here. 186 If the cache has no positive or negative answers for any SVCB record 187 for any of a zone's authoritative servers, the resolver MAY send 188 queries for the SVCB records (and for the A/AAAA records of names 189 mentioned in those SVCB records) for some or all of the zone's 190 authoritative servers and wait for a positive response so that the 191 resolver can use DNS with encryption for the original query. In this 192 situation, the resolver MAY instead just use classic DNS for the 193 original query but simultaneously queue queries for the SVCB (and 194 subsequent A/AAAA) records for some or all of the zone's 195 authoritative servers so that future queries might be able to use DNS 196 with encryption. 198 DNSSEC validation of SVCB RRsets used strictly for this discovery 199 mechanism is not mandated. 201 3. Processing Discovery Responses 203 After a resolver has DNS SCVB records in its cache (possibly due to 204 having just queried for them), it needs to use those records to try 205 to find an authoritative server that uses DNS with encryption. This 206 section describes how the resolver can make that selection. 208 A resolver MUST NOT attempt encryption for a server that has a 209 negative response in its cache for the associated DNS SVCB record. 211 After sending out all requests for SVCB records for the authoritative 212 servers in the NS RRset for a name, if all of the SVCB records for 213 those authoritative servers in the cache are negative responses, the 214 resolver MUST use classic (unencrypted) DNS instead of encryption. 215 Similarly, if none of the DNS SVCB records for the authoritative 216 servers in the cache have supported "alpn" parameters, the resolver 217 MUST use classic (unencrypted) DNS instead of encryption. 219 If there are any DNS SVCB records in the cache for the authoritative 220 servers for a zone with supported "alpn" parameters, the resolver 221 MUST try each indicated authoritative server using DNS with 222 encryption until it successfully sets up a connection. The resolver 223 only attempts to use the encrypted transports that are in the 224 associated SVCB record for the authoritative server. (( Note that 225 this completely prohibits "simple port 853 probing" even though that 226 is what some operators are currently doing. Does the WG want to be 227 this strict? )) 229 A resolver SHOULD keep a DNS with encryption session to a particular 230 server open if it expects to send additional queries to that server 231 in a short period of time. [DNS-OVER-TCP] says "both clients and 232 servers SHOULD support connection reuse" for TCP connections, and 233 that advice could apply as well for DNS with encryption, especially 234 as DNS with encryption has far greater overhead for re-establishing a 235 connection. If the server closes the DNS with encryption session, 236 the resolver can possibly re-establish a DNS with encryption session 237 using encrypted session resumption. 239 For any DNS with encryption protocols, TLS version 1.3 [TLS-13] or 240 later MUST be used. 242 A resolver following this protocol does not need to authenticate TLS 243 servers. Thus, when setting up a TLS connection, if the server's 244 authentication credentials do not match those expected by the 245 resolver, the resolver continues with the TLS connection. Privacy- 246 oriented resolvers (defined in [PRIVACY-REC]) following this protocol 247 MUST NOT indicate that they are using encryption because this 248 protocol is susceptible to on-path attacks. 250 3.1. Resolver Process as Pseudocode 252 This section is meant as an informal clarification of the protocol, 253 and is not normative. The pseudocode here is designed to show the 254 intent of the protocol, so it is not optimized for things like 255 intersection of sets and other shortcuts. 257 In this code, "signal_rrset(this_name)" means an "SVCB" query for the 258 "'_dns'" prefix of "this_name". The "Query over secure transport 259 until successful" section ignores differences in name server 260 selection and retry behaviour in different resolvers. 262 # Inputs 263 ns_names = List of NS Rdatas from the NS RRset for the queried name 264 can_do_secure = List of secure transports supported by resolver 265 secure_names_and_transports = Empty list, filled in below 267 # Fill secure_names_and_transports with (name, transport) tuples 268 for this_name in ns_names: 269 if signal_rrset(this_name) is in the resolver cache: 270 if signal_rrset(this_name) positively does not exist: 271 continue 272 for this_transport in signal_rrset(this_name): 273 if this_transport in can_do_secure: 274 add (this_name, this_transport) to secure_names_and_transports 275 else: # signal_rrset(this_name) is not in the resolver cache 276 queue a query for signal_rrset(this_name) for later caching 278 # Query over secure transport until successful 279 for (this_name, this_transport) tuple in secure_names_and_transports: 280 query using this_transport on this_name 281 if successful: 282 finished 284 # Got here if no this_name/this_transport query was successful 285 # or if secure_names_and_transports was empty 286 query using classic DNS on any/all ns_names; finished 288 3.2. Resolver Session Failures 290 The following are some of the reasons that a DNS with encryption 291 session might fail to be set up: 293 o The resolver receives a TCP RST response 295 o The resolver does not receive replies to TCP or TLS setup (such as 296 getting the TCP SYN message, the first TLS message, or completing 297 TLS handshakes) 299 o The TLS handshake gets a definitive failure 301 o The encrypted session fails for reasons other than for 302 authentication, such as incorrect algorithm choices or TLS record 303 failures 305 4. Serving with Encryption 307 An operator of an authoritative server following this protocol SHOULD 308 publish SVCB records as described in Section 2. If they cannot 309 publish such records, the security properties of their authoritative 310 servers will not be found. If an operator wants to test serving 311 using encryption, they can publish SVCB records with short TTLs and 312 then stop serving with encryption after removing the SVCB records and 313 waiting for the TTLs to expire. 315 It is acceptable for an operator of authoritative servers to only 316 offer encryption on some of the named authoritative servers, such as 317 when the operator is determining how far to roll out encrypted 318 service. 320 A server MAY close an encrypted connection at any time. For example, 321 it can close the session if it has not received a DNS query in a 322 defined length of time. The server MAY close an encrypted session 323 after it sends a DNS response; however, it might also want to keep 324 the session open waiting for another DNS query from the resolver. 325 [DNS-OVER-TCP] says "both clients and servers SHOULD support 326 connection reuse" for TCP connections, and that advice could apply as 327 well for DNS with encryption, especially as DNS with encryption has 328 far greater overhead for re-establishing a connection. If the server 329 closes the DNS with encryption session, the resolver can possibly re- 330 establish a DNS with encryption session using encrypted session 331 resumption. 333 For any DNS with encryption protocols, TLS version 1.3 [TLS-13] or 334 later MUST be used. 336 5. IANA Considerations 338 (( Update registration for TCP/853 to also include ADoT )) 340 (( Maybe other updates for DoH and DoQ )) 342 6. Security Considerations 344 The method described in this document explicitly allows a resolver to 345 perform DNS communications over traditional unencrypted, 346 unauthenticated DNS on port 53, if it cannot find an authoritative 347 server that advertises that it supports encryption. The method 348 described in this document explicitly allows a resolver using 349 encryption to choose to allow unauthenticated encryption. In either 350 of these cases, the resulting communication will be susceptible to 351 obvious and well-understood attacks from an attacker in the path of 352 the communications. 354 7. Acknowledgements 356 Puneet Sood contributed many ideas to early drafts of this document. 358 The DPRIVE Working Group has contributed many ideas that keep 359 shifting the focus and content of this document. 361 8. References 363 8.1. Normative References 365 [DNS-SVCB] 366 Schwartz, B., "Service Binding Mapping for DNS Servers", 367 draft-schwartz-svcb-dns-03 (work in progress), April 2021. 369 [DNS-TERM] 370 Hoffman, P. and K. Fujiwara, "DNS Terminology", draft- 371 ietf-dnsop-rfc8499bis-02 (work in progress), June 2021. 373 [FULL-AUTH] 374 Pauly, T., Rescorla, E., Schinazi, D., and C. A. Wood, 375 "Signaling Authoritative DNS Encryption", draft-rescorla- 376 dprive-adox-latest-00 (work in progress), February 2021. 378 [MUSTSHOULD1] 379 Bradner, S., "Key words for use in RFCs to Indicate 380 Requirement Levels", BCP 14, RFC 2119, 381 DOI 10.17487/RFC2119, March 1997, 382 . 384 [MUSTSHOULD2] 385 Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 386 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 387 May 2017, . 389 [OPPORTUN] 390 Dukhovni, V., "Opportunistic Security: Some Protection 391 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 392 December 2014, . 394 [SVCB] Schwartz, B., Bishop, M., and E. Nygren, "Service binding 395 and parameter specification via the DNS (DNS SVCB and 396 HTTPS RRs)", draft-ietf-dnsop-svcb-https-06 (work in 397 progress), June 2021. 399 [TLS-13] Rescorla, E., "The Transport Layer Security (TLS) Protocol 400 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 401 . 403 8.2. Informative References 405 [DNS-OVER-TCP] 406 Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 407 D. Wessels, "DNS Transport over TCP - Implementation 408 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 409 . 411 [DNSOHTTPS] 412 Hoffman, P. and P. McManus, "DNS Queries over HTTPS 413 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 414 . 416 [DNSOQUIC] 417 Huitema, C., Mankin, A., and S. Dickinson, "Specification 418 of DNS over Dedicated QUIC Connections", draft-ietf- 419 dprive-dnsoquic-02 (work in progress), February 2021. 421 [DNSOTLS] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 422 and P. Hoffman, "Specification for DNS over Transport 423 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 424 2016, . 426 [PRIVACY-REC] 427 Dickinson, S., Overeinder, B., van Rijswijk-Deij, R., and 428 A. Mankin, "Recommendations for DNS Privacy Service 429 Operators", BCP 232, RFC 8932, DOI 10.17487/RFC8932, 430 October 2020, . 432 [RSO_STATEMENT] 433 "Statement on DNS Encryption", 2021, . 436 Authors' Addresses 438 Paul Hoffman 439 ICANN 441 Email: paul.hoffman@icann.org 443 Peter van Dijk 444 PowerDNS 446 Email: peter.van.dijk@powerdns.com