idnits 2.17.1 draft-pp-recursive-authoritative-opportunistic-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 document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (25 November 2020) is 1241 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) == Outdated reference: A later version (-10) exists of draft-ietf-dnsop-rfc8499bis-01 ** Downref: Normative reference to an Informational RFC: RFC 7435 == Outdated reference: A later version (-12) exists of draft-ietf-dprive-dnsoquic-01 Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). 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: Standards Track 25 November 2020 5 Expires: 29 May 2021 7 Recursive to Authoritative DNS with Opportunistic Encryption 8 draft-pp-recursive-authoritative-opportunistic-03 10 Abstract 12 This document describes a use case and a method for a DNS recursive 13 resolver to use opportunistic encryption (that is, encryption with 14 optional authentication) when communicating with authoritative 15 servers. The motivating use case for this method is that more 16 encryption on the Internet is better, and opportunistic encryption is 17 better than no encryption at all. The method here is optional for 18 both the recursive resolver and the authoritative server. Nothing in 19 this method prevents use cases and methods that require authenticated 20 encryption. 22 IMPORTANT NOTE: This version of the document describes discovery 23 whether an authoritative server supports encryption using port- 24 checking. This restriction is based on the request of the DPRIVE WG 25 during its meeting at IETF 109. It is quite likely that the final 26 protocol will include a better set of methods for such discovery. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at https://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on 29 May 2021. 45 Copyright Notice 47 Copyright (c) 2020 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 52 license-info) in effect on the date of publication of this document. 53 Please review these documents carefully, as they describe your rights 54 and restrictions with respect to this document. Code Components 55 extracted from this document must include Simplified BSD License text 56 as described in Section 4.e of the Trust Legal Provisions and are 57 provided without warranty as described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 62 1.1. Use Case . . . . . . . . . . . . . . . . . . . . . . . . 3 63 1.2. Summary of Protocol . . . . . . . . . . . . . . . . . . . 3 64 1.3. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4 65 2. Method for Opportunistic Encryption . . . . . . . . . . . . . 4 66 2.1. Resolvers . . . . . . . . . . . . . . . . . . . . . . . . 4 67 2.2. Authoritative Servers . . . . . . . . . . . . . . . . . . 5 68 3. Discovering Whether an Authoritative Server Uses 69 Encryption . . . . . . . . . . . . . . . . . . . . . . . 5 70 4. The Transport Cache . . . . . . . . . . . . . . . . . . . . . 6 71 5. Authentication . . . . . . . . . . . . . . . . . . . . . . . 7 72 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 73 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 74 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 75 8.1. Normative References . . . . . . . . . . . . . . . . . . 8 76 8.2. Informative References . . . . . . . . . . . . . . . . . 9 77 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 79 1. Introduction 81 A recursive resolver using traditional DNS over port 53 may wish 82 instead to use encrypted communication with authoritative servers in 83 order to prevent passive snooping of its DNS traffic. The recursive 84 resolver can use opportunistic encryption (defined in [RFC7435] to 85 achieve this goal. 87 This document describes a use case and a method for recursive 88 resolvers to use opportunistic encryption. The use case is described 89 in Section 1.1. The method uses DNS-over-TLS [RFC7858] (DoT) with 90 authoritative servers in an efficient manner; it is called "ADoT", as 91 described in [I-D.ietf-dnsop-rfc8499bis]. (( A later version of this 92 document might also describe the use of DNS-over-QUIC 93 [I-D.ietf-dprive-dnsoquic] (DoQ). )) 95 Because opportunistic encryption means encryption with optional 96 authentication, a resolver using the mechanism described here will 97 likely achieve authenticated encryption with some authoritative 98 servers. The resolver can then take advantage of DNS features that 99 require authentication of authoritative servers; such features will 100 be described elsewhere. 102 1.1. Use Case 104 The use case in this document is recursive resolver operators who are 105 happy to use TLS [RFC8446] encryption with authoritative servers if 106 doing so doesn't significantly slow down getting answers, and 107 authoritative server operators that are happy to use encryption with 108 recursive resolvers if it doesn't cost much. 110 Both parties understand that using encryption costs something, but 111 are willing to absorb the costs for the benefit of more Internet 112 traffic being encrypted. The extra costs (compared to using 113 traditional DNS on port 53) include: 115 * Extra round trips to establish TCP for every session 117 * Extra round trips for TLS establishment 119 * Greater CPU use for TLS establishment 121 * Greater CPU use for encryption after TLS establishment 123 * Greater memory use for holding TLS state 125 1.2. Summary of Protocol 127 This protocol has four main parts. This summary gives an overview of 128 how the work together. 130 * A resolver that uses this protocol has a cache that it uses to 131 know whether to attempt using ADoT with a particular authoritative 132 server, as described in Section 4. 134 * A resolver fills its transport cache by discovering whether any 135 authoritative server of interest uses encrypted DNS, as described 136 in Section 3. 138 * If there is no entry for that server in the cache, or the cache 139 says that the authoritative server doesn't support encrypted 140 transport, the resolver uses classic DNS; otherwise, the resolver 141 attempts to connect to the authoritative server with ADoT, as 142 described in Section 2. 144 * If the TLS session is authenticated and the resolver has use for 145 this authentication, the resolver can mark responses it gets as 146 authenticated, as described in Section 5. 148 * If the TLS session is not authenticated, the resolver treats the 149 answers it receives as if they were received over classic DNS. 151 1.3. Definitions 153 The terms "recursive resolver", "authoritative server", "ADoT", and 154 "classic DNS" are defined in [I-D.ietf-dnsop-rfc8499bis]. 156 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 157 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 158 "OPTIONAL" in this document are to be interpreted as described in BCP 159 14 [RFC2119] [RFC8174] when, and only when, they appear in all 160 capitals, as shown here. 162 2. Method for Opportunistic Encryption 164 [RFC7435] defines opportunistic encryption. In this document, the 165 only difference between normal TLS session establishment and 166 opportunistic encryption is that the the TLS client (the recursive 167 resolver) optionally authenticates the server. See Section 5 for a 168 fuller description of the use of authentication. 170 2.1. Resolvers 172 A resolver following this protocol uses its transport cache 173 (described in Section 4 to decide whether to use classic DNS or this 174 protocol to contact authoritative servers. If the transport cache 175 indicates that the authoritative server is known to support encrypted 176 DNS, the resolver attempts to connect to in on port 853. 178 The resolver is configured with a set of timeouts that it uses when 179 it is setting up ADoT. This document does not yet suggest values for 180 those timeouts; they are marked here with (( timeout_ )). 182 The resolver MUST fall back to using classic DNS with a server if any 183 of the following happens when using ADoT: 185 * The resolver receives a TCP RST response 187 * The resolver does not receive a reply to the TCP SYN message 188 within timeout (( timeout_syn )) 190 * The resolver does not receive a reply to its first TLS message 191 within timeout (( timeout_tls_start )) 193 * The TLS handshake gets a definitive failure 195 * The TLS session is set up, but the resolver does not receive a 196 response to its first DNS query in the TLS session within timeout 197 (( timeout_dns_answ )) 199 In any of those cases, the resolver needs to update its transport 200 cache to indicate that the server is not currently available. The 201 time-to-live value for that entry could be (( some value goes here 202 )). 204 Failures in TLS other than for authentication, such as incorrect 205 algorithm choices or TLS record failures, MUST cause the TLS session 206 from being set up. 208 A resolver can keep a TLS session to a particular server open if it 209 expects to send additional queries to that server in a short period 210 of time (( timeout_additional )). If the server closes the TLS 211 session, the resolver can re-establish a TLS session of the version 212 of TLS in use allows for session resumption. 214 2.2. Authoritative Servers 216 An authoritative server following this protocol establishes an ADoT 217 service at port 853 for each IP address on which it offers service 218 for classic DNS on port 53. The server's TLS certificate MUST have a 219 subject identifier that matches the IP addresses or the domain names 220 it is known by. 222 A server MAY close the TLS connection at any time. For example, it 223 can close the TLS session if it has not received a DNS query by (( 224 timeout_dns_query )). It can also close the TLS session after it 225 sends a DNS response; however, it might also want to keep the TLS 226 session open waiting for another DNS query from the resolver. 228 3. Discovering Whether an Authoritative Server Uses Encryption 230 A recursive resolver can discover whether an authoritative server 231 supports DNS-over-TLS by attempting to open a TLS session on port 232 853. If the server completes the TLS handshake, the resolver can be 233 fairly confident that the server supports ADoT. 235 (( Note that there are likely better ways to do discovery. The 236 DPRIVE WG requested that this version of this draft only specify 237 port-probing. Future drafts will describe other methods, and how to 238 use multiple methods at the same time for discovery. )) 239 The following are indications of failure for the ability to use ADoT 240 with the server: 242 * The resolver receives a TCP RST response 244 * The resolver does not receive a reply to the TCP SYN message 245 within timeout (( timeout_syn )) 247 * The resolver does not receive a reply to its first TLS message 248 within timeout (( timeout_tls_start )) 250 * The TLS handshake gets a definitive failure 252 (( Clearly, further research is needed to determine good timeouts to 253 use here. )) 255 4. The Transport Cache 257 A recursive resolver that attempted to use encrypted transport every 258 time it connected to any authoritative server would inherently be 259 slower than one that did not. Similarly, a recursive resolver that 260 made an external lookup of what secure transports every authoritative 261 server supports each time it connected would also inherently be 262 slower than one that did not. Recursive resolver operators desire to 263 give answers to stub resolvers as quickly as possible, so neither of 264 these two strategies would make sense. 266 Instead, recursive resolvers following the method described in this 267 document MUST keep a cache of relevant information about how DNS- 268 over-TLS is supported by authoritative servers. This is called a 269 "transport cache" in this document. The relevant information could 270 include things such as support for encryption, expected round-trip 271 times, authentication mechanisms, and so on. The transport cache is 272 likely to store both positive and negative information about a 273 server's ability to support encrypted DNS. 275 The recursive resolver MUST look in its transport cache before 276 sending DNS queries to an authoritative server. If there is no entry 277 for an authoritative server in its transport cache, the recursive 278 resolver MUST use classic DNS over port 53. It MAY then probe for 279 encrypted transports, and cache that information for later 280 connections. 282 This document explicitly does not mandate the contents of the 283 transport cache. Different recursive resolver implementers are 284 likely to have different cache structures based on many factors, such 285 as research results, active measurements, secure protocols supported, 286 and customer feedback, There will likely be different strategies for 287 the time-to-live for parts of the transport cache, such as how often 288 to refresh the data in the cache, how often to refresh negative data, 289 whether to prioritize refreshing certain zones or types of zones, and 290 so on. 292 This document also explicitly doesn't mandate how the strategy for 293 filling transport caches. Some strategies might include one or more 294 of "try to send a refresh query over ADoT", "use external data", 295 "trust a third-party service for filling the transport cache", and so 296 on. 298 There are no interoperability issues with different implementors 299 making different choices for the contents and fill strategies of 300 their transport caches, and having many different options available 301 will likely cause the cache designs to get better over time. 303 5. Authentication 305 In the opportunistic encryption described here, there is no 306 requirement for the recursive resolver to authenticate the 307 authoritative server because any certificate authentication failure 308 does not cause the TLS session from being set up. If it is easier 309 programmatically for the recursive resolver to authenticate the 310 authoritative server and then ignore the negative result for 311 certificate authentication, than to just not authenticate, the 312 recursive resolver MAY do that. The recursive resolver MAY note a 313 certificate authentication failure and act on it (such as by logging 314 it or noting it in the cache), as long as the failure does not 315 prevent the TLS session from being set up. 317 This document does not describe what to do with successful 318 authentication of a ADoT TLS session. Some suggestions have been 319 floated in the DPRIVE WG, but none have been written into drafts. (( 320 Change this paragraph when that sentence becomes outdated. )) When 321 there are reasons to note authentication of the server, resolvers 322 following this protocol MAY use that authenticated data. 324 Later protocols for encrypted resolver-to-authoritative communication 325 might to require normal TLS authentication. Because of this, 326 authoritative servers SHOULD use TLS certificates that can be used in 327 authenticated TLS authentication, such as those issued by trusted 328 third parties or self-issued certificates that can be authenticated 329 with DANE [RFC6698] records. However, if an authoritative server 330 does not care about the use cases for such future protocols, it MAY 331 use self-issued certificates that cannot be authenticated. 333 6. Security Considerations 335 The method described in this document explicitly allows a stub to 336 perform DNS communications over traditional unencrypted, 337 unauthenticated DNS on port 53. 339 The method described in this document explicitly allows a stub to 340 choose to allow unauthenticated TLS. In this case, the resulting 341 communication will be susceptible to obvious and well-understood 342 attacks from an attacker in the path of the communications. 344 7. Acknowledgements 346 Puneet Sood and Peter van Dijk contributed many ideas to early drafts 347 of this document. 349 8. References 351 8.1. Normative References 353 [I-D.ietf-dnsop-rfc8499bis] 354 Hoffman, P. and K. Fujiwara, "DNS Terminology", Work in 355 Progress, Internet-Draft, draft-ietf-dnsop-rfc8499bis-01, 356 20 November 2020, . 359 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 360 Requirement Levels", BCP 14, RFC 2119, 361 DOI 10.17487/RFC2119, March 1997, 362 . 364 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 365 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 366 December 2014, . 368 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 369 and P. Hoffman, "Specification for DNS over Transport 370 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 371 2016, . 373 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 374 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 375 May 2017, . 377 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 378 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 379 . 381 8.2. Informative References 383 [I-D.ietf-dprive-dnsoquic] 384 Huitema, C., Mankin, A., and S. Dickinson, "Specification 385 of DNS over Dedicated QUIC Connections", Work in Progress, 386 Internet-Draft, draft-ietf-dprive-dnsoquic-01, 20 October 387 2020, . 390 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 391 of Named Entities (DANE) Transport Layer Security (TLS) 392 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 393 2012, . 395 Author's Address 397 Paul Hoffman 398 ICANN 400 Email: paul.hoffman@icann.org