idnits 2.17.00 (12 Aug 2021) /tmp/idnits49128/draft-ietf-dprive-dns-over-tls-02.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 : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (December 7, 2015) is 2356 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) == Missing Reference: 'TBD' is mentioned on line 285, but not defined == Unused Reference: 'RFC2818' is defined on line 674, but no explicit reference was found in the text == Unused Reference: 'RFC5280' is defined on line 687, but no explicit reference was found in the text == Unused Reference: 'RFC6698' is defined on line 697, but no explicit reference was found in the text == Outdated reference: draft-ietf-dnsop-5966bis has been published as RFC 7766 ** Obsolete normative reference: RFC 5077 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) == Outdated reference: draft-ietf-dnsop-edns-tcp-keepalive has been published as RFC 7828 -- Obsolete informational reference (is this intentional?): RFC 5966 (Obsoleted by RFC 7766) -- Obsolete informational reference (is this intentional?): RFC 7626 (Obsoleted by RFC 9076) Summary: 2 errors (**), 0 flaws (~~), 8 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Z. Hu 3 Internet-Draft L. Zhu 4 Intended status: Standards Track J. Heidemann 5 Expires: June 9, 2016 USC/Information Sciences 6 Institute 7 A. Mankin 8 D. Wessels 9 Verisign Labs 10 P. Hoffman 11 ICANN 12 December 7, 2015 14 DNS over TLS: Initiation and Performance Considerations 15 draft-ietf-dprive-dns-over-tls-02 17 Abstract 19 This document describes the use of TLS to provide privacy for DNS. 20 Encryption provided by TLS eliminates opportunities for eavesdropping 21 and on-path tampering with DNS queries in the network, such as 22 discussed in RFC 7258. In addition, this document specifies two 23 usage profiles for DNS-over-TLS and provides advice on performance 24 considerations to minimize overhead from using TCP and TLS with DNS. 26 Note: this document was formerly named 27 draft-ietf-dprive-start-tls-for-dns. Its name has been changed to 28 better describe the mechanism now used. Please refer to working 29 group archives under the former name for history and previous 30 discussion. [RFC Editor: please remove this paragraph prior to 31 publication] 33 Status of this Memo 35 This Internet-Draft is submitted in full conformance with the 36 provisions of BCP 78 and BCP 79. 38 Internet-Drafts are working documents of the Internet Engineering 39 Task Force (IETF). Note that other groups may also distribute 40 working documents as Internet-Drafts. The list of current Internet- 41 Drafts is at http://datatracker.ietf.org/drafts/current/. 43 Internet-Drafts are draft documents valid for a maximum of six months 44 and may be updated, replaced, or obsoleted by other documents at any 45 time. It is inappropriate to use Internet-Drafts as reference 46 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on June 9, 2016. 50 Copyright Notice 52 Copyright (c) 2015 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (http://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 68 2. Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . 4 69 3. Establishing and Managing DNS-over-TLS Sessions . . . . . . . 4 70 3.1. Session Initiation . . . . . . . . . . . . . . . . . . . . 4 71 3.2. TLS Handshake and Authentication . . . . . . . . . . . . . 4 72 3.3. Transmitting and Receiving Messages . . . . . . . . . . . 5 73 3.4. Connection Reuse, Close and Reestablishment . . . . . . . 5 74 4. Usage Profiles . . . . . . . . . . . . . . . . . . . . . . . . 6 75 4.1. Opportunistic Privacy Profile . . . . . . . . . . . . . . 7 76 4.2. Out-of-band Key-pinned Privacy Profile . . . . . . . . . . 7 77 5. Performance Considerations . . . . . . . . . . . . . . . . . . 8 78 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 79 7. Design Evolution . . . . . . . . . . . . . . . . . . . . . . . 9 80 8. Implementation Status . . . . . . . . . . . . . . . . . . . . 10 81 8.1. Unbound . . . . . . . . . . . . . . . . . . . . . . . . . 11 82 8.2. ldns . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 83 8.3. digit . . . . . . . . . . . . . . . . . . . . . . . . . . 11 84 8.4. getdns . . . . . . . . . . . . . . . . . . . . . . . . . . 11 85 9. Security Considerations . . . . . . . . . . . . . . . . . . . 11 86 10. Contributing Authors . . . . . . . . . . . . . . . . . . . . . 12 87 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 13 88 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13 89 12.1. Normative References . . . . . . . . . . . . . . . . . . . 13 90 12.2. Informative References . . . . . . . . . . . . . . . . . . 14 91 Appendix A. Out-of-band Key-pinned Privacy Profile Example . . . 16 92 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 17 94 1. Introduction 96 Today, nearly all DNS queries [RFC1034], [RFC1035] are sent 97 unencrypted, which makes them vulnerable to eavesdropping by an 98 attacker that has access to the network channel, reducing the privacy 99 of the querier. Recent news reports have elevated these concerns, 100 and recent IETF work has specified privacy considerations for DNS 101 [RFC7626]. 103 Prior work has addressed some aspects of DNS security, but until 104 recently there has been little work on privacy between a DNS client 105 and server. DNS Security Extensions (DNSSEC), [RFC4033] provide 106 _response integrity_ by defining mechanisms to cryptographically sign 107 zones, allowing end-users (or their first-hop resolver) to verify 108 replies are correct. By intention, DNSSEC does not protect request 109 and response privacy. Traditionally, either privacy was not 110 considered a requirement for DNS traffic, or it was assumed that 111 network traffic was sufficiently private, however these perceptions 112 are evolving due to recent events [RFC7258]. 114 Other work that has offered the potential to encrypt between DNS 115 clients and servers includes DNSCurve [dempsky-dnscurve], 116 ConfidentialDNS [I-D.confidentialdns] and IPSECA [I-D.ipseca]. In 117 addition to the present draft, the DPRIVE working group has recently 118 adopted a DNS-over-DTLS [draft-ietf-dprive-dnsodtls] proposal. 120 This document describes using DNS-over-TLS on a well-known port and 121 also offers advice on performance considerations to minimize 122 overheads from using TCP and TLS with DNS. 124 Initiation of DNS-over-TLS is very straightforward. By establishing 125 a connection over a well-known port, clients and servers expect and 126 agree to negotiate a TLS session to secure the channel. Deployment 127 will be gradual. Not all servers will support DNS-over-TLS and the 128 well-known port might be blocked by some firewalls. Clients will be 129 expected to keep track of servers that support TLS and those that 130 don't. Clients and servers will adhere to the TLS implementation 131 recommendations and security considerations of [RFC7525] or its 132 successor. 134 The protocol described here works for any DNS client to server 135 communication using DNS-over-TCP. That is, it may be used for 136 queries and responses between stub clients and recursive servers as 137 well as between recursive clients and authoritative servers. 139 This document describes two profiles in Section 4 providing different 140 levels of assurance of privacy: an opportunistic privacy profile and 141 an out-of-band key-pinned privacy profile. It is expected that a 142 future document based on [TBD] will further describe additional 143 privacy profiles for DNS over both TLS and DTLS. [Note to RFC 144 Editor: informative reference for that document will be forthcoming] 146 An earlier version of this document described a technique for 147 upgrading a DNS-over-TCP connection to a DNS-over-TLS session with, 148 essentially, "STARTTLS for DNS". To simplify the protocol, this 149 document now only uses a well-known port to specify TLS use, omitting 150 the upgrade approach. The upgrade approach no longer appears in this 151 document, which now focuses exclusively on the use of a well-known 152 port for DNS-over-TLS. 154 2. Reserved Words 156 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 157 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 158 document are to be interpreted as described in RFC 2119 [RFC2119]. 160 3. Establishing and Managing DNS-over-TLS Sessions 162 3.1. Session Initiation 164 A DNS server that supports DNS-over-TLS SHOULD listen for and accept 165 TCP connections on port 853. 167 DNS clients desiring privacy from DNS-over-TLS from a particular 168 server SHOULD establish a TCP connection to port 853 on the server. 169 Upon successful establishment of the TCP connection, client and 170 server SHOULD immediately initiate a TLS handshake using the 171 procedure described in [RFC5246]. 173 DNS clients SHOULD remember server IP addresses that don't support 174 DNS-over-TLS, including timeouts, connection refusals, and TLS 175 handshake failures, and not request DNS-over-TLS from them for a 176 reasonable period (such as one hour per server). DNS clients 177 following an out-of-band key-pinned privacy profile MAY be more 178 aggressive about retrying DNS-over-TLS connection failures. 180 3.2. TLS Handshake and Authentication 182 Once the DNS client succeeds in connecting via TCP on the well-known 183 port for DNS-over-TLS, it proceeds with the TLS handshake [RFC5246], 184 following the best practices specified in [RFC7525] or its successor. 186 The client will then authenticate the server, if required. This 187 document does not propose new ideas for authentication. Depending on 188 the privacy profile in use Section 4, the DNS client may choose not 189 to require authentication of the server, or it may make use of 190 trusted a SPKI Fingerprint pinset. 192 After TLS negotiation completes, the connection will be encrypted and 193 is now protected from eavesdropping. At this point, normal DNS 194 queries SHOULD take place. 196 3.3. Transmitting and Receiving Messages 198 All messages (requests and responses) in the established TLS session 199 MUST use the two-octet length field described in Section 4.2.2 of 200 [RFC1035]. For reasons of efficiency, DNS clients and servers SHOULD 201 transmit the two-octet length field, and the message described by 202 that length field, to the TCP layer at the same time (e.g., in a 203 single "write" system call) to make it more likely that all the data 204 will be transmitted in a single TCP segment 205 ([I-D.ietf-dnsop-5966bis], Section 8). 207 In order to minimize latency, clients SHOULD pipeline multiple 208 queries over a TLS session. When a DNS client sends multiple queries 209 to a server, it should not wait for an outstanding reply before 210 sending the next query ([I-D.ietf-dnsop-5966bis], Section 6.2.1.1). 212 Since pipelined responses can arrive out-of-order, clients MUST match 213 responses to outstanding queries using the ID field, query name, 214 type, and class. Failure by clients to properly match responses to 215 outstanding queries can have serious consequences for 216 interoperability ([I-D.ietf-dnsop-5966bis], Section 7). 218 3.4. Connection Reuse, Close and Reestablishment 220 For DNS clients that use library functions such as "getaddrinfo()" 221 and "gethostbyname()", current implementations are known to open and 222 close TCP connections each DNS call. To avoid excess TCP 223 connections, each with a single query, clients SHOULD reuse a single 224 TCP connection to the recursive resolver. Alternatively they may 225 prefer to use UDP to a DNS-over-TLS enabled caching resolver on the 226 same machine that then uses a system-wide TCP connection to the 227 recursive resolver. 229 In order to amortize TCP and TLS connection setup costs, clients and 230 servers SHOULD NOT immediately close a connection after each 231 response. Instead, clients and servers SHOULD reuse existing 232 connections for subsequent queries as long as they have sufficient 233 resources. In some cases, this means that clients and servers may 234 need to keep idle connections open for some amount of time. 236 Proper management of established and idle connections is important to 237 the healthy operation of a DNS server. An implementor of DNS-over- 238 TLS SHOULD follow best practices for DNS-over-TCP, as described in 239 [I-D.ietf-dnsop-5966bis]. Failure to do so may lead to resource 240 exhaustion and denial-of-service. 242 Whereas client and server implementations from the [RFC1035] era are 243 known to have poor TCP connection management, this document 244 stipulates that successful negotiation of TLS indicates the 245 willingness of both parties to keep idle DNS connections open, 246 independent of timeouts or other recommendations for DNS-over-TCP 247 without TLS. In other words, software implementing this protocol is 248 assumed to support idle, persistent connections and be prepared to 249 manage multiple, potentially long-lived TCP connections. 251 This document does not make specific recommendations for timeout 252 values on idle connections. Clients and servers should reuse and/or 253 close connections depending on the level of available resources. 254 Timeouts may be longer during periods of low activity and shorter 255 during periods of high activity. Current work in this area may also 256 assist DNS-over-TLS clients and servers select useful timeout values 257 [I-D.edns-tcp-keepalive] [tdns]. 259 Clients and servers that keep idle connections open MUST be robust to 260 termination of idle connection by either party. As with current DNS- 261 over-TCP, DNS servers MAY close the connection at any time (perhaps 262 due to resource constraints). As with current DNS-over-TCP, clients 263 MUST handle abrupt closes and be prepared to reestablish connections 264 and/or retry queries. 266 When reestablishing a DNS-over-TCP connection that was terminated, as 267 discussed in [I-D.ietf-dnsop-5966bis], TCP Fast Open [RFC7413] is of 268 benefit. DNS servers SHOULD enable fast TLS session resumption 269 [RFC5077] and this SHOULD be used when reestablishing connections. 271 When closing a connection, DNS servers SHOULD use the TLS close- 272 notify request to shift TCP TIME-WAIT state to the clients. 273 Additional requirements and guidance for optimizing DNS-over-TCP are 274 provided by [RFC5966], [I-D.ietf-dnsop-5966bis]. 276 4. Usage Profiles 278 This protocol provides flexibility to accommodate several different 279 use cases. This document defines two usage profiles: (1) 280 opportunistic privacy, and (2) out-of-band key-pinned authentication 281 that can be used to obtain stronger privacy guarantees if the client 282 has a trusted relationship with a DNS server supporting TLS. 284 Additional methods of authentication will be defined in a forthcoming 285 draft [TBD]. 287 4.1. Opportunistic Privacy Profile 289 For opportunistic privacy, analogous to SMTP opportunistic encryption 290 [RFC7435] one does not require privacy, but one desires privacy when 291 possible. 293 With opportunistic privacy, a client might learn of a TLS-enabled 294 recursive DNS resolver from an untrusted source (such as DHCP while 295 roaming), it might or might not validate the resolver. These choices 296 maximize availability and performance, but they leave the client 297 vulnerable to on-path attacks that remove privacy. 299 Opportunistic privacy can be used by any current client, but it only 300 provides guaranteed privacy when there are no on-path active 301 attackers. 303 4.2. Out-of-band Key-pinned Privacy Profile 305 The out-of-band key-pinned privacy profile can be used in 306 environments where an established trust relationship already exists 307 between DNS clients and servers (e.g., stub-to-recursive in 308 enterprise networks, actively-maintained contractual service 309 relationships, or a client using a public DNS resolver). The result 310 of this profile is that the client has strong guarantees about the 311 privacy of its DNS data by connecting only to servers it can 312 authenticate. 314 In this profile, clients authenticate servers by matching a set of 315 Subject Public Key Info (SPKI) Fingerprints in an analogous manner to 316 that described in [RFC7469]. With this out-of-band key-pinned 317 privacy profile, client administrators MUST deploy a pinset 318 containing two or more pins (specific to the service being pinned) 319 using a secure out-of-band (i.e., non-DNS) mechanism. This minimum 320 pinset size is required for key rollover, so that a server operator 321 does not have to coordinate key transitions with all its clients 322 simultaneously. After a change of keys on the server, an updated 323 pinset should be distributed to all clients in some secure way in 324 preparation for future key rollover. The mechanism for out-of-band 325 pinset update is out of scope for this document. 327 Such a client will only use DNS servers for which an SPKI Fingerprint 328 pinset has been provided. The possession of trusted pre-deployed 329 pinset allows the client to detect and prevent person-in-the-middle 330 and downgrade attacks. 332 However, a configured DNS server may be temporarily unavailable when 333 configuring a network. For example, for clients on networks that 334 require authentication through web-based login, such authentication 335 may rely on DNS interception and spoofing. Techniques such as those 336 used by DNSSEC-trigger [dnssec-trigger] MAY be used during network 337 configuration, with the intent to transition to the designated DNS 338 provider after authentication. The user MUST be alerted that the DNS 339 is not private during such bootstrap. 341 Upon successful TLS connection and handshake, the client computes the 342 SPKI Fingerprints for the public keys found in the validated server's 343 certificate chain (or in the raw public key, if the server provides 344 that instead). If a computed fingerprint exactly matches one of the 345 configured pins the client continues with the connection as normal. 346 Otherwise, the client MUST treat the SPKI validation failure as a 347 non-recoverable error. Appendix A provides a detailed example of how 348 this authentication could be performed in practice. 350 5. Performance Considerations 352 DNS-over-TLS incurs additional latency at session startup. It also 353 requires additional state (memory) and increased processing (CPU). 355 1. Latency: Compared to UDP, DNS-over-TCP requires an additional 356 round-trip-time (RTT) of latency to establish a TCP connection. 357 TCP Fast Open [RFC7413] can eliminate that RTT when information 358 exists from prior connections. The TLS handshake adds another 359 two RTTs of latency. Clients and servers should support 360 connection keepalive (reuse) and out-of-order processing to 361 amortize connection setup costs. Fast TLS connection resumption 362 [RFC5077] further reduces the setup delay and avoids the DNS 363 server keeping per-client session state. TLS False Start 364 [draft-ietf-tls-falsestart] can also lead to a latency reduction 365 in certain situations. 367 2. State: The use of connection-oriented TCP requires keeping 368 additional state at the server in both the kernel and 369 application. The state requirements are of particular concern on 370 servers with many clients, although memory-optimized TLS can add 371 only modest state over TCP. Smaller timeout values will reduce 372 the number of concurrent connections, and servers can 373 preemptively close connections when resource limits are exceeded. 375 3. Processing: Use of TLS encryption algorithms results in slightly 376 higher CPU usage. Servers can choose to refuse new DNS-over-TLS 377 clients if processing limits are exceeded. 379 4. Number of connections: To minimize state on DNS servers and 380 connection startup time, clients SHOULD minimize creation of new 381 TCP connections. Use of a local DNS request aggregator (a 382 particular type of forwarder) allows a single active DNS-over-TLS 383 connection from any given client computer to its server. 384 Additional guidance can be found in [I-D.ietf-dnsop-5966bis]. 386 A full performance evaluation is outside the scope of this 387 specification. A more detailed analysis of the performance 388 implications of DNS-over-TLS (and DNS-over-TCP) is discussed in 389 [tdns] and [I-D.ietf-dnsop-5966bis]. 391 6. IANA Considerations 393 IANA is requested to add the following value to the "Service Name and 394 Transport Protocol Port Number Registry" registry in the System 395 Range. The registry for that range requires IETF Review or IESG 396 Approval [RFC6335] and such a review was requested using the Early 397 Allocation process [RFC7120] for the well-known TCP port in this 398 document. 400 We further recommend that IANA reserve the same port number over UDP 401 for the proposed DNS-over-DTLS protocol [draft-ietf-dprive-dnsodtls]. 403 IANA responded to the early allocation request with the following 404 TEMPORARY assignment: 406 Service Name domain-s 407 Port Number 853 408 Transport Protocol(s) TCP/UDP 409 Assignee IETF DPRIVE Chairs 410 Contact Paul Hoffman 411 Description DNS query-response protocol run over TLS/DTLS 412 Reference This document 414 The TEMPORARY assignment expires 2016-10-08. IANA is requested to 415 make the assigmnent permanent upon publication of this document as an 416 RFC. 418 7. Design Evolution 420 [Note to RFC Editor: please do not remove this section prior to 421 publication as it may be useful to future Foo-over-TLS efforts] 423 Earlier versions of this document proposed an upgrade-based approach 424 to establishing a TLS session. The client would signal its interest 425 in TLS by setting a "TLS OK" bit in the EDNS0 flags field. A server 426 would signal its acceptance by responding with the TLS OK bit set. 428 Since we assume the client doesn't want to reveal (leak) any 429 information prior to securing the channel, we proposed the use of a 430 "dummy query" that clients could send for this purpose. The proposed 431 query name was STARTTLS, query type TXT, and query class CH. 433 The TLS OK signaling approach has both advantages and disadvantages. 434 One important advantage is that clients and servers could negotiate 435 TLS. If the server is too busy, or doesn't want to provide TLS 436 service to a particular client, it can respond negatively to the TLS 437 probe. An ancillary benefit is that servers could collect 438 information on adoption of DNS-over-TLS (via the TLS OK bit in 439 queries) before implementation and deployment. Another anticipated 440 advantage is the expectation that DNS-over-TLS would work over port 441 53. That is, no need to "waste" another port and deploy new firewall 442 rules on middleboxes. 444 However, at the same time, there was uncertainty whether or not 445 middleboxes would pass the TLS OK bit, given that the EDNS0 flags 446 field has been unchanged for many years. Another disadvantage is 447 that the TLS OK bit may make downgrade attacks easy and 448 indistinguishable from broken middleboxes. From a performance 449 standpoint, the upgrade-based approach had the disadvantage of 450 requiring 1xRTT additional latency for the dummy query. 452 Following this proposal, DNS-over-DTLS was proposed separately. DNS- 453 over-DTLS claimed it could work over port 53, but only because a non- 454 DTLS server interprets a DNS-over-DTLS query as a response. That is, 455 the non-DTLS server observes the QR flag set to 1. While this 456 technically works, it seems unfortunate and perhaps even undesirable. 458 DNS over both TLS and DTLS can benefit from a single well-known port 459 and avoid extra latency and mis-interpreted queries as responses. 461 8. Implementation Status 463 [Note to RFC Editor: please remove this section and reference to RFC 464 6982 prior to publication.] 466 This section records the status of known implementations of the 467 protocol defined by this specification at the time of posting of this 468 Internet-Draft, and is based on a proposal described in RFC 6982. 469 The description of implementations in this section is intended to 470 assist the IETF in its decision processes in progressing drafts to 471 RFCs. Please note that the listing of any individual implementation 472 here does not imply endorsement by the IETF. Furthermore, no effort 473 has been spent to verify the information presented here that was 474 supplied by IETF contributors. This is not intended as, and must not 475 be construed to be, a catalog of available implementations or their 476 features. Readers are advised to note that other implementations may 477 exist. 479 According to RFC 6982, "this will allow reviewers and working groups 480 to assign due consideration to documents that have the benefit of 481 running code, which may serve as evidence of valuable experimentation 482 and feedback that have made the implemented protocols more mature. 483 It is up to the individual working groups to use this information as 484 they see fit". 486 8.1. Unbound 488 The Unbound recursive name server software added support for DNS- 489 over-TLS in version 1.4.14. The unbound.conf configuration file has 490 the following configuration directives: ssl-port, ssl-service-key, 491 ssl-service-pem, ssl-upstream. See 492 https://unbound.net/documentation/unbound.conf.html. 494 8.2. ldns 496 Sinodun Internet Technologies has implemented DNS-over-TLS in the 497 ldns library from NLnetLabs. This also gives DNS-over-TLS support to 498 the drill DNS client program. Patches available at https:// 499 portal.sinodun.com/stash/projects/TDNS/repos/dns-over-tls_patches/ 500 browse. 502 8.3. digit 504 The digit DNS client from USC/ISI supports DNS-over-TLS. Source code 505 available at http://www.isi.edu/ant/software/tdns/index.html. 507 8.4. getdns 509 The getdns API implementation supports DNS-over-TLS. Source code 510 available at https://getdnsapi.net. 512 9. Security Considerations 514 Use of DNS-over-TLS is designed to address the privacy risks that 515 arise out of the ability to eavesdrop on DNS messages. It does not 516 address other security issues in DNS, and there are a number of 517 residual risks that may affect its success at protecting privacy: 519 1. There are known attacks on TLS, such as person-in-the-middle and 520 protocol downgrade. These are general attacks on TLS and not 521 specific to DNS-over-TLS; please refer to the TLS RFCs for 522 discussion of these security issues. Clients and servers MUST 523 adhere to the TLS implementation recommendations and security 524 considerations of [RFC7525] or its successor. DNS clients 525 keeping track of servers known to support TLS enables clients to 526 detect downgrade attacks. For servers with no connection history 527 and no apparent support for TLS, depending on their Privacy 528 Profile and privacy requirements, clients may choose to (a) try 529 another server when available, (b) continue without TLS, or (c) 530 refuse to forward the query. 532 2. Middleboxes [RFC3234] are present in some networks and have been 533 known to interfere with normal DNS resolution. Use of a 534 designated port for DNS-over-TLS should avoid such interference. 535 In general, clients that attempt TLS and fail can either fall 536 back on unencrypted DNS, or wait and retry later, depending on 537 their Privacy Profile and privacy requirements. 539 3. Any DNS protocol interactions prior to the TLS handshake that are 540 performed in the clear can be modified by a person-in-the-middle 541 attacker. For example, unencrypted queries and responses might 542 take place over port 53 between a client and server prior to TLS. 543 For this reason, clients MAY discard cached information about 544 server capabilities advertised prior to the start of the TLS 545 handshake. 547 4. This document does not itself specify ideas to resist known 548 traffic analysis or side channel leaks. Even with encrypted 549 messages, a well-positioned party may be able to glean certain 550 details from an analysis of message timings and sizes. Clients 551 and servers may consider the use of a padding method to address 552 privacy leakage due to message sizes [I-D.edns0-padding] 554 10. Contributing Authors 556 The below individuals contributed significantly to the draft. The 557 RFC Editor prefers a maximum of 5 names on the front page, and so we 558 have listed additional authors in this section. 560 Sara Dickinson 561 Sinodun Internet Technologies 562 Magdalen Centre 563 Oxford Science Park 564 Oxford OX4 4GA 565 UK 566 Email: sara@sinodun.com 567 URI: http://sinodun.com 569 Daniel Kahn Gillmor 570 ACLU 571 125 Broad Street, 18th Floor 572 New York, NY 10004 573 USA 575 11. Acknowledgments 577 The authors would like to thank Stephane Bortzmeyer, John Dickinson, 578 Brian Haberman, Shumon Huque, Kim-Minh Kaplan, Simon Joseffson, Simon 579 Kelley, Warren Kumari, John Levine, Ilari Liusvaara, Bill Manning, 580 George Michaelson, Eric Osterweil, Jinmei Tatuya, Tim Wicinski, and 581 Glen Wiley for reviewing this Internet-draft. They also thank Nikita 582 Somaiya for early work on this idea. 584 Work by Zi Hu, Liang Zhu, and John Heidemann on this document is 585 partially sponsored by the U.S. Dept. of Homeland Security (DHS) 586 Science and Technology Directorate, HSARPA, Cyber Security Division, 587 BAA 11-01-RIKA and Air Force Research Laboratory, Information 588 Directorate under agreement number FA8750-12-2-0344, and contract 589 number D08PC75599. 591 12. References 593 12.1. Normative References 595 [I-D.ietf-dnsop-5966bis] 596 Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 597 D. Wessels, "DNS Transport over TCP - Implementation 598 Requirements", draft-ietf-dnsop-5966bis-02 (work in 599 progress), July 2015. 601 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 602 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 603 . 605 [RFC1035] Mockapetris, P., "Domain names - implementation and 606 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 607 November 1987, . 609 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 610 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 611 RFC2119, March 1997, 612 . 614 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 615 "Transport Layer Security (TLS) Session Resumption without 616 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 617 January 2008, . 619 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 620 (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/ 621 RFC5246, August 2008, 622 . 624 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 625 Cheshire, "Internet Assigned Numbers Authority (IANA) 626 Procedures for the Management of the Service Name and 627 Transport Protocol Port Number Registry", BCP 165, 628 RFC 6335, DOI 10.17487/RFC6335, August 2011, 629 . 631 [RFC7120] Cotton, M., "Early IANA Allocation of Standards Track Code 632 Points", BCP 100, RFC 7120, DOI 10.17487/RFC7120, 633 January 2014, . 635 [RFC7469] Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning 636 Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, 637 April 2015, . 639 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 640 "Recommendations for Secure Use of Transport Layer 641 Security (TLS) and Datagram Transport Layer Security 642 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, 643 May 2015, . 645 12.2. Informative References 647 [I-D.confidentialdns] 648 Wijngaards, W., "Confidential DNS", 649 draft-wijngaards-dnsop-confidentialdns-03 (work in 650 progress), March 2015, . 653 [I-D.edns-tcp-keepalive] 654 Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 655 edns-tcp-keepalive EDNS0 Option", 656 draft-ietf-dnsop-edns-tcp-keepalive-02 (work in progress), 657 July 2015, . 660 [I-D.edns0-padding] 661 Mayrhofer, A., "The EDNS(0) Padding Option", 662 draft-mayrhofer-edns0-padding-01 (work in progress), 663 August 2015, . 666 [I-D.ipseca] 667 Osterweil, E., Wiley, G., Okubo, T., Lavu, R., and A. 668 Mohaisen, "Opportunistic Encryption with DANE Semantics 669 and IPsec: IPSECA", draft-osterweil-dane-ipsec-03 (work in 670 progress), July 2015, 671 . 674 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, DOI 10.17487/ 675 RFC2818, May 2000, 676 . 678 [RFC3234] Carpenter, B. and S. Brim, "Middleboxes: Taxonomy and 679 Issues", RFC 3234, DOI 10.17487/RFC3234, February 2002, 680 . 682 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 683 Rose, "DNS Security Introduction and Requirements", 684 RFC 4033, DOI 10.17487/RFC4033, March 2005, 685 . 687 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 688 Housley, R., and W. Polk, "Internet X.509 Public Key 689 Infrastructure Certificate and Certificate Revocation List 690 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 691 . 693 [RFC5966] Bellis, R., "DNS Transport over TCP - Implementation 694 Requirements", RFC 5966, DOI 10.17487/RFC5966, 695 August 2010, . 697 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 698 of Named Entities (DANE) Transport Layer Security (TLS) 699 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, 700 August 2012, . 702 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 703 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, 704 May 2014, . 706 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 707 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 708 . 710 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 711 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 712 December 2014, . 714 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 715 DOI 10.17487/RFC7626, August 2015, 716 . 718 [dempsky-dnscurve] 719 Dempsky, M., "DNSCurve", draft-dempsky-dnscurve-01 (work 720 in progress), August 2010, 721 . 723 [dnssec-trigger] 724 NLnet Labs, "Dnssec-Trigger", May 2014, 725 . 727 [draft-ietf-dprive-dnsodtls] 728 Reddy, T., Wing, D., and P. Patil, "DNS over DTLS 729 (DNSoD)", draft-ietf-dprive-dnsodtls-01 (work in 730 progress), June 2015, . 733 [draft-ietf-tls-falsestart] 734 Moeller, B. and A. Langley, "Transport Layer Security 735 (TLS) False Start", draft-ietf-tls-falsestart-00 (work in 736 progress), November 2014, 737 . 739 [tdns] Zhu, L., Hu, Z., Heidemann, J., Wessels, D., Mankin, A., 740 and N. Somaiya, "T-DNS: Connection-Oriented DNS to Improve 741 Privacy and Security", Technical report ISI-TR-688, 742 February 2014, . 745 Appendix A. Out-of-band Key-pinned Privacy Profile Example 747 This section presents an example of how the out-of-band key-pinned 748 privacy profile could work in practice based on a minimal pinset (two 749 pins). Operators of a DNS-over-TLS service in this profile are 750 expected to provide pins that are specific to the service being 751 pinned (i.e., public keys belonging directly to the end-entity or to 752 a service-specific private CA) and not to public key(s) of a generic 753 public CA. 755 A DNS client system is configured with an out-of-band key-pinned 756 privacy profile from a network service, using a pinset containing two 757 pins. Represented in HPKP [RFC7469] style, the pins are: 759 o pin-sha256="FHkyLhvI0n70E47cJlRTamTrnYVcsYdjUGbr79CfAVI=" 761 o pin-sha256="dFSY3wdPU8L0u/8qECuz5wtlSgnorYV2f66L6GNQg6w=" 763 The client also configures the IP addresses of its expected DNS 764 server, 192.0.2.3 and 192.0.2.4. 766 The client connects to 192.0.2.3 on TCP port 853 and begins the TLS 767 handshake, negotiation TLS 1.2 with a diffie-hellman key exchange. 768 The server sends a Certificate message with a list of three 769 certificates (A, B, and C), and signs the ServerKeyExchange message 770 correctly with the public key found certificate A. 772 The client now takes the SHA-256 digest of the SPKI in cert A, and 773 compares it against both pins in the pinset. If either pin matches, 774 the verification is successful; the client continues with the TLS 775 connection and can make its first DNS query. 777 If neither pin matches the SPKI of cert A, the client verifies that 778 cert A is actually issued by cert B. If it is, it takes the SHA-256 779 digest of the SPKI in cert B and compares it against both pins in the 780 pinset. If either pin matches, the verification is successful. 781 Otherwise, it verifes that B was issued by C, and then compares the 782 pins against the digest of C's SPKI. 784 If none of the SPKIs in the cryptographically-valid chain of certs 785 match any pin in the pinset, the client closes the connection with an 786 error, and marks the IP address as failed. 788 Authors' Addresses 790 Zi Hu 791 USC/Information Sciences Institute 792 4676 Admiralty Way, Suite 1133 793 Marina del Rey, CA 90292 794 USA 796 Phone: +1 213 587-1057 797 Email: zihu@usc.edu 799 Liang Zhu 800 USC/Information Sciences Institute 801 4676 Admiralty Way, Suite 1133 802 Marina del Rey, CA 90292 803 USA 805 Phone: +1 310 448-8323 806 Email: liangzhu@usc.edu 808 John Heidemann 809 USC/Information Sciences Institute 810 4676 Admiralty Way, Suite 1001 811 Marina del Rey, CA 90292 812 USA 814 Phone: +1 310 822-1511 815 Email: johnh@isi.edu 817 Allison Mankin 818 Verisign Labs 819 12061 Bluemont Way 820 Reston, VA 20190 822 Phone: +1 703 948-3200 823 Email: amankin@verisign.com 824 Duane Wessels 825 Verisign Labs 826 12061 Bluemont Way 827 Reston, VA 20190 829 Phone: +1 703 948-3200 830 Email: dwessels@verisign.com 832 Paul Hoffman 833 ICANN 835 Email: paul.hoffman@icann.org