idnits 2.17.00 (12 Aug 2021) /tmp/idnits23999/draft-ietf-doh-dns-over-https-10.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 : ---------------------------------------------------------------------------- -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 01, 2018) is 1449 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) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Hoffman 3 Internet-Draft ICANN 4 Intended status: Standards Track P. McManus 5 Expires: December 3, 2018 Mozilla 6 June 01, 2018 8 DNS Queries over HTTPS (DOH) 9 draft-ietf-doh-dns-over-https-10 11 Abstract 13 This document describes how to make DNS queries over HTTPS. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at https://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on December 3, 2018. 32 Copyright Notice 34 Copyright (c) 2018 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (https://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 3. Protocol Requirements . . . . . . . . . . . . . . . . . . . . 3 52 3.1. Non-requirements . . . . . . . . . . . . . . . . . . . . 4 53 4. Selection of DNS API Server . . . . . . . . . . . . . . . . . 4 54 5. The HTTP Exchange . . . . . . . . . . . . . . . . . . . . . . 4 55 5.1. The HTTP Request . . . . . . . . . . . . . . . . . . . . 4 56 5.1.1. HTTP Request Examples . . . . . . . . . . . . . . . . 5 57 5.2. The HTTP Response . . . . . . . . . . . . . . . . . . . . 7 58 5.2.1. HTTP Response Example . . . . . . . . . . . . . . . . 7 59 6. HTTP Integration . . . . . . . . . . . . . . . . . . . . . . 8 60 6.1. Cache Interaction . . . . . . . . . . . . . . . . . . . . 8 61 6.2. HTTP/2 . . . . . . . . . . . . . . . . . . . . . . . . . 10 62 6.3. Server Push . . . . . . . . . . . . . . . . . . . . . . . 10 63 6.4. Content Negotiation . . . . . . . . . . . . . . . . . . . 10 64 7. DNS Wire Format . . . . . . . . . . . . . . . . . . . . . . . 10 65 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 66 8.1. Registration of application/dns-message Media Type . . . 11 67 9. Security Considerations . . . . . . . . . . . . . . . . . . . 13 68 10. Operational Considerations . . . . . . . . . . . . . . . . . 13 69 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 70 11.1. Normative References . . . . . . . . . . . . . . . . . . 15 71 11.2. Informative References . . . . . . . . . . . . . . . . . 16 72 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 17 73 Previous Work on DNS over HTTP or in Other Formats . . . . . . . 18 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 76 1. Introduction 78 This document defines a specific protocol for sending DNS [RFC1035] 79 queries and getting DNS responses over HTTP [RFC7540] using https 80 URIs (and therefore TLS [RFC5246] security for integrity and 81 confidentiality). Each DNS query-response pair is mapped into a HTTP 82 exchange. 84 The described approach is more than a tunnel over HTTP. It 85 establishes default media formatting types for requests and responses 86 but uses normal HTTP content negotiation mechanisms for selecting 87 alternatives that endpoints may prefer in anticipation of serving new 88 use cases. In addition to this media type negotiation, it aligns 89 itself with HTTP features such as caching, redirection, proxying, 90 authentication, and compression. 92 The integration with HTTP provides a transport suitable for both 93 existing DNS clients and native web applications seeking access to 94 the DNS. 96 Two primary uses cases were considered during this protocol's 97 development. They included preventing on-path devices from 98 interfering with DNS operations and allowing web applications to 99 access DNS information via existing browser APIs in a safe way 100 consistent with Cross Origin Resource Sharing (CORS) [CORS]. No 101 special effort has been taken to enable or prevent application to 102 other use cases. This document focuses on communication between DNS 103 clients (such as operating system stub resolvers) and recursive 104 resolvers. 106 2. Terminology 108 A server that supports this protocol is called a "DNS API server" to 109 differentiate it from a "DNS server" (one that only provides DNS 110 service over one or more of the other transport protocols 111 standardized for DNS). Similarly, a client that supports this 112 protocol is called a "DNS API client". 114 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 115 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 116 "OPTIONAL" in this document are to be interpreted as described in BCP 117 14 [RFC2119] [RFC8174] when, and only when, they appear in all 118 capitals, as shown here. 120 3. Protocol Requirements 122 [[ RFC Editor: Please remove this entire section before publication. 123 ]] 125 The protocol described here bases its design on the following 126 protocol requirements: 128 o The protocol must use normal HTTP semantics. 130 o The queries and responses must be able to be flexible enough to 131 express every DNS query that would normally be sent in DNS over 132 UDP (including queries and responses that use DNS extensions, but 133 not those that require multiple responses). 135 o The protocol must permit the addition of new formats for DNS 136 queries and responses. 138 o The protocol must ensure interoperability by specifying a single 139 format for requests and responses that is mandatory to implement. 140 That format must be able to support future modifications to the 141 DNS protocol including the inclusion of one or more EDNS options 142 (including those not yet defined). 144 o The protocol must use a secure transport that meets the 145 requirements for HTTPS. 147 3.1. Non-requirements 149 o Supporting network-specific DNS64 [RFC6147] 151 o Supporting other network-specific inferences from plaintext DNS 152 queries 154 o Supporting insecure HTTP 156 4. Selection of DNS API Server 158 Configuration, discovery, and updating of the URI Template [RFC6570] 159 (see Section 5.1) is done out of band from this protocol. Note that 160 configuration might be manual (such as a user typing URI Templates in 161 a user interface for "options") or automatic (such as URI Templates 162 being supplied in responses from DHCP or similar protocols). DNS API 163 Servers MAY support more than one URI. This allows the different 164 endpoints to have different properties such as different 165 authentication requirements or service level guarantees. 167 A DNS API client uses configuration to select the URI, and thus the 168 DNS API server, that is to be used for resolution. [RFC2818] defines 169 how HTTPS verifies the DNS API server's identity. 171 A DNS API client MUST NOT use a different URI simply because it was 172 discovered outside of the client's configuration, or because a server 173 offers an unsolicited response that appears to be a valid answer to a 174 DNS query. This specification does not extend DNS resolution 175 privileges to URIs that are not recognized by the DNS API client as 176 configured URIs. Such scenarios may create additional operational, 177 tracking, and security hazards that require limitations for safe 178 usage. A future specification may support this use case. 180 5. The HTTP Exchange 182 5.1. The HTTP Request 184 A DNS API client encodes a single DNS query into an HTTP request 185 using either the HTTP GET or POST method and the other requirements 186 of this section. The DNS API server defines the URI used by the 187 request through the use of a URI Template. 189 The URI Template defined in this document is processed without any 190 variables when the HTTP method is POST. When the HTTP method is GET 191 the single variable "dns" is defined as the content of the DNS 192 request (as described in Section 7), encoded with base64url 193 [RFC4648]. 195 Future specifications for new media types MUST define the variables 196 used for URI Template processing with this protocol. 198 DNS API servers MUST implement both the POST and GET methods. 200 When using the POST method the DNS query is included as the message 201 body of the HTTP request and the Content-Type request header 202 indicates the media type of the message. POST-ed requests are 203 smaller than their GET equivalents. 205 Using the GET method is friendlier to many HTTP cache 206 implementations. 208 The DNS API client SHOULD include an HTTP "Accept" request header to 209 indicate what type of content can be understood in response. 210 Irrespective of the value of the Accept request header, the client 211 MUST be prepared to process "application/dns-message" (as described 212 in Section 7) responses but MAY also process any other type it 213 receives. 215 In order to maximize cache friendliness, DNS API clients using media 216 formats that include DNS ID, such as application/dns-message, SHOULD 217 use a DNS ID of 0 in every DNS request. HTTP correlates the request 218 and response, thus eliminating the need for the ID in a media type 219 such as application/dns-message. The use of a varying DNS ID can 220 cause semantically equivalent DNS queries to be cached separately. 222 DNS API clients can use HTTP/2 padding and compression in the same 223 way that other HTTP/2 clients use (or don't use) them. 225 5.1.1. HTTP Request Examples 227 These examples use HTTP/2 style formatting from [RFC7540]. 229 These examples use a DNS API service with a URI Template of 230 "https://dnsserver.example.net/dns-query{?dns}" to resolve IN A 231 records. 233 The requests are represented as application/dns-message typed bodies. 235 The first example request uses GET to request www.example.com 236 :method = GET 237 :scheme = https 238 :authority = dnsserver.example.net 239 :path = /dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB 240 accept = application/dns-message 242 The same DNS query for www.example.com, using the POST method would 243 be: 245 :method = POST 246 :scheme = https 247 :authority = dnsserver.example.net 248 :path = /dns-query 249 accept = application/dns-message 250 content-type = application/dns-message 251 content-length = 33 253 <33 bytes represented by the following hex encoding> 254 00 00 01 00 00 01 00 00 00 00 00 00 03 77 77 77 255 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 256 01 258 Finally, a GET based query for a.62characterlabel-makes-base64url- 259 distinct-from-standard-base64.example.com is shown as an example to 260 emphasize that the encoding alphabet of base64url is different than 261 regular base64 and that padding is omitted. 263 The DNS query is 94 bytes represented by the following hex encoding 265 00 00 01 00 00 01 00 00 00 00 00 00 01 61 3e 36 266 32 63 68 61 72 61 63 74 65 72 6c 61 62 65 6c 2d 267 6d 61 6b 65 73 2d 62 61 73 65 36 34 75 72 6c 2d 268 64 69 73 74 69 6e 63 74 2d 66 72 6f 6d 2d 73 74 269 61 6e 64 61 72 64 2d 62 61 73 65 36 34 07 65 78 270 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 272 :method = GET 273 :scheme = https 274 :authority = dnsserver.example.net 275 :path = /dns-query? (no space or CR) 276 dns=AAABAAABAAAAAAAAAWE-NjJjaGFyYWN0ZXJsYWJl (no space or CR) 277 bC1tYWtlcy1iYXNlNjR1cmwtZGlzdGluY3QtZnJvbS1z (no space or CR) 278 dGFuZGFyZC1iYXNlNjQHZXhhbXBsZQNjb20AAAEAAQ 279 accept = application/dns-message 281 5.2. The HTTP Response 283 An HTTP response with a 2xx status code ([RFC7231] Section 6.3) 284 indicates a valid DNS response to the query made in the HTTP request. 285 A valid DNS response includes both success and failure responses. 286 For example, a DNS failure response such as SERVFAIL or NXDOMAIN will 287 be the message in a successful 2xx HTTP response even though there 288 was a failure at the DNS layer. Responses with non-successful HTTP 289 status codes do not contain DNS answers to the question in the 290 corresponding request. Some of these non-successful HTTP responses 291 (e.g., redirects or authentication failures) could mean that clients 292 need to make new requests to satisfy the original question. 294 Different response media types will provide more or less information 295 from a DNS response. For example, one response type might include 296 the information from the DNS header bytes while another might omit 297 it. The amount and type of information that a media type gives is 298 solely up to the format, and not defined in this protocol. 300 The only response type defined in this document is "application/dns- 301 message", but it is possible that other response formats will be 302 defined in the future. 304 The DNS response for "application/dns-message" in Section 7 MAY have 305 one or more EDNS options [RFC6891], depending on the extension 306 definition of the extensions given in the DNS request. 308 Each DNS request-response pair is matched to one HTTP exchange. The 309 responses may be processed and transported in any order using HTTP's 310 multi-streaming functionality ([RFC7540] Section 5). 312 Section 6.1 discusses the relationship between DNS and HTTP response 313 caching. 315 A DNS API server MUST be able to process application/dns-message 316 request messages. 318 A DNS API server SHOULD respond with HTTP status code 415 319 (Unsupported Media Type) upon receiving a media type it is unable to 320 process. 322 5.2.1. HTTP Response Example 324 This is an example response for a query for the IN A records for 325 "www.example.com" with recursion turned on. The response bears one 326 record with an address of 192.0.2.1 and a TTL of 128 seconds. 328 :status = 200 329 content-type = application/dns-message 330 content-length = 64 331 cache-control = max-age=128 333 <64 bytes represented by the following hex encoding> 334 00 00 81 80 00 01 00 01 00 00 00 00 03 77 77 77 335 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 336 01 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 337 6d 00 00 01 00 01 00 00 00 80 00 04 C0 00 02 01 339 6. HTTP Integration 341 This protocol MUST be used with the https scheme URI [RFC7230]. 343 6.1. Cache Interaction 345 A DOH exchange can pass through a hierarchy of caches that include 346 both HTTP and DNS specific caches. These caches may exist beteen the 347 DNS API server and client, or on the DNS API client itself. HTTP 348 caches are by design generic; that is, they do not understand this 349 protocol. Even if a DNS API client has modified its cache 350 implementation to be aware of DOH semantics, it does not follow that 351 all upstream caches (for example, inline proxies, server-side 352 gateways and Content Delivery Networks) will be. 354 As a result, DNS API servers need to carefully consider the HTTP 355 caching metadata they send in response to GET requests (POST requests 356 are not cacheable unless specific response headers are sent; this is 357 not widely implemented, and not advised for DOH). 359 In particular, DNS API servers SHOULD assign an explicit freshness 360 lifetime ([RFC7234] Section 4.2) so that the DNS API client is more 361 likely to use fresh DNS data. This requirement is due to HTTP caches 362 being able to assign their own heuristic freshness (such as that 363 described in [RFC7234] Section 4.2.2), which would take control of 364 the cache contents out of the hands of the DNS API server. 366 The assigned freshness lifetime of a DOH HTTP response SHOULD be the 367 smallest TTL in the Answer section of the DNS response. For example, 368 if a HTTP response carries three RRsets with TTLs of 30, 600, and 369 300, the HTTP freshness lifetime should be 30 seconds (which could be 370 specified as "Cache-Control: max-age=30"). The assigned freshness 371 lifetime MUST NOT be greater than the smallest TTL in the Answer 372 section of the DNS response. This requirement helps assure that none 373 of the RRsets contained in a DNS response are served stale from an 374 HTTP cache. 376 If the DNS response has no records in the Answer section, and the DNS 377 response has an SOA record in the Authority section, the response 378 freshness lifetime MUST NOT be greater than the MINIMUM field from 379 that SOA record (see [RFC2308]). 381 The stale-while-revalidate and stale-if-error Cache-Control 382 directives ([RFC5861]) could be well suited to a DOH implementation 383 when allowed by server policy. Those mechanisms allow a client, at 384 the server's discretion, to reuse a cache entry that is no longer 385 fresh. In such a case, the client reuses all of a cached entry, or 386 none of it. 388 DNS API servers also need to consider caching when generating 389 responses that are not globally valid. For instance, if a DNS API 390 server customizes a response based on the client's identity, it would 391 not want to allow global reuse of that response. This could be 392 accomplished through a variety of HTTP techniques such as a Cache- 393 Control max-age of 0, or by using the Vary response header ([RFC7231] 394 Section 7.1.4) to establish a secondary cache key ([RFC7234] 395 Section 4.1). 397 DNS API clients MUST account for the Age response header's value 398 ([RFC7234]) when calculating the DNS TTL of a response. For example, 399 if a RRset is received with a DNS TTL of 600, but the Age header 400 indicates that the response has been cached for 250 seconds, the 401 remaining lifetime of the RRset is 350 seconds. 403 DNS API clients can request an uncached copy of a response by using 404 the "no-cache" request cache control directive ([RFC7234], 405 Section 5.2.1.4) and similar controls. Note that some caches might 406 not honor these directives, either due to configuration or 407 interaction with traditional DNS caches that do not have such a 408 mechanism. 410 HTTP conditional requests ([RFC7232]) may be of limited value to DOH, 411 as revalidation provides only a bandwidth benefit and DNS 412 transactions are normally latency bound. Furthermore, the HTTP 413 response headers that enable revalidation (such as "Last-Modified" 414 and "Etag") are often fairly large when compared to the overall DNS 415 response size, and have a variable nature that creates constant 416 pressure on the HTTP/2 compression dictionary [RFC7541]. Other types 417 of DNS data, such as zone transfers, may be larger and benefit more 418 from revalidation. 420 6.2. HTTP/2 422 HTTP/2 [RFC7540] is the minimum RECOMMENDED version of HTTP for use 423 with DOH. 425 The messages in classic UDP based DNS [RFC1035] are inherently 426 unordered and have low overhead. A competitive HTTP transport needs 427 to support reordering, parallelism, priority, and header compression 428 to achieve similar performance. Those features were introduced to 429 HTTP in HTTP/2 [RFC7540]. Earlier versions of HTTP are capable of 430 conveying the semantic requirements of DOH but may result in very 431 poor performance. 433 6.3. Server Push 435 Before using DOH response data for DNS resolution, the client MUST 436 establish that the HTTP request URI may be used for the DOH query. 437 For HTTP requests initiated by the DNS API client this is implicit in 438 the selection of URI. For HTTP server push ([RFC7540] Section 8.2) 439 extra care must be taken to ensure that the pushed URI is one that 440 the client would have directed the same query to if the client had 441 initiated the request. 443 6.4. Content Negotiation 445 In order to maximize interoperability, DNS API clients and DNS API 446 servers MUST support the "application/dns-message" media type. Other 447 media types MAY be used as defined by HTTP Content Negotiation 448 ([RFC7231] Section 3.4). Those media types MUST be flexible enough 449 to express every DNS query that would normally be sent in DNS over 450 UDP (including queries and responses that use DNS extensions, but not 451 those that require multiple responses). 453 7. DNS Wire Format 455 The data payload is the DNS on-the-wire format defined in [RFC1035]. 456 The format is for DNS over UDP. Note that this is different than the 457 wire format used in [RFC7858]. Also note that while [RFC1035] says 458 "Messages carried by UDP are restricted to 512 bytes", that was later 459 updated by [RFC6891]. This protocol allows DNS on-the-wire format 460 payloads of any size. 462 When using the GET method, the data payload MUST be encoded with 463 base64url [RFC4648] and then provided as a variable named "dns" to 464 the URI Template expansion. Padding characters for base64url MUST 465 NOT be included. 467 When using the POST method, the data payload MUST NOT be encoded and 468 is used directly as the HTTP message body. 470 DNS API clients using the DNS wire format MAY have one or more EDNS 471 options [RFC6891] in the request. 473 The media type is "application/dns-message". 475 8. IANA Considerations 477 8.1. Registration of application/dns-message Media Type 478 To: ietf-types@iana.org 479 Subject: Registration of MIME media type 480 application/dns-message 482 MIME media type name: application 484 MIME subtype name: dns-message 486 Required parameters: n/a 488 Optional parameters: n/a 490 Encoding considerations: This is a binary format. The contents are a 491 DNS message as defined in RFC 1035. The format used here is for DNS 492 over UDP, which is the format defined in the diagrams in RFC 1035. 494 Security considerations: The security considerations for carrying 495 this data are the same for carrying DNS without encryption. 497 Interoperability considerations: None. 499 Published specification: This document. 501 Applications that use this media type: 502 Systems that want to exchange full DNS messages. 504 Additional information: 506 Magic number(s): n/a 508 File extension(s): n/a 510 Macintosh file type code(s): n/a 512 Person & email address to contact for further information: 513 Paul Hoffman, paul.hoffman@icann.org 515 Intended usage: COMMON 517 Restrictions on usage: n/a 519 Author: Paul Hoffman, paul.hoffman@icann.org 521 Change controller: IESG 523 9. Security Considerations 525 Running DNS over HTTPS relies on the security of the underlying HTTP 526 transport. This mitigates classic amplification attacks for UDP- 527 based DNS. Implementations utilizing HTTP/2 benefit from the TLS 528 profile defined in [RFC7540] Section 9.2. 530 Session level encryption has well known weaknesses with respect to 531 traffic analysis which might be particularly acute when dealing with 532 DNS queries. HTTP/2 provides further advice about the use of 533 compression ([RFC7540] Section 10.6) and padding ([RFC7540] 534 Section 10.7 ). DNS API Servers can also add DNS padding [RFC7830] 535 if the DNS API requests it in the DNS query. 537 The HTTPS connection provides transport security for the interaction 538 between the DNS API server and client, but does not provide the 539 response integrity of DNS data provided by DNSSEC. DNSSEC and DOH 540 are independent and fully compatible protocols, each solving 541 different problems. The use of one does not diminish the need nor 542 the usefulness of the other. It is the choice of a client to either 543 perform full DNSSEC validation of answers or to trust the DNS API 544 server to do DNSSEC validation and inspect the AD (Authentic Data) 545 bit in the returned message to determine whether an answer was 546 authentic or not. As noted in Section 5.2, different response media 547 types will provide more or less information from a DNS response so 548 this choice may be affected by the response media type. 550 Section 6.1 describes the interaction of this protocol with HTTP 551 caching. An adversary that can control the cache used by the client 552 can affect that client's view of the DNS. This is no different than 553 the security implications of HTTP caching for other protocols that 554 use HTTP. 556 In the absence of DNSSEC information, a DNS API server can give a 557 client invalid data in response to a DNS query. Section 4 disallows 558 the use of DOH DNS responses that do not originate from configured 559 servers. This prohibition does not guarantee protection against 560 invalid data, but it does reduce the risk. 562 10. Operational Considerations 564 Local policy considerations and similar factors mean different DNS 565 servers may provide different results to the same query: for instance 566 in split DNS configurations [RFC6950]. It logically follows that the 567 server which is queried can influence the end result. Therefore a 568 client's choice of DNS server may affect the responses it gets to its 569 queries. For example, in the case of DNS64 [RFC6147], the choice 570 could affect whether IPv6/IPv4 translation will work at all. 572 The HTTPS channel used by this specification establishes secure two 573 party communication between the DNS API client and the DNS API 574 server. Filtering or inspection systems that rely on unsecured 575 transport of DNS will not function in a DNS over HTTPS environment. 577 Some HTTPS client implementations perform real time third party 578 checks of the revocation status of the certificates being used by 579 TLS. If this check is done as part of the DNS API server connection 580 procedure and the check itself requires DNS resolution to connect to 581 the third party a deadlock can occur. The use of OCSP [RFC6960] 582 servers or AIA for CRL fetching ([RFC5280] Section 4.2.2.1) are 583 examples of how this deadlock can happen. To mitigate the 584 possibility of deadlock, DNS API servers SHOULD NOT rely on DNS based 585 references to external resources in the TLS handshake. For OCSP the 586 server can bundle the certificate status as part of the handshake 587 using a mechanism appropriate to the version of TLS, such as using 588 [RFC6066] Section 8 for TLS version 1.2. AIA deadlocks can be 589 avoided by providing intermediate certificates that might otherwise 590 be obtained through additional requests. Note that these deadlocks 591 also need to be considered for server that a DNS API server might 592 redirect to. 594 A DNS API client may face a similar bootstrapping problem when the 595 HTTP request needs to resolve the hostname portion of the DNS URI. 596 Just as the address of a traditional DNS nameserver cannot be 597 originally determined from that same server, a DNS API client cannot 598 use its DNS API server to initially resolve the server's host name 599 into an address. Alternative strategies a client might employ 600 include making the initial resolution part of the configuration, IP 601 based URIs and corresponding IP based certificates for HTTPS, or 602 resolving the DNS API server's hostname via traditional DNS or 603 another DNS API server while still authenticating the resulting 604 connection via HTTPS. 606 HTTP [RFC7230] is a stateless application level protocol and 607 therefore DOH implementations do not provide stateful ordering 608 guarantees between different requests. DOH cannot be used as a 609 transport for other protocols that require strict ordering. 611 A DNS API server is allowed to answer queries with any valid DNS 612 response. For example, a valid DNS response might have the TC 613 (truncation) bit set in the DNS header to indicate that the server 614 was not able to retrieve a full answer for the query but is providing 615 the best answer it could get. A DNS API server can reply to queries 616 with an HTTP error for queries that it cannot fulfill. In this same 617 example, a DNS API server could use an HTTP error instead of a non- 618 error response that has the TC bit set. 620 Many extensions to DNS, using [RFC6891], have been defined over the 621 years. Extensions that are specific to the choice of transport, such 622 as [RFC7828], are not applicable to DOH. 624 11. References 626 11.1. Normative References 628 [RFC1035] Mockapetris, P., "Domain names - implementation and 629 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 630 November 1987, . 632 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 633 Requirement Levels", BCP 14, RFC 2119, 634 DOI 10.17487/RFC2119, March 1997, 635 . 637 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 638 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 639 . 641 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 642 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 643 . 645 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 646 (TLS) Protocol Version 1.2", RFC 5246, 647 DOI 10.17487/RFC5246, August 2008, 648 . 650 [RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., 651 and D. Orchard, "URI Template", RFC 6570, 652 DOI 10.17487/RFC6570, March 2012, 653 . 655 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 656 Protocol (HTTP/1.1): Message Syntax and Routing", 657 RFC 7230, DOI 10.17487/RFC7230, June 2014, 658 . 660 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 661 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 662 DOI 10.17487/RFC7231, June 2014, 663 . 665 [RFC7232] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 666 Protocol (HTTP/1.1): Conditional Requests", RFC 7232, 667 DOI 10.17487/RFC7232, June 2014, 668 . 670 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 671 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 672 RFC 7234, DOI 10.17487/RFC7234, June 2014, 673 . 675 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 676 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 677 DOI 10.17487/RFC7540, May 2015, 678 . 680 [RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for 681 HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, 682 . 684 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 685 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 686 May 2017, . 688 11.2. Informative References 690 [CORS] "Cross-Origin Resource Sharing", n.d., 691 . 693 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 694 DOI 10.17487/RFC2818, May 2000, 695 . 697 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 698 Housley, R., and W. Polk, "Internet X.509 Public Key 699 Infrastructure Certificate and Certificate Revocation List 700 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 701 . 703 [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale 704 Content", RFC 5861, DOI 10.17487/RFC5861, May 2010, 705 . 707 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 708 Extensions: Extension Definitions", RFC 6066, 709 DOI 10.17487/RFC6066, January 2011, 710 . 712 [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van 713 Beijnum, "DNS64: DNS Extensions for Network Address 714 Translation from IPv6 Clients to IPv4 Servers", RFC 6147, 715 DOI 10.17487/RFC6147, April 2011, 716 . 718 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 719 for DNS (EDNS(0))", STD 75, RFC 6891, 720 DOI 10.17487/RFC6891, April 2013, 721 . 723 [RFC6950] Peterson, J., Kolkman, O., Tschofenig, H., and B. Aboba, 724 "Architectural Considerations on Application Features in 725 the DNS", RFC 6950, DOI 10.17487/RFC6950, October 2013, 726 . 728 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 729 Galperin, S., and C. Adams, "X.509 Internet Public Key 730 Infrastructure Online Certificate Status Protocol - OCSP", 731 RFC 6960, DOI 10.17487/RFC6960, June 2013, 732 . 734 [RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 735 edns-tcp-keepalive EDNS0 Option", RFC 7828, 736 DOI 10.17487/RFC7828, April 2016, 737 . 739 [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, 740 DOI 10.17487/RFC7830, May 2016, 741 . 743 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 744 and P. Hoffman, "Specification for DNS over Transport 745 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 746 2016, . 748 Acknowledgments 750 This work required a high level of cooperation between experts in 751 different technologies. Thank you Ray Bellis, Stephane Bortzmeyer, 752 Manu Bretelle, Sara Dickinson, Tony Finch, Daniel Kahn Gilmor, Olafur 753 Guomundsson, Wes Hardaker, Rory Hewitt, Joe Hildebrand, David 754 Lawrence, Eliot Lear, John Mattson, Alex Mayrhofer, Mark Nottingham, 755 Jim Reid, Adam Roach, Ben Schwartz, Davey Song, Daniel Stenberg, 756 Andrew Sullivan, Martin Thomson, and Sam Weiler. 758 Previous Work on DNS over HTTP or in Other Formats 760 The following is an incomplete list of earlier work that related to 761 DNS over HTTP/1 or representing DNS data in other formats. 763 The list includes links to the tools.ietf.org site (because these 764 documents are all expired) and web sites of software. 766 o https://tools.ietf.org/html/draft-mohan-dns-query-xml 768 o https://tools.ietf.org/html/draft-daley-dnsxml 770 o https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof 772 o https://tools.ietf.org/html/draft-bortzmeyer-dns-json 774 o https://www.nlnetlabs.nl/projects/dnssec-trigger/ 776 Authors' Addresses 778 Paul Hoffman 779 ICANN 781 Email: paul.hoffman@icann.org 783 Patrick McManus 784 Mozilla 786 Email: mcmanus@ducksong.com