RFC 9250
DNS over Dedicated QUIC Connections
RFC 9250: DNS over Dedicated QUIC Connections πβ¨
okay bestie, let's get into it π this one is the RFC that makes DNS go over QUIC π¦ and it is lowkey iconic.
Here's the title block, the tea β:
- RFC number: 9250
- Title: DNS over Dedicated QUIC Connections
- Authors: C. Huitema (Private Octopus Inc.), S. Dickinson (Sinodun IT), and A. Mankin (Salesforce) π
- Category: Standards Track, so this is a real, official Internet standard π₯
- Date: May 2022
- ISSN: 2070-1721
- Obsoletes/Updates: The original header doesn't list any, so there's nothing to mention here πΈ
Abstract
okay so the abstract says this doc is about using QUIC to give DNS transport confidentiality π. QUIC's encryption works kinda like TLS does, and the transport kills the head-of-line blocking problem that TCP has π. It also recovers from packet loss better than UDP does π. DoQ (DNS over QUIC) has privacy similar to DoT from RFC 7858, and its latency is similar to classic DNS over UDP π§. It's meant to be a general-purpose transport for DNS, covering stub-to-recursive, recursive-to-authoritative, and zone transfers π.
Status of This Memo
This is an Internet Standards Track document π.
It's a product of the Internet Engineering Task Force (IETF), so it represents the consensus of the IETF community π. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG) β¨. For more on Internet Standards, check Section 2 of RFC 7841 π¦.
Info on the current status, errata, and feedback for this doc lives at https://www.rfc-editor.org/info/rfc9250 π .
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved π«Ά.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication π. Please read these carefully, because they describe your rights and restrictions with respect to this document π. Code Components pulled out of this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Revised BSD License π.
Table of Contents
1. Introduction
2. Key Words
3. Design Considerations
3.1. Provide DNS Privacy
3.2. Design for Minimum Latency
3.3. Middlebox Considerations
3.4. No Server-Initiated Transactions
4. Specifications
4.1. Connection Establishment
4.1.1. Port Selection
4.2. Stream Mapping and Usage
4.2.1. DNS Message IDs
4.3. DoQ Error Codes
4.3.1. Transaction Cancellation
4.3.2. Transaction Errors
4.3.3. Protocol Errors
4.3.4. Alternative Error Codes
4.4. Connection Management
4.5. Session Resumption and 0-RTT
4.6. Message Sizes
5. Implementation Requirements
5.1. Authentication
5.2. Fallback to Other Protocols on Connection Failure
5.3. Address Validation
5.4. Padding
5.5. Connection Handling
5.5.1. Connection Reuse
5.5.2. Resource Management
5.5.3. Using 0-RTT and Session Resumption
5.5.4. Controlling Connection Migration for Privacy
5.6. Processing Queries in Parallel
5.7. Zone Transfer
5.8. Flow Control Mechanisms
6. Security Considerations
7. Privacy Considerations
7.1. Privacy Issues with 0-RTT data
7.2. Privacy Issues with Session Resumption
7.3. Privacy Issues with Address Validation Tokens
7.4. Privacy Issues with Long Duration Sessions
7.5. Traffic Analysis
8. IANA Considerations
8.1. Registration of a DoQ Identification String
8.2. Reservation of a Dedicated Port
8.3. Reservation of an Extended DNS Error Code: Too Early
8.4. DNS-over-QUIC Error Codes Registry
9. References
9.1. Normative References
9.2. Informative References
Appendix A. The NOTIFY Service
Acknowledgements
Authors' Addresses
1. Introduction πΈ
1.1. Background π
okay so DNS concepts are defined in "Domain names - concepts and facilities" [RFC1034] π. How DNS queries and responses get carried over UDP and TCP is in "Domain names - implementation and specification" [RFC1035] π§.
This doc describes how DNS maps onto the QUIC transport [RFC9000] [RFC9001] π¦. We call it DoQ, which matches "DNS Terminology" [DNS-TERMS] π.
The goals of the DoQ mapping are:
- Provide the same DNS privacy protection as DoT [RFC7858]. This includes an option for the client to authenticate the server with an authentication domain name, as specified in "Usage Profiles for DNS over TLS and DNS over DTLS" [RFC8310] π.
- Provide better source address validation for DNS servers than classic DNS over UDP π‘οΈ.
- Provide a transport that doesn't put path MTU limits on how big DNS responses can be π.
To hit these goals, and to support ongoing work on DNS encryption, the scope covers:
- the "stub to recursive resolver" scenario (also called "stub to recursive" in this document)
- the "recursive resolver to authoritative nameserver" scenario (also called "recursive to authoritative" in this document), and
- the "nameserver to nameserver" scenario (mainly used for zone transfers (XFR) [RFC1995] [RFC5936]) β¨.
In other words, this doc specifies QUIC as a general-purpose transport for DNS π.
The specific non-goals are:
- No attempt is made to evade potential blocking of DoQ traffic by middleboxes π.
- No attempt to support server-initiated transactions, which are used only in DNS Stateful Operations (DSO) [RFC8490] π.
Specifying how an application runs over QUIC means specifying how its messages map to QUIC streams, and generally how it uses QUIC π. HTTP does this in "Hypertext Transfer Protocol Version 3 (HTTP/3)" [HTTP/3]. This doc's job is to define how DNS messages get sent over QUIC π.
DNS over HTTPS (DoH) [RFC8484] can use HTTP/3 to get some of QUIC's benefits π. But a lightweight direct mapping for DoQ is a more natural fit for recursive-to-authoritative and zone transfer scenarios, which rarely involve intermediaries π¦. In those scenarios, the extra overhead of HTTP isn't paid back by things like HTTP proxying and caching β.
In this doc, Section 3 explains the reasoning behind the design π§ . Section 4 specifies the actual DoQ mapping π. Section 5 gives guidelines on implementing, using, and deploying DoQ π«Ά.
2. Key Words π
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here π .
3. Design Considerations π§
This section and its subsections explain the design guidelines used for DoQ. Every other section in this document is normative, but this one is informative π.
3.1. Provide DNS Privacy π
DoT [RFC7858] shows how to deal with some of the issues in "DNS Privacy Considerations" [RFC9076] by describing how to send DNS messages over TLS π. The "Usage Profiles for DNS over TLS and DNS over DTLS" [RFC8310] spec Strict and Opportunistic usage profiles for DoT, including how stub resolvers can authenticate recursive resolvers πΈ.
QUIC connection setup negotiates security parameters using TLS, as in "Using TLS to Secure QUIC" [RFC9001], which encrypts the QUIC transport π¦. Sending DNS messages over QUIC gives you basically the same privacy protections as DoT [RFC7858], including the Strict and Opportunistic usage profiles [RFC8310] β¨. There's more on this in Section 7 π.
3.2. Design for Minimum Latency β‘
QUIC is built to cut down on protocol-induced delays, with stuff like:
- Support for 0-RTT data during session resumption π.
- Support for advanced packet-loss recovery, as in "QUIC Loss Detection and Congestion Control" [RFC9002] π.
- Reduced head-of-line blocking, since data can be delivered in parallel on multiple streams π.
This DNS-to-QUIC mapping uses those features in three ways:
- Optional support for sending 0-RTT data during session resumption (we talk about the security and privacy implications in later sections) π.
- Long-lived QUIC connections where multiple DNS transactions happen, generating the steady traffic you need to benefit from the advanced recovery features π₯.
- Each DNS Query/Response transaction gets its own stream, which fights head-of-line blocking π¦. This lets servers answer queries "out of order" π. It also lets clients process responses as soon as they arrive, without waiting for in-order delivery of responses the server already sent π .
These ideas show up in how DNS traffic maps onto QUIC streams in Section 4.2 β¨.
3.3. Middlebox Considerations π‘οΈ
QUIC lets a protocol hide its purpose from devices on the network path, using encryption and traffic analysis resistance techniques like padding, traffic pacing, and traffic shaping π. This spec doesn't include any measures designed to avoid that kind of classification. The padding mechanisms in Section 5.4 are meant to hide the specific records in DNS queries and responses, but not the fact that this is DNS traffic π. So firewalls and other middleboxes might be able to tell DoQ apart from other QUIC protocols, like HTTP, and treat them differently π.
Not including measures to avoid protocol classification is not an endorsement of those practices π«Ά.
3.4. No Server-Initiated Transactions π«
As Section 1 says, this doc doesn't specify support for server-initiated transactions within established DoQ connections π. Only the initiator of the DoQ connection may send queries over the connection π.
DSO does support server-initiated transactions within existing connections π. But DoQ as defined here doesn't meet the criteria for an applicable transport for DSO, because it doesn't guarantee in-order delivery of messages; see Section 4.2 of [RFC8490] π .
4. Specifications π
4.1. Connection Establishment π¦
DoQ connections are established as described in the QUIC transport specification [RFC9000] π§. During connection establishment, DoQ support is indicated by selecting the Application-Layer Protocol Negotiation (ALPN) token doq in the crypto handshake β¨.
okay bestie that's part 1 π we're just getting started and I'm obsessed. Part 2 is next π
4.1.1. Port Selection β¨
Okay so by default, a DNS server that supports DoQ MUST listen for and accept QUIC connections on the dedicated UDP port 853 (Section 8), unless there's a mutual agreement to use a different port. π
By default, a DNS client that wants to use DoQ with a particular server MUST establish a QUIC connection to UDP port 853 on that server, unless there's a mutual agreement to use another port. π
DoQ connections MUST NOT use UDP port 53. This is so nobody mixes DoQ up with DNS over UDP [RFC1035]. The mix-up risk still exists even if two parties agreed on port 53, because other parties who don't know about that deal might still try to use that port. π
In the stub-to-recursive scenario, using port 443 as a mutually agreed alternative can be operationally beneficial, since lots of services use QUIC and HTTP-3 on port 443. That makes it less likely to get blocked than other ports. How stubs find recursives that offer encrypted transports, including through custom ports, is still being worked on. π¦
4.2. Stream Mapping and Usage π
The mapping of DNS traffic over QUIC streams takes advantage of the QUIC stream features detailed in Section 2 of [RFC9000], the QUIC transport specification. π§
DNS query/response traffic [RFC1034] [RFC1035] follows a simple pattern: the client sends a query, and the server sends back one or more responses. Multiple responses can happen in zone transfers. π
The mapping specified here requires that the client select a separate QUIC stream for each query. The server then uses that same stream to send all the response messages for that query. To make multiple responses parseable, a 2-octet length field is used in exactly the same way as the 2-octet length field defined for DNS over TCP [RFC1035]. The practical result is that the content of each QUIC stream is exactly the same as the content of a TCP connection that would manage exactly one query. β¨
All DNS messages (queries and responses) sent over DoQ connections MUST be encoded as a 2-octet length field followed by the message content as specified in [RFC1035]. π
The client MUST select the next available client-initiated bidirectional stream for each subsequent query on a QUIC connection, in conformance with the QUIC transport specification [RFC9000]. Packet losses and other network events might cause queries to arrive in a different order. Servers SHOULD process queries as they arrive, because not doing so would cause unnecessary delays. πββοΈ
The client MUST send the DNS query over the selected stream and MUST indicate, through the STREAM FIN mechanism, that no further data will be sent on that stream. π
The server MUST send the response(s) on the same stream and MUST indicate, after the last response, through the STREAM FIN mechanism, that no further data will be sent on that stream. π
So a single DNS transaction uses a single bidirectional client-initiated stream. That means the client's first query goes on QUIC stream 0, the second on 4, and so on (see Section 2.1 of [RFC9000]). π’
Servers MAY defer processing of a query until the STREAM FIN has been indicated on the stream the client selected. π«Ά
Servers and clients MAY monitor the number of "dangling" streams. These are open streams where the following events have not occurred after implementation-defined timeouts:
- the expected queries or responses have not been received, or
- the expected queries or responses have been received but not the STREAM FIN
Implementations MAY impose a limit on the number of such dangling streams. If limits are hit, implementations MAY close the connection. π§
4.2.1. DNS Message IDs πͺͺ
When sending queries over a QUIC connection, the DNS Message ID MUST be set to 0. The stream mapping for DoQ allows queries and responses to be matched up without any ambiguity, so the Message ID field isn't required. π
This has implications for proxying DoQ messages to and from other transports. For example, proxies may have to deal with the fact that DoQ can support a larger number of outstanding queries on a single connection than, say, DNS over TCP. That's because DoQ isn't limited by the Message ID space. This issue already exists for DoH, where a Message ID of 0 is recommended. πΈ
When forwarding a DNS message from DoQ over another transport, a DNS Message ID MUST be generated according to the rules of the protocol in use. When forwarding a DNS message from another transport over DoQ, the Message ID MUST be set to 0. π
4.3. DoQ Error Codes π¨
The following error codes are defined for use when abruptly terminating streams, for use as application protocol error codes when aborting reading of streams, or for immediately closing connections:
DOQ_NO_ERROR(0x0): No error. This is used when the connection or stream needs to be closed, but there's no error to signal. π«§DOQ_INTERNAL_ERROR(0x1): The DoQ implementation ran into an internal error and can't keep going with the transaction or the connection. π΅DOQ_PROTOCOL_ERROR(0x2): The DoQ implementation ran into a protocol error and is forcibly aborting the connection. π ββοΈDOQ_REQUEST_CANCELLED(0x3): A DoQ client uses this to say it wants to cancel an outstanding transaction. πDOQ_EXCESSIVE_LOAD(0x4): A DoQ implementation uses this to signal that it's closing a connection because of excessive load. πDOQ_UNSPECIFIED_ERROR(0x5): A DoQ implementation uses this when there's no more specific error code. π€·ββοΈDOQ_ERROR_RESERVED(0xd098ea5e): An alternative error code used for tests. π§ͺ
See Section 8.4 for details on registering new error codes. π
4.3.1. Transaction Cancellation π ββοΈ
In QUIC, sending STOP_SENDING requests that a peer stop transmitting on a stream. If a DoQ client wants to cancel an outstanding request, it MUST issue a QUIC STOP_SENDING, and it SHOULD use the error code DOQ_REQUEST_CANCELLED. It MAY use a more specific error code registered according to Section 8.4. The STOP_SENDING request may be sent at any time, but it will have no effect if the server response has already been sent. In that case the client will simply discard the incoming response. The corresponding DNS transaction MUST be abandoned. π«
Servers that receive STOP_SENDING act in accordance with Section 3.5 of [RFC9000]. Servers SHOULD NOT continue processing a DNS transaction if they receive a STOP_SENDING. π
Servers MAY impose implementation limits on the total number or rate of cancellation requests. If limits are hit, servers MAY close the connection. In that case, servers that want to help with client debugging MAY use the error code DOQ_EXCESSIVE_LOAD. There's always a trade-off between helping good-faith clients debug issues and letting denial-of-service attackers test server defenses. Depending on circumstances, servers might very well choose to send different error codes. βοΈ
Note that this mechanism gives secondaries a way to cancel a single zone transfer occurring on a given stream without having to close the QUIC connection. π
Servers MUST NOT continue processing a DNS transaction if they receive a RESET_STREAM request from the client before the client indicates the STREAM FIN. The server MUST issue a RESET_STREAM to indicate that the transaction is abandoned, unless:
- it has already done so for another reason, or
- it has already both sent the response and indicated the STREAM FIN
4.3.2. Transaction Errors π§―
Servers normally complete transactions by sending a DNS response (or responses) on the transaction's stream. This includes cases where the DNS response indicates a DNS error. For example, a client SHOULD be notified of a Server Failure (SERVFAIL, [RFC1035]) through a response with the Response Code set to SERVFAIL. π¬
If a server can't send a DNS response because of an internal error, it SHOULD issue a QUIC RESET_STREAM frame. The error code SHOULD be set to DOQ_INTERNAL_ERROR. The corresponding DNS transaction MUST be abandoned. Clients MAY limit the number of unsolicited QUIC RESET_STREAM frames they receive on a connection before choosing to close the connection. πͺ
Note that this mechanism gives primaries a way to abort a single zone transfer occurring on a given stream without having to close the QUIC connection. π·
4.3.3. Protocol Errors π«
Other error scenarios can happen because of malformed, incomplete, or unexpected messages during a transaction. These include (but are not limited to):
- a client or server receives a message with a non-zero Message ID
- a client or server receives a STREAM FIN before receiving all the bytes for a message indicated in the 2-octet length field
- a client receives a STREAM FIN before receiving all the expected responses
- a server receives more than one query on a stream
- a client receives a different number of responses on a stream than expected (e.g., multiple responses to a query for an A record)
- a client receives a STOP_SENDING request
- the client or server does not indicate the expected STREAM FIN after sending requests or responses (see Section 4.2)
- an implementation receives a message containing the
edns-tcp-keepaliveEDNS(0) Option [RFC7828] (see Section 5.5.2) - a client or a server attempts to open a unidirectional QUIC stream
- a server attempts to open a server-initiated bidirectional QUIC stream
- a server receives a "replayable" transaction in 0-RTT data (for servers not willing to handle this case, see Section 4.5)
If a peer runs into one of these error conditions, it's considered a fatal error. It SHOULD forcibly abort the connection using QUIC's CONNECTION_CLOSE mechanism, and it SHOULD use the DoQ error code DOQ_PROTOCOL_ERROR. In some cases, it MAY instead silently abandon the connection. That uses fewer of the local resources, but it makes debugging at the offending node harder. π€
It's worth knowing that the restrictions on using the above EDNS(0) option have implications for proxying messages from TCP/DoT/DoH over DoQ. π
4.3.4. Alternative Error Codes π¦
This specification describes specific error codes in Sections 4.3.1, 4.3.2, and 4.3.3. These error codes are meant to make it easier to investigate failures and other incidents. New error codes may be defined in future versions of DoQ, or registered as specified in Section 8.4. π
Because new error codes can be defined without negotiation, using an error code in an unexpected context, or receiving an unknown error code, MUST be treated as equivalent to DOQ_UNSPECIFIED_ERROR. π§©
Implementations MAY wish to test support for the error code extension mechanism by using error codes not listed in this document, or they MAY use DOQ_ERROR_RESERVED. π§ͺβ¨
4.4. Connection Management β¨
Okay bestie, so [RFC9000] (the QUIC transport spec, Section 10) says connections can close in three ways: π«Ά
- idle timeout
- immediate close
- stateless reset
Clients and servers doing DoQ SHOULD negotiate the idle timeout π°οΈ. Closing on idle timeout needs zero packets to be exchanged, so it's super low overhead, which is so iconic. Per Section 10.1 of [RFC9000], the QUIC transport specification, the effective idle timeout is the minimum of the values the two endpoints advertised π . If you want the practical stuff on picking a value, check out Section 5.5.2.
Clients SHOULD keep an eye on their idle time to the server, which means how long it's been since they last got a packet from the server π. When a client is about to send a new DNS query, it SHOULD check whether the idle time is comfortably below the idle timer. If it is, the client SHOULD send the query over the existing connection. If it isn't, the client SHOULD open a new connection and send the query over that one instead β¨.
Clients MAY drop their connections to the server before the idle timeout hits π¦. A client that still has outstanding queries SHOULD close the connection on purpose using QUIC's CONNECTION_CLOSE mechanism with the DoQ error code DOQ_NO_ERROR πΈ.
Clients and servers MAY close the connection for other reasons too, signalled with QUIC's CONNECTION_CLOSE π. If a client or server sends packets over a connection its peer already threw away, it might get a stateless reset indication back π. And if a connection fails, every in-progress transaction on it MUST be abandoned π. No exceptions, periodt.
4.5. Session Resumption and 0-RTT π
A client MAY use the session resumption and 0-RTT mechanisms from QUIC transport [RFC9000] and QUIC TLS [RFC9001], as long as the server supports them π. Clients SHOULD think about the privacy issues that come with session resumption before turning it on, and really look at the trade-offs covered across this document π. The privacy stuff is in Sections 7.1 and 7.2, and the implementation considerations are in Section 5.5.3 π§.
The 0-RTT mechanism MUST NOT be used to send DNS requests that aren't "replayable" transactions π«. In this spec, only transactions with an OPCODE of QUERY or NOTIFY count as replayable, so other OPCODES MUST NOT be sent in 0-RTT data π. Appendix A explains why NOTIFY is on the list, so go read it if you're curious π.
Servers MAY support session resumption, and they MAY do that with or without 0-RTT, using the mechanisms in Section 4.6.1 of [RFC9001] π§. Servers that support 0-RTT MUST NOT immediately process non-replayable transactions that arrive in 0-RTT data. Instead, they MUST pick one of these behaviours π:
- Queue the offending transaction and only process it once the QUIC handshake is complete, as defined in Section 4.1.1 of [RFC9001].
- Reply to the offending transaction with a REFUSED response code plus an Extended DNS Error Code (EDE) of "Too Early", using the extended RCODE mechanisms from [RFC6891] and the extended DNS errors from [RFC8914]. See Section 8.3.
- Close the connection with the error code
DOQ_PROTOCOL_ERROR.
4.6. Message Sizes π
DoQ queries and responses ride on QUIC streams, which can theoretically carry up to 2^62 bytes π. In practice though, DNS messages are capped at 65535 bytes π«§. That cap is enforced by the 2-octet message length field in DNS over TCP [RFC1035] and DoT [RFC7858], and by the definition of "application/dns-message" for DoH [RFC8484]. DoQ enforces the same restriction, so no drama there π.
The Extension Mechanisms for DNS (EDNS(0)) [RFC6891] let peers say what UDP message size they can handle. DoQ ignores that parameter π. DoQ implementations always assume the maximum message size is 65535 bytes π .
5. Implementation Requirements π οΈ
5.1. Authentication π
For the stub to recursive scenario, the authentication requirements are the same as in DoT [RFC7858] and "Usage Profiles for DNS over TLS and DNS over DTLS" [RFC8310]. [RFC8932] says DNS privacy services SHOULD provide credentials that clients can use to authenticate the server πͺͺ. Given that, and to line up with the DoH authentication model, DoQ stubs SHOULD use a Strict usage profile β¨. Client authentication for the encrypted stub to recursive scenario isn't described in any DNS RFC, so that one's still a mystery π΅οΈ.
For zone transfer, the authentication requirements are the same as in [RFC9103] π€.
For the recursive to authoritative scenario, the authentication requirements are unspecified at the time of writing. They're the subject of ongoing work in the DPRIVE WG π€οΈ.
5.2. Fallback to Other Protocols on Connection Failure πͺ
If establishing the DoQ connection fails, clients MAY try falling back to DoT and then possibly cleartext, as specified in DoT [RFC7858] and "Usage Profiles for DNS over TLS and DNS over DTLS" [RFC8310], depending on their usage profile π.
DNS clients SHOULD remember server IP addresses that don't support DoQ π. Mobile clients might also remember the lack of DoQ support for given IP addresses on a per-context basis, like per network or provisioning domain π±.
Timeouts, connection refusals, and QUIC handshake failures are all signs that a server doesn't support DoQ π©. Clients SHOULD NOT attempt DoQ queries to a server that doesn't support DoQ for a reasonable period, such as one hour per server β³. DNS clients following an out-of-band key-pinned usage profile [RFC7858] MAY be more aggressive about retrying after DoQ connection failures πββοΈ.
5.3. Address Validation π‘οΈ
Section 8 of [RFC9000], the QUIC transport specification, defines Address Validation procedures so servers can't be abused in address amplification attacks π¨. DoQ implementations MUST conform to this specification, which limits the worst-case amplification to a factor of 3 π ββοΈ.
DoQ implementations SHOULD consider configuring servers to use the Address Validation using Retry Packets procedure from Section 8.1.2 of [RFC9000], the QUIC transport specification. This procedure adds a 1-RTT delay to verify the return routability of a client's source address, kind of like the DNS Cookies mechanism [RFC7873] πͺ.
DoQ implementations that configure Address Validation using Retry Packets SHOULD implement the Address Validation for Future Connections procedure from Section 8.1.3 of [RFC9000], the QUIC transport specification ποΈ. It explains how servers can send NEW_TOKEN frames to clients after a client's address is validated, so that client can skip the 1-RTT penalty on later connections from the same address π§ .
5.4. Padding π
Implementations MUST protect against the traffic analysis attacks described in Section 7.5 by injecting padding judiciously π΅οΈββοΈ. This can be done either by padding individual DNS messages with the EDNS(0) Padding Option [RFC7830], or by padding QUIC packets (see Section 19.1 of [RFC9000]) π«§.
In theory, padding at the QUIC packet level could perform better for the same protection π. That's because the padding amount can account for non-DNS frames like acknowledgements or flow control updates, and because QUIC packets can carry multiple DNS messages. The catch is that applications can only control padding in QUIC packets if the QUIC implementation exposes adequate APIs π€. So here are the recommendations π:
- If the QUIC implementation exposes APIs to set a padding policy, DoQ SHOULD use that API to align packet lengths to a small set of fixed sizes.
- If padding at the QUIC packet level isn't available or isn't used, DoQ MUST ensure that all DNS queries and responses are padded to a small set of fixed sizes, using the EDNS(0) padding extension specified in [RFC7830].
Implementations might choose not to use a QUIC API for padding if it's way simpler to reuse the existing DNS message padding logic that's applied to other encrypted transports π€·ββοΈ.
With no standard policy for padding sizes, implementations SHOULD follow the recommendations in "Padding Policies for Extension Mechanisms for DNS (EDNS(0))" [RFC8467], which has Experimental status π§ͺ. These recommendations are referenced because they're already implemented and deployed for DoT, and they give implementations a way to be fully compliant with this specification π.
5.5. Connection Handling π€
"DNS Transport over TCP - Implementation Requirements" [RFC7766] has updated guidance for DNS over TCP, and some of it applies to DoQ too πΈ. This section gives similar connection handling advice for DoQ π.
5.5.1. Connection Reuse π
Historic DNS clients are known to open and close TCP connections for every single DNS query, which is a lot π΅βπ«. To amortize connection setup costs, both clients and servers SHOULD support connection reuse by sending multiple queries and responses over a single persistent QUIC connection β»οΈ.
To get performance on par with UDP, DNS clients SHOULD send their queries concurrently over the QUIC streams on a QUIC connection π. In other words, when a DNS client sends multiple queries to a server over one QUIC connection, it SHOULD NOT wait for an outstanding reply before sending the next query ποΈ.
5.5.2. Resource Management π§Ή
Managing established and idle connections properly matters a lot for a healthy DNS server π₯.
An implementation of DoQ SHOULD follow best practices similar to those specified for DNS over TCP [RFC7766], especially around:
- Concurrent Connections (Section 6.2.2 of [RFC7766], updated by Section 6.4 of [RFC9103])
- Security Considerations (Section 10 of [RFC7766])
Failing to do this may lead to resource exhaustion and denial of service π¨π±. Seriously, don't skip it.
Clients that want to keep long-duration DoQ connections SHOULD use the idle timeout mechanisms in Section 10.1 of [RFC9000], the QUIC transport specification π°οΈ. Clients and servers MUST NOT send the edns-tcp-keepalive EDNS(0) Option [RFC7828] in any messages sent on a DoQ connection, because it's specific to TCP/TLS as a transport π ββοΈ.
This document doesn't make specific recommendations for idle connection timeout values. Clients and servers should reuse and/or close connections depending on how many resources they have available. Timeouts may be longer during quiet periods and shorter during busy ones π€οΈβ‘
5.5.3. Using 0-RTT and Session Resumption π¦
okay so 0-RTT for DoQ is lowkey iconic, bestie π clients can set up a connection AND send their queries without waiting around for the handshake, so no connection delay at all β¨ and because clients using 0-RTT don't take a latency hit when a brand new connection is needed for a query, servers can negotiate low values of the connection timers. that means fewer connections they have to keep track of π
session resumption and 0-RTT data transmission come with privacy risks, which are covered in Sections 7.1 and 7.2 π«Ά these recommendations are meant to cut down those risks while you still get the perks of 0-RTT data, but they're subject to the restrictions in Section 4.5 π₯
clients SHOULD use resumption tickets only once, like Appendix C.4 of [RFC8446] says π and by default, clients SHOULD NOT use session resumption if their connectivity has changed πΈ
clients could get address validation tokens from the server through the NEW_TOKEN mechanism (see Section 8 of [RFC9000]) π§ the tracking risks for those are in Section 7.3. so clients SHOULD only use address validation tokens when they're also using session resumption, which keeps the extra tracking risks down π
servers SHOULD issue session resumption tickets with a sufficiently long lifetime (e.g., 6 hours) so clients aren't tempted to keep the connection alive or keep polling the server to renew tickets π and servers SHOULD implement the anti-replay mechanisms in Section 8 of [RFC8446] π‘οΈ
5.5.4. Controlling Connection Migration for Privacy π¦
DoQ implementations might consider using the connection migration features from Section 9 of [RFC9000] β¨ these let connections keep working when the client's connectivity changes, but as Section 7.4 explains, they trade privacy for latency π so by default, clients SHOULD be configured to prioritize privacy and start new sessions if their connectivity changes π
5.6. Processing Queries in Parallel πΈ
as Section 7 of [RFC7766] ("DNS Transport over TCP - Implementation Requirements") says, resolvers are RECOMMENDED to support preparing responses in parallel and sending them out of order π₯ in DoQ, they do this by sending each response on its own stream as soon as it's ready, without waiting for responses on previously opened streams. no cap, that's giving efficiency π
5.7. Zone Transfer π§
[RFC9103] specifies zone transfer over TLS (XoT) and updates [RFC1995] (IXFR), [RFC5936] (AXFR), and [RFC7766] π the considerations about reusing XoT connections apply the same way to zone transfers over DoQ connections. this guidance gets repeated because existing TCP/TLS zone transfer implementations today don't really do effective connection reuse π the following recommendations apply:
- DoQ servers MUST be able to handle multiple concurrent IXFR requests on a single QUIC connection π
- DoQ servers MUST be able to handle multiple concurrent AXFR requests on a single QUIC connection π
- DoQ implementations SHOULD:
- use the same QUIC connection for both AXFR and IXFR requests to the same primary π«Ά
- send those requests in parallel as soon as they're queued, i.e., not wait for a response before sending the next query on the connection (this is analogous to pipelining requests on a TCP/TLS connection) β¨
- send the response(s) for each request as soon as they're available, i.e., response streams MAY be sent intermingled π¦
5.8. Flow Control Mechanisms π
servers and clients manage flow control using the mechanisms in Section 4 of [RFC9000] π these let clients and servers specify how many streams can be created, how much data can be sent on a stream, and how much data can be sent across all streams combined. for DoQ, controlling how many streams get created lets servers control how many new requests the client can send on a given connection π
flow control exists to protect endpoint resources π‘οΈ for servers, global and per-stream flow control limits control how much data clients can send. the same mechanisms let clients control how much data servers can send back. values that are too small will unnecessarily limit performance π values that are too large might expose endpoints to overload or memory exhaustion π implementations or deployments will need to adjust flow control limits to balance these concerns. zone transfer implementations especially need to control these limits carefully so that both large and concurrent zone transfers are well managed π
initial values of parameters control how many requests and how much data clients and servers can send at the start of the connection π§ these values are specified in transport parameters exchanged during the connection handshake. the parameter values received on the initial connection also control how many requests and how much data clients can send using 0-RTT data in a resumed connection. using values that are too small for these initial parameters would restrict how useful 0-RTT data is πΈ
- Security Considerations π₯
a Threat Analysis of the Domain Name System is found in [RFC3833] π΅οΈ this analysis was written before DoT, DoH, and DoQ were developed, and it probably needs updating π
the security considerations of DoQ should be comparable to those of DoT [RFC7858] π DoT as specified in [RFC7858] only addresses the stub to recursive scenario, but the considerations about person-in-the-middle attacks, middleboxes, and caching of data from cleartext connections also apply to DoQ in the resolver to authoritative server scenario π± as Section 5.1 states, the authentication requirements for securing zone transfer using DoQ are the same as those for zone transfer over DoT, so the general security considerations are entirely analogous to those described in [RFC9103] π
DoQ relies on QUIC, which itself relies on TLS 1.3, and thus supports by default the protections against downgrade attacks described in [BCP195] π QUIC-specific issues and their mitigations are described in Section 21 of [RFC9000] π¦
- Privacy Considerations π«£
the general considerations for encrypted transports in "DNS Privacy Considerations" [RFC9076] apply to DoQ π the specific considerations there don't differ between DoT and DoQ, so they aren't discussed further here. "Recommendations for DNS Privacy Service Operators" [RFC8932] (which covers operational, policy, and security considerations for DNS privacy services) also applies to DoQ services π
QUIC incorporates the mechanisms of TLS 1.3 [RFC8446], and this is what enables QUIC to send "0-RTT" data β¨ that can give really nice latency gains, but it raises two concerns:
- adversaries could replay the 0-RTT data and infer its content from the behavior of the receiving server π
- the 0-RTT mechanism relies on TLS session resumption, which can provide linkability between successive client sessions π
these issues are developed in Sections 7.1 and 7.2 π«Ά
7.1. Privacy Issues with 0-RTT data π¦
the 0-RTT data can be replayed by adversaries π¬ that data may trigger queries from a recursive resolver to authoritative resolvers. adversaries may be able to pick a time when the recursive resolver's outgoing traffic is observable, and then find out what name was queried for in the 0-RTT data π΅οΈ
this risk is actually a subset of the general problem of observing the behavior of the recursive resolver, which is discussed in "DNS Privacy Considerations" [RFC9076] πΈ the attack is partially mitigated by reducing how observable this traffic is. the mandatory replay protection mechanisms in TLS 1.3 [RFC8446] limit the risk of replay but don't eliminate it π 0-RTT packets can only be replayed within a narrow window, which is only wide enough to account for variations in clock skew and network transmission β±οΈ
the recommendation for TLS 1.3 [RFC8446] is that the capability to use 0-RTT data should be turned off by default and only enabled if the user clearly understands the risks π for DoQ, though, allowing 0-RTT data gives significant performance gains, and there's a concern that a recommendation not to use it would just get ignored π€ so instead, a set of practical recommendations is provided in Sections 4.5 and 5.5.3 π
the specifications in Section 4.5 block the most obvious replay attack risks, since they only allow transactions that won't change the long-term state of the server π₯
the attacks described above apply to the stub resolver to recursive resolver scenario, but similar attacks might be imagined in the recursive resolver to authoritative resolver scenario, and the same mitigations apply π§
7.2. Privacy Issues with Session Resumption π
QUIC session resumption reduces the cost of re-establishing sessions and enables 0-RTT data β¨ there's a linkability issue with session resumption if the same resumption token gets used several times. attackers on the path between client and server could observe repeated use of the token and use it to track the client over time or across multiple locations π
session resumption also lets servers correlate resumed sessions with the initial sessions, which means they can track the client too π³ this creates a virtual long-duration session, and the series of queries in that session can be used by the server to identify the client. servers can most probably do that already if the client address stays constant, but session resumption tickets also make tracking possible after the client's address changes π«£
the recommendations in Section 5.5.3 are designed to mitigate these risks π‘οΈ using session tickets only once mitigates the risk of tracking by third parties. refusing to resume a session if addresses change mitigates the incremental risk of tracking by the server (but the risk of tracking by IP address remains) π
the privacy trade-offs here may be context specific π stub resolvers have a strong motivation to prefer privacy over latency, since they often change location. recursive resolvers that use a small set of static IP addresses are more likely to prefer the lower latency that session resumption gives, and may consider that a valid reason to use resumption tickets even if the IP address changed between sessions π
encrypted zone transfer ([RFC9103]) explicitly does not try to hide the identity of the parties involved in the transfer. at the same time, those transfers aren't especially latency sensitive π this means applications supporting zone transfers may decide to apply the same protections as stub to recursive applications π
7.3. Privacy Issues with Address Validation Tokens πβ¨
okay so QUIC has its address validation stuff in Section 8 of [RFC9000] π¦ Address validation tokens let QUIC servers skip an extra RTT for brand new connections π These tokens are usually tied to an IP address, so clients normally only use them when they're setting up a new connection from an address they've used before π But clients aren't always aware they're on a new address π¬ That can happen because of NAT, or because the client doesn't have an API to check whether its IP address changed (which happens a lot with IPv6 π). There's a linkability risk if clients accidentally use address validation tokens after quietly moving to a new location π
The recommendations in Section 5.5.3 mitigate this risk by tying usage of the NEW_TOKEN to session resumption π though this recommendation doesn't cover the case where the client is unaware of the address change π
7.4. Privacy Issues with Long Duration Sessions π
A potential alternative to session resumption is long duration sessions π§ If a session stays open for a long time, new queries can be sent without any connection establishment delays β It's worth pointing out that the two solutions have similar privacy characteristics. Session resumption may allow servers to keep track of the IP addresses of clients, but long duration sessions have the same effect π
In particular, a DoQ implementation might take advantage of the connection migration features of QUIC to keep a session alive even when the client's connectivity changes π For example, the client might migrate from a Wi-Fi connection to a cellular network connection and then to another Wi-Fi connection πΆ The server would be able to track the client's location by monitoring the succession of IP addresses used by the long duration connection π΅οΈββοΈ
The recommendation in Section 5.5.4 mitigates the privacy concerns related to long duration sessions using multiple client addresses π«Ά
7.5. Traffic Analysis π
Even though QUIC packets are encrypted, adversaries can still gain information from observing packet lengths (in both queries and responses) as well as packet timing β±οΈ Many DNS requests are emitted by web browsers, and loading a specific web page may require resolving dozens of DNS names π If an application adopts a simple mapping of one query or response per packet, or "one QUIC STREAM frame per packet", then the succession of packet lengths may provide enough information to identify the requested site π±
Implementations SHOULD use the mechanisms defined in Section 5.4 to mitigate this attack. π‘οΈ
8. IANA Considerations π
8.1. Registration of a DoQ Identification String π·οΈ
This document creates a new registration for the identification of DoQ in the "TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs" registry [RFC7301].
The "doq" string identifies DoQ:
Protocol: DoQ
Identification Sequence: 0x64 0x6F 0x71 ("doq")
Specification: This document
8.2. Reservation of a Dedicated Port π
For both TCP and UDP, port 853 is currently reserved for "DNS query-response protocol run over TLS/DTLS" [RFC7858].
However, the specification for DNS over DTLS (DoD) [RFC8094] is experimental, limited to stub to resolver, and no implementations or deployments currently exist to the authors' knowledge (even though several years have passed since the specification was published) π₯²
This specification additionally reserves the use of UDP port 853 for DoQ. QUIC version 1 was designed to coexist with other protocols on the same port, including DTLS; see Section 17.2 of [RFC9000] β¨ This means that deployments serving DoD and DoQ (QUIC version 1) on the same port will be able to demultiplex the two due to the second most significant bit in each UDP payload π§© Such deployments ought to check the signatures of future versions or extensions (e.g., [GREASING-QUIC]) of QUIC and DTLS before deploying them to serve DNS on the same port β οΈ
IANA has updated the following value in the "Service Name and Transport Protocol Port Number Registry" in the System range. The registry for that range requires IETF Review or IESG Approval [RFC6335] π
Service Name: domain-s
Port Number: 853
Transport Protocol(s): UDP
Assignee: IESG
Contact: IETF Chair
Description: DNS query-response protocol run over DTLS or QUIC
Reference: [RFC7858][RFC8094] This document
Additionally, IANA has updated the Description field for the corresponding TCP port 853 allocation to be "DNS query-response protocol run over TLS" and removed [RFC8094] from the TCP allocation's Reference field for consistency and clarity π§Ή
8.3. Reservation of an Extended DNS Error Code: Too Early π
IANA has registered the following value in the "Extended DNS Error Codes" registry [RFC8914]:
INFO-CODE: 26
Purpose: Too Early
Reference: This document
8.4. DNS-over-QUIC Error Codes Registry π§Ύ
IANA has added a registry for "DNS-over-QUIC Error Codes" on the "Domain Name System (DNS) Parameters" web page πΈ
The "DNS-over-QUIC Error Codes" registry governs a 62-bit space. This space is split into three regions that are governed by different policies π
- Permanent registrations for values between
0x00and0x3f(in hexadecimal; inclusive), which are assigned using Standards Action or IESG Approval as defined in Sections 4.9 and 4.10 of [RFC8126] - Permanent registrations for values larger than
0x3f, which are assigned using the Specification Required policy ([RFC8126]) - Provisional registrations for values larger than
0x3f, which require Expert Review, as defined in Section 4.5 of [RFC8126]
Provisional reservations share the range of values larger than 0x3f with some permanent registrations. This is by design to enable conversion of provisional registrations into permanent registrations without requiring changes in deployed systems. (This design is aligned with the principles set in Section 22 of [RFC9000].) π¦
Registrations in this registry MUST include the following fields:
Value: The assigned codepointStatus: "Permanent" or "Provisional"Contact: Contact details for the registrant
In addition, permanent registrations MUST include:
Error: A short mnemonic for the parameterSpecification: A reference to a publicly available specification for the value (optional for provisional registrations)Description: A brief description of the error code semantics, which MAY be a summary if a specification reference is provided
Provisional registrations of codepoints are intended to allow for private use and experimentation with extensions to DoQ. However, provisional registrations could be reclaimed and reassigned for other purposes π§ͺ In addition to the parameters listed above, provisional registrations MUST include:
Date: The date of last update to the registration
A request to update the date on any provisional registration can be made without review from the designated expert(s) π
The initial content of this registry is shown in Table 1, and all entries share the following fields π
Status: Permanent
Contact: DPRIVE WG
Specification: Section 4.3
+============+=======================+=============================+
| Value | Error | Description |
+============+=======================+=============================+
| 0x0 | DOQ_NO_ERROR | No error |
+------------+-----------------------+-----------------------------+
| 0x1 | DOQ_INTERNAL_ERROR | Implementation error |
+------------+-----------------------+-----------------------------+
| 0x2 | DOQ_PROTOCOL_ERROR | Generic protocol violation |
+------------+-----------------------+-----------------------------+
| 0x3 | DOQ_REQUEST_CANCELLED | Request cancelled by client |
+------------+-----------------------+-----------------------------+
| 0x4 | DOQ_EXCESSIVE_LOAD | Closing a connection for |
| | | excessive load |
+------------+-----------------------+-----------------------------+
| 0x5 | DOQ_UNSPECIFIED_ERROR | No error reason specified |
+------------+-----------------------+-----------------------------+
| 0xd098ea5e | DOQ_ERROR_RESERVED | Alternative error code used |
| | | for tests |
+------------+-----------------------+-----------------------------+
Table 1: Initial DNS-over-QUIC Error Codes Entries
9. References π
9.1. Normative References β¨
Okay bestie, these are the docs the spec needs you to have read, no cap π
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, https://www.rfc-editor.org/info/rfc1034.
[RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, November 1987, https://www.rfc-editor.org/info/rfc1035.
[RFC1995] Ohta, M., "Incremental Zone Transfer in DNS", RFC 1995, DOI 10.17487/RFC1995, August 1996, https://www.rfc-editor.org/info/rfc1995.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, https://www.rfc-editor.org/info/rfc2119.
[RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010, https://www.rfc-editor.org/info/rfc5936.
[RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms for DNS (EDNS(0))", STD 75, RFC 6891, DOI 10.17487/RFC6891, April 2013, https://www.rfc-editor.org/info/rfc6891.
[RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, "Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, July 2014, https://www.rfc-editor.org/info/rfc7301.
[RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and D. Wessels, "DNS Transport over TCP - Implementation Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, https://www.rfc-editor.org/info/rfc7766.
[RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, DOI 10.17487/RFC7830, May 2016, https://www.rfc-editor.org/info/rfc7830.
[RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., and P. Hoffman, "Specification for DNS over Transport Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 2016, https://www.rfc-editor.org/info/rfc7858.
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017, https://www.rfc-editor.org/info/rfc8126.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, https://www.rfc-editor.org/info/rfc8174.
[RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles for DNS over TLS and DNS over DTLS", RFC 8310, DOI 10.17487/RFC8310, March 2018, https://www.rfc-editor.org/info/rfc8310.
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, https://www.rfc-editor.org/info/rfc8446.
[RFC8467] Mayrhofer, A., "Padding Policies for Extension Mechanisms for DNS (EDNS(0))", RFC 8467, DOI 10.17487/RFC8467, October 2018, https://www.rfc-editor.org/info/rfc8467.
[RFC8914] Kumari, W., Hunt, E., Arends, R., Hardaker, W., and D. Lawrence, "Extended DNS Errors", RFC 8914, DOI 10.17487/RFC8914, October 2020, https://www.rfc-editor.org/info/rfc8914.
[RFC9000] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Multiplexed and Secure Transport", RFC 9000, DOI 10.17487/RFC9000, May 2021, https://www.rfc-editor.org/info/rfc9000.
[RFC9001] Thomson, M., Ed. and S. Turner, Ed., "Using TLS to Secure QUIC", RFC 9001, DOI 10.17487/RFC9001, May 2021, https://www.rfc-editor.org/info/rfc9001.
[RFC9103] Toorop, W., Dickinson, S., Sahib, S., Aras, P., and A. Mankin, "DNS Zone Transfer over TLS", RFC 9103, DOI 10.17487/RFC9103, August 2021, https://www.rfc-editor.org/info/rfc9103.
9.2. Informative References π
Here's the extra reading. Totally optional, but so worth it π€
[BCP195] Sheffer, Y., Holz, R., and P. Saint-Andre, "Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)", BCP 195, RFC 7525, May 2015.
Moriarty, K. and S. Farrell, "Deprecating TLS 1.0 and TLS 1.1", BCP 195, RFC 8996, March 2021.
https://www.rfc-editor.org/info/bcp195
[DNS-TERMS] Hoffman, P. and K. Fujiwara, "DNS Terminology", Work in Progress, Internet-Draft, draft-ietf-dnsop-rfc8499bis-03, 28 September 2021, https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-rfc8499bis-03.
[DNS0RTT] Kahn Gillmor, D., "DNS + 0-RTT", Message to DNS-Privacy WG mailing list, 6 April 2016, https://www.ietf.org/mail-archive/web/dns-privacy/current/msg01276.html.
[GREASING-QUIC] Thomson, M., "Greasing the QUIC Bit", Work in Progress, Internet-Draft, draft-ietf-quic-bit-grease-02, 10 November 2021, https://datatracker.ietf.org/doc/html/draft-ietf-quic-bit-grease-02.
[HTTP/3] Bishop, M., Ed., "Hypertext Transfer Protocol Version 3 (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf-quic-http-34, 2 February 2021, https://datatracker.ietf.org/doc/html/draft-ietf-quic-http-34.
[RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996, August 1996, https://www.rfc-editor.org/info/rfc1996.
[RFC3833] Atkins, D. and R. Austein, "Threat Analysis of the Domain Name System (DNS)", RFC 3833, DOI 10.17487/RFC3833, August 2004, https://www.rfc-editor.org/info/rfc3833.
[RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. Cheshire, "Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry", BCP 165, RFC 6335, DOI 10.17487/RFC6335, August 2011, https://www.rfc-editor.org/info/rfc6335.
[RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The edns-tcp-keepalive EDNS0 Option", RFC 7828, DOI 10.17487/RFC7828, April 2016, https://www.rfc-editor.org/info/rfc7828.
[RFC7873] Eastlake 3rd, D. and M. Andrews, "Domain Name System (DNS) Cookies", RFC 7873, DOI 10.17487/RFC7873, May 2016, https://www.rfc-editor.org/info/rfc7873.
[RFC8094] Reddy, T., Wing, D., and P. Patil, "DNS over Datagram Transport Layer Security (DTLS)", RFC 8094, DOI 10.17487/RFC8094, February 2017, https://www.rfc-editor.org/info/rfc8094.
[RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, https://www.rfc-editor.org/info/rfc8484.
[RFC8490] Bellis, R., Cheshire, S., Dickinson, J., Dickinson, S., Lemon, T., and T. Pusateri, "DNS Stateful Operations", RFC 8490, DOI 10.17487/RFC8490, March 2019, https://www.rfc-editor.org/info/rfc8490.
[RFC8932] Dickinson, S., Overeinder, B., van Rijswijk-Deij, R., and A. Mankin, "Recommendations for DNS Privacy Service Operators", BCP 232, RFC 8932, DOI 10.17487/RFC8932, October 2020, https://www.rfc-editor.org/info/rfc8932.
[RFC9002] Iyengar, J., Ed. and I. Swett, Ed., "QUIC Loss Detection and Congestion Control", RFC 9002, DOI 10.17487/RFC9002, May 2021, https://www.rfc-editor.org/info/rfc9002.
[RFC9076] Wicinski, T., Ed., "DNS Privacy Considerations", RFC 9076, DOI 10.17487/RFC9076, July 2021, https://www.rfc-editor.org/info/rfc9076.
Appendix A. The NOTIFY Service π§
This appendix is all about why it's considered acceptable to send NOTIFY (see [RFC1996]) in 0-RTT data. Let's get into it! π
Section 4.5 says "The 0-RTT mechanism MUST NOT be used to send DNS requests that are not "replayable" transactions". This spec supports sending a NOTIFY in 0-RTT data because, even though a NOTIFY technically changes the state of the receiving server, replaying NOTIFYs has negligible impact in practice. π
NOTIFY messages prompt a secondary to send either an SOA query or an XFR request to the primary, because a newer version of the zone is available. It's been long recognized that NOTIFYs can be forged and, in theory, used to make a secondary send repeated unnecessary requests to the primary. That's why most implementations have some form of throttling for the SOA/XFR queries triggered by one or more NOTIFYs. π‘οΈ
[RFC9103] describes the privacy risks associated with both NOTIFY and SOA queries, and it does not include addressing those risks within the scope of encrypting zone transfers. Given this, the privacy benefit of using DoQ for NOTIFY is not clear. But for the same reason, sending NOTIFY as 0-RTT data has no privacy risk above that of sending it using cleartext DNS. π«
Acknowledgements π«Ά
This document liberally borrows text from the HTTP/3 specification [HTTP/3], edited by Mike Bishop, and from the DoT specification [RFC7858], authored by Zi Hu, Liang Zhu, John Heidemann, Allison Mankin, Duane Wessels, and Paul Hoffman. π
The privacy issue with 0-RTT data and session resumption was analyzed by Daniel Kahn Gillmor (DKG) in a message to the IETF DPRIVE Working Group [DNS0RTT]. π
Thanks to Tony Finch for an extensive review of the initial draft version of this document, and to Robert Evans for the discussion of 0-RTT privacy issues. Early reviews by Paul Hoffman and Martin Thomson, and interoperability tests conducted by Stephane Bortzmeyer, helped improve the definition of the protocol. β¨
Thanks also to Martin Thomson and Martin Duke for their later reviews focusing on the low-level QUIC details, which helped clarify several aspects of DoQ. Thanks to Andrey Meshkov, Loganaden Velvindron, Lucas Pardue, Matt Joras, Mirja Kuelewind, Brian Trammell, and Phillip Hallam-Baker for their reviews and contributions. π
Authors' Addresses π
Christian Huitema Private Octopus Inc. 427 Golfcourse Rd Friday Harbor, WA 98250 United States of America Email: huitema@huitema.net
Sara Dickinson Sinodun IT Oxford Science Park Oxford OX4 4GA United Kingdom Email: sara@sinodun.com
Allison Mankin Salesforce Email: allison.mankin@gmail.com
π¦ where this page comes from
- ietf: rfc9250 2022-05
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms