idnits 2.17.1 draft-ietf-dprive-dnsoquic-08.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 (10 January 2022) is 836 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-10) exists of draft-ietf-dnsop-rfc8499bis-03 == Outdated reference: A later version (-04) exists of draft-ietf-quic-bit-grease-02 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Huitema 3 Internet-Draft Private Octopus Inc. 4 Intended status: Standards Track S. Dickinson 5 Expires: 14 July 2022 Sinodun IT 6 A. Mankin 7 Salesforce 8 10 January 2022 10 DNS over Dedicated QUIC Connections 11 draft-ietf-dprive-dnsoquic-08 13 Abstract 15 This document describes the use of QUIC to provide transport privacy 16 for DNS. The encryption provided by QUIC has similar properties to 17 that provided by TLS, while QUIC transport eliminates the head-of- 18 line blocking issues inherent with TCP and provides more efficient 19 packet loss recovery than UDP. DNS over QUIC (DoQ) has privacy 20 properties similar to DNS over TLS (DoT) specified in RFC7858, and 21 latency characteristics similar to classic DNS over UDP. This 22 specification describes the use of DNS over QUIC as a general-purpose 23 transport for DNS and includes the use of DNS over QUIC for stub to 24 recursive, recursive to authoritative, and zone transfer scenarios. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at https://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on 14 July 2022. 43 Copyright Notice 45 Copyright (c) 2022 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 50 license-info) in effect on the date of publication of this document. 51 Please review these documents carefully, as they describe your rights 52 and restrictions with respect to this document. Code Components 53 extracted from this document must include Revised BSD License text as 54 described in Section 4.e of the Trust Legal Provisions and are 55 provided without warranty as described in the Revised BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Key Words . . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. Document work via GitHub . . . . . . . . . . . . . . . . . . 5 62 4. Design Considerations . . . . . . . . . . . . . . . . . . . . 5 63 4.1. Provide DNS Privacy . . . . . . . . . . . . . . . . . . . 5 64 4.2. Design for Minimum Latency . . . . . . . . . . . . . . . 5 65 4.3. Middlebox Considerations . . . . . . . . . . . . . . . . 6 66 4.4. No Server-Initiated Transactions . . . . . . . . . . . . 6 67 5. Specifications . . . . . . . . . . . . . . . . . . . . . . . 6 68 5.1. Connection Establishment . . . . . . . . . . . . . . . . 7 69 5.1.1. Draft Version Identification . . . . . . . . . . . . 7 70 5.1.2. Port Selection . . . . . . . . . . . . . . . . . . . 7 71 5.2. Stream Mapping and Usage . . . . . . . . . . . . . . . . 7 72 5.2.1. DNS Message IDs . . . . . . . . . . . . . . . . . . . 8 73 5.3. DoQ Error Codes . . . . . . . . . . . . . . . . . . . . . 9 74 5.3.1. Transaction Cancellation . . . . . . . . . . . . . . 9 75 5.3.2. Transaction Errors . . . . . . . . . . . . . . . . . 10 76 5.3.3. Protocol Errors . . . . . . . . . . . . . . . . . . . 10 77 5.3.4. Alternative error codes . . . . . . . . . . . . . . . 11 78 5.4. Connection Management . . . . . . . . . . . . . . . . . . 11 79 5.5. Session Resumption and 0-RTT . . . . . . . . . . . . . . 12 80 5.6. Message Sizes . . . . . . . . . . . . . . . . . . . . . . 13 81 6. Implementation Requirements . . . . . . . . . . . . . . . . . 13 82 6.1. Authentication . . . . . . . . . . . . . . . . . . . . . 13 83 6.2. Fallback to Other Protocols on Connection Failure . . . . 14 84 6.3. Address Validation . . . . . . . . . . . . . . . . . . . 14 85 6.4. Padding . . . . . . . . . . . . . . . . . . . . . . . . . 14 86 6.5. Connection Handling . . . . . . . . . . . . . . . . . . . 15 87 6.5.1. Connection Reuse . . . . . . . . . . . . . . . . . . 15 88 6.5.2. Resource Management . . . . . . . . . . . . . . . . . 16 89 6.5.3. Using 0-RTT and Session Resumption . . . . . . . . . 16 90 6.5.4. Controlling Connection Migration For Privacy . . . . 17 91 6.6. Processing Queries in Parallel . . . . . . . . . . . . . 17 92 6.7. Zone transfer . . . . . . . . . . . . . . . . . . . . . . 17 93 6.8. Flow Control Mechanisms . . . . . . . . . . . . . . . . . 18 94 7. Implementation Status . . . . . . . . . . . . . . . . . . . . 18 95 7.1. Performance Measurements . . . . . . . . . . . . . . . . 19 97 8. Security Considerations . . . . . . . . . . . . . . . . . . . 20 98 9. Privacy Considerations . . . . . . . . . . . . . . . . . . . 20 99 9.1. Privacy Issues With 0-RTT data . . . . . . . . . . . . . 20 100 9.2. Privacy Issues With Session Resumption . . . . . . . . . 21 101 9.3. Privacy Issues With Address Validation Tokens . . . . . . 22 102 9.4. Privacy Issues With Long Duration Sessions . . . . . . . 22 103 9.5. Traffic Analysis . . . . . . . . . . . . . . . . . . . . 23 104 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 105 10.1. Registration of DoQ Identification String . . . . . . . 23 106 10.2. Reservation of Dedicated Port . . . . . . . . . . . . . 23 107 10.2.1. Port number 784 for experimentations . . . . . . . . 24 108 10.3. Reservation of Extended DNS Error Code Too Early . . . . 24 109 10.4. DNS over QUIC Error Codes Registry . . . . . . . . . . . 25 110 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26 111 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 112 12.1. Normative References . . . . . . . . . . . . . . . . . . 27 113 12.2. Informative References . . . . . . . . . . . . . . . . . 29 114 Appendix A. The NOTIFY Service . . . . . . . . . . . . . . . . . 30 115 Appendix B. Notable Changes From Previous Versions . . . . . . . 31 116 B.1. Stream Mapping Incompatibility With Draft-02 . . . . . . 31 117 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 119 1. Introduction 121 Domain Name System (DNS) concepts are specified in "Domain names - 122 concepts and facilities" [RFC1034]. The transmission of DNS queries 123 and responses over UDP and TCP is specified in "Domain names - 124 implementation and specification" [RFC1035]. 126 This document presents a mapping of the DNS protocol over the QUIC 127 transport [RFC9000] [RFC9001]. DNS over QUIC is referred here as 128 DoQ, in line with "DNS Terminology" [I-D.ietf-dnsop-rfc8499bis]. 130 The goals of the DoQ mapping are: 132 1. Provide the same DNS privacy protection as DNS over TLS (DoT) 133 [RFC7858]. This includes an option for the client to 134 authenticate the server by means of an authentication domain name 135 as specified in "Usage Profiles for DNS over TLS and DNS over 136 DTLS" [RFC8310]. 138 2. Provide an improved level of source address validation for DNS 139 servers compared to classic DNS over UDP. 141 3. Provide a transport that is not constrained by path MTU 142 limitations on the size of DNS responses it can send. 144 In order to achieve these goals, and to support ongoing work on 145 encryption of DNS, the scope of this document includes 147 * the "stub to recursive resolver" scenario 149 * the "recursive resolver to authoritative nameserver" scenario and 151 * the "nameserver to nameserver" scenario (mainly used for zone 152 transfers (XFR) [RFC1995], [RFC5936]). 154 In other words, this document specifies QUIC as a general-purpose 155 transport for DNS. 157 The specific non-goals of this document are: 159 1. No attempt is made to evade potential blocking of DNS over QUIC 160 traffic by middleboxes. 162 2. No attempt to support server-initiated transactions, which are 163 used only in DNS Stateful Operations (DSO) [RFC8490]. 165 Specifying the transmission of an application over QUIC requires 166 specifying how the application's messages are mapped to QUIC streams, 167 and generally how the application will use QUIC. This is done for 168 HTTP in "Hypertext Transfer Protocol Version 3 169 (HTTP/3)"[I-D.ietf-quic-http]. The purpose of this document is to 170 define the way DNS messages can be transmitted over QUIC. 172 DNS over HTTP [RFC8484] can be used with HTTP/3 to get some of the 173 benefits of QUIC. However, a lightweight direct mapping for DNS over 174 QUIC can be regarded as a more natural fit for both the recursive to 175 authoritative and zone transfer scenarios which rarely involve 176 intermediaries. In these scenarios, the additional overhead of HTTP 177 is not offset by, e.g., benefits of HTTP proxying and caching 178 behavior. 180 In this document, Section 4 presents the reasoning that guided the 181 proposed design. Section 5 specifies the actual mapping of DoQ. 182 Section 6 presents guidelines on the implementation, usage and 183 deployment of DoQ. 185 2. Key Words 187 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 188 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 189 "OPTIONAL" in this document are to be interpreted as described in BCP 190 14 [RFC2119] [RFC8174] when, and only when, they appear in all 191 capitals, as shown here. 193 3. Document work via GitHub 195 (RFC EDITOR NOTE: THIS SECTION TO BE REMOVED BEFORE PUBLICATION)The 196 Github repository for this document is at https://github.com/huitema/ 197 dnsoquic. Proposed text and editorial changes are very much welcomed 198 there, but any functional changes should always first be discussed on 199 the IETF DPRIVE WG (dns-privacy) mailing list. 201 4. Design Considerations 203 This section and its subsections present the design guidelines that 204 were used for DoQ. Whilst all other sections in this document are 205 normative, this section is informative in nature. 207 4.1. Provide DNS Privacy 209 DoT [RFC7858] defines how to mitigate some of the issues described in 210 "DNS Privacy Considerations" [RFC9076] by specifying how to transmit 211 DNS messages over TLS. The "Usage Profiles for DNS over TLS and DNS 212 over DTLS" [RFC8310] specify Strict and Opportunistic Usage Profiles 213 for DoT including how stub resolvers can authenticate recursive 214 resolvers. 216 QUIC connection setup includes the negotiation of security parameters 217 using TLS, as specified in "Using TLS to Secure QUIC" [RFC9001], 218 enabling encryption of the QUIC transport. Transmitting DNS messages 219 over QUIC will provide essentially the same privacy protections as 220 DoT [RFC7858] including Strict and Opportunistic Usage Profiles 221 [RFC8310]. Further discussion on this is provided in Section 9. 223 4.2. Design for Minimum Latency 225 QUIC is specifically designed to reduce protocol-induced delays, with 226 features such as: 228 1. Support for 0-RTT data during session resumption. 230 2. Support for advanced packet loss recovery procedures as specified 231 in "QUIC Loss Detection and Congestion Control" [RFC9002]. 233 3. Mitigation of head-of-line blocking by allowing parallel delivery 234 of data on multiple streams. 236 This mapping of DNS to QUIC will take advantage of these features in 237 three ways: 239 1. Optional support for sending 0-RTT data during session resumption 240 (the security and privacy implications of this are discussed in 241 later sections). 243 2. Long-lived QUIC connections over which multiple DNS transactions 244 are performed, generating the sustained traffic required to 245 benefit from advanced recovery features. 247 3. Mapping of each DNS Query/Response transaction to a separate 248 stream, to mitigate head-of-line blocking. This enables servers 249 to respond to queries "out of order". It also enables clients to 250 process responses as soon as they arrive, without having to wait 251 for in order delivery of responses previously posted by the 252 server. 254 These considerations are reflected in the mapping of DNS traffic to 255 QUIC streams in Section 5.2. 257 4.3. Middlebox Considerations 259 Using QUIC might allow a protocol to disguise its purpose from 260 devices on the network path using encryption and traffic analysis 261 resistance techniques like padding. This specification does not 262 include any measures that are designed to avoid such classification. 263 Consequently, firewalls and other middleboxes might be able to 264 distinguish DoQ from other protocols that use QUIC, like HTTP, and 265 apply different treatment. 267 The lack of measures in this specification to avoid protocol 268 classification is not an endorsement of such practices. 270 4.4. No Server-Initiated Transactions 272 As stated in Section 1, this document does not specify support for 273 server-initiated transactions within established DoQ connections. 274 That is, only the initiator of the DoQ connection may send queries 275 over the connection. 277 DSO does support server-initiated transactions within existing 278 connections. However, DoQ as defined here does not meet the criteria 279 for an applicable transport for DSO because it does not guarantee in- 280 order delivery of messages, see Section 4.2 of [RFC8490]. 282 5. Specifications 283 5.1. Connection Establishment 285 DoQ connections are established as described in the QUIC transport 286 specification [RFC9000]. During connection establishment, DoQ 287 support is indicated by selecting the ALPN token "doq" in the crypto 288 handshake. 290 5.1.1. Draft Version Identification 292 (RFC EDITOR NOTE: THIS SECTION TO BE REMOVED BEFORE PUBLICATION) Only 293 implementations of the final, published RFC can identify themselves 294 as "doq". Until such an RFC exists, implementations MUST NOT 295 identify themselves using this string. 297 Implementations of draft versions of the protocol MUST add the string 298 "-" and the corresponding draft number to the identifier. For 299 example, draft-ietf-dprive-dnsoquic-00 is identified using the string 300 "doq-i00". 302 5.1.2. Port Selection 304 By default, a DNS server that supports DoQ MUST listen for and accept 305 QUIC connections on the dedicated UDP port TBD (number to be defined 306 in Section 10), unless there is a mutual agreement to use another 307 port. 309 By default, a DNS client desiring to use DoQ with a particular server 310 MUST establish a QUIC connection to UDP port TBD on the server, 311 unless there is a mutual agreement to use another port. 313 DoQ connections MUST NOT use UDP port 53. This recommendation 314 against use of port 53 for DoQ is to avoid confusion between DoQ and 315 the use of DNS over UDP [RFC1035]. 317 In the stub to recursive scenario, the use of port 443 as a mutually 318 agreed alternative port can be operationally beneficial, since port 319 443 is less likely to be blocked than other ports. Several 320 mechanisms for stubs to discover recursives offering encrypted 321 transports, including the use of custom ports, are the subject of 322 ongoing work. 324 5.2. Stream Mapping and Usage 326 The mapping of DNS traffic over QUIC streams takes advantage of the 327 QUIC stream features detailed in Section 2 of [RFC9000], the QUIC 328 transport specification. 330 DNS traffic follows a simple pattern in which the client sends a 331 query, and the server provides one or more responses (multiple 332 responses can occur in zone transfers). 334 The mapping specified here requires that the client selects a 335 separate QUIC stream for each query. The server then uses the same 336 stream to provide all the response messages for that query. In order 337 that multiple responses can be parsed, a 2-octet length field is used 338 in exactly the same way as the 2-octet length field defined for DNS 339 over TCP [RFC1035]. The practical result of this is that the content 340 of each QUIC stream is exactly the same as the content of a TCP 341 connection that would manage exactly one query. 343 All DNS messages (queries and responses) sent over DoQ connections 344 MUST be encoded as a 2-octet length field followed by the message 345 content as specified in [RFC1035]. 347 The client MUST select the next available client-initiated 348 bidirectional stream for each subsequent query on a QUIC connection, 349 in conformance with the QUIC transport specification [RFC9000]. 351 The client MUST send the DNS query over the selected stream, and MUST 352 indicate through the STREAM FIN mechanism that no further data will 353 be sent on that stream. 355 The server MUST send the response(s) on the same stream and MUST 356 indicate, after the last response, through the STREAM FIN mechanism 357 that no further data will be sent on that stream. 359 Therefore, a single client-initiated DNS transaction consumes a 360 single stream. This means that the client's first query occurs on 361 QUIC stream 0, the second on 4, and so on. 363 Servers MAY defer processing of a query until the STREAM FIN has been 364 indicated on the stream selected by the client. Servers and clients 365 MAY monitor the number of "dangling" streams for which the expected 366 queries or responses have been received but not the STREAM FIN. 367 Implementations MAY impose a limit on the number of such dangling 368 streams. If limits are encountered, implementations MAY close the 369 connection. 371 5.2.1. DNS Message IDs 373 When sending queries over a QUIC connection, the DNS Message ID MUST 374 be set to zero. The stream mapping for DoQ allows for unambiguous 375 correlation of queries and responses and so the Message ID field is 376 not required. 378 This has implications for proxying DoQ message to and from other 379 transports. For example, proxies may have to manage the fact that 380 DoQ can support a larger number of outstanding queries on a single 381 connection than e.g., DNS over TCP because DoQ is not limited by the 382 Message ID space. This issue already exists for DoH, where a Message 383 ID of 0 is recommended. 385 When forwarding a DNS message from DoQ over another transport, a DNS 386 Message ID MUST be generated according to the rules of the protocol 387 that is in use. When forwarding a DNS message from another transport 388 over DoQ, the Message ID MUST be set to zero. 390 5.3. DoQ Error Codes 392 The following error codes are defined for use when abruptly 393 terminating streams, aborting reading of streams, or immediately 394 closing connections: 396 DOQ_NO_ERROR (0x0): No error. This is used when the connection or 397 stream needs to be closed, but there is no error to signal. 399 DOQ_INTERNAL_ERROR (0x1): The DoQ implementation encountered an 400 internal error and is incapable of pursuing the transaction or the 401 connection. 403 DOQ_PROTOCOL_ERROR (0x2): The DoQ implementation encountered an 404 protocol error and is forcibly aborting the connection. 406 DOQ_REQUEST_CANCELLED (0x3): A DoQ client uses this to signal that 407 it wants to cancel an outstanding transaction. 409 DOQ_EXCESSIVE_LOAD (0x4): A DoQ implementation uses this to signal 410 when closing a connection due to excessive load. 412 DOQ_ERROR_RESERVED (0xd098ea5e): Alternative error code used for 413 tests. 415 See Section 10.4 for details on registering new error codes. 417 5.3.1. Transaction Cancellation 419 In QUIC, sending STOP_SENDING requests that a peer cease transmission 420 on a stream. If a DoQ client wishes to cancel an outstanding 421 request, it MUST issue a QUIC Stop Sending with error code 422 DOQ_REQUEST_CANCELLED. This may be sent at any time but will be 423 ignored if the server response has already been acknowledged. The 424 corresponding DNS transaction MUST be abandoned. 426 Servers that receive STOP_SENDING act in accordance with Section 3.5 427 of [RFC9000]. Servers MAY impose implementation limits on the total 428 number or rate of request cancellations. If limits are encountered, 429 servers MAY close the connection. In this case, servers wanting to 430 help client debugging MAY use the error code DOQ_EXCESSIVE_LOAD. 431 There is always a trade-off between helping good faith clients debug 432 issues and allowing denial-of-service attackers to test server 433 defenses, so depending on circumstances servers might very well chose 434 to send different error codes. 436 Note that this mechanism provides a way for secondaries to cancel a 437 single zone transfer occurring on a given stream without having to 438 close the QUIC connection. 440 5.3.2. Transaction Errors 442 Servers normally complete transactions by sending a DNS response (or 443 responses) on the transaction's stream, including cases where the DNS 444 response indicates a DNS error. For example, a Server Failure 445 (SERVFAIL, [RFC1035]) SHOULD be notified to the client by sending 446 back a response with the Response Code set to SERVFAIL. 448 If a server is incapable of sending a DNS response due to an internal 449 error, it SHOULD issue a QUIC Stream Reset. The error code SHOULD be 450 set to DOQ_INTERNAL_ERROR. The corresponding DNS transaction MUST be 451 abandoned. Clients MAY limit the number of unsolicited QUIC Stream 452 Resets received on a connection before choosing to close the 453 connection. 455 Note that this mechanism provides a way for primaries to abort a 456 single zone transfer occurring on a given stream without having to 457 close the QUIC connection. 459 5.3.3. Protocol Errors 461 Other error scenarios can occur due to malformed, incomplete or 462 unexpected messages during a transaction. These include (but are not 463 limited to) 465 * a client or server receives a message with a non-zero Message ID 467 * a client or server receives a STREAM FIN before receiving all the 468 bytes for a message indicated in the 2-octet length field 470 * a client receives a STREAM FIN before receiving all the expected 471 responses 473 * a server receives more than one query on a stream 474 * a client receives a different number of responses on a stream than 475 expected (e.g. multiple responses to a query for an A record) 477 * a client receives a STOP_SENDING request 479 * the client or server does not indicate the expected STREAM FIN 480 after sending requests or responses (see Section 5.2). 482 * an implementation receives a message containing the edns-tcp- 483 keepalive EDNS(0) Option [RFC7828] (see Section 6.5.2) 485 * a client or a server attempts to open a unidirectional QUIC stream 487 * a server attempts to open a server-initiated bidirectional QUIC 488 stream 490 If a peer encounters such an error condition it is considered a fatal 491 error. It SHOULD forcibly abort the connection using QUIC's 492 CONNECTION_CLOSE mechanism, and SHOULD use the DoQ error code 493 DOQ_PROTOCOL_ERROR. 495 It is noted that the restrictions on use of the above EDNS(0) options 496 has implications for proxying message from TCP/DoT/DoH over DoQ. 498 5.3.4. Alternative error codes 500 This specification suggests specific error codes Section 5.3.1, 501 Section 5.3.2, and Section 5.3.3. These error codes are meant to 502 facilitate investigation of failures and other incidents. New error 503 codes may be defined in future versions of DoQ, or registered as 504 specified in Section 10.4. 506 Because new error codes can be defined without negotiation, use of an 507 error code in an unexpected context or receipt of an unknown error 508 code MUST be treated as equivalent to DOQ_NO_ERROR. 510 Implementations MAY wish to test the support for the error code 511 extension mechanism by using error codes not listed in this document, 512 or they MAY use DOQ_ERROR_RESERVED. 514 5.4. Connection Management 516 Section 10 of [RFC9000], the QUIC transport specification, specifies 517 that connections can be closed in three ways: 519 * idle timeout 521 * immediate close 522 * stateless reset 524 Clients and servers implementing DoQ SHOULD negotiate use of the idle 525 timeout. Closing on idle timeout is done without any packet 526 exchange, which minimizes protocol overhead. Per Section 10.1 of 527 [RFC9000], the QUIC transport specification, the effective value of 528 the idle timeout is computed as the minimum of the values advertised 529 by the two endpoints. Practical considerations on setting the idle 530 timeout are discussed in Section 6.5.2. 532 Clients SHOULD monitor the idle time incurred on their connection to 533 the server, defined by the time spent since the last packet from the 534 server has been received. When a client prepares to send a new DNS 535 query to the server, it will check whether the idle time is 536 sufficient lower than the idle timer. If it is, the client will send 537 the DNS query over the existing connection. If not, the client will 538 establish a new connection and send the query over that connection. 540 Clients MAY discard their connections to the server before the idle 541 timeout expires. A client that has outstanding queries SHOULD close 542 the connection explicitly using QUIC's CONNECTION_CLOSE mechanism and 543 the DoQ error code DOQ_NO_ERROR. 545 Clients and servers MAY close the connection for a variety of other 546 reasons, indicated using QUIC's CONNECTION_CLOSE. Client and servers 547 that send packets over a connection discarded by their peer MAY 548 receive a stateless reset indication. If a connection fails, all the 549 in progress transaction on that connection MUST be abandoned. 551 5.5. Session Resumption and 0-RTT 553 A client MAY take advantage of the session resumption mechanisms 554 supported by QUIC transport [RFC9000] and QUIC TLS [RFC9001]. 555 Clients SHOULD consider potential privacy issues associated with 556 session resumption before deciding to use this mechanism. These 557 privacy issues are detailed in Section 9.2 and Section 9.1, and the 558 implementation considerations are discussed in Section 6.5.3. 560 The 0-RTT mechanism SHOULD NOT be used to send DNS requests that are 561 not "replayable" transactions. In this specification, only 562 transactions that have an OPCODE of QUERY or NOTIFY are considered 563 replayable and MAY be sent in 0-RTT data. See Appendix A for a 564 detailed discussion of why NOTIFY is included here. 566 Servers MUST NOT execute non replayable transactions received in 567 0-RTT data. Servers MUST adopt one of the following behaviors: 569 * Queue the offending transaction and only execute it after the QUIC 570 handshake has been completed, as defined in Section 4.1.1 of 571 [RFC9001]. 573 * Reply to the offending transaction with a response code REFUSED 574 and an Extended DNS Error Code (EDE) "Too Early", see 575 Section 10.3. 577 * Close the connection with the error code DOQ_PROTOCOL_ERROR. 579 5.6. Message Sizes 581 DoQ Queries and Responses are sent on QUIC streams, which in theory 582 can carry up to 2^62 bytes. However, DNS messages are restricted in 583 practice to a maximum size of 65535 bytes. This maximum size is 584 enforced by the use of a two-octet message length field in DNS over 585 TCP [RFC1035] and DNS over TLS [RFC7858], and by the definition of 586 the "application/dns-message" for DNS over HTTP [RFC8484]. DoQ 587 enforces the same restriction. 589 The Extension Mechanisms for DNS (EDNS) [RFC6891] allow peers to 590 specify the UDP message size. This parameter is ignored by DoQ. DoQ 591 implementations always assume that the maximum message size is 65535 592 bytes. 594 6. Implementation Requirements 596 6.1. Authentication 598 For the stub to recursive resolver scenario, the authentication 599 requirements are the same as described in DoT [RFC7858] and "Usage 600 Profiles for DNS over TLS and DNS over DTLS" [RFC8310]. [RFC8932] 601 states that DNS privacy services SHOULD provide credentials that 602 clients can use to authenticate the server. Given this, and to align 603 with the authentication model for DoH, DoQ stubs SHOULD use a Strict 604 authentication profile. Client authentication for the encrypted stub 605 to recursive scenario is not described in any DNS RFC. 607 For zone transfer, the requirements are the same as described in 608 [RFC9103]. 610 For the recursive resolver to authoritative nameserver scenario, 611 authentication requirements are unspecified at the time of writing 612 and are the subject on ongoing work in the DPRIVE WG. 614 6.2. Fallback to Other Protocols on Connection Failure 616 If the establishment of the DoQ connection fails, clients MAY attempt 617 to fall back to DoT and then potentially clear text, as specified in 618 DoT [RFC7858] and "Usage Profiles for DNS over TLS and DNS over DTLS" 619 [RFC8310], depending on their privacy profile. 621 DNS clients SHOULD remember server IP addresses that don't support 622 DoQ. Timeouts, connection refusals, and QUIC handshake failures are 623 valid indicators that a server does not support DoQ. Clients SHOULD 624 NOT attempt DoQ queries to a server that does not support DoQ for a 625 reasonable period (such as one hour per server). DNS clients 626 following an out-of-band key-pinned privacy profile ([RFC7858]) MAY 627 be more aggressive about retrying DoQ connection failures. 629 6.3. Address Validation 631 Section 8 of [RFC9000], the QUIC transport specification, defines 632 Address Validation procedures to avoid servers being used in address 633 amplification attacks. DoQ implementations MUST conform to this 634 specification, which limits the worst case amplification to a factor 635 3. 637 DoQ implementations SHOULD consider configuring servers to use the 638 Address Validation using Retry Packets procedure defined in 639 Section 8.1.2 of [RFC9000], the QUIC transport specification. This 640 procedure imposes a 1-RTT delay for verifying the return routability 641 of the source address of a client, similar to the DNS Cookies 642 mechanism [RFC7873]. 644 DoQ implementations that configure Address Validation using Retry 645 Packets SHOULD implement the Address Validation for Future 646 Connections procedure defined in Section 8.1.3 of [RFC9000], the QUIC 647 transport specification. This defines how servers can send NEW_TOKEN 648 frames to clients after the client address is validated, in order to 649 avoid the 1-RTT penalty during subsequent connections by the client 650 from the same address. 652 6.4. Padding 654 Implementations MUST protect against the traffic analysis attacks 655 described in Section 9.5 by the judicious injection of padding. This 656 could be done either by padding individual DNS messages using the 657 EDNS(0) Padding Option [RFC7830] or by padding QUIC packets (see 658 Section 8.6 of [RFC9000], the QUIC transport specification. 660 In theory, padding at the QUIC level could result in better 661 performance for the equivalent protection, because the amount of 662 padding can take into account non-DNS frames such as acknowledgements 663 or flow control updates, and also because QUIC packets can carry 664 multiple DNS messages. However, applications can only control the 665 amount of padding in QUIC packets if the implementation of QUIC 666 exposes adequate APIs. This leads to the following recommendation: 668 * if the implementation of QUIC exposes APIs to set a padding 669 policy, DNS over QUIC SHOULD use that API to align the packet 670 length to a small set of fixed sizes. 672 * if padding at the QUIC level is not available or not used, DNS 673 over QUIC MUST ensure that all DNS queries and responses are 674 padded to a small set of fixed sizes, using the EDNS(0) padding 675 extension as specified in [RFC7830]. 677 Implementation might choose not to use a QUIC API for padding if it 678 is significantly simpler to re-use existing DNS message padding logic 679 which is applied to other encrypted transports. 681 In the absence of a standard policy for padding sizes, 682 implementations should consider following the recommendations of the 683 Experimental status "Padding Policies for Extension Mechanisms for 684 DNS (EDNS(0))" [RFC8467]. 686 6.5. Connection Handling 688 "DNS Transport over TCP - Implementation Requirements" [RFC7766] 689 provides updated guidance on DNS over TCP, some of which is 690 applicable to DoQ. This section provides similar advice on 691 connection handling for DoQ. 693 6.5.1. Connection Reuse 695 Historic implementations of DNS clients are known to open and close 696 TCP connections for each DNS query. To amortize connection setup 697 costs, both clients and servers SHOULD support connection reuse by 698 sending multiple queries and responses over a single persistent QUIC 699 connection. 701 In order to achieve performance on par with UDP, DNS clients SHOULD 702 send their queries concurrently over the QUIC streams on a QUIC 703 connection. That is, when a DNS client sends multiple queries to a 704 server over a QUIC connection, it SHOULD NOT wait for an outstanding 705 reply before sending the next query. 707 6.5.2. Resource Management 709 Proper management of established and idle connections is important to 710 the healthy operation of a DNS server. 712 An implementation of DoQ SHOULD follow best practices similar to 713 those specified for DNS over TCP [RFC7766], in particular with regard 714 to: 716 * Concurrent Connections (Section 6.2.2 of [RFC7766], updated by 717 Section 6.4 of [RFC9103]) 719 * Security Considerations (Section 10 of [RFC7766]) 721 Failure to do so may lead to resource exhaustion and denial of 722 service. 724 Clients that want to maintain long duration DoQ connections SHOULD 725 use the idle timeout mechanisms defined in Section 10.1 of [RFC9000], 726 the QUIC transport specification. Clients and servers MUST NOT send 727 the edns-tcp-keepalive EDNS(0) Option [RFC7828] in any messages sent 728 on a DoQ connection (because it is specific to the use of TCP/TLS as 729 a transport). 731 This document does not make specific recommendations for timeout 732 values on idle connections. Clients and servers should reuse and/or 733 close connections depending on the level of available resources. 734 Timeouts may be longer during periods of low activity and shorter 735 during periods of high activity. 737 6.5.3. Using 0-RTT and Session Resumption 739 Using 0-RTT for DNS over QUIC has many compelling advantages. 740 Clients can establish connections and send queries without incurring 741 a connection delay. Servers can thus negotiate low values of the 742 connection timers, which reduces the total number of connections that 743 they need to manage. They can do that because the clients that use 744 0-RTT will not incur latency penalties if new connections are 745 required for a query. 747 Session resumption and 0-RTT data transmission create privacy risks 748 detailed in detailed in Section 9.2 and Section 9.1. The following 749 recommendations are meant to reduce the privacy risks while enjoying 750 the performance benefits of 0-RTT data, with the restriction 751 specified in Section 5.5. 753 Clients SHOULD use resumption tickets only once, as specified in 754 Appendix C.4 to [RFC8446]. By default, clients SHOULD NOT use 755 session resumption if the client's connectivity has changed. 757 Clients could receive address validation tokens from the server using 758 the NEW_TOKEN mechanism; see Section 8 of [RFC9000]. The associated 759 tracking risks are mentioned in Section 9.3. Clients SHOULD only use 760 the address validation tokens when they are also using session 761 resumption, thus avoiding additional tracking risks. 763 Servers SHOULD issue session resumption tickets with a sufficiently 764 long life time (e.g., 6 hours), so that clients are not tempted to 765 either keep connection alive or frequently poll the server to renew 766 session resumption tickets. Servers SHOULD implement the anti-replay 767 mechanisms specified in Section 8 of [RFC8446]. 769 6.5.4. Controlling Connection Migration For Privacy 771 DoQ implementation might consider using the connection migration 772 features defined in Section 9 of [RFC9000]. These features enable 773 connections to continue operating as the client's connectivity 774 changes. As detailed in Section 9.4, these features trade off 775 privacy for latency. By default, clients SHOULD be configured to 776 prioritize privacy and start new sessions if their connectivity 777 changes. 779 6.6. Processing Queries in Parallel 781 As specified in Section 7 of [RFC7766] "DNS Transport over TCP - 782 Implementation Requirements", resolvers are RECOMMENDED to support 783 the preparing of responses in parallel and sending them out of order. 784 In DoQ, they do that by sending responses on their specific stream as 785 soon as possible, without waiting for availability of responses for 786 previously opened streams. 788 6.7. Zone transfer 790 [RFC9103] specifies zone transfer over TLS (XoT) and includes updates 791 to [RFC1995] (IXFR), [RFC5936] (AXFR) and [RFC7766]. Considerations 792 relating to the re-use of XoT connections described there apply 793 analogously to zone transfers performed using DoQ connections. For 794 example: 796 * DoQ servers MUST be able to handle multiple concurrent IXFR 797 requests on a single QUIC connection 799 * DoQ servers MUST be able to handle multiple concurrent AXFR 800 requests on a single QUIC connection 802 * DoQ implementations SHOULD 804 - use the same QUIC connection for both AXFR and IXFR requests to 805 the same primary 807 - pipeline such requests (if they pipeline XFR requests in 808 general) and MAY intermingle them 810 - send the response(s) for each request as soon as they are 811 available i.e. responses MAY be sent intermingled 813 6.8. Flow Control Mechanisms 815 Servers and Clients manage flow control using the mechanisms defined 816 in Section 4 of [RFC9000]. These mechanisms allow clients and 817 servers to specify how many streams can be created, how much data can 818 be sent on a stream, and how much data can be sent on the union of 819 all streams. For DNS over QUIC, controlling how many streams are 820 created allows servers to control how many new requests the client 821 can send on a given connection. 823 Flow control exists to protect endpoint resources. For servers, 824 global and per-stream flow control limits control how much data can 825 be sent by clients. The same mechanisms allow clients to control how 826 much data can be sent by servers. Values that are too small will 827 unnecessarily limit performance. Values that are too large might 828 expose endpoints to overload or memory exhaustion. Implementations 829 or deployments will need to adjust flow control limits to balance 830 these concerns. In particular, zone transfer implementations will 831 need to control these limits carefully to ensure both large and 832 concurrent zone transfers are well managed. 834 Initial values of parameters control how many requests and how much 835 data can be sent by clients and servers at the beginning of the 836 connection. These values are specified in transport parameters 837 exchanged during the connection handshake. The parameter values 838 received in the initial connection also control how many requests and 839 how much data can be sent by clients using 0-RTT data in a resumed 840 connection. Using too small values of these initial parameters would 841 restrict the usefulness of allowing 0-RTT data. 843 7. Implementation Status 845 (RFC EDITOR NOTE: THIS SECTION TO BE REMOVED BEFORE PUBLICATION) This 846 section records the status of known implementations of the protocol 847 defined by this specification at the time of posting of this 848 Internet-Draft, and is based on a proposal described in [RFC7942]. 850 1. AdGuard launched a DoQ recursive resolver service in December 851 2020. They have released a suite of open source tools that 852 support DoQ: 854 1. AdGuard C++ DNS libraries (https://github.com/AdguardTeam/ 855 DnsLibs) A DNS proxy library that supports all existing DNS 856 protocols including DNS-over-TLS, DNS-over-HTTPS, DNSCrypt 857 and DNS-over-QUIC (experimental). 859 2. DNS Proxy (https://github.com/AdguardTeam/dnsproxy) A simple 860 DNS proxy server that supports all existing DNS protocols 861 including DNS-over-TLS, DNS-over-HTTPS, DNSCrypt, and DNS- 862 over-QUIC. Moreover, it can work as a DNS-over-HTTPS, DNS- 863 over-TLS or DNS-over-QUIC server. 865 3. CoreDNS fork for AdGuard DNS (https://github.com/AdguardTeam/ 866 coredns) Includes DNS-over-QUIC server-side support. 868 4. dnslookup (https://github.com/ameshkov/dnslookup) Simple 869 command line utility to make DNS lookups. Supports all known 870 DNS protocols: plain DNS, DoH, DoT, DoQ, DNSCrypt. 872 2. Quicdoq (https://github.com/private-octopus/quicdoq) Quicdoq is a 873 simple open source implementation of DoQ. It is written in C, 874 based on Picoquic (https://github.com/private-octopus/picoquic). 876 3. Flamethrower (https://github.com/DNS-OARC/flamethrower/tree/dns- 877 over-quic) is an open source DNS performance and functional 878 testing utility written in C++ that has an experimental 879 implementation of DoQ. 881 4. aioquic (https://github.com/aiortc/aioquic) is an implementation 882 of QUIC in Python. It includes example client and server for 883 DoQ. 885 7.1. Performance Measurements 887 To the authors' knowledge, no benchmarking studies comparing DoT, DoH 888 and DoQ are published yet. However, anecdotal evidence from the 889 AdGuard DoQ recursive resolver deployment 890 (https://adguard.com/en/blog/dns-over-quic.html) indicates that it 891 performs similarly (and possibly better) compared to the other 892 encrypted protocols, particularly in mobile environments. Reasons 893 given for this include that DoQ 895 * Uses less bandwidth due to a more efficient handshake (and due to 896 less per message overhead when compared to DoH). 898 * Performs better in mobile environments due to the increased 899 resilience to packet loss 901 * Can maintain connections as users move between mobile networks via 902 its connection management 904 8. Security Considerations 906 The security considerations of DoQ should be comparable to those of 907 DoT [RFC7858]. 909 9. Privacy Considerations 911 The general considerations of encrypted transports provided in "DNS 912 Privacy Considerations" [RFC9076] apply to DoQ. The specific 913 considerations provided there do not differ between DoT and DoQ, and 914 are not discussed further here. Similarly, "Recommendations for DNS 915 Privacy Service Operators" [RFC8932] (which covers operational, 916 policy, and security considerations for DNS privacy services) is also 917 applicable to DoQ services. 919 QUIC incorporates the mechanisms of TLS 1.3 [RFC8446] and this 920 enables QUIC transmission of "0-RTT" data. This can provide 921 interesting latency gains, but it raises two concerns: 923 1. Adversaries could replay the 0-RTT data and infer its content 924 from the behavior of the receiving server. 926 2. The 0-RTT mechanism relies on TLS session resumption, which can 927 provide linkability between successive client sessions. 929 These issues are developed in Section 9.1 and Section 9.2. 931 9.1. Privacy Issues With 0-RTT data 933 The 0-RTT data can be replayed by adversaries. That data may trigger 934 queries by a recursive resolver to authoritative resolvers. 935 Adversaries may be able to pick a time at which the recursive 936 resolver outgoing traffic is observable, and thus find out what name 937 was queried for in the 0-RTT data. 939 This risk is in fact a subset of the general problem of observing the 940 behavior of the recursive resolver discussed in "DNS Privacy 941 Considerations" [RFC9076]. The attack is partially mitigated by 942 reducing the observability of this traffic. The mandatory replay 943 protection mechanisms in TLS 1.3 [RFC8446] limit but do not eliminate 944 the risk of replay. 0-RTT packets can only be replayed within a 945 narrow window, which is only wide enough to account for variations in 946 clock skew and network transmission. 948 The recommendation for TLS 1.3 [RFC8446] is that the capability to 949 use 0-RTT data should be turned off by default, and only enabled if 950 the user clearly understands the associated risks. In the case of 951 DoQ, allowing 0-RTT data provides significant performance gains, and 952 there is a concern that a recommendation to not use it would simply 953 be ignored. Instead, a set of practical recommendations is provided 954 in Section 5.5 and Section 6.5.3. 956 The prevention on allowing replayable transactions in 0-RTT data 957 expressed in Section 5.5 blocks the most obvious risks of replay 958 attacks, as it only allows for transactions that will not change the 959 long-term state of the server. 961 The attacks described above apply to the stub resolver to recursive 962 resolver scenario, but similar attacks might be envisaged in the 963 recursive resolver to authoritative resolver scenario, and the same 964 mitigations apply. 966 9.2. Privacy Issues With Session Resumption 968 The QUIC session resumption mechanism reduces the cost of re- 969 establishing sessions and enables 0-RTT data. There is a linkability 970 issue associated with session resumption, if the same resumption 971 token is used several times. Attackers on path between client and 972 server could observe repeated usage of the token and use that to 973 track the client over time or over multiple locations. 975 The session resumption mechanism allows servers to correlate the 976 resumed sessions with the initial sessions, and thus to track the 977 client. This creates a virtual long duration session. The series of 978 queries in that session can be used by the server to identify the 979 client. Servers can most probably do that already if the client 980 address remains constant, but session resumption tickets also enable 981 tracking after changes of the client's address. 983 The recommendations in Section 6.5.3 are designed to mitigate these 984 risks. Using session tickets only once mitigates the risk of 985 tracking by third parties. Refusing to resume a session if addresses 986 change mitigates the risk of tracking by the server. 988 The privacy trade-offs here may be context specific. Stub resolvers 989 will have a strong motivation to prefer privacy over latency since 990 they often change location. However, recursive resolvers that use a 991 small set of static IP addresses are more likely to prefer the 992 reduced latency provided by session resumption and may consider this 993 a valid reason to use resumption tickets even if the IP address 994 changed between sessions. 996 Encrypted zone transfer (RFC9103) explicitly does not attempt to hide 997 the identity of the parties involved in the transfer, but at the same 998 time such transfers are not particularly latency sensitive. This 999 means that applications supporting zone transfers may decide to apply 1000 the same protections as stub to recursive applications. 1002 9.3. Privacy Issues With Address Validation Tokens 1004 QUIC specifies address validation mechanisms in Section 8 of 1005 [RFC9000]. Use of an address validation token allows QUIC servers to 1006 avoid an extra RTT for new connections. Address validation tokens 1007 are typically tied to an IP address. QUIC clients normally only use 1008 these tokens when setting up a new connection from a previously used 1009 address. However, clients are not always aware that they are using a 1010 new address. This could be due to NAT, or because the client does 1011 not have an API available to check if the IP address has changed 1012 (which can be quite often for IPv6). There is a linkability risk if 1013 clients mistakenly use address validation tokens after unknowingly 1014 moving to a new location. 1016 The recommendations in Section 6.5.3 mitigates this risk by tying the 1017 usage of the NEW_TOKEN to that of session resumption. 1019 9.4. Privacy Issues With Long Duration Sessions 1021 A potential alternative to session resumption is the use of long 1022 duration sessions: if a session remains open for a long time, new 1023 queries can be sent without incurring connection establishment 1024 delays. It is worth pointing out that the two solutions have similar 1025 privacy characteristics. Session resumption may allow servers to 1026 keep track of the IP addresses of clients, but long duration sessions 1027 have the same effect. 1029 In particular, a DoQ implementation might take advantage of the 1030 connection migration features of QUIC to maintain a session even if 1031 the client's connectivity changes, for example if the client migrates 1032 from a Wi-Fi connection to a cellular network connection, and then to 1033 another Wi-Fi connection. The server would be able to track the 1034 client location by monitoring the succession of IP addresses used by 1035 the long duration connection. 1037 The recommendation in Section 6.5.4 mitigates the privacy concerns 1038 related to long duration sessions using multiple client addresses. 1040 9.5. Traffic Analysis 1042 Even though QUIC packets are encrypted, adversaries can gain 1043 information from observing packet lengths, in both queries and 1044 responses, as well as packet timing. Many DNS requests are emitted 1045 by web browsers. Loading a specific web page may require resolving 1046 dozen of DNS names. If an application adopts a simple mapping of one 1047 query or response per packet, or "one QUIC STREAM frame per packet", 1048 then the succession of packet lengths may provide enough information 1049 to identify the requested site. 1051 Implementations SHOULD use the mechanisms defined in Section 6.4 to 1052 mitigate this attack. 1054 10. IANA Considerations 1056 10.1. Registration of DoQ Identification String 1058 This document creates a new registration for the identification of 1059 DoQ in the "Application Layer Protocol Negotiation (ALPN) Protocol 1060 IDs" registry [RFC7301]. 1062 The "doq" string identifies DoQ: 1064 Protocol: DoQ 1066 Identification Sequence: 0x64 0x6F 0x71 ("doq") 1068 Specification: This document 1070 10.2. Reservation of Dedicated Port 1072 For both TCP and UDP port 853 is currently reserved for 'DNS query- 1073 response protocol run over TLS/DTLS' [RFC7858]. 1075 However, the specification for DNS over DTLS (DoD) [RFC8094] is 1076 experimental, limited to stub to resolver, and no implementations or 1077 deployments currently exist to the authors' knowledge (even though 1078 several years have passed since the specification was published). 1080 This specification proposes to additionally reserve the use of UDP 1081 port 853 for DoQ. QUIC version 1 was designed to be able to co-exist 1082 with other protocols on the same port, including DTLS , see 1083 Section 17.2 of [RFC9000]. This means that deployments that serve 1084 DNS over DTLS and DNS over QUIC (QUIC version 1) on the same port 1085 will be able to demultiplex the two due to the second most 1086 significant bit in each UDP payload. Such deployments ought to check 1087 the signatures of future versions or extensions (e.g. 1088 [I-D.ietf-quic-bit-grease]) of QUIC and DTLS before deploying them to 1089 serve DNS on the same port. 1091 IANA is requested to update the following value in the "Service Name 1092 and Transport Protocol Port Number Registry" in the System Range. 1093 The registry for that range requires IETF Review or IESG Approval 1094 [RFC6335]. 1096 IANA responded to the early allocation request with the following 1097 TEMPORARY assignment: 1099 Service Name: domain-s 1101 Port Number: 853 1103 Transport Protocol(s): UDP 1105 Assignee: IETF DPRIVE Chairs 1107 Contact: Brian Haberman 1109 Description: DNS query-response protocol run over DTLS or QUIC 1111 Reference: [RFC7858][RFC8094] This document 1113 The TEMPORARY assignment expires 13th December 2022. 1115 Additionally, IANA is requested to update the Description field for 1116 the corresponding TCP port 853 allocation to be 'DNS query-response 1117 protocol run over TLS' for consistency and clarity. 1119 10.2.1. Port number 784 for experimentations 1121 (RFC EDITOR NOTE: THIS SECTION TO BE REMOVED BEFORE PUBLICATION) 1122 Early experiments MAY use port 784. This port is marked in the IANA 1123 registry as unassigned. 1125 (Note that version in -02 of this draft experiments were directed to 1126 use port 8853.) 1128 10.3. Reservation of Extended DNS Error Code Too Early 1130 IANA is requested to add the following value to the Extended DNS 1131 Error Codes registry [RFC8914]: 1133 INFO-CODE: TBD 1135 Purpose: Too Early 1137 Reference: This document 1139 10.4. DNS over QUIC Error Codes Registry 1141 IANA [SHALL add/has added] a registry for "DNS over QUIC Error Codes" 1142 on the "Domain Name System (DNS) Parameters" web page. 1144 The "DNS over QUIC Error Codes" registry governs a 62-bit space. 1145 This space is split into three regions that are governed by different 1146 policies: 1148 * Permanent registrations for values between 0x00 and 0x3f (in 1149 hexadecimal; inclusive), which are assigned using Standards Action 1150 or IESG Approval as defined in Section 4.9 and Section 4.10 of 1151 [RFC8126] 1153 * Permanent registrations for values larger than 0x3f, which are 1154 assigned using the Specification Required policy ([RFC8126]) 1156 * Provisional registrations for values larger than 0x3f, which 1157 require Expert Review, as defined in Section 4.5 of [RFC8126]. 1159 Provisional reservations share the range of values larger than 0x3f 1160 with some permanent registrations. This is by design, to enable 1161 conversion of provisional registrations into permanent registrations 1162 without requiring changes in deployed systems. (This design is 1163 aligned with the principles set in Section 22 of [RFC9000].) 1165 Registrations in this registry MUST include the following fields: 1167 Value: The assigned codepoint. 1169 Status: "Permanent" or "Provisional". 1171 Contact: Contact details for the registrant. 1173 Notes: Supplementary notes about the registration. 1175 In addition, permanent registrations MUST include: 1177 Error: A short mnemonic for the parameter. 1179 Specification: A reference to a publicly available specification for 1180 the value (optional for provisional registrations). 1182 Description: A brief description of the error code semantics, which 1183 MAY be a summary if a specification reference is provided. 1185 Provisional registrations of codepoints are intended to allow for 1186 private use and experimentation with extensions to DNS over QUIC. 1187 However, provisional registrations could be reclaimed and reassigned 1188 for another purpose. In addition to the parameters listed above, 1189 provisional registrations MUST include: 1191 Date: The date of last update to the registration. 1193 A request to update the date on any provisional registration can be 1194 made without review from the designated expert(s). 1196 The initial contents of this registry are shown in Table 1. 1198 +==========+=======================+================+===============+ 1199 |Value | Error |Description | Specification | 1200 +==========+=======================+================+===============+ 1201 |0x0 | DOQ_NO_ERROR |No error | Section 5.3 | 1202 +----------+-----------------------+----------------+---------------+ 1203 |0x1 | DOQ_INTERNAL_ERROR |Implementation | Section 5.3 | 1204 | | |error | | 1205 +----------+-----------------------+----------------+---------------+ 1206 |0x2 | DOQ_PROTOCOL_ERROR |Generic protocol| Section 5.3 | 1207 | | |violation | | 1208 +----------+-----------------------+----------------+---------------+ 1209 |0x3 | DOQ_REQUEST_CANCELLED |Request | Section 5.3 | 1210 | | |cancelled by | | 1211 | | |client | | 1212 +----------+-----------------------+----------------+---------------+ 1213 |0x4 | DOQ_EXCESSIVE_LOAD |Closing a | Section 5.3 | 1214 | | |connection for | | 1215 | | |excessive load | | 1216 +----------+-----------------------+----------------+---------------+ 1217 |0xd098ea5e| DOQ_ERROR_RESERVED |Alternative | Section 5.3 | 1218 | | |error code used | | 1219 | | |for tests | | 1220 +----------+-----------------------+----------------+---------------+ 1222 Table 1: Initial DNS over QUIC Error Codes Entries 1224 11. Acknowledgements 1226 This document liberally borrows text from the HTTP-3 specification 1227 [I-D.ietf-quic-http] edited by Mike Bishop, and from the DoT 1228 specification [RFC7858] authored by Zi Hu, Liang Zhu, John Heidemann, 1229 Allison Mankin, Duane Wessels, and Paul Hoffman. 1231 The privacy issue with 0-RTT data and session resumption were 1232 analyzed by Daniel Kahn Gillmor (DKG) in a message to the IETF 1233 "DPRIVE" working group [DNS0RTT]. 1235 Thanks to Tony Finch for an extensive review of the initial version 1236 of this draft, and to Robert Evans for the discussion of 0-RTT 1237 privacy issues. Reviews by Paul Hoffman and Martin Thomson and 1238 interoperability tests conducted by Stephane Bortzmeyer helped 1239 improve the definition of the protocol. 1241 12. References 1243 12.1. Normative References 1245 [I-D.ietf-dnsop-rfc8499bis] 1246 Hoffman, P. and K. Fujiwara, "DNS Terminology", Work in 1247 Progress, Internet-Draft, draft-ietf-dnsop-rfc8499bis-03, 1248 28 September 2021, . 1251 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1252 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1253 . 1255 [RFC1035] Mockapetris, P., "Domain names - implementation and 1256 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1257 November 1987, . 1259 [RFC1995] Ohta, M., "Incremental Zone Transfer in DNS", RFC 1995, 1260 DOI 10.17487/RFC1995, August 1996, 1261 . 1263 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1264 Requirement Levels", BCP 14, RFC 2119, 1265 DOI 10.17487/RFC2119, March 1997, 1266 . 1268 [RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol 1269 (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010, 1270 . 1272 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 1273 for DNS (EDNS(0))", STD 75, RFC 6891, 1274 DOI 10.17487/RFC6891, April 2013, 1275 . 1277 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 1278 "Transport Layer Security (TLS) Application-Layer Protocol 1279 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 1280 July 2014, . 1282 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 1283 D. Wessels, "DNS Transport over TCP - Implementation 1284 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 1285 . 1287 [RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 1288 edns-tcp-keepalive EDNS0 Option", RFC 7828, 1289 DOI 10.17487/RFC7828, April 2016, 1290 . 1292 [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, 1293 DOI 10.17487/RFC7830, May 2016, 1294 . 1296 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1297 and P. Hoffman, "Specification for DNS over Transport 1298 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1299 2016, . 1301 [RFC7873] Eastlake 3rd, D. and M. Andrews, "Domain Name System (DNS) 1302 Cookies", RFC 7873, DOI 10.17487/RFC7873, May 2016, 1303 . 1305 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1306 Writing an IANA Considerations Section in RFCs", BCP 26, 1307 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1308 . 1310 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1311 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1312 May 2017, . 1314 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 1315 for DNS over TLS and DNS over DTLS", RFC 8310, 1316 DOI 10.17487/RFC8310, March 2018, 1317 . 1319 [RFC8914] Kumari, W., Hunt, E., Arends, R., Hardaker, W., and D. 1320 Lawrence, "Extended DNS Errors", RFC 8914, 1321 DOI 10.17487/RFC8914, October 2020, 1322 . 1324 [RFC9000] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based 1325 Multiplexed and Secure Transport", RFC 9000, 1326 DOI 10.17487/RFC9000, May 2021, 1327 . 1329 [RFC9001] Thomson, M., Ed. and S. Turner, Ed., "Using TLS to Secure 1330 QUIC", RFC 9001, DOI 10.17487/RFC9001, May 2021, 1331 . 1333 [RFC9103] Toorop, W., Dickinson, S., Sahib, S., Aras, P., and A. 1334 Mankin, "DNS Zone Transfer over TLS", RFC 9103, 1335 DOI 10.17487/RFC9103, August 2021, 1336 . 1338 12.2. Informative References 1340 [DNS0RTT] Kahn Gillmor, D., "DNS + 0-RTT", Message to DNS-Privacy WG 1341 mailing list, 6 April 2016, . 1344 [I-D.ietf-quic-bit-grease] 1345 Thomson, M., "Greasing the QUIC Bit", Work in Progress, 1346 Internet-Draft, draft-ietf-quic-bit-grease-02, 10 November 1347 2021, . 1350 [I-D.ietf-quic-http] 1351 Bishop, M., "Hypertext Transfer Protocol Version 3 1352 (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf- 1353 quic-http-34, 2 February 2021, 1354 . 1357 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 1358 Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996, 1359 August 1996, . 1361 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 1362 Cheshire, "Internet Assigned Numbers Authority (IANA) 1363 Procedures for the Management of the Service Name and 1364 Transport Protocol Port Number Registry", BCP 165, 1365 RFC 6335, DOI 10.17487/RFC6335, August 2011, 1366 . 1368 [RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 1369 Code: The Implementation Status Section", BCP 205, 1370 RFC 7942, DOI 10.17487/RFC7942, July 2016, 1371 . 1373 [RFC8094] Reddy, T., Wing, D., and P. Patil, "DNS over Datagram 1374 Transport Layer Security (DTLS)", RFC 8094, 1375 DOI 10.17487/RFC8094, February 2017, 1376 . 1378 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1379 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1380 . 1382 [RFC8467] Mayrhofer, A., "Padding Policies for Extension Mechanisms 1383 for DNS (EDNS(0))", RFC 8467, DOI 10.17487/RFC8467, 1384 October 2018, . 1386 [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 1387 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 1388 . 1390 [RFC8490] Bellis, R., Cheshire, S., Dickinson, J., Dickinson, S., 1391 Lemon, T., and T. Pusateri, "DNS Stateful Operations", 1392 RFC 8490, DOI 10.17487/RFC8490, March 2019, 1393 . 1395 [RFC8932] Dickinson, S., Overeinder, B., van Rijswijk-Deij, R., and 1396 A. Mankin, "Recommendations for DNS Privacy Service 1397 Operators", BCP 232, RFC 8932, DOI 10.17487/RFC8932, 1398 October 2020, . 1400 [RFC9002] Iyengar, J., Ed. and I. Swett, Ed., "QUIC Loss Detection 1401 and Congestion Control", RFC 9002, DOI 10.17487/RFC9002, 1402 May 2021, . 1404 [RFC9076] Wicinski, T., Ed., "DNS Privacy Considerations", RFC 9076, 1405 DOI 10.17487/RFC9076, July 2021, 1406 . 1408 Appendix A. The NOTIFY Service 1410 This appendix discusses why it is considered acceptable to send 1411 NOTIFY (see [RFC1996]) in 0-RTT data. 1413 Section 5.5 says "The 0-RTT mechanism SHOULD NOT be used to send DNS 1414 requests that are not "replayable" transactions". This specification 1415 supports sending a NOTIFY in 0-RTT data because although a NOTIFY 1416 technically changes the state of the receiving server, the effect of 1417 replaying NOTIFYs has negligible impact in practice. 1419 NOTIFY messages prompt a secondary to either send an SOA query or an 1420 XFR request to the primary on the basis that a newer version of the 1421 zone is available. It has long been recognized that NOTIFYs can be 1422 forged and, in theory, used to cause a secondary to send repeated 1423 unnecessary requests to the primary. For this reason, most 1424 implementations have some form of throttling of the SOA/XFR queries 1425 triggered by the receipt of one or more NOTIFYs. 1427 [RFC9103] describes the privacy risks associated with both NOTIFY and 1428 SOA queries and does not include addressing those risks within the 1429 scope of encrypting zone transfers. Given this, the privacy benefit 1430 of using DoQ for NOTIFY is not clear - but for the same reason, 1431 sending NOTIFY as 0-RTT data has no privacy risk above that of 1432 sending it using cleartext DNS. 1434 Appendix B. Notable Changes From Previous Versions 1436 (RFC EDITOR NOTE: THIS SECTION TO BE REMOVED BEFORE PUBLICATION) 1438 B.1. Stream Mapping Incompatibility With Draft-02 1440 Versions prior to -02 of this specification proposed a simpler 1441 mapping scheme of queries and responses to QUIc stream, which omitted 1442 the 2 byte length field and supported only a single response on a 1443 given stream. The more complex mapping in Section 5.2 was adopted to 1444 specifically cater for XFR support, however, it breaks compatibility 1445 with earlier versions. 1447 Authors' Addresses 1449 Christian Huitema 1450 Private Octopus Inc. 1451 427 Golfcourse Rd 1452 Friday Harbor, WA 98250 1453 United States of America 1455 Email: huitema@huitema.net 1457 Sara Dickinson 1458 Sinodun IT 1459 Oxford Science Park 1460 Oxford 1461 OX4 4GA 1462 United Kingdom 1464 Email: sara@sinodun.com 1465 Allison Mankin 1466 Salesforce 1468 Email: allison.mankin@gmail.com