idnits 2.17.1 draft-huitema-quic-dnsoquic-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 date (June 29, 2018) is 2127 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 (-34) exists of draft-ietf-quic-tls-13 == Outdated reference: A later version (-34) exists of draft-ietf-quic-transport-13 == Outdated reference: A later version (-20) exists of draft-ietf-dnsop-session-signal-10 == Outdated reference: A later version (-25) exists of draft-ietf-dnssd-push-14 == Outdated reference: A later version (-14) exists of draft-ietf-doh-dns-over-https-10 == Outdated reference: A later version (-06) exists of draft-ietf-dprive-padding-policy-05 == Outdated reference: A later version (-34) exists of draft-ietf-quic-http-13 == Outdated reference: A later version (-34) exists of draft-ietf-quic-recovery-13 -- Obsolete informational reference (is this intentional?): RFC 7626 (Obsoleted by RFC 9076) Summary: 0 errors (**), 0 flaws (~~), 9 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Huitema 3 Internet-Draft Private Octopus Inc. 4 Intended status: Standards Track M. Shore 5 Expires: December 31, 2018 Fastly 6 A. Mankin 7 Salesforce 8 S. Dickinson 9 Sinodun IT 10 J. Iyengar 11 Google 12 June 29, 2018 14 Specification of DNS over Dedicated QUIC Connections 15 draft-huitema-quic-dnsoquic-04 17 Abstract 19 This document describes the use of QUIC to provide transport privacy 20 for DNS. The encryption provided by QUIC has similar properties to 21 that provided by TLS, while QUIC transport eliminates the head-of- 22 line blocking issues inherent with TCP and provides more efficient 23 error corrections than UDP. DNS over QUIC (DNS/QUIC) has privacy 24 properties similar to DNS over TLS specified in RFC7858, and 25 performance similar to classic DNS over UDP. 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 December 31, 2018. 44 Copyright Notice 46 Copyright (c) 2018 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. Key Words . . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 3. Design Considerations . . . . . . . . . . . . . . . . . . . . 4 64 3.1. Scope is Limited to the Stub to Resolver Scenario . . . . 4 65 3.2. Provide DNS Privacy . . . . . . . . . . . . . . . . . . . 5 66 3.3. Design for Minimum Latency . . . . . . . . . . . . . . . 5 67 3.4. Development of QUIC Protocols and API . . . . . . . . . . 6 68 3.5. No Specific Middlebox Bypass Mechanism . . . . . . . . . 6 69 4. Specifications . . . . . . . . . . . . . . . . . . . . . . . 7 70 4.1. Connection Establishment . . . . . . . . . . . . . . . . 7 71 4.1.1. Draft Version Identification . . . . . . . . . . . . 7 72 4.1.2. Port Selection . . . . . . . . . . . . . . . . . . . 7 73 4.2. Stream Mapping and Usage . . . . . . . . . . . . . . . . 8 74 4.2.1. Server Initiated Transactions . . . . . . . . . . . . 8 75 4.2.2. Stream Reset . . . . . . . . . . . . . . . . . . . . 9 76 4.3. Closing the DNS/QUIC Connection . . . . . . . . . . . . . 9 77 4.4. Connection Resume and 0-RTT . . . . . . . . . . . . . . . 9 78 5. Implementation Requirements . . . . . . . . . . . . . . . . . 10 79 5.1. Authentication . . . . . . . . . . . . . . . . . . . . . 10 80 5.2. Fall Back to Other Protocols on Connection Failure . . . 10 81 5.3. Response Sizes . . . . . . . . . . . . . . . . . . . . . 10 82 5.4. DNS Message IDs . . . . . . . . . . . . . . . . . . . . . 10 83 5.5. Padding . . . . . . . . . . . . . . . . . . . . . . . . . 11 84 5.6. Connection Handling . . . . . . . . . . . . . . . . . . . 11 85 5.6.1. Connection Reuse . . . . . . . . . . . . . . . . . . 11 86 5.6.2. Connection Close . . . . . . . . . . . . . . . . . . 11 87 5.6.3. Idle Timeouts . . . . . . . . . . . . . . . . . . . . 12 88 5.7. Flow Control Mechanisms . . . . . . . . . . . . . . . . . 12 89 6. Security Considerations . . . . . . . . . . . . . . . . . . . 12 90 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 13 91 7.1. Privacy Issues With Zero RTT data . . . . . . . . . . . . 13 92 7.2. Privacy Issues With Session Resume . . . . . . . . . . . 13 93 7.3. Traffic Analysis . . . . . . . . . . . . . . . . . . . . 14 94 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 95 8.1. Registration of DNS/QUIC Identification String . . . . . 14 96 8.2. Reservation of Dedicated Port . . . . . . . . . . . . . . 15 97 8.2.1. Port number 784 for experimentations . . . . . . . . 15 98 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 15 99 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 100 10.1. Normative References . . . . . . . . . . . . . . . . . . 15 101 10.2. Informative References . . . . . . . . . . . . . . . . . 16 102 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 104 1. Introduction 106 Domain Name System (DNS) concepts are specified in [RFC1034]. This 107 document presents a mapping of the DNS protocol [RFC1035] over QUIC 108 transport [I-D.ietf-quic-transport] [I-D.ietf-quic-tls]. The goals 109 of this mapping are: 111 1. Provide the same DNS privacy protection as DNS over TLS (DNS/TLS) 112 [RFC7858]. This includes an option for the client to 113 authenticate the server by means of an authentication domain name 114 [RFC8310]. 116 2. Provide an improved level of source address validation for DNS 117 servers compared to DNS/UDP [RFC1035]. 119 3. Provide a transport that is not constrained by path MTU 120 limitations on the size of DNS responses it can send. 122 4. Explore the potential performance gains of using QUIC as a DNS 123 transport, versus other solutions like DNS over UDP (DNS/UDP) 124 [RFC1035] or DNS/TLS [RFC7858]. 126 5. Participate in the definition of QUIC protocols and API, by 127 outlining a use case for QUIC different from HTTP over QUIC 128 [I-D.ietf-quic-http]. 130 In order to achieve these goals, the focus of this document is 131 limited to the "stub to recursive resolver" scenario also addressed 132 by [RFC7858]. That is, the protocol described here works for queries 133 and responses between stub clients and recursive servers. The 134 specific non-goals of this document are: 136 1. No attempt is made to support zone transfers [RFC5936], as these 137 are not relevant to the stub to recursive resolver scenario. 139 2. No attempt is made to evade potential blocking of DNS/QUIC 140 traffic by middleboxes. 142 Users interested in zone transfers should continue using TCP based 143 solutions. Users interested in evading middleboxes should consider 144 using solutions like DNS/HTTPS [I-D.ietf-doh-dns-over-https]. 146 Specifying the transmission of an application over QUIC requires 147 specifying how the application's messages are mapped to QUIC streams, 148 and generally how the application will use QUIC. This is done for 149 HTTP in [I-D.ietf-quic-http]. The purpose of this document is to 150 define the way DNS messages can be transmitted over QUIC. 152 In this document, Section 3 presents the reasoning that guided the 153 proposed design. Section 4 specifies the actual mapping of DNS/QUIC. 154 Section 5 presents guidelines on the implementation, usage and 155 deployment of DNS/QUIC. 157 2. Key Words 159 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 160 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 161 document are to be interpreted as described in [RFC8174]. 163 3. Design Considerations 165 This section and its subsection present the design guidelines that 166 were used for the proposed mapping of DNS/QUIC. This section is 167 informative in nature. 169 3.1. Scope is Limited to the Stub to Resolver Scenario 171 Usage scenarios for the DNS protocol can be broadly classified in 172 three groups: stub to recursive resolver, recursive resolver to 173 authoritative server, and server to server. This design focuses only 174 on the "stub to recursive resolver" scenario following the approach 175 taken in [RFC7858] and [RFC8310]. 177 QUESTION: Should this document specify any aspects of configuration 178 of discoverability differently to DNS/TLS? 180 No attempt is made to address the recursive to authoritative 181 scenarios. Authoritative resolvers are discovered dynamically 182 through NS records. It is noted that at the time of writing work is 183 ongoing in the DPRIVE working group to attempt to address the 184 analogous problem for DNS/TLS 185 [I-D.bortzmeyer-dprive-resolver-to-auth]. In the absence of an 186 agreed way for authoritative to signal support for QUIC transport, 187 recursive resolvers would have to resort to some trial and error 188 process. At this stage of QUIC deployment, this would be mostly 189 errors, and does not seem attractive. This could change in the 190 future. 192 The DNS protocol is also used for zone transfers. In the zone 193 transfer scenario ([RFC5936]), the client emits a single AXFR query, 194 and the server responds with a series of AXFR responses. This 195 creates a unique profile, in which a query results in several 196 responses. Supporting that profile would complicate the mapping of 197 DNS queries over QUIC streams. Zone transfers are not used in the 198 stub to recursive scenario that is the focus here, and seem to be 199 currently well served by the DNS over TCP (DNS/TCP). There is no 200 attempt to support them in this proposed mapping of DNS to QUIC. 202 3.2. Provide DNS Privacy 204 DNS privacy considerations are described in [RFC7626]. [RFC7858] 205 defines how to mitigate some of these issues by transmitting DNS 206 messages over TLS and TCP and [RFC8310] specifies Strict and 207 Opportunistic Usage Profiles for DNS/TLS including how stub resolvers 208 can authenticate recursive resolvers. 210 QUIC connection setup includes the negotiation of security parameters 211 using TLS, as specified in [I-D.ietf-quic-tls], enabling encryption 212 of the QUIC transport. Transmitting DNS messages over QUIC will 213 provide essentially the same privacy protections as [RFC7858] and 214 [RFC8310]. Further discussion on this is provided in Section 7. 216 3.3. Design for Minimum Latency 218 QUIC is specifically designed to reduce the delay between HTTP 219 queries and HTTP responses. This is achieved through three main 220 components: 222 1. Support for 0-RTT data during session resumption. 224 2. Support for advanced error recovery procedures as specified in 225 [I-D.ietf-quic-recovery]. 227 3. Mitigation of head-of-line blocking by allowing parallel delivery 228 of data on multiple streams. 230 This mapping of DNS to QUIC will take advantage of these features in 231 three ways: 233 1. Optional support for sending 0-RTT data during session resumption 234 (the security and privacy implications of this are discussed in 235 later sections). 237 2. Long-lived QUIC connections over which multiple DNS transactions 238 are performed, generating the sustained traffic required to 239 benefit from advanced recovery features. 241 3. Mapping of each DNS Query/Response transaction to a separate 242 stream, to mitigate head-of-line blocking. 244 These considerations will be reflected in the mapping of DNS traffic 245 to QUIC streams in Section 4.2. 247 3.4. Development of QUIC Protocols and API 249 QUIC is defined as a layered protocol, with application-specific 250 mapping layered on top of the generic QUIC transport. The only 251 mapping defined at this stage is HTTP over QUIC [I-D.ietf-quic-http]. 252 Adding a different mapping for a different application contributes to 253 the development of QUIC. 255 HTTP/QUIC parallels the definition of HTTP/2.0, in which HTTP queries 256 and responses are carried as series of frames. The HTTP/QUIC mapping 257 provide with some simplification compared to HTTP/TLS/TCP, as QUIC 258 already provides concepts like stream identification or end of stream 259 marks. Dedicated control channel are used to carry connection data, 260 such as settings or the relative priority of queries. It would be 261 completely possible to use the HTTP/QUIC mapping to carry DNS 262 requests as HTTP queries, as specified in 263 [I-D.ietf-doh-dns-over-https]. We are somewhat concerned that this 264 mapping carries the overhead of HTTP into the DNS protocol, resulting 265 in additional complexity and overhead. 267 In this document a different design is deliberately explored, in 268 which clients and servers can initiate queries as determined by the 269 DNS application logic, opening new streams as necessary. This 270 provides for maximum parallelism between queries, as noted in 271 Section 3.3. It also places constraints on the API. Client and 272 servers will have to be notified of the opening of a new stream by 273 their peer. Instead of orderly closing the control stream, client 274 and server will have to use orderly connection closure mechanisms and 275 manage the potential loss of data if closing on one end conflicts 276 with opening of a stream on the other end. 278 3.5. No Specific Middlebox Bypass Mechanism 280 Being different from HTTP/QUIC is a design choice. The advantage is 281 that the mapping can be defined for minimal overhead and maximum 282 performance. The downside is that the difference can be noted by 283 firewalls and middleboxes. There may be environments in which HTTP/ 284 QUIC will be allowed, but DNS/QUIC will be disallowed and blocked by 285 these middle boxes. 287 It is recognized that this might be a problem, but there is currently 288 no indication on how widespread that problem might be. The problem 289 might be acute enough that the only realistic solution would be to 290 communicate with independent recursive resolvers using DNS/HTTPS, or 291 maybe DNS/HTTP/QUIC. Or the problem might be rare enough and the 292 performance gains significant enough that the appropriate solution 293 would be to use DNS/QUIC most of the time, and fall back to DNS/HTTPS 294 some of the time. Measurements and experimentation will inform that 295 decision. 297 It may indeed turn out that the complexity and overhead concerns are 298 negligible compared to the potential advantages of DNS/HTTPS, such as 299 integration with web services or firewall traversal, and that DNS/ 300 QUIC does not provide sufficient performance gains to justify a new 301 protocol. We will evaluate that once implementations are available 302 and can be compared. In the meanwhile, we believe that a clean 303 design is most likely to inform the QUIC development, as explained in 304 Section 3.4. 306 4. Specifications 308 4.1. Connection Establishment 310 DNS/QUIC connections are established as described in 311 [I-D.ietf-quic-transport]. During connection establishment, DNS/QUIC 312 support is indicated by selecting the ALPN token "dq" in the crypto 313 handshake. 315 4.1.1. Draft Version Identification 317 *RFC Editor's Note:* Please remove this section prior to publication 318 of a final version of this document. 320 Only implementations of the final, published RFC can identify 321 themselves as "dq". Until such an RFC exists, implementations MUST 322 NOT identify themselves using this string. 324 Implementations of draft versions of the protocol MUST add the string 325 "-" and the corresponding draft number to the identifier. For 326 example, draft-huitema-quic-dnsoquic-01 is identified using the 327 string "dq-h01". 329 4.1.2. Port Selection 331 By default, a DNS server that supports DNS/QUIC MUST listen for and 332 accept QUIC connections on the dedicated UDP port TBD (number to be 333 defined in Section 8), unless it has mutual agreement with its 334 clients to use a port other than TBD for DNS/QUIC. In order to use a 335 port other than TBD, both clients and servers would need a 336 configuration option in their software. 338 By default, a DNS client desiring to use DNS/QUIC with a particular 339 server MUST establish a QUIC connection to UDP port TBD on the 340 server, unless it has mutual agreement with its server to use a port 341 other than port TBD for DNS/QUIC. Such another port MUST NOT be port 342 53 or port 853. This recommendation against use of port 53 for DNS/ 343 QUIC is to avoid confusion between DNS/QUIC and DNS/UDP as specified 344 in [RFC1035]. Similarly, using port 853 would cause confusion 345 between DNS/QUIC and DNS/DTLS as specified in [RFC8094]. 347 4.2. Stream Mapping and Usage 349 The mapping of DNS traffic over QUIC streams takes advantage of the 350 QUIC stream features detailed in Section 10 of 351 [I-D.ietf-quic-transport]. 353 The stub to resolver DNS traffic follows a simple pattern in which 354 the client sends a query, and the server provides a response. This 355 design specifies that for each subsequent query on a QUIC connection 356 the client MUST select the next available client-initiated 357 bidirectional stream, in conformance with [I-D.ietf-quic-transport]. 359 The client MUST send the DNS query over the selected stream, and MUST 360 indicate through the STREAM FIN mechanism that no further data will 361 be sent on that stream. 363 The server MUST send the response on the same stream, and MUST 364 indicate through the STREAM FIN mechanism that no further data will 365 be sent on that stream. 367 Therefore, a single client initiated DNS transaction consumes a 368 single stream. This means that the client's first query occurs on 369 QUIC stream 4, the second on 8, and so on. 371 4.2.1. Server Initiated Transactions 373 There are planned traffic patterns in which a server sends 374 unsolicited queries to a client, such as for example PUSH messages 375 defined in [I-D.ietf-dnssd-push]. These occur when a client 376 subscribes to changes for a particular DNS RRset or resource record 377 type. When a PUSH server wishes to send such updates it MUST select 378 the next available server initiated bidirectional stream, in 379 conformance with [I-D.ietf-quic-transport]. 381 The server MUST send the DNS query over the selected stream, and MUST 382 indicate through the STREAM FIN mechanism that no further data will 383 be sent on that stream. 385 The client MUST send the response on the same stream, and MUST 386 indicate through the STREAM FIN mechanism that no further data will 387 be sent on that stream. 389 Therefore a single server initiated DNS transaction consumes a single 390 stream. This means that the servers's first query occurs on QUIC 391 stream 1, the second on 5, and so on. 393 4.2.2. Stream Reset 395 Stream transmission may be abandoned by either party, using the 396 stream "reset" facility. A stream reset indicates that one party is 397 unwilling to continue processing the transaction associated with the 398 stream. The corresponding transaction MUST be abandoned. A Server 399 Failure (SERVFAIL, [RFC1035]) SHOULD be notified to the initiator of 400 the transaction. 402 4.3. Closing the DNS/QUIC Connection 404 QUIC connections are closed using the CONNECTION_CLOSE mechanisms 405 specified in [I-D.ietf-quic-transport]. Connections can be closed at 406 the initiative of either the client or the server (also see 407 Section 5.6.2). The party initiating the connection closure SHOULD 408 use the QUIC GOAWAY mechanism to initiate a graceful shutdown of a 409 connection. 411 The transactions corresponding to stream number higher than indicated 412 in the GO AWAY frames MUST be considered failed. Similarly, if 413 streams are still open when the CONNECTION_CLOSE is received, the 414 corresponding transactions MUST be considered failed. In both cases, 415 a Server Failure (SERVFAIL, [RFC1035]) SHOULD be notified to the 416 initiator of the transaction. 418 4.4. Connection Resume and 0-RTT 420 A stub resolver MAY take advantage of the connection resume 421 mechanisms supported by QUIC transport [I-D.ietf-quic-transport] and 422 QUIC TLS [I-D.ietf-quic-tls]. Stub resolvers SHOULD consider 423 potential privacy issues associated with session resume before 424 deciding to use this mechanism. These privacy issues are detailed in 425 Section 7.2. 427 When resuming a session, a stub resolver MAY take advantage of the 428 0-RTT mechanism supported by QUIC. The 0-RTT mechanism MUST NOT be 429 used to send data that is not "replayable" transactions. For 430 example, a stub resolver MAY transmit a Query as 0-RTT, but MUST NOT 431 transmit an Update. 433 5. Implementation Requirements 435 5.1. Authentication 437 For the stub to recursive resolver scenario, the authentication 438 requirements are the same as described in [RFC7858] and [RFC8310]. 439 There is no need to authenticate the client's identity in either 440 scenario. 442 5.2. Fall Back to Other Protocols on Connection Failure 444 If the establishment of the DNS/QUIC connection fails, clients SHOULD 445 attempt to fall back to DNS/TLS and then potentially clear text, as 446 specified in [RFC7858] and [RFC8310], depending on their privacy 447 profile. 449 DNS clients SHOULD remember server IP addresses that don't support 450 DNS/QUIC, including timeouts, connection refusals, and QUIC handshake 451 failures, and not request DNS/QUIC from them for a reasonable period 452 (such as one hour per server). DNS clients following an out-of-band 453 key-pinned privacy profile ([RFC7858]) MAY be more aggressive about 454 retrying DNS/QUIC connection failures. 456 5.3. Response Sizes 458 DNS/QUIC does not suffer from the limitation on the size of responses 459 that can be delivered as DNS/UDP [RFC1035] does, since large 460 responses will be sent in separate STREAM frames in separate packets. 462 QUESTION: However, this raises a new issue because the responses sent 463 over QUIC can be significantly larger than those sent over TCP 464 (65,635 bytes). According to [I-D.ietf-quic-transport] "The largest 465 offset delivered on a stream - the sum of the re-constructed offset 466 and data length - MUST be less than 2^62". Should a specific limit 467 be applied for DNS/QUIC responses or not? 469 5.4. DNS Message IDs 471 When sending multiple queries over a QUIC connection, clients MUST 472 NOT reuse the DNS Message ID of an in-flight query on that connection 473 in order to avoid Message ID collisions. 475 Clients MUST match responses to outstanding queries using the STREAM 476 ID and Message ID and if the response contains a question section, 477 the client MUST match the QNAME, QCLASS, and QTYPE fields. Failure 478 to match is a DNS/QUIC protocol error. Clients observing such errors 479 SHOULD close the connection immediately, indicating the application 480 specific error code 0x00000001. The client should also mark the 481 server as inappropriate for future use of DNS/QUIC. 483 5.5. Padding 485 There are mechanisms specified for both padding individual DNS 486 messages [RFC7830], [I-D.ietf-dprive-padding-policy] and padding 487 within QUIC packets (see Section 8.6 of [I-D.ietf-quic-transport]), 488 which may contain multiple frames. 490 Implementations SHOULD NOT use DNS options for padding individual DNS 491 messages, because QUIC transport MAY transmit multiple STREAM frames 492 containing separate DNS messages in a single QUIC packet. Instead, 493 implementations SHOULD use QUIC PADDING frames to align the packet 494 length to a small set of fixed sizes, aligned with the 495 recommendations of [I-D.ietf-dprive-padding-policy]. 497 5.6. Connection Handling 499 [RFC7766] provides updated guidance on DNS/TCP much of which is 500 applicable to DNS/QUIC. This section attempts to specify how those 501 considerations apply to DNS/QUIC. 503 5.6.1. Connection Reuse 505 Historic implementations of DNS stub resolvers are known to open and 506 close TCP connections for each DNS query. To avoid excess QUIC 507 connections, each with a single query, clients SHOULD reuse a single 508 QUIC connection to the recursive resolver. 510 In order to achieve performance on par with UDP, DNS clients SHOULD 511 send their queries concurrently over the QUIC streams on a QUIC 512 connection. That is, when a DNS client sends multiple queries to a 513 server over a QUIC connection, it SHOULD NOT wait for an outstanding 514 reply before sending the next query. 516 5.6.2. Connection Close 518 In order to amortize QUIC and TLS connection setup costs, clients and 519 servers SHOULD NOT immediately close a QUIC connection after each 520 response. Instead, clients and servers SHOULD reuse existing QUIC 521 connections for subsequent queries as long as they have sufficient 522 resources. In some cases, this means that clients and servers may 523 need to keep idle connections open for some amount of time. 525 Under normal operation DNS clients typically initiate connection 526 closing on idle connections; however, DNS servers can close the 527 connection if the idle timeout set by local policy is exceeded. 529 Also, connections can be closed by either end under unusual 530 conditions such as defending against an attack or system failure/ 531 reboot. 533 Clients and servers that keep idle connections open MUST be robust to 534 termination of idle connection by either party. As with current DNS 535 over TCP, DNS servers MAY close the connection at any time (perhaps 536 due to resource constraints). As with current DNS/TCP, clients MUST 537 handle abrupt closes and be prepared to reestablish connections and/ 538 or retry queries. 540 5.6.3. Idle Timeouts 542 Proper management of established and idle connections is important to 543 the healthy operation of a DNS server. An implementation of DNS/QUIC 544 SHOULD follow best practices for DNS/TCP, as described in [RFC7766]. 545 Failure to do so may lead to resource exhaustion and denial of 546 service. 548 This document does not make specific recommendations for timeout 549 values on idle connections. Clients and servers should reuse and/or 550 close connections depending on the level of available resources. 551 Timeouts may be longer during periods of low activity and shorter 552 during periods of high activity. Current work in this area may also 553 assist DNS/TLS clients and servers in selecting useful timeout values 554 [RFC7828] [I-D.ietf-dnsop-session-signal] [TDNS]. 556 TODO: Clarify what timers (idle timeouts, response timeouts) apply at 557 the stream level and at the connection level. 559 TODO: QUIC provides an efficient mechanism for resuming connections, 560 including the possibility of sending 0-RTT data. Does that change 561 the tradeoff? Is it plausible to use shorter timers than specified 562 for TCP? 564 5.7. Flow Control Mechanisms 566 Servers MAY use the "maximum stream ID" option of the QUIC transport 567 to limit the number of streams opened by the client. This mechanism 568 will effectively limit the number of DNS queries that a client can 569 send. 571 6. Security Considerations 573 The security considerations of DNS/QUIC should be comparable to those 574 of DNS/TLS [RFC7858]. 576 7. Privacy Considerations 578 DNS/QUIC is specifically designed to protect the DNS traffic between 579 stub and resolver from observations by third parties, and thus 580 protect the privacy of queries from the stub. However, the recursive 581 resolver has full visibility of the stub's traffic, and could be used 582 as an observation point, as discussed in [RFC7626]. These 583 considerations do not differ between DNS/TLS and DNS/QUIC and are not 584 discussed further here. 586 QUIC incorporates the mechanisms of TLS 1.3 [I-D.ietf-tls-tls13] and 587 this enables QUIC transmission of "Zero-RTT" data. This can provide 588 interesting latency gains, but it raises two concerns: 590 1. Adversaries could replay the zero-RTT data and infer its content 591 from the behavior of the receiving server. 593 2. The zero-RTT mechanism relies on TLS resume, which can provide 594 linkability between successive client sessions. 596 These issues are developed in Section 7.1 and Section 7.2. 598 7.1. Privacy Issues With Zero RTT data 600 The zero-RTT data can be replayed by adversaries. That data may 601 triggers a query by a recursive resolver to an authoritative 602 resolvers. Adversaries may be able to pick a time at which the 603 recursive resolver outgoing traffic is observable, and thus find out 604 what name was queried for in the 0-RTT data. 606 This risk is in fact a subset of the general problem of observing the 607 behavior of the recursive resolver discussed in [RFC7626]. The 608 attack is partially mitigated by reducing the observability of this 609 traffic. However, the risk is amplified for 0-RTT data, because the 610 attacker might replay it at chosen times, several times. 612 The recommendation in [I-D.ietf-tls-tls13] is that the capability to 613 use 0-RTT data should be turned off by default, on only enabled if 614 the user clearly understands the associated risks. 616 QUESTION: Should 0-RTT only be used with Opportunistic profiles (i.e. 617 disabled by default for Strict only)? 619 7.2. Privacy Issues With Session Resume 621 The QUIC session resume mechanism reduces the cost of reestablishing 622 sessions and enables zero-RTT data. There is a linkability issue 623 associated with session resume, if the same resume token is used 624 several times, but this risk is mitigated by the mechanisms 625 incorporated in QUIC and in TLS 1.3. With these mechanisms, clients 626 and servers can cooperate to avoid linkability by third parties. 627 However, the server will always be able to link the resumed session 628 to the initial session. This creates a virtual long duration 629 session. The series of queries in that session can be used by the 630 server to identify the client. 632 Enabling the server to link client sessions through session resume is 633 probably not a large additional risk if the client's connectivity did 634 not change between the sessions, since the two sessions can probably 635 be correlated by comparing the IP addresses. On the other hand, if 636 the addresses did change, the client SHOULD consider whether the 637 linkability risk exceeds the privacy benefits. This evaluation will 638 obviously depend on the level of trust between stub and recursive. 640 7.3. Traffic Analysis 642 Even though QUIC packets are encrypted, adversaries can gain 643 information from observing packet lengths, in both queries and 644 responses, as well as packet timing. Many DNS requests are emitted 645 by web browsers. Loading a specific web page may require resolving 646 dozen of DNS names. If an application adopts a simple mapping of one 647 query or response per packet, or "one QUIC STREAM frame per packet", 648 then the succession of packet lengths may provide enough information 649 to identify the requested site. 651 Implementations SHOULD use the mechanisms defined in Section 5.5 to 652 mitigate this attack. 654 8. IANA Considerations 656 8.1. Registration of DNS/QUIC Identification String 658 This document creates a new registration for the identification of 659 DNS/QUIC in the "Application Layer Protocol Negotiation (ALPN) 660 Protocol IDs" registry established in [RFC7301]. 662 The "dq" string identifies DNS/QUIC: 664 Protocol: DNS/QUIC 666 Identification Sequence: 0x64 0x71 ("dq") 668 Specification: This document 670 8.2. Reservation of Dedicated Port 672 IANA is required to add the following value to the "Service Name and 673 Transport Protocol Port Number Registry" in the System Range. The 674 registry for that range requires IETF Review or IESG Approval 675 [RFC6335], and such a review was requested using the early allocation 676 process [RFC7120] for the well-known UDP port in this document. 677 Since port 853 is reserved for 'DNS query-response protocol run over 678 TLS' consideration is requested for reserving port TBD for 'DNS 679 query-response 680 protocol run over QUIC'. 682 Service Name domain-s 683 Transport Protocol(s) TCP/UDP 684 Assignee IESG 685 Contact IETF Chair 686 Description DNS query-response protocol run over QUIC 687 Reference This document 689 8.2.1. Port number 784 for experimentations 691 *RFC Editor's Note:* Please remove this section prior to publication 692 of a final version of this document. 694 Early experiments MAY use port 784. This port is marked in the IANA 695 registry as unassigned. 697 9. Acknowledgements 699 This document liberally borrows text from [I-D.ietf-quic-http] edited 700 by Mike Bishop, and from [RFC7858] authored by Zi Hu, Liang Zhu, John 701 Heidemann, Allison Mankin, Duane Wessels, and Paul Hoffman. 703 The privacy issue with 0-RTT data and session resume were analyzed by 704 Daniel Kahn Gillmor (DKG) in a message to the IETF "DPRIV" working 705 group [DNS0RTT]. 707 Thanks to our wide cast of supporters. 709 10. References 711 10.1. Normative References 713 [I-D.ietf-quic-tls] 714 Thomson, M. and S. Turner, "Using Transport Layer Security 715 (TLS) to Secure QUIC", draft-ietf-quic-tls-13 (work in 716 progress), June 2018. 718 [I-D.ietf-quic-transport] 719 Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed 720 and Secure Transport", draft-ietf-quic-transport-13 (work 721 in progress), June 2018. 723 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 724 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 725 . 727 [RFC1035] Mockapetris, P., "Domain names - implementation and 728 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 729 November 1987, . 731 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 732 "Transport Layer Security (TLS) Application-Layer Protocol 733 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 734 July 2014, . 736 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 737 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 738 May 2017, . 740 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 741 for DNS over TLS and DNS over DTLS", RFC 8310, 742 DOI 10.17487/RFC8310, March 2018, . 745 10.2. Informative References 747 [DNS0RTT] Kahn Gillmor, D., "DNS + 0-RTT", Message to DNS-Privacy WG 748 mailing list, April 2016, . 751 [I-D.bortzmeyer-dprive-resolver-to-auth] 752 Bortzmeyer, S., "Encryption and authentication of the DNS 753 resolver-to-authoritative communication", draft- 754 bortzmeyer-dprive-resolver-to-auth-01 (work in progress), 755 March 2018. 757 [I-D.ietf-dnsop-session-signal] 758 Bellis, R., Cheshire, S., Dickinson, J., Dickinson, S., 759 Lemon, T., and T. Pusateri, "DNS Stateful Operations", 760 draft-ietf-dnsop-session-signal-10 (work in progress), 761 June 2018. 763 [I-D.ietf-dnssd-push] 764 Pusateri, T. and S. Cheshire, "DNS Push Notifications", 765 draft-ietf-dnssd-push-14 (work in progress), March 2018. 767 [I-D.ietf-doh-dns-over-https] 768 Hoffman, P. and P. McManus, "DNS Queries over HTTPS 769 (DOH)", draft-ietf-doh-dns-over-https-10 (work in 770 progress), June 2018. 772 [I-D.ietf-dprive-padding-policy] 773 Mayrhofer, A., "Padding Policy for EDNS(0)", draft-ietf- 774 dprive-padding-policy-05 (work in progress), April 2018. 776 [I-D.ietf-quic-http] 777 Bishop, M., "Hypertext Transfer Protocol (HTTP) over 778 QUIC", draft-ietf-quic-http-13 (work in progress), June 779 2018. 781 [I-D.ietf-quic-recovery] 782 Iyengar, J. and I. Swett, "QUIC Loss Detection and 783 Congestion Control", draft-ietf-quic-recovery-13 (work in 784 progress), June 2018. 786 [I-D.ietf-tls-tls13] 787 Rescorla, E., "The Transport Layer Security (TLS) Protocol 788 Version 1.3", draft-ietf-tls-tls13-28 (work in progress), 789 March 2018. 791 [RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol 792 (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010, 793 . 795 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 796 Cheshire, "Internet Assigned Numbers Authority (IANA) 797 Procedures for the Management of the Service Name and 798 Transport Protocol Port Number Registry", BCP 165, 799 RFC 6335, DOI 10.17487/RFC6335, August 2011, 800 . 802 [RFC7120] Cotton, M., "Early IANA Allocation of Standards Track Code 803 Points", BCP 100, RFC 7120, DOI 10.17487/RFC7120, January 804 2014, . 806 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 807 DOI 10.17487/RFC7626, August 2015, . 810 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 811 D. Wessels, "DNS Transport over TCP - Implementation 812 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 813 . 815 [RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 816 edns-tcp-keepalive EDNS0 Option", RFC 7828, 817 DOI 10.17487/RFC7828, April 2016, . 820 [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, 821 DOI 10.17487/RFC7830, May 2016, . 824 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 825 and P. Hoffman, "Specification for DNS over Transport 826 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 827 2016, . 829 [RFC8094] Reddy, T., Wing, D., and P. Patil, "DNS over Datagram 830 Transport Layer Security (DTLS)", RFC 8094, 831 DOI 10.17487/RFC8094, February 2017, . 834 [TDNS] Zhu, L., Hu, Z., Heidemann, J., Wessels, D., Mankin, A., 835 and N. Somaiya, "Connection-Oriented DNS to Improve 836 Privacy and Security", 2015 IEEE Symposium on Security and 837 Privacy (SP), DOI 10.1109/SP.2015.18, 838 . 840 Authors' Addresses 842 Christian Huitema 843 Private Octopus Inc. 844 Friday Harbor WA 98250 845 U.S.A 847 Email: huitema@huitema.net 849 Melinda Shore 850 Fastly 852 Email: mshore@fastly.com 854 Allison Mankin 855 Salesforce 857 Email: amankin@salesforce.com 858 Sara Dickinson 859 Sinodun IT 860 Magdalen Centre 861 Oxford Science Park 862 Oxford OX4 4GA 863 U.K. 865 Email: sara@sinodun.com 867 Jana Iyengar 868 Google 870 Email: jri@google.com