idnits 2.17.1 draft-huitema-quic-dnsoquic-06.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 (March 7, 2019) is 1867 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-18 == Outdated reference: A later version (-34) exists of draft-ietf-quic-transport-18 == Outdated reference: A later version (-25) exists of draft-ietf-dnssd-push-16 == Outdated reference: A later version (-34) exists of draft-ietf-quic-http-18 == Outdated reference: A later version (-34) exists of draft-ietf-quic-recovery-18 -- Obsolete informational reference (is this intentional?): RFC 7626 (Obsoleted by RFC 9076) Summary: 0 errors (**), 0 flaws (~~), 6 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: September 8, 2019 Fastly 6 A. Mankin 7 Salesforce 8 S. Dickinson 9 Sinodun IT 10 J. Iyengar 11 Fastly 12 March 7, 2019 14 Specification of DNS over Dedicated QUIC Connections 15 draft-huitema-quic-dnsoquic-06 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 https://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 September 8, 2019. 44 Copyright Notice 46 Copyright (c) 2019 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 (https://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 [RFC8484]. 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 [RFC8484]. We are somewhat 263 concerned that this mapping carries the overhead of HTTP into the DNS 264 protocol, resulting in additional complexity and overhead. 266 In this document a different design is deliberately explored, in 267 which clients and servers can initiate queries as determined by the 268 DNS application logic, opening new streams as necessary. This 269 provides for maximum parallelism between queries, as noted in 270 Section 3.3. It also places constraints on the API. Client and 271 servers will have to be notified of the opening of a new stream by 272 their peer. Instead of orderly closing the control stream, client 273 and server will have to use orderly connection closure mechanisms and 274 manage the potential loss of data if closing on one end conflicts 275 with opening of a stream on the other end. 277 3.5. No Specific Middlebox Bypass Mechanism 279 Being different from HTTP/QUIC is a design choice. The advantage is 280 that the mapping can be defined for minimal overhead and maximum 281 performance. The downside is that the difference can be noted by 282 firewalls and middleboxes. There may be environments in which HTTP/ 283 QUIC will be allowed, but DNS/QUIC will be disallowed and blocked by 284 these middle boxes. 286 It is recognized that this might be a problem, but there is currently 287 no indication on how widespread that problem might be. The problem 288 might be acute enough that the only realistic solution would be to 289 communicate with independent recursive resolvers using DNS/HTTPS, or 290 maybe DNS/HTTP/QUIC. Or the problem might be rare enough and the 291 performance gains significant enough that the appropriate solution 292 would be to use DNS/QUIC most of the time, and fall back to DNS/HTTPS 293 some of the time. Measurements and experimentation will inform that 294 decision. 296 It may indeed turn out that the complexity and overhead concerns are 297 negligible compared to the potential advantages of DNS/HTTPS, such as 298 integration with web services or firewall traversal, and that DNS/ 299 QUIC does not provide sufficient performance gains to justify a new 300 protocol. We will evaluate that once implementations are available 301 and can be compared. In the meanwhile, we believe that a clean 302 design is most likely to inform the QUIC development, as explained in 303 Section 3.4. 305 4. Specifications 307 4.1. Connection Establishment 309 DNS/QUIC connections are established as described in 310 [I-D.ietf-quic-transport]. During connection establishment, DNS/QUIC 311 support is indicated by selecting the ALPN token "dq" in the crypto 312 handshake. 314 4.1.1. Draft Version Identification 316 *RFC Editor's Note:* Please remove this section prior to publication 317 of a final version of this document. 319 Only implementations of the final, published RFC can identify 320 themselves as "dq". Until such an RFC exists, implementations MUST 321 NOT identify themselves using this string. 323 Implementations of draft versions of the protocol MUST add the string 324 "-" and the corresponding draft number to the identifier. For 325 example, draft-huitema-quic-dnsoquic-01 is identified using the 326 string "dq-h01". 328 4.1.2. Port Selection 330 By default, a DNS server that supports DNS/QUIC MUST listen for and 331 accept QUIC connections on the dedicated UDP port TBD (number to be 332 defined in Section 8), unless it has mutual agreement with its 333 clients to use a port other than TBD for DNS/QUIC. In order to use a 334 port other than TBD, both clients and servers would need a 335 configuration option in their software. 337 By default, a DNS client desiring to use DNS/QUIC with a particular 338 server MUST establish a QUIC connection to UDP port TBD on the 339 server, unless it has mutual agreement with its server to use a port 340 other than port TBD for DNS/QUIC. Such another port MUST NOT be port 341 53 or port 853. This recommendation against use of port 53 for DNS/ 342 QUIC is to avoid confusion between DNS/QUIC and DNS/UDP as specified 343 in [RFC1035]. Similarly, using port 853 would cause confusion 344 between DNS/QUIC and DNS/DTLS as specified in [RFC8094]. 346 4.2. Stream Mapping and Usage 348 The mapping of DNS traffic over QUIC streams takes advantage of the 349 QUIC stream features detailed in Section 10 of 350 [I-D.ietf-quic-transport]. 352 The stub to resolver DNS traffic follows a simple pattern in which 353 the client sends a query, and the server provides a response. This 354 design specifies that for each subsequent query on a QUIC connection 355 the client MUST select the next available client-initiated 356 bidirectional stream, in conformance with [I-D.ietf-quic-transport]. 358 The client MUST send the DNS query over the selected stream, and MUST 359 indicate through the STREAM FIN mechanism that no further data will 360 be sent on that stream. 362 The server MUST send the response on the same stream, and MUST 363 indicate through the STREAM FIN mechanism that no further data will 364 be sent on that stream. 366 Therefore, a single client initiated DNS transaction consumes a 367 single stream. This means that the client's first query occurs on 368 QUIC stream 4, the second on 8, and so on. 370 4.2.1. Server Initiated Transactions 372 There are planned traffic patterns in which a server sends 373 unsolicited queries to a client, such as for example PUSH messages 374 defined in [I-D.ietf-dnssd-push]. These occur when a client 375 subscribes to changes for a particular DNS RRset or resource record 376 type. When a PUSH server wishes to send such updates it MUST select 377 the next available server initiated bidirectional stream, in 378 conformance with [I-D.ietf-quic-transport]. 380 The server MUST send the DNS query over the selected stream, and MUST 381 indicate through the STREAM FIN mechanism that no further data will 382 be sent on that stream. 384 The client MUST send the response on the same stream, and MUST 385 indicate through the STREAM FIN mechanism that no further data will 386 be sent on that stream. 388 Therefore a single server initiated DNS transaction consumes a single 389 stream. This means that the servers's first query occurs on QUIC 390 stream 1, the second on 5, and so on. 392 4.2.2. Stream Reset 394 Stream transmission may be abandoned by either party, using the 395 stream "reset" facility. A stream reset indicates that one party is 396 unwilling to continue processing the transaction associated with the 397 stream. The corresponding transaction MUST be abandoned. A Server 398 Failure (SERVFAIL, [RFC1035]) SHOULD be notified to the initiator of 399 the transaction. 401 4.3. Closing the DNS/QUIC Connection 403 QUIC connections are closed using the CONNECTION_CLOSE mechanisms 404 specified in [I-D.ietf-quic-transport]. Connections can be closed at 405 the initiative of either the client or the server (also see 406 Section 5.6.2). The party initiating the connection closure SHOULD 407 use the QUIC GOAWAY mechanism to initiate a graceful shutdown of a 408 connection. 410 The transactions corresponding to stream number higher than indicated 411 in the GO AWAY frames MUST be considered failed. Similarly, if 412 streams are still open when the CONNECTION_CLOSE is received, the 413 corresponding transactions MUST be considered failed. In both cases, 414 a Server Failure (SERVFAIL, [RFC1035]) SHOULD be notified to the 415 initiator of the transaction. 417 4.4. Connection Resume and 0-RTT 419 A stub resolver MAY take advantage of the connection resume 420 mechanisms supported by QUIC transport [I-D.ietf-quic-transport] and 421 QUIC TLS [I-D.ietf-quic-tls]. Stub resolvers SHOULD consider 422 potential privacy issues associated with session resume before 423 deciding to use this mechanism. These privacy issues are detailed in 424 Section 7.2. 426 When resuming a session, a stub resolver MAY take advantage of the 427 0-RTT mechanism supported by QUIC. The 0-RTT mechanism MUST NOT be 428 used to send data that is not "replayable" transactions. For 429 example, a stub resolver MAY transmit a Query as 0-RTT, but MUST NOT 430 transmit an Update. 432 5. Implementation Requirements 434 5.1. Authentication 436 For the stub to recursive resolver scenario, the authentication 437 requirements are the same as described in [RFC7858] and [RFC8310]. 438 There is no need to authenticate the client's identity in either 439 scenario. 441 5.2. Fall Back to Other Protocols on Connection Failure 443 If the establishment of the DNS/QUIC connection fails, clients SHOULD 444 attempt to fall back to DNS/TLS and then potentially clear text, as 445 specified in [RFC7858] and [RFC8310], depending on their privacy 446 profile. 448 DNS clients SHOULD remember server IP addresses that don't support 449 DNS/QUIC, including timeouts, connection refusals, and QUIC handshake 450 failures, and not request DNS/QUIC from them for a reasonable period 451 (such as one hour per server). DNS clients following an out-of-band 452 key-pinned privacy profile ([RFC7858]) MAY be more aggressive about 453 retrying DNS/QUIC connection failures. 455 5.3. Response Sizes 457 DNS/QUIC does not suffer from the limitation on the size of responses 458 that can be delivered as DNS/UDP [RFC1035] does, since large 459 responses will be sent in separate STREAM frames in separate packets. 461 QUESTION: However, this raises a new issue because the responses sent 462 over QUIC can be significantly larger than those sent over TCP 463 (65,635 bytes). According to [I-D.ietf-quic-transport] "The largest 464 offset delivered on a stream - the sum of the re-constructed offset 465 and data length - MUST be less than 2^62". Should a specific limit 466 be applied for DNS/QUIC responses or not? 468 5.4. DNS Message IDs 470 When sending multiple queries over a QUIC connection, clients MUST 471 NOT reuse the DNS Message ID of an in-flight query on that connection 472 in order to avoid Message ID collisions. 474 Clients MUST match responses to outstanding queries using the STREAM 475 ID and Message ID and if the response contains a question section, 476 the client MUST match the QNAME, QCLASS, and QTYPE fields. Failure 477 to match is a DNS/QUIC protocol error. Clients observing such errors 478 SHOULD close the connection immediately, indicating the application 479 specific error code 0x00000001. The client should also mark the 480 server as inappropriate for future use of DNS/QUIC. 482 5.5. Padding 484 There are mechanisms specified for both padding individual DNS 485 messages [RFC7830], [RFC8467] and padding within QUIC packets (see 486 Section 8.6 of [I-D.ietf-quic-transport]), which may contain multiple 487 frames. 489 Implementations SHOULD NOT use DNS options for padding individual DNS 490 messages, because QUIC transport MAY transmit multiple STREAM frames 491 containing separate DNS messages in a single QUIC packet. Instead, 492 implementations SHOULD use QUIC PADDING frames to align the packet 493 length to a small set of fixed sizes, aligned with the 494 recommendations of [RFC8467]. 496 5.6. Connection Handling 498 [RFC7766] provides updated guidance on DNS/TCP much of which is 499 applicable to DNS/QUIC. This section attempts to specify how those 500 considerations apply to DNS/QUIC. 502 5.6.1. Connection Reuse 504 Historic implementations of DNS stub resolvers are known to open and 505 close TCP connections for each DNS query. To avoid excess QUIC 506 connections, each with a single query, clients SHOULD reuse a single 507 QUIC connection to the recursive resolver. 509 In order to achieve performance on par with UDP, DNS clients SHOULD 510 send their queries concurrently over the QUIC streams on a QUIC 511 connection. That is, when a DNS client sends multiple queries to a 512 server over a QUIC connection, it SHOULD NOT wait for an outstanding 513 reply before sending the next query. 515 5.6.2. Connection Close 517 In order to amortize QUIC and TLS connection setup costs, clients and 518 servers SHOULD NOT immediately close a QUIC connection after each 519 response. Instead, clients and servers SHOULD reuse existing QUIC 520 connections for subsequent queries as long as they have sufficient 521 resources. In some cases, this means that clients and servers may 522 need to keep idle connections open for some amount of time. 524 Under normal operation DNS clients typically initiate connection 525 closing on idle connections; however, DNS servers can close the 526 connection if the idle timeout set by local policy is exceeded. 528 Also, connections can be closed by either end under unusual 529 conditions such as defending against an attack or system failure/ 530 reboot. 532 Clients and servers that keep idle connections open MUST be robust to 533 termination of idle connection by either party. As with current DNS 534 over TCP, DNS servers MAY close the connection at any time (perhaps 535 due to resource constraints). As with current DNS/TCP, clients MUST 536 handle abrupt closes and be prepared to reestablish connections and/ 537 or retry queries. 539 5.6.3. Idle Timeouts 541 Proper management of established and idle connections is important to 542 the healthy operation of a DNS server. An implementation of DNS/QUIC 543 SHOULD follow best practices for DNS/TCP, as described in [RFC7766]. 544 Failure to do so may lead to resource exhaustion and denial of 545 service. 547 This document does not make specific recommendations for timeout 548 values on idle connections. Clients and servers should reuse and/or 549 close connections depending on the level of available resources. 550 Timeouts may be longer during periods of low activity and shorter 551 during periods of high activity. Current work in this area may also 552 assist DNS/TLS clients and servers in selecting useful timeout values 553 [RFC7828] [I-D.ietf-dnsop-session-signal] [TDNS]. 555 TODO: Clarify what timers (idle timeouts, response timeouts) apply at 556 the stream level and at the connection level. 558 TODO: QUIC provides an efficient mechanism for resuming connections, 559 including the possibility of sending 0-RTT data. Does that change 560 the tradeoff? Is it plausible to use shorter timers than specified 561 for TCP? 563 5.7. Flow Control Mechanisms 565 Servers MAY use the "maximum stream ID" option of the QUIC transport 566 to limit the number of streams opened by the client. This mechanism 567 will effectively limit the number of DNS queries that a client can 568 send. 570 6. Security Considerations 572 The security considerations of DNS/QUIC should be comparable to those 573 of DNS/TLS [RFC7858]. 575 7. Privacy Considerations 577 DNS/QUIC is specifically designed to protect the DNS traffic between 578 stub and resolver from observations by third parties, and thus 579 protect the privacy of queries from the stub. However, the recursive 580 resolver has full visibility of the stub's traffic, and could be used 581 as an observation point, as discussed in [RFC7626]. These 582 considerations do not differ between DNS/TLS and DNS/QUIC and are not 583 discussed further here. 585 QUIC incorporates the mechanisms of TLS 1.3 [RFC8446] and this 586 enables QUIC transmission of "Zero-RTT" data. This can provide 587 interesting latency gains, but it raises two concerns: 589 1. Adversaries could replay the zero-RTT data and infer its content 590 from the behavior of the receiving server. 592 2. The zero-RTT mechanism relies on TLS resume, which can provide 593 linkability between successive client sessions. 595 These issues are developed in Section 7.1 and Section 7.2. 597 7.1. Privacy Issues With Zero RTT data 599 The zero-RTT data can be replayed by adversaries. That data may 600 triggers a query by a recursive resolver to an authoritative 601 resolvers. Adversaries may be able to pick a time at which the 602 recursive resolver outgoing traffic is observable, and thus find out 603 what name was queried for in the 0-RTT data. 605 This risk is in fact a subset of the general problem of observing the 606 behavior of the recursive resolver discussed in [RFC7626]. The 607 attack is partially mitigated by reducing the observability of this 608 traffic. However, the risk is amplified for 0-RTT data, because the 609 attacker might replay it at chosen times, several times. 611 The recommendation in [RFC8446] is that the capability to use 0-RTT 612 data should be turned off by default, on only enabled if the user 613 clearly understands the associated risks. 615 QUESTION: Should 0-RTT only be used with Opportunistic profiles (i.e. 616 disabled by default for Strict only)? 618 7.2. Privacy Issues With Session Resume 620 The QUIC session resume mechanism reduces the cost of reestablishing 621 sessions and enables zero-RTT data. There is a linkability issue 622 associated with session resume, if the same resume token is used 623 several times, but this risk is mitigated by the mechanisms 624 incorporated in QUIC and in TLS 1.3. With these mechanisms, clients 625 and servers can cooperate to avoid linkability by third parties. 626 However, the server will always be able to link the resumed session 627 to the initial session. This creates a virtual long duration 628 session. The series of queries in that session can be used by the 629 server to identify the client. 631 Enabling the server to link client sessions through session resume is 632 probably not a large additional risk if the client's connectivity did 633 not change between the sessions, since the two sessions can probably 634 be correlated by comparing the IP addresses. On the other hand, if 635 the addresses did change, the client SHOULD consider whether the 636 linkability risk exceeds the privacy benefits. This evaluation will 637 obviously depend on the level of trust between stub and recursive. 639 7.3. Traffic Analysis 641 Even though QUIC packets are encrypted, adversaries can gain 642 information from observing packet lengths, in both queries and 643 responses, as well as packet timing. Many DNS requests are emitted 644 by web browsers. Loading a specific web page may require resolving 645 dozen of DNS names. If an application adopts a simple mapping of one 646 query or response per packet, or "one QUIC STREAM frame per packet", 647 then the succession of packet lengths may provide enough information 648 to identify the requested site. 650 Implementations SHOULD use the mechanisms defined in Section 5.5 to 651 mitigate this attack. 653 8. IANA Considerations 655 8.1. Registration of DNS/QUIC Identification String 657 This document creates a new registration for the identification of 658 DNS/QUIC in the "Application Layer Protocol Negotiation (ALPN) 659 Protocol IDs" registry established in [RFC7301]. 661 The "dq" string identifies DNS/QUIC: 663 Protocol: DNS/QUIC 665 Identification Sequence: 0x64 0x71 ("dq") 667 Specification: This document 669 8.2. Reservation of Dedicated Port 671 IANA is required to add the following value to the "Service Name and 672 Transport Protocol Port Number Registry" in the System Range. The 673 registry for that range requires IETF Review or IESG Approval 674 [RFC6335], and such a review was requested using the early allocation 675 process [RFC7120] for the well-known UDP port in this document. 676 Since port 853 is reserved for 'DNS query-response protocol run over 677 TLS' consideration is requested for reserving port TBD for 'DNS 678 query-response 679 protocol run over QUIC'. 681 Service Name domain-s 682 Transport Protocol(s) TCP/UDP 683 Assignee IESG 684 Contact IETF Chair 685 Description DNS query-response protocol run over QUIC 686 Reference This document 688 8.2.1. Port number 784 for experimentations 690 *RFC Editor's Note:* Please remove this section prior to publication 691 of a final version of this document. 693 Early experiments MAY use port 784. This port is marked in the IANA 694 registry as unassigned. 696 9. Acknowledgements 698 This document liberally borrows text from [I-D.ietf-quic-http] edited 699 by Mike Bishop, and from [RFC7858] authored by Zi Hu, Liang Zhu, John 700 Heidemann, Allison Mankin, Duane Wessels, and Paul Hoffman. 702 The privacy issue with 0-RTT data and session resume were analyzed by 703 Daniel Kahn Gillmor (DKG) in a message to the IETF "DPRIV" working 704 group [DNS0RTT]. 706 Thanks to our wide cast of supporters. 708 10. References 710 10.1. Normative References 712 [I-D.ietf-quic-tls] 713 Thomson, M. and S. Turner, "Using TLS to Secure QUIC", 714 draft-ietf-quic-tls-18 (work in progress), January 2019. 716 [I-D.ietf-quic-transport] 717 Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed 718 and Secure Transport", draft-ietf-quic-transport-18 (work 719 in progress), January 2019. 721 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 722 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 723 . 725 [RFC1035] Mockapetris, P., "Domain names - implementation and 726 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 727 November 1987, . 729 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 730 "Transport Layer Security (TLS) Application-Layer Protocol 731 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 732 July 2014, . 734 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 735 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 736 May 2017, . 738 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 739 for DNS over TLS and DNS over DTLS", RFC 8310, 740 DOI 10.17487/RFC8310, March 2018, 741 . 743 10.2. Informative References 745 [DNS0RTT] Kahn Gillmor, D., "DNS + 0-RTT", Message to DNS-Privacy WG 746 mailing list, April 2016, . 749 [I-D.bortzmeyer-dprive-resolver-to-auth] 750 Bortzmeyer, S., "Encryption and authentication of the DNS 751 resolver-to-authoritative communication", draft- 752 bortzmeyer-dprive-resolver-to-auth-01 (work in progress), 753 March 2018. 755 [I-D.ietf-dnsop-session-signal] 756 Bellis, R., Cheshire, S., Dickinson, J., Dickinson, S., 757 Lemon, T., and T. Pusateri, "DNS Stateful Operations", 758 draft-ietf-dnsop-session-signal-20 (work in progress), 759 December 2018. 761 [I-D.ietf-dnssd-push] 762 Pusateri, T. and S. Cheshire, "DNS Push Notifications", 763 draft-ietf-dnssd-push-16 (work in progress), November 764 2018. 766 [I-D.ietf-quic-http] 767 Bishop, M., "Hypertext Transfer Protocol Version 3 768 (HTTP/3)", draft-ietf-quic-http-18 (work in progress), 769 January 2019. 771 [I-D.ietf-quic-recovery] 772 Iyengar, J. and I. Swett, "QUIC Loss Detection and 773 Congestion Control", draft-ietf-quic-recovery-18 (work in 774 progress), January 2019. 776 [RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol 777 (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010, 778 . 780 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 781 Cheshire, "Internet Assigned Numbers Authority (IANA) 782 Procedures for the Management of the Service Name and 783 Transport Protocol Port Number Registry", BCP 165, 784 RFC 6335, DOI 10.17487/RFC6335, August 2011, 785 . 787 [RFC7120] Cotton, M., "Early IANA Allocation of Standards Track Code 788 Points", BCP 100, RFC 7120, DOI 10.17487/RFC7120, January 789 2014, . 791 [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, 792 DOI 10.17487/RFC7626, August 2015, 793 . 795 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 796 D. Wessels, "DNS Transport over TCP - Implementation 797 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 798 . 800 [RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 801 edns-tcp-keepalive EDNS0 Option", RFC 7828, 802 DOI 10.17487/RFC7828, April 2016, 803 . 805 [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, 806 DOI 10.17487/RFC7830, May 2016, 807 . 809 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 810 and P. Hoffman, "Specification for DNS over Transport 811 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 812 2016, . 814 [RFC8094] Reddy, T., Wing, D., and P. Patil, "DNS over Datagram 815 Transport Layer Security (DTLS)", RFC 8094, 816 DOI 10.17487/RFC8094, February 2017, 817 . 819 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 820 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 821 . 823 [RFC8467] Mayrhofer, A., "Padding Policies for Extension Mechanisms 824 for DNS (EDNS(0))", RFC 8467, DOI 10.17487/RFC8467, 825 October 2018, . 827 [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 828 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 829 . 831 [TDNS] Zhu, L., Hu, Z., Heidemann, J., Wessels, D., Mankin, A., 832 and N. Somaiya, "Connection-Oriented DNS to Improve 833 Privacy and Security", 2015 IEEE Symposium on Security and 834 Privacy (SP), DOI 10.1109/SP.2015.18, 835 . 837 Authors' Addresses 839 Christian Huitema 840 Private Octopus Inc. 841 Friday Harbor WA 98250 842 U.S.A 844 Email: huitema@huitema.net 846 Melinda Shore 847 Fastly 849 Email: mshore@fastly.com 851 Allison Mankin 852 Salesforce 854 Email: amankin@salesforce.com 855 Sara Dickinson 856 Sinodun IT 857 Magdalen Centre 858 Oxford Science Park 859 Oxford OX4 4GA 860 U.K. 862 Email: sara@sinodun.com 864 Jana Iyengar 865 Fastly 867 Email: jri.ietf@gmail.com