idnits 2.17.1 draft-ietf-doh-dns-over-https-09.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 24, 2018) is 2163 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) -- Obsolete informational reference (is this intentional?): RFC 2818 (Obsoleted by RFC 9110) Summary: 6 errors (**), 0 flaws (~~), 1 warning (==), 3 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 25, 2018 Mozilla 6 May 24, 2018 8 DNS Queries over HTTPS (DOH) 9 draft-ietf-doh-dns-over-https-09 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 25, 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 . . . . . . . . . . . . . . . . . . . . . . . . . 9 62 6.3. Server Push . . . . . . . . . . . . . . . . . . . . . . . 10 63 6.4. Content Negotiation . . . . . . . . . . . . . . . . . . . 10 64 7. DNS Wire Format . . . . . . . . . . . . . . . . . . . . . . . 10 65 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 66 8.1. Registration of application/dns-message Media Type . . . 11 67 9. Security Considerations . . . . . . . . . . . . . . . . . . . 12 68 10. Operational Considerations . . . . . . . . . . . . . . . . . 12 69 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 70 11.1. Normative References . . . . . . . . . . . . . . . . . . 14 71 11.2. Informative References . . . . . . . . . . . . . . . . . 15 72 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 16 73 Previous Work on DNS over HTTP or in Other Formats . . . . . . . 17 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 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 A DNS API client uses configuration to select the URI, and thus the 159 DNS API server, used for resolution. A client MUST NOT use a DNS API 160 server simply because it was discovered, or because the client was 161 told to use the DNS API server by an untrusted party. [RFC2818] 162 defines how HTTPS verifies the server's identity. 164 This specification does not extend DNS resolution privileges to URIs 165 that are not recognized by the DNS API client as trusted DNS API 166 servers. As such, use of untrusted servers is out of scope of this 167 document. 169 5. The HTTP Exchange 171 5.1. The HTTP Request 173 A DNS API client encodes a single DNS query into an HTTP request 174 using either the HTTP GET or POST method and the other requirements 175 of this section. The DNS API server defines the URI used by the 176 request through the use of a URI Template [RFC6570]. 178 Configuration and discovery of the URI Template is done out of band 179 from this protocol. DNS API Servers MAY support more than one URI. 180 This allows the different endpoints to have different properties such 181 as different authentication requirements or service level guarantees. 183 The URI Template defined in this document is processed without any 184 variables when the HTTP method is POST. When the HTTP method is GET 185 the single variable "dns" is defined as the content of the DNS 186 request (as described in Section 7), encoded with base64url 187 [RFC4648]. 189 Future specifications for new media types MUST define the variables 190 used for URI Template processing with this protocol. 192 DNS API servers MUST implement both the POST and GET methods. 194 When using the POST method the DNS query is included as the message 195 body of the HTTP request and the Content-Type request header 196 indicates the media type of the message. POST-ed requests are 197 smaller than their GET equivalents. 199 Using the GET method is friendlier to many HTTP cache 200 implementations. 202 The DNS API client SHOULD include an HTTP "Accept" request header to 203 indicate what type of content can be understood in response. 204 Irrespective of the value of the Accept request header, the client 205 MUST be prepared to process "application/dns-message" (as described 206 in Section 7) responses but MAY also process any other type it 207 receives. 209 In order to maximize cache friendliness, DNS API clients using media 210 formats that include DNS ID, such as application/dns-message, SHOULD 211 use a DNS ID of 0 in every DNS request. HTTP correlates the request 212 and response, thus eliminating the need for the ID in a media type 213 such as application/dns-message. The use of a varying DNS ID can 214 cause semantically equivalent DNS queries to be cached separately. 216 DNS API clients can use HTTP/2 padding and compression in the same 217 way that other HTTP/2 clients use (or don't use) them. 219 5.1.1. HTTP Request Examples 221 These examples use HTTP/2 style formatting from [RFC7540]. 223 These examples use a DNS API service with a URI Template of 224 "https://dnsserver.example.net/dns-query{?dns}" to resolve IN A 225 records. 227 The requests are represented as application/dns-message typed bodies. 229 The first example request uses GET to request www.example.com 231 :method = GET 232 :scheme = https 233 :authority = dnsserver.example.net 234 :path = /dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB 235 accept = application/dns-message 237 The same DNS query for www.example.com, using the POST method would 238 be: 240 :method = POST 241 :scheme = https 242 :authority = dnsserver.example.net 243 :path = /dns-query 244 accept = application/dns-message 245 content-type = application/dns-message 246 content-length = 33 248 <33 bytes represented by the following hex encoding> 249 00 00 01 00 00 01 00 00 00 00 00 00 03 77 77 77 250 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 251 01 253 Finally, a GET based query for a.62characterlabel-makes-base64url- 254 distinct-from-standard-base64.example.com is shown as an example to 255 emphasize that the encoding alphabet of base64url is different than 256 regular base64 and that padding is omitted. 258 The DNS query is 94 bytes represented by the following hex encoding 260 00 00 01 00 00 01 00 00 00 00 00 00 01 61 3e 36 261 32 63 68 61 72 61 63 74 65 72 6c 61 62 65 6c 2d 262 6d 61 6b 65 73 2d 62 61 73 65 36 34 75 72 6c 2d 263 64 69 73 74 69 6e 63 74 2d 66 72 6f 6d 2d 73 74 264 61 6e 64 61 72 64 2d 62 61 73 65 36 34 07 65 78 265 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 267 :method = GET 268 :scheme = https 269 :authority = dnsserver.example.net 270 :path = /dns-query? (no space or CR) 271 dns=AAABAAABAAAAAAAAAWE-NjJjaGFyYWN0ZXJsYWJl (no space or CR) 272 bC1tYWtlcy1iYXNlNjR1cmwtZGlzdGluY3QtZnJvbS1z (no space or CR) 273 dGFuZGFyZC1iYXNlNjQHZXhhbXBsZQNjb20AAAEAAQ 274 accept = application/dns-message 276 5.2. The HTTP Response 278 An HTTP response with a 2xx status code ([RFC7231] Section 6.3) 279 indicates a valid DNS response to the query made in the HTTP request. 280 A valid DNS response includes both success and failure responses. 281 For example, a DNS failure response such as SERVFAIL or NXDOMAIN will 282 be the message in a successful 2xx HTTP response even though there 283 was a failure at the DNS layer. Responses with non-successful HTTP 284 status codes do not contain DNS answers to the question in the 285 corresponding request. Some of these non-successful HTTP responses 286 (e.g., redirects or authentication failures) could mean that clients 287 need to make new requests to satisfy the original question. 289 Different response media types will provide more or less information 290 from a DNS response. For example, one response type might include 291 the information from the DNS header bytes while another might omit 292 it. The amount and type of information that a media type gives is 293 solely up to the format, and not defined in this protocol. 295 The only response type defined in this document is "application/dns- 296 message", but it is possible that other response formats will be 297 defined in the future. 299 The DNS response for "application/dns-message" in Section 7 MAY have 300 one or more EDNS options [RFC6891], depending on the extension 301 definition of the extensions given in the DNS request. 303 Each DNS request-response pair is matched to one HTTP exchange. The 304 responses may be processed and transported in any order using HTTP's 305 multi-streaming functionality ([RFC7540] Section 5). 307 Section 6.1 discusses the relationship between DNS and HTTP response 308 caching. 310 A DNS API server MUST be able to process application/dns-message 311 request messages. 313 A DNS API server SHOULD respond with HTTP status code 415 314 (Unsupported Media Type) upon receiving a media type it is unable to 315 process. 317 5.2.1. HTTP Response Example 319 This is an example response for a query for the IN A records for 320 "www.example.com" with recursion turned on. The response bears one 321 record with an address of 192.0.2.1 and a TTL of 128 seconds. 323 :status = 200 324 content-type = application/dns-message 325 content-length = 64 326 cache-control = max-age=128 328 <64 bytes represented by the following hex encoding> 329 00 00 81 80 00 01 00 01 00 00 00 00 03 77 77 77 330 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 331 01 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 332 6d 00 00 01 00 01 00 00 00 80 00 04 C0 00 02 01 334 6. HTTP Integration 336 This protocol MUST be used with the https scheme URI [RFC7230]. 338 6.1. Cache Interaction 340 A DOH exchange can pass through a hierarchy of caches that include 341 both HTTP and DNS specific caches. These caches may exist beteen the 342 DNS API server and client, or on the DNS API client itself. HTTP 343 caches are by design generic; that is, they do not understand this 344 protocol. Even if a DNS API client has modified its cache 345 implementation to be aware of DOH semantics, it does not follow that 346 all upstream caches (for example, inline proxies, server-side 347 gateways and Content Delivery Networks) will be. 349 As a result, DNS API servers need to carefully consider the HTTP 350 caching metadata they send in response to GET requests (POST requests 351 are not cacheable unless specific response headers are sent; this is 352 not widely implemented, and not advised for DOH). 354 In particular, DNS API servers SHOULD assign an explicit freshness 355 lifetime ([RFC7234] Section 4.2) so that the DNS API client is more 356 likely to use fresh DNS data. This requirement is due to HTTP caches 357 being able to assign their own heuristic freshness (such as that 358 described in [RFC7234] Section 4.2.2), which would take control of 359 the cache contents out of the hands of the DNS API server. 361 The assigned freshness lifetime of a DOH HTTP response SHOULD be the 362 smallest TTL in the Answer section of the DNS response. For example, 363 if a HTTP response carries three RRsets with TTLs of 30, 600, and 364 300, the HTTP freshness lifetime should be 30 seconds (which could be 365 specified as "Cache-Control: max-age=30"). The assigned freshness 366 lifetime MUST NOT be greater than the smallest TTL in the Answer 367 section of the DNS response. This requirement helps assure that none 368 of the RRsets contained in a DNS response are served stale from an 369 HTTP cache. 371 If the DNS response has no records in the Answer section, and the DNS 372 response has an SOA record in the Authority section, the response 373 freshness lifetime MUST NOT be greater than the MINIMUM field from 374 that SOA record (see [RFC2308]). 376 The stale-while-revalidate and stale-if-error Cache-Control 377 directives ([RFC5861]) could be well suited to a DOH implementation 378 when allowed by server policy. Those mechanisms allow a client, at 379 the server's discretion, to reuse a cache entry that is no longer 380 fresh. In such a case, the client reuses all of a cached entry, or 381 none of it. 383 DNS API servers also need to consider caching when generating 384 responses that are not globally valid. For instance, if a DNS API 385 server customizes a response based on the client's identity, it would 386 not want to allow global reuse of that response. This could be 387 accomplished through a variety of HTTP techniques such as a Cache- 388 Control max-age of 0, or by using the Vary response header ([RFC7231] 389 Section 7.1.4) to establish a secondary cache key ([RFC7234] 390 Section 4.1). 392 DNS API clients MUST account for the Age response header's value 393 ([RFC7234]) when calculating the DNS TTL of a response. For example, 394 if a RRset is received with a DNS TTL of 600, but the Age header 395 indicates that the response has been cached for 250 seconds, the 396 remaining lifetime of the RRset is 350 seconds. 398 DNS API clients can request an uncached copy of a response by using 399 the "no-cache" request cache control directive ([RFC7234], 400 Section 5.2.1.4) and similar controls. Note that some caches might 401 not honor these directives, either due to configuration or 402 interaction with traditional DNS caches that do not have such a 403 mechanism. 405 HTTP conditional requests ([RFC7232]) may be of limited value to DOH, 406 as revalidation provides only a bandwidth benefit and DNS 407 transactions are normally latency bound. Furthermore, the HTTP 408 response headers that enable revalidation (such as "Last-Modified" 409 and "Etag") are often fairly large when compared to the overall DNS 410 response size, and have a variable nature that creates constant 411 pressure on the HTTP/2 compression dictionary [RFC7541]. Other types 412 of DNS data, such as zone transfers, may be larger and benefit more 413 from revalidation. 415 6.2. HTTP/2 417 HTTP/2 [RFC7540] is the minimum RECOMMENDED version of HTTP for use 418 with DOH. 420 The messages in classic UDP based DNS [RFC1035] are inherently 421 unordered and have low overhead. A competitive HTTP transport needs 422 to support reordering, parallelism, priority, and header compression 423 to achieve similar performance. Those features were introduced to 424 HTTP in HTTP/2 [RFC7540]. Earlier versions of HTTP are capable of 425 conveying the semantic requirements of DOH but may result in very 426 poor performance. 428 6.3. Server Push 430 Before using DOH response data for DNS resolution, the client MUST 431 establish that the HTTP request URI may be used for the DOH query. 432 For HTTP requests initiated by the DNS API client this is implicit in 433 the selection of URI. For HTTP server push ([RFC7540] Section 8.2) 434 extra care must be taken to ensure that the pushed URI is one that 435 the client would have directed the same query to if the client had 436 initiated the request. 438 6.4. Content Negotiation 440 In order to maximize interoperability, DNS API clients and DNS API 441 servers MUST support the "application/dns-message" media type. Other 442 media types MAY be used as defined by HTTP Content Negotiation 443 ([RFC7231] Section 3.4). Those media types MUST be flexible enough 444 to express every DNS query that would normally be sent in DNS over 445 UDP (including queries and responses that use DNS extensions, but not 446 those that require multiple responses). 448 7. DNS Wire Format 450 The data payload is the DNS on-the-wire format defined in [RFC1035]. 451 The format is for DNS over UDP. Note that this is different than the 452 wire format used in [RFC7858]. Also note that while [RFC1035] says 453 "Messages carried by UDP are restricted to 512 bytes", that was later 454 updated by [RFC6891]. This protocol allows DNS on-the-wire format 455 payloads of any size. 457 When using the GET method, the data payload MUST be encoded with 458 base64url [RFC4648] and then provided as a variable named "dns" to 459 the URI Template expansion. Padding characters for base64url MUST 460 NOT be included. 462 When using the POST method, the data payload MUST NOT be encoded and 463 is used directly as the HTTP message body. 465 DNS API clients using the DNS wire format MAY have one or more EDNS 466 options [RFC6891] in the request. 468 The media type is "application/dns-message". 470 8. IANA Considerations 471 8.1. Registration of application/dns-message Media Type 473 To: ietf-types@iana.org 474 Subject: Registration of MIME media type 475 application/dns-message 477 MIME media type name: application 479 MIME subtype name: dns-message 481 Required parameters: n/a 483 Optional parameters: n/a 485 Encoding considerations: This is a binary format. The contents are a 486 DNS message as defined in RFC 1035. The format used here is for DNS 487 over UDP, which is the format defined in the diagrams in RFC 1035. 489 Security considerations: The security considerations for carrying 490 this data are the same for carrying DNS without encryption. 492 Interoperability considerations: None. 494 Published specification: This document. 496 Applications that use this media type: 497 Systems that want to exchange full DNS messages. 499 Additional information: 501 Magic number(s): n/a 503 File extension(s): n/a 505 Macintosh file type code(s): n/a 507 Person & email address to contact for further information: 508 Paul Hoffman, paul.hoffman@icann.org 510 Intended usage: COMMON 512 Restrictions on usage: n/a 514 Author: Paul Hoffman, paul.hoffman@icann.org 516 Change controller: IESG 518 9. Security Considerations 520 Running DNS over HTTPS relies on the security of the underlying HTTP 521 transport. This mitigates classic amplification attacks for UDP- 522 based DNS. Implementations utilizing HTTP/2 benefit from the TLS 523 profile defined in [RFC7540] Section 9.2. 525 Session level encryption has well known weaknesses with respect to 526 traffic analysis which might be particularly acute when dealing with 527 DNS queries. HTTP/2 provides further advice about the use of 528 compression ([RFC7540] Section 10.6) and padding ([RFC7540] 529 Section 10.7 ). DNS API Servers can also add DNS padding [RFC7830] 530 if the DNS API requests it in the DNS query. 532 The HTTPS connection provides transport security for the interaction 533 between the DNS API server and client, but does not provide the 534 response integrity of DNS data provided by DNSSEC. DNSSEC and DOH 535 are independent and fully compatible protocols, each solving 536 different problems. The use of one does not diminish the need nor 537 the usefulness of the other. It is the choice of a client to either 538 perform full DNSSEC validation of answers or to trust the DNS API 539 server to do DNSSEC validation and inspect the AD (Authentic Data) 540 bit in the returned message to determine whether an answer was 541 authentic or not. As noted in Section 5.2, different response media 542 types will provide more or less information from a DNS response so 543 this choice may be affected by the response media type. 545 Section 6.1 describes the interaction of this protocol with HTTP 546 caching. An adversary that can control the cache used by the client 547 can affect that client's view of the DNS. This is no different than 548 the security implications of HTTP caching for other protocols that 549 use HTTP. 551 In the absence of DNSSEC information, a DNS API server can give a 552 client invalid data in response to a DNS query. A client MUST NOT 553 use arbitrary DNS API servers. Instead, a client MUST only use DNS 554 API servers specified using mechanisms such as explicit 555 configuration. This does not guarantee protection against invalid 556 data but reduces the risk. 558 10. Operational Considerations 560 Local policy considerations and similar factors mean different DNS 561 servers may provide different results to the same query: for instance 562 in split DNS configurations [RFC6950]. It logically follows that the 563 server which is queried can influence the end result. Therefore a 564 client's choice of DNS server may affect the responses it gets to its 565 queries. For example, in the case of DNS64 [RFC6147], the choice 566 could affect whether IPv6/IPv4 translation will work at all. 568 The HTTPS channel used by this specification establishes secure two 569 party communication between the DNS API client and the DNS API 570 server. Filtering or inspection systems that rely on unsecured 571 transport of DNS will not function in a DNS over HTTPS environment. 573 Some HTTPS client implementations perform real time third party 574 checks of the revocation status of the certificates being used by 575 TLS. If this check is done as part of the DNS API server connection 576 procedure and the check itself requires DNS resolution to connect to 577 the third party a deadlock can occur. The use of OCSP [RFC6960] 578 servers or AIA for CRL fetching ([RFC5280] Section 4.2.2.1) are 579 examples of how this deadlock can happen. To mitigate the 580 possibility of deadlock, DNS API servers SHOULD NOT rely on DNS based 581 references to external resources in the TLS handshake. For OCSP the 582 server can bundle the certificate status as part of the handshake 583 using a mechanism appropriate to the version of TLS, such as using 584 [RFC6066] Section 8 for TLS version 1.2. AIA deadlocks can be 585 avoided by providing intermediate certificates that might otherwise 586 be obtained through additional requests. Note that these deadlocks 587 also need to be considered for server that a DNS API server might 588 redirect to. 590 A DNS API client may face a similar bootstrapping problem when the 591 HTTP request needs to resolve the hostname portion of the DNS URI. 592 Just as the address of a traditional DNS nameserver cannot be 593 originally determined from that same server, a DNS API client cannot 594 use its DNS API server to initially resolve the server's host name 595 into an address. Alternative strategies a client might employ 596 include making the initial resolution part of the configuration, IP 597 based URIs and corresponding IP based certificates for HTTPS, or 598 resolving the DNS API server's hostname via traditional DNS or 599 another DNS API server while still authenticating the resulting 600 connection via HTTPS. 602 HTTP [RFC7230] is a stateless application level protocol and 603 therefore DOH implementations do not provide stateful ordering 604 guarantees between different requests. DOH cannot be used as a 605 transport for other protocols that require strict ordering. 607 A DNS API server is allowed to answer queries with any valid DNS 608 response. For example, a valid DNS response might have the TC 609 (truncation) bit set in the DNS header to indicate that the server 610 was not able to retrieve a full answer for the query but is providing 611 the best answer it could get. A DNS API server can reply to queries 612 with an HTTP error for queries that it cannot fulfill. In this same 613 example, a DNS API server could use an HTTP error instead of a non- 614 error response that has the TC bit set. 616 Many extensions to DNS, using [RFC6891], have been defined over the 617 years. Extensions that are specific to the choice of transport, such 618 as [RFC7828], are not applicable to DOH. 620 11. References 622 11.1. Normative References 624 [RFC1035] Mockapetris, P., "Domain names - implementation and 625 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 626 November 1987, . 628 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 629 Requirement Levels", BCP 14, RFC 2119, 630 DOI 10.17487/RFC2119, March 1997, 631 . 633 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 634 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 635 . 637 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 638 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 639 . 641 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 642 (TLS) Protocol Version 1.2", RFC 5246, 643 DOI 10.17487/RFC5246, August 2008, 644 . 646 [RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., 647 and D. Orchard, "URI Template", RFC 6570, 648 DOI 10.17487/RFC6570, March 2012, 649 . 651 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 652 Protocol (HTTP/1.1): Message Syntax and Routing", 653 RFC 7230, DOI 10.17487/RFC7230, June 2014, 654 . 656 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 657 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 658 DOI 10.17487/RFC7231, June 2014, 659 . 661 [RFC7232] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 662 Protocol (HTTP/1.1): Conditional Requests", RFC 7232, 663 DOI 10.17487/RFC7232, June 2014, 664 . 666 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 667 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 668 RFC 7234, DOI 10.17487/RFC7234, June 2014, 669 . 671 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 672 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 673 DOI 10.17487/RFC7540, May 2015, 674 . 676 [RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for 677 HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, 678 . 680 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 681 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 682 May 2017, . 684 11.2. Informative References 686 [CORS] "Cross-Origin Resource Sharing", n.d., 687 . 689 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 690 DOI 10.17487/RFC2818, May 2000, 691 . 693 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 694 Housley, R., and W. Polk, "Internet X.509 Public Key 695 Infrastructure Certificate and Certificate Revocation List 696 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 697 . 699 [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale 700 Content", RFC 5861, DOI 10.17487/RFC5861, May 2010, 701 . 703 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 704 Extensions: Extension Definitions", RFC 6066, 705 DOI 10.17487/RFC6066, January 2011, 706 . 708 [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van 709 Beijnum, "DNS64: DNS Extensions for Network Address 710 Translation from IPv6 Clients to IPv4 Servers", RFC 6147, 711 DOI 10.17487/RFC6147, April 2011, 712 . 714 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 715 for DNS (EDNS(0))", STD 75, RFC 6891, 716 DOI 10.17487/RFC6891, April 2013, 717 . 719 [RFC6950] Peterson, J., Kolkman, O., Tschofenig, H., and B. Aboba, 720 "Architectural Considerations on Application Features in 721 the DNS", RFC 6950, DOI 10.17487/RFC6950, October 2013, 722 . 724 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 725 Galperin, S., and C. Adams, "X.509 Internet Public Key 726 Infrastructure Online Certificate Status Protocol - OCSP", 727 RFC 6960, DOI 10.17487/RFC6960, June 2013, 728 . 730 [RFC7828] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 731 edns-tcp-keepalive EDNS0 Option", RFC 7828, 732 DOI 10.17487/RFC7828, April 2016, 733 . 735 [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, 736 DOI 10.17487/RFC7830, May 2016, 737 . 739 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 740 and P. Hoffman, "Specification for DNS over Transport 741 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 742 2016, . 744 Acknowledgments 746 This work required a high level of cooperation between experts in 747 different technologies. Thank you Ray Bellis, Stephane Bortzmeyer, 748 Manu Bretelle, Sara Dickinson, Tony Finch, Daniel Kahn Gilmor, Olafur 749 Guomundsson, Wes Hardaker, Rory Hewitt, Joe Hildebrand, David 750 Lawrence, Eliot Lear, John Mattson, Alex Mayrhofer, Mark Nottingham, 751 Jim Reid, Adam Roach, Ben Schwartz, Davey Song, Daniel Stenberg, 752 Andrew Sullivan, Martin Thomson, and Sam Weiler. 754 Previous Work on DNS over HTTP or in Other Formats 756 The following is an incomplete list of earlier work that related to 757 DNS over HTTP/1 or representing DNS data in other formats. 759 The list includes links to the tools.ietf.org site (because these 760 documents are all expired) and web sites of software. 762 o https://tools.ietf.org/html/draft-mohan-dns-query-xml 764 o https://tools.ietf.org/html/draft-daley-dnsxml 766 o https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof 768 o https://tools.ietf.org/html/draft-bortzmeyer-dns-json 770 o https://www.nlnetlabs.nl/projects/dnssec-trigger/ 772 Authors' Addresses 774 Paul Hoffman 775 ICANN 777 Email: paul.hoffman@icann.org 779 Patrick McManus 780 Mozilla 782 Email: mcmanus@ducksong.com