idnits 2.17.1 draft-ietf-doh-dns-over-https-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- 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 (May 16, 2018) is 2170 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) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7232 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7234 (Obsoleted by RFC 9111) ** Obsolete normative reference: RFC 7540 (Obsoleted by RFC 9113) Summary: 6 errors (**), 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: November 17, 2018 Mozilla 6 May 16, 2018 8 DNS Queries over HTTPS (DOH) 9 draft-ietf-doh-dns-over-https-08 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 November 17, 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 . . . . . . . . . . . . . . . . . . . . 6 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 . . . . . . . . . . . . . . . . . 14 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 Before using a DNS API server for DNS resolution, the client MUST 159 establish that the HTTP request URI is a trusted service for the DOH 160 query, in other words, a DNS API client MUST only use a DNS API 161 server that is configured as trustworthy. 163 A client MUST NOT use a DNS API server simply because it was 164 discovered, or because the client was told to use the DNS API server 165 by an untrusted party. 167 This specification does not extend DNS resolution privileges to URIs 168 that are not recognized by the DNS API client as trusted DNS API 169 servers. As such, use of untrusted servers is out of scope of this 170 document. 172 5. The HTTP Exchange 174 5.1. The HTTP Request 176 A DNS API client encodes a single DNS query into an HTTP request 177 using either the HTTP GET or POST method and the other requirements 178 of this section. The DNS API server defines the URI used by the 179 request through the use of a URI Template [RFC6570]. 181 Configuration and discovery of the URI Template is done out of band 182 from this protocol. DNS API Servers MAY support more than one URI. 183 This allows the different endpoints to have different properties such 184 as different authentication requirements or service level guarantees. 186 The URI Template defined in this document is processed without any 187 variables when the HTTP method is POST. When the HTTP method is GET 188 the single variable "dns" is defined as the content of the DNS 189 request (as described in Section 7), encoded with base64url 190 [RFC4648]. 192 Future specifications for new media types MUST define the variables 193 used for URI Template processing with this protocol. 195 DNS API servers MUST implement both the POST and GET methods. 197 When using the POST method the DNS query is included as the message 198 body of the HTTP request and the Content-Type request header 199 indicates the media type of the message. POST-ed requests are 200 smaller than their GET equivalents. 202 Using the GET method is friendlier to many HTTP cache 203 implementations. 205 The DNS API client SHOULD include an HTTP "Accept" request header to 206 indicate what type of content can be understood in response. 207 Irrespective of the value of the Accept request header, the client 208 MUST be prepared to process "application/dns-message" (as described 209 in Section 7) responses but MAY also process any other type it 210 receives. 212 In order to maximize cache friendliness, DNS API clients using media 213 formats that include DNS ID, such as application/dns-message, SHOULD 214 use a DNS ID of 0 in every DNS request. HTTP correlates the request 215 and response, thus eliminating the need for the ID in a media type 216 such as application/dns-message. The use of a varying DNS ID can 217 cause semantically equivalent DNS queries to be cached separately. 219 DNS API clients can use HTTP/2 padding and compression in the same 220 way that other HTTP/2 clients use (or don't use) them. 222 5.1.1. HTTP Request Examples 224 These examples use HTTP/2 style formatting from [RFC7540]. 226 These examples use a DNS API service with a URI Template of 227 "https://dnsserver.example.net/dns-query{?dns}" to resolve IN A 228 records. 230 The requests are represented as application/dns-message typed bodies. 232 The first example request uses GET to request www.example.com 234 :method = GET 235 :scheme = https 236 :authority = dnsserver.example.net 237 :path = /dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB 238 accept = application/dns-message 239 The same DNS query for www.example.com, using the POST method would 240 be: 242 :method = POST 243 :scheme = https 244 :authority = dnsserver.example.net 245 :path = /dns-query 246 accept = application/dns-message 247 content-type = application/dns-message 248 content-length = 33 250 <33 bytes represented by the following hex encoding> 251 00 00 01 00 00 01 00 00 00 00 00 00 03 77 77 77 252 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 253 01 255 Finally, a GET based query for a.62characterlabel-makes-base64url- 256 distinct-from-standard-base64.example.com is shown as an example to 257 emphasize that the encoding alphabet of base64url is different than 258 regular base64 and that padding is omitted. 260 The DNS query is 94 bytes represented by the following hex encoding 262 00 00 01 00 00 01 00 00 00 00 00 00 01 61 3e 36 263 32 63 68 61 72 61 63 74 65 72 6c 61 62 65 6c 2d 264 6d 61 6b 65 73 2d 62 61 73 65 36 34 75 72 6c 2d 265 64 69 73 74 69 6e 63 74 2d 66 72 6f 6d 2d 73 74 266 61 6e 64 61 72 64 2d 62 61 73 65 36 34 07 65 78 267 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 269 :method = GET 270 :scheme = https 271 :authority = dnsserver.example.net 272 :path = /dns-query? (no space or CR) 273 dns=AAABAAABAAAAAAAAAWE-NjJjaGFyYWN0ZXJsYWJl (no space or CR) 274 bC1tYWtlcy1iYXNlNjR1cmwtZGlzdGluY3QtZnJvbS1z (no space or CR) 275 dGFuZGFyZC1iYXNlNjQHZXhhbXBsZQNjb20AAAEAAQ 276 accept = application/dns-message 278 5.2. The HTTP Response 280 An HTTP response with a 2xx status code ([RFC7231] Section 6.3) 281 indicates a valid DNS response to the query made in the HTTP request. 282 A valid DNS response includes both success and failure responses. 283 For example, a DNS failure response such as SERVFAIL or NXDOMAIN will 284 be the message in a successful 2xx HTTP response even though there 285 was a failure at the DNS layer. Responses with non-successful HTTP 286 status codes do not contain DNS answers to the question in the 287 corresponding request. Some of these non-successful HTTP responses 288 (e.g., redirects or authentication failures) could mean that clients 289 need to make new requests to satisfy the original question. 291 Different response media types will provide more or less information 292 from a DNS response. For example, one response type might include 293 the information from the DNS header bytes while another might omit 294 it. The amount and type of information that a media type gives is 295 solely up to the format, and not defined in this protocol. 297 The only response type defined in this document is "application/dns- 298 message", but it is possible that other response formats will be 299 defined in the future. 301 The DNS response for "application/dns-message" in Section 7 MAY have 302 one or more EDNS options [RFC6891], depending on the extension 303 definition of the extensions given in the DNS request. 305 Each DNS request-response pair is matched to one HTTP exchange. The 306 responses may be processed and transported in any order using HTTP's 307 multi-streaming functionality ([RFC7540] Section 5). 309 Section 6.1 discusses the relationship between DNS and HTTP response 310 caching. 312 A DNS API server MUST be able to process application/dns-message 313 request messages. 315 A DNS API server SHOULD respond with HTTP status code 415 316 (Unsupported Media Type) upon receiving a media type it is unable to 317 process. 319 5.2.1. HTTP Response Example 321 This is an example response for a query for the IN A records for 322 "www.example.com" with recursion turned on. The response bears one 323 record with an address of 192.0.2.1 and a TTL of 128 seconds. 325 :status = 200 326 content-type = application/dns-message 327 content-length = 64 328 cache-control = max-age=128 330 <64 bytes represented by the following hex encoding> 331 00 00 81 80 00 01 00 01 00 00 00 00 03 77 77 77 332 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 333 01 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 334 6d 00 00 01 00 01 00 00 00 80 00 04 C0 00 02 01 336 6. HTTP Integration 338 This protocol MUST be used with the https scheme URI [RFC7230]. 340 6.1. Cache Interaction 342 A DOH exchange can pass through a hierarchy of caches that include 343 both HTTP and DNS specific caches. These caches may exist beteen the 344 DNS API server and client, or on the DNS API client itself. HTTP 345 caches are by design generic; that is, they do not understand this 346 protocol. Even if a DNS API client has modified its cache 347 implementation to be aware of DOH semantics, it does not follow that 348 all upstream caches (for example, inline proxies, server-side 349 gateways and Content Delivery Networks) will be. 351 As a result, DNS API servers need to carefully consider the HTTP 352 caching metadata they send in response to GET requests (POST requests 353 are not cacheable unless specific response headers are sent; this is 354 not widely implemented, and not advised for DOH). 356 In particular, DNS API servers SHOULD assign an explicit freshness 357 lifetime ([RFC7234] Section 4.2) so that the DNS API client is more 358 likely to use fresh DNS data. This requirement is due to HTTP caches 359 being able to assign their own heuristic freshness (such as that 360 described in [RFC7234] Section 4.2.2), which would take control of 361 the cache contents out of the hands of the DNS API server. 363 The assigned freshness lifetime of a DOH HTTP response SHOULD be the 364 smallest TTL in the Answer section of the DNS response. For example, 365 if a HTTP response carries three RRsets with TTLs of 30, 600, and 366 300, the HTTP freshness lifetime should be 30 seconds (which could be 367 specified as "Cache-Control: max-age=30"). The assigned freshness 368 lifetime MUST NOT be greater than the smallest TTL in the Answer 369 section of the DNS response. This requirement helps assure that none 370 of the RRsets contained in a DNS response are served stale from an 371 HTTP cache. 373 If the DNS response has no records in the Answer section, and the DNS 374 response has an SOA record in the Authority section, the response 375 freshness lifetime MUST NOT be greater than the MINIMUM field from 376 that SOA record (see [RFC2308]). 378 The stale-while-revalidate and stale-if-error Cache-Control 379 directives ([RFC5861]) could be well suited to a DOH implementation 380 when allowed by server policy. Those mechanisms allow a client, at 381 the server's discretion, to reuse a cache entry that is no longer 382 fresh. In such a case, the client reuses all of a cached entry, or 383 none of it. 385 DNS API servers also need to consider caching when generating 386 responses that are not globally valid. For instance, if a DNS API 387 server customizes a response based on the client's identity, it would 388 not want to allow global reuse of that response. This could be 389 accomplished through a variety of HTTP techniques such as a Cache- 390 Control max-age of 0, or by using the Vary response header ([RFC7231] 391 Section 7.1.4) to establish a secondary cache key ([RFC7234] 392 Section 4.1). 394 DNS API clients MUST account for the Age response header's value 395 ([RFC7234]) when calculating the DNS TTL of a response. For example, 396 if a RRset is received with a DNS TTL of 600, but the Age header 397 indicates that the response has been cached for 250 seconds, the 398 remaining lifetime of the RRset is 350 seconds. 400 DNS API clients can request an uncached copy of a response by using 401 the "no-cache" request cache control directive ([RFC7234], 402 Section 5.2.1.4) and similar controls. Note that some caches might 403 not honor these directives, either due to configuration or 404 interaction with traditional DNS caches that do not have such a 405 mechanism. 407 HTTP conditional requests ([RFC7232]) may be of limited value to DOH, 408 as revalidation provides only a bandwidth benefit and DNS 409 transactions are normally latency bound. Furthermore, the HTTP 410 response headers that enable revalidation (such as "Last-Modified" 411 and "Etag") are often fairly large when compared to the overall DNS 412 response size, and have a variable nature that creates constant 413 pressure on the HTTP/2 compression dictionary [RFC7541]. Other types 414 of DNS data, such as zone transfers, may be larger and benefit more 415 from revalidation. 417 6.2. HTTP/2 419 HTTP/2 [RFC7540] is the minimum RECOMMENDED version of HTTP for use 420 with DOH. 422 The messages in classic UDP based DNS [RFC1035] are inherently 423 unordered and have low overhead. A competitive HTTP transport needs 424 to support reordering, parallelism, priority, and header compression 425 to achieve similar performance. Those features were introduced to 426 HTTP in HTTP/2 [RFC7540]. Earlier versions of HTTP are capable of 427 conveying the semantic requirements of DOH but may result in very 428 poor performance. 430 6.3. Server Push 432 Before using DOH response data for DNS resolution, the client MUST 433 establish that the HTTP request URI may be used for the DOH query. 434 For HTTP requests initiated by the DNS API client this is implicit in 435 the selection of URI. For HTTP server push ([RFC7540] Section 8.2) 436 extra care must be taken to ensure that the pushed URI is one that 437 the client would have directed the same query to if the client had 438 initiated the request. 440 6.4. Content Negotiation 442 In order to maximize interoperability, DNS API clients and DNS API 443 servers MUST support the "application/dns-message" media type. Other 444 media types MAY be used as defined by HTTP Content Negotiation 445 ([RFC7231] Section 3.4). Those media types MUST be flexible enough 446 to express every DNS query that would normally be sent in DNS over 447 UDP (including queries and responses that use DNS extensions, but not 448 those that require multiple responses). 450 7. DNS Wire Format 452 The data payload is the DNS on-the-wire format defined in [RFC1035]. 453 The format is for DNS over UDP. Note that this is different than the 454 wire format used in [RFC7858]. Also note that while [RFC1035] says 455 "Messages carried by UDP are restricted to 512 bytes", that was later 456 updated by [RFC6891]. This protocol allows DNS on-the-wire format 457 payloads of any size. 459 When using the GET method, the data payload MUST be encoded with 460 base64url [RFC4648] and then provided as a variable named "dns" to 461 the URI Template expansion. Padding characters for base64url MUST 462 NOT be included. 464 When using the POST method, the data payload MUST NOT be encoded and 465 is used directly as the HTTP message body. 467 DNS API clients using the DNS wire format MAY have one or more EDNS 468 options [RFC6891] in the request. 470 The media type is "application/dns-message". 472 8. IANA Considerations 474 8.1. Registration of application/dns-message Media Type 475 To: ietf-types@iana.org 476 Subject: Registration of MIME media type 477 application/dns-message 479 MIME media type name: application 481 MIME subtype name: dns-message 483 Required parameters: n/a 485 Optional parameters: n/a 487 Encoding considerations: This is a binary format. The contents are a 488 DNS message as defined in RFC 1035. The format used here is for DNS 489 over UDP, which is the format defined in the diagrams in RFC 1035. 491 Security considerations: The security considerations for carrying 492 this data are the same for carrying DNS without encryption. 494 Interoperability considerations: None. 496 Published specification: This document. 498 Applications that use this media type: 499 Systems that want to exchange full DNS messages. 501 Additional information: 503 Magic number(s): n/a 505 File extension(s): n/a 507 Macintosh file type code(s): n/a 509 Person & email address to contact for further information: 510 Paul Hoffman, paul.hoffman@icann.org 512 Intended usage: COMMON 514 Restrictions on usage: n/a 516 Author: Paul Hoffman, paul.hoffman@icann.org 518 Change controller: IESG 520 9. Security Considerations 522 Running DNS over HTTPS relies on the security of the underlying HTTP 523 transport. This mitigates classic amplification attacks for UDP- 524 based DNS. Implementations utilizing HTTP/2 benefit from the TLS 525 profile defined in [RFC7540] Section 9.2. 527 Session level encryption has well known weaknesses with respect to 528 traffic analysis which might be particularly acute when dealing with 529 DNS queries. HTTP/2 provides further advice about the use of 530 compression ([RFC7540] Section 10.6) and padding ([RFC7540] 531 Section 10.7 ). DNS API Servers can also add DNS padding [RFC7830] 532 if the DNS API requests it in the DNS query. 534 The HTTPS connection provides transport security for the interaction 535 between the DNS API server and client, but does not provide the 536 response integrity of DNS data provided by DNSSEC. DNSSEC and DOH 537 are independent and fully compatible protocols, each solving 538 different problems. The use of one does not diminish the need nor 539 the usefulness of the other. It is the choice of a client to either 540 perform full DNSSEC validation of answers or to trust the DNS API 541 server to do DNSSEC validation and inspect the AD (Authentic Data) 542 bit in the returned message to determine whether an answer was 543 authentic or not. As noted in Section 5.2, different response media 544 types will provide more or less information from a DNS response so 545 this choice may be affected by the response media type. 547 Section 6.1 describes the interaction of this protocol with HTTP 548 caching. An adversary that can control the cache used by the client 549 can affect that client's view of the DNS. This is no different than 550 the security implications of HTTP caching for other protocols that 551 use HTTP. 553 In the absence of DNSSEC information, a DNS API server can give a 554 client invalid data in response to a DNS query. A client MUST NOT 555 use arbitrary DNS API servers. Instead, a client MUST only use DNS 556 API servers specified using mechanisms such as explicit 557 configuration. This does not guarantee protection against invalid 558 data but reduces the risk. 560 A client can use DNS over HTTPS as one of multiple mechanisms to 561 obtain DNS data. If a client of this protocol encounters an HTTP 562 error after sending a DNS query, and then falls back to a different 563 DNS retrieval mechanism, doing so can weaken the privacy and 564 authenticity expected by the user of the client. 566 10. Operational Considerations 568 Local policy considerations and similar factors mean different DNS 569 servers may provide different results to the same query: for instance 570 in split DNS configurations [RFC6950]. It logically follows that the 571 server which is queried can influence the end result. Therefore a 572 client's choice of DNS server may affect the responses it gets to its 573 queries. For example, in the case of DNS64 [RFC6147], the choice 574 could affect whether IPv6/IPv4 translation will work at all. 576 The HTTPS channel used by this specification establishes secure two 577 party communication between the DNS API client and the DNS API 578 server. Filtering or inspection systems that rely on unsecured 579 transport of DNS will not function in a DNS over HTTPS environment. 581 Some HTTPS client implementations perform real time third party 582 checks of the revocation status of the certificates being used by 583 TLS. If this check is done as part of the DNS API server connection 584 procedure and the check itself requires DNS resolution to connect to 585 the third party a deadlock can occur. The use of OCSP [RFC6960] 586 servers or AIA for CRL fetching ([RFC5280] Section 4.2.2.1) are 587 examples of how this deadlock can happen. To mitigate the 588 possibility of deadlock, DNS API servers SHOULD NOT rely on DNS based 589 references to external resources in the TLS handshake. For OCSP the 590 server can bundle the certificate status as part of the handshake 591 using a mechanism appropriate to the version of TLS, such as using 592 [RFC6066] Section 8 for TLS version 1.2. AIA deadlocks can be 593 avoided by providing intermediate certificates that might otherwise 594 be obtained through additional requests. Note that these deadlocks 595 also need to be considered for server that a DNS API server might 596 redirect to. 598 A DNS API client may face a similar bootstrapping problem when the 599 HTTP request needs to resolve the hostname portion of the DNS URI. 600 Just as the address of a traditional DNS nameserver cannot be 601 originally determined from that same server, a DNS API client cannot 602 use its DNS API server to initially resolve the server's host name 603 into an address. Alternative strategies a client might employ 604 include making the initial resolution part of the configuration, IP 605 based URIs and corresponding IP based certificates for HTTPS, or 606 resolving the DNS API server's hostname via traditional DNS or 607 another DNS API server while still authenticating the resulting 608 connection via HTTPS. 610 HTTP [RFC7230] is a stateless application level protocol and 611 therefore DOH implementations do not provide stateful ordering 612 guarantees between different requests. DOH cannot be used as a 613 transport for other protocols that require strict ordering. 615 A DNS API server is allowed to answer queries with any valid DNS 616 response. For example, a valid DNS response might have the TC 617 (truncation) bit set in the DNS header to indicate that the server 618 was not able to retrieve a full answer for the query but is providing 619 the best answer it could get. A DNS API server can reply to queries 620 with an HTTP error for queries that it cannot fulfill. In this same 621 example, a DNS API server could use an HTTP error instead of a non- 622 error response that has the TC bit set. 624 Many extensions to DNS, using [RFC6891], have been defined over the 625 years. Extensions that are specific to the choice of transport, such 626 as [RFC7828], are not applicable to DOH. 628 11. References 630 11.1. Normative References 632 [RFC1035] Mockapetris, P., "Domain names - implementation and 633 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 634 November 1987, . 636 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 637 Requirement Levels", BCP 14, RFC 2119, 638 DOI 10.17487/RFC2119, March 1997, 639 . 641 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 642 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 643 . 645 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 646 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 647 . 649 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 650 (TLS) Protocol Version 1.2", RFC 5246, 651 DOI 10.17487/RFC5246, August 2008, 652 . 654 [RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., 655 and D. Orchard, "URI Template", RFC 6570, 656 DOI 10.17487/RFC6570, March 2012, 657 . 659 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 660 Protocol (HTTP/1.1): Message Syntax and Routing", 661 RFC 7230, DOI 10.17487/RFC7230, June 2014, 662 . 664 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 665 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 666 DOI 10.17487/RFC7231, June 2014, 667 . 669 [RFC7232] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 670 Protocol (HTTP/1.1): Conditional Requests", RFC 7232, 671 DOI 10.17487/RFC7232, June 2014, 672 . 674 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 675 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 676 RFC 7234, DOI 10.17487/RFC7234, June 2014, 677 . 679 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 680 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 681 DOI 10.17487/RFC7540, May 2015, 682 . 684 [RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for 685 HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, 686 . 688 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 689 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 690 May 2017, . 692 11.2. Informative References 694 [CORS] "Cross-Origin Resource Sharing", n.d., 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