idnits 2.17.1 draft-ietf-doh-dns-over-https-05.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 abstract seems to contain references ([1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. -- 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 seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (April 02, 2018) is 2214 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) -- Looks like a reference, but probably isn't: '1' on line 715 ** 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 7234 (Obsoleted by RFC 9111) ** Obsolete normative reference: RFC 7540 (Obsoleted by RFC 9113) -- Obsolete informational reference (is this intentional?): RFC 7719 (Obsoleted by RFC 8499) Summary: 6 errors (**), 0 flaws (~~), 2 warnings (==), 4 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: October 4, 2018 Mozilla 6 April 02, 2018 8 DNS Queries over HTTPS 9 draft-ietf-doh-dns-over-https-05 11 Abstract 13 This document describes how to run DNS service over HTTP using 14 https:// URIs. 16 [[ There is a repository for this draft at https://github.com/dohwg/ 17 draft-ietf-doh-dns-over-https [1] ]]. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on October 4, 2018. 36 Copyright Notice 38 Copyright (c) 2018 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (https://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 3. Protocol Requirements . . . . . . . . . . . . . . . . . . . . 3 56 3.1. Non-requirements . . . . . . . . . . . . . . . . . . . . 4 57 4. The HTTP Request . . . . . . . . . . . . . . . . . . . . . . 4 58 4.1. DNS Wire Format . . . . . . . . . . . . . . . . . . . . . 5 59 4.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 5 60 5. The HTTP Response . . . . . . . . . . . . . . . . . . . . . . 6 61 5.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 8 62 6. HTTP Integration . . . . . . . . . . . . . . . . . . . . . . 8 63 6.1. Cache Interaction . . . . . . . . . . . . . . . . . . . . 8 64 6.2. HTTP/2 . . . . . . . . . . . . . . . . . . . . . . . . . 9 65 6.3. Server Push . . . . . . . . . . . . . . . . . . . . . . . 9 66 6.4. Content Negotiation . . . . . . . . . . . . . . . . . . . 10 67 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 68 7.1. Registration of application/dns-udpwireformat Media Type 10 69 8. Security Considerations . . . . . . . . . . . . . . . . . . . 12 70 9. Operational Considerations . . . . . . . . . . . . . . . . . 13 71 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 14 72 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 73 11.1. Normative References . . . . . . . . . . . . . . . . . . 14 74 11.2. Informative References . . . . . . . . . . . . . . . . . 15 75 11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 16 76 Appendix A. Previous Work on DNS over HTTP or in Other Formats . 16 77 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 79 1. Introduction 81 This document defines a specific protocol for sending DNS [RFC1035] 82 queries and getting DNS responses over HTTP [RFC7540] using https:// 83 (and therefore TLS [RFC5246] security for integrity and 84 confidentiality). Each DNS query-response pair is mapped into a HTTP 85 request-response pair. 87 The described approach is more than a tunnel over HTTP. It 88 establishes default media formatting types for requests and responses 89 but uses normal HTTP content negotiation mechanisms for selecting 90 alternatives that endpoints may prefer in anticipation of serving new 91 use cases. In addition to this media type negotiation, it aligns 92 itself with HTTP features such as caching, redirection, proxying, 93 authentication, and compression. 95 The integration with HTTP provides a transport suitable for both 96 traditional DNS clients and native web applications seeking access to 97 the DNS. 99 Two primary uses cases were considered during this protocol's 100 development. They included preventing on-path devices from 101 interfering with DNS operations and allowing web applications to 102 access DNS information via existing browser APIs in a safe way 103 consistent with Cross Origin Resource Sharing (CORS) [CORS]. There 104 are certainly other uses for this work. 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 uses the regular DNS 110 protocol). Similarly, a client that supports this protocol is called 111 a "DNS API client". 113 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 114 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 115 "OPTIONAL" in this document are to be interpreted as described in BCP 116 14, RFC8174 [RFC8174] when, and only when, they appear in all 117 capitals, as shown here. 119 3. Protocol Requirements 121 The protocol described here bases its design on the following 122 protocol requirements: 124 o The protocol must use normal HTTP semantics. 126 o The queries and responses must be able to be flexible enough to 127 express every DNS query that would normally be sent in DNS over 128 UDP (including queries and responses that use DNS extensions, but 129 not those that require multiple responses). 131 o The protocol must permit the addition of new formats for DNS 132 queries and responses. 134 o The protocol must ensure interoperability by specifying a single 135 format for requests and responses that is mandatory to implement. 136 That format must be able to support future modifications to the 137 DNS protocol including the inclusion of one or more EDNS options 138 (including those not yet defined). 140 o The protocol must use a secure transport that meets the 141 requirements for HTTPS. 143 3.1. Non-requirements 145 o Supporting network-specific DNS64 [RFC6147] 147 o Supporting other network-specific inferences from plaintext DNS 148 queries 150 o Supporting insecure HTTP 152 4. The HTTP Request 154 A DNS API client encodes a single DNS query into an HTTP request 155 using either the HTTP GET or POST method and the other requirements 156 of this section. The DNS API server defines the URI used by the 157 request through the use of a URI Template [RFC6570]. Configuration 158 and discovery of the URI Template is done out of band from this 159 protocol. 161 The URI template defined in this document is processed without any 162 variables for requests using POST, and with the single variable "dns" 163 for requests using GET. The value of the dns parameter is the 164 content of the request (as described in Section 4.1), encoded with 165 base64url [RFC4648]. 167 Future specifications for new media types MUST define the variables 168 used for URI Template processing with this protocol. 170 DNS API servers MUST implement both the POST and GET methods. 172 When using the POST method the DNS query is included as the message 173 body of the HTTP request and the Content-Type request header 174 indicates the media type of the message. POST-ed requests are 175 smaller than their GET equivalents. 177 Using the GET method is friendlier to many HTTP cache 178 implementations. 180 The DNS API client SHOULD include an HTTP "Accept" request header to 181 indicate what type of content can be understood in response. 182 Irrespective of the value of the Accept request header, the client 183 MUST be prepared to process "application/dns-udpwireformat" 184 Section 4.1 responses but MAY also process any other type it 185 receives. 187 In order to maximize cache friendliness, DNS API clients using media 188 formats that include DNS ID, such as application/dns-udpwireformat, 189 SHOULD use a DNS ID of 0 in every DNS request. HTTP correlates 190 request and response, thus eliminating the need for the ID in a media 191 type such as application/dns-udpwireformat and the use of a varying 192 DNS ID can cause semantically equivalent DNS queries to be cached 193 separately. 195 DNS API clients can use HTTP/2 padding and compression in the same 196 way that other HTTP/2 clients use (or don't use) them. 198 4.1. DNS Wire Format 200 The data payload is the DNS on-the-wire format defined in [RFC1035]. 201 The format is for DNS over UDP. Note that this is different than the 202 wire format used in [RFC7858]. Also note that while [RFC1035] says 203 "Messages carried by UDP are restricted to 512 bytes", that was later 204 updated by [RFC6891], and this protocol allows DNS on-the-wire format 205 payloads of any size. 207 When using the GET method, the data payload MUST be encoded with 208 base64url [RFC4648] and then provided as a variable named "dns" to 209 the URI Template expansion. Padding characters for base64url MUST 210 NOT be included. 212 When using the POST method, the data payload MUST NOT be encoded and 213 is used directly as the HTTP message body. 215 DNS API clients using the DNS wire format MAY have one or more EDNS 216 options [RFC6891] in the request. 218 The media type is "application/dns-udpwireformat". 220 4.2. Examples 222 These examples use HTTP/2 style formatting from [RFC7540]. 224 These examples use a DNS API service with a URI Template of 225 "https://dnsserver.example.net/dns-query{?dns}" to resolve IN A 226 records. 228 The requests are represented as application/dns-udpwirefomat typed 229 bodies. 231 The first example request uses GET to request www.example.com 233 :method = GET 234 :scheme = https 235 :authority = dnsserver.example.net 236 :path = /dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB 237 accept = application/dns-udpwireformat 238 The same DNS query for www.example.com, using the POST method would 239 be: 241 :method = POST 242 :scheme = https 243 :authority = dnsserver.example.net 244 :path = /dns-query 245 accept = application/dns-udpwireformat 246 content-type = application/dns-udpwireformat 247 content-length = 33 249 <33 bytes represented by the following hex encoding> 250 00 00 01 00 00 01 00 00 00 00 00 00 03 77 77 77 251 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 252 01 254 Finally, a GET based query for a.62characterlabel-makes-base64url- 255 distinct-from-standard-base64.example.com is shown as an example to 256 emphasize that the encoding alphabet of base64url is different than 257 regular base64 and that padding is omitted. 259 The DNS query is 94 bytes represented by the following hex encoding 261 00 00 01 00 00 01 00 00 00 00 00 00 01 61 3e 36 262 32 63 68 61 72 61 63 74 65 72 6c 61 62 65 6c 2d 263 6d 61 6b 65 73 2d 62 61 73 65 36 34 75 72 6c 2d 264 64 69 73 74 69 6e 63 74 2d 66 72 6f 6d 2d 73 74 265 61 6e 64 61 72 64 2d 62 61 73 65 36 34 07 65 78 266 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 268 :method = GET 269 :scheme = https 270 :authority = dnsserver.example.net 271 :path = /dns-query? (no space or CR) 272 dns=AAABAAABAAAAAAAAAWE-NjJjaGFyYWN0ZXJsYWJl (no space or CR) 273 bC1tYWtlcy1iYXNlNjR1cmwtZGlzdGluY3QtZnJvbS1z (no space or CR) 274 dGFuZGFyZC1iYXNlNjQHZXhhbXBsZQNjb20AAAEAAQ 275 accept = application/dns-udpwireformat 277 5. The HTTP Response 279 An HTTP response with a 2xx status code ([RFC7231] Section 6.3) 280 indicates a valid DNS response to the query made in the HTTP request. 281 A valid DNS response includes both success and failure responses. 282 For example, a DNS failure response such as SERVFAIL or NXDOMAIN will 283 be the message in a successful 2xx HTTP response even though there 284 was a failure at the DNS layer. Responses with non-successful HTTP 285 status codes do not contain DNS answers to the question in the 286 corresponding request. Some of these non-successful HTTP responses 287 (e.g., redirects or authentication failures) could allow clients to 288 make new requests to satisfy the original question. 290 Different response media types will provide more or less information 291 from a DNS response. For example, one response type might include 292 the information from the DNS header bytes while another might omit 293 it. The amount and type of information that a media type gives is 294 solely up to the format, and not defined in this protocol. 296 At the time this is published, the response types are works in 297 progress. The only response type defined in this document is 298 "application/dns-udpwireformat", but it is possible that other 299 response formats will be defined in the future. 301 The DNS response for "application/dns-udpwireformat" in Section 4.1 302 MAY have one or more EDNS options, 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 request- 306 response pair. The responses may be processed and transported in any 307 order using HTTP's multi-streaming functionality ([RFC7540] 308 Section 5}). 310 The Answer section of a DNS response can contain zero or more RRsets. 311 (RRsets are defined in [RFC7719].) According to [RFC2181], each 312 resource record in an RRset has Time To Live (TTL) freshness 313 information. Different RRsets in the Answer section can have 314 different TTLs, although it is only possible for the HTTP response to 315 have a single freshness lifetime. The HTTP response freshness 316 lifetime ([RFC7234] Section 4.2) should be coordinated with the RRset 317 with the smallest TTL in the Answer section of the response. 318 Specifically, the HTTP freshness lifetime SHOULD be set to expire at 319 the same time any of the DNS resource records in the Answer section 320 reach a 0 TTL. The response freshness lifetime MUST NOT be greater 321 than that indicated by the DNS resoruce record with the smallest TTL 322 in the response. 324 If the DNS response has no records in the Answer section, and the DNS 325 response has an SOA record in the Authority section, the response 326 freshness lifetime MUST NOT be greater than the MINIMUM field from 327 that SOA record. (See [RFC2308].) Otherwise, the HTTP response MUST 328 set a freshness lifetime ([RFC7234] Section 4.2) of 0 by using a 329 mechanism such as "Cache-Control: no-cache" ([RFC7234] 330 Section 5.2.1.4). 332 A DNS API client that receives a response without an explicit 333 freshness lifetime MUST NOT assign that response a heuristic 334 freshness ([RFC7234] Section 4.2.2.) greater than that indicated by 335 the DNS Record with the smallest TTL in the response. 337 A DNS API server MUST be able to process application/dns- 338 udpwireformat request messages. 340 A DNS API server SHOULD respond with HTTP status code 415 341 (Unsupported Media Type) upon receiving a media type it is unable to 342 process. 344 This document does not change the definition of any HTTP response 345 codes or otherwise proscribe their use. 347 5.1. Example 349 This is an example response for a query for the IN A records for 350 "www.example.com" with recursion turned on. The response bears one 351 record with an address of 192.0.2.1 and a TTL of 128 seconds. 353 :status = 200 354 content-type = application/dns-udpwireformat 355 content-length = 64 356 cache-control = max-age=128 358 <64 bytes represented by the following hex encoding> 359 00 00 81 80 00 01 00 01 00 00 00 00 03 77 77 77 360 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 361 01 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 362 6d 00 00 01 00 01 00 00 00 80 00 04 C0 00 02 01 364 6. HTTP Integration 366 This protocol MUST be used with the https scheme URI [RFC7230]. 368 6.1. Cache Interaction 370 A DNS API client may utilize a hierarchy of caches that include both 371 HTTP and DNS specific caches. HTTP cache entries may be bypassed 372 with HTTP mechanisms such as the "Cache-Control no-cache" directive; 373 however DNS caches do not have a similar mechanism. 375 A DOH response that was previously stored in an HTTP cache will 376 contain the [RFC7234] Age response header indicating the elapsed time 377 between when the entry was placed in the HTTP cache and the current 378 DOH response. DNS API clients should subtract this time from the DNS 379 TTL if they are re-sharing the information in a non HTTP context 380 (e.g., their own DNS cache) to determine the remaining time to live 381 of the DNS record. 383 HTTP revalidation (e.g., via If-None-Match request headers) of cached 384 DNS information may be of limited value to DOH as revalidation 385 provides only a bandwidth benefit and DNS transactions are normally 386 latency bound. Furthermore, the HTTP response headers that enable 387 revalidation (such as "Last-Modified" and "Etag") are often fairly 388 large when compared to the overall DNS response size, and have a 389 variable nature that creates constant pressure on the HTTP/2 390 compression dictionary [RFC7541]. Other types of DNS data, such as 391 zone transfers, may be larger and benefit more from revalidation. 392 DNS API servers may wish to consider whether providing these 393 validation enabling response headers is worthwhile. 395 The stale-while-revalidate and stale-if-error cache control 396 directives may be well suited to a DOH implementation when allowed by 397 server policy. Those mechanisms allow a client, at the server's 398 discretion, to reuse a cache entry that is no longer fresh under some 399 extenuating circumstances defined in [RFC5861]. 401 All HTTP servers, including DNS API servers, need to consider cache 402 interaction when they generate responses that are not globally valid. 403 For instance, if a DNS API server customized a response based on the 404 client's identity then it would not want to globally allow reuse of 405 that response. This could be accomplished through a variety of HTTP 406 techniques such as a Cache-Control max-age of 0, or perhaps by the 407 Vary response header. 409 6.2. HTTP/2 411 The minimum version of HTTP used by DOH SHOULD be HTTP/2 [RFC7540]. 413 The messages in classic UDP based DNS [RFC1035] are inherently 414 unordered and have low overhead. A competitive HTTP transport needs 415 to support reordering, parallelism, priority, and header compression 416 to achieve similar performance. Those features were introduced to 417 HTTP in HTTP/2 [RFC7540]. Earlier versions of HTTP are capable of 418 conveying the semantic requirements of DOH but may result in very 419 poor performance for many uses cases. 421 6.3. Server Push 423 Before using DOH response data for DNS resolution, the client MUST 424 establish that the HTTP request URI is a trusted service for the DOH 425 query. For HTTP requests initiated by the DNS API client this trust 426 is implicit in the selection of URI. For HTTP server push ([RFC7540] 427 Section 8.2) extra care must be taken to ensure that the pushed URI 428 is one that the client would have directed the same query to if the 429 client had initiated the request. This specification does not extend 430 DNS resolution privileges to URIs that are not recognized by the 431 client as trusted DNS API servers. 433 6.4. Content Negotiation 435 In order to maximize interoperability, DNS API clients and DNS API 436 servers MUST support the "application/dns-udpwireformat" media type. 437 Other media types MAY be used as defined by HTTP Content Negotiation 438 ([RFC7231] Section 3.4). 440 7. IANA Considerations 442 7.1. Registration of application/dns-udpwireformat Media Type 443 To: ietf-types@iana.org 444 Subject: Registration of MIME media type 445 application/dns-udpwireformat 447 MIME media type name: application 449 MIME subtype name: dns-udpwireformat 451 Required parameters: n/a 453 Optional parameters: original_transport 454 The "original_transport" parameter has two defined values, 455 "udp" and "tcp". This parameter is only expected to be used by 456 servers. 458 Encoding considerations: This is a binary format. The contents are a 459 DNS message as defined in RFC 1035. The format used here is for DNS 460 over UDP, which is the format defined in the diagrams in RFC 1035. 462 Security considerations: The security considerations for carrying 463 this data are the same for carrying DNS without encryption. 465 Interoperability considerations: None. 467 Published specification: This document. 469 Applications that use this media type: 470 Systems that want to exchange full DNS messages. 472 Additional information: 474 Magic number(s): n/a 476 File extension(s): n/a 478 Macintosh file type code(s): n/a 480 Person & email address to contact for further information: 481 Paul Hoffman, paul.hoffman@icann.org 483 Intended usage: COMMON 485 Restrictions on usage: n/a 487 Author: Paul Hoffman, paul.hoffman@icann.org 489 Change controller: IESG 491 8. Security Considerations 493 Running DNS over HTTPS relies on the security of the underlying HTTP 494 transport. This mitigates classic amplification attacks for UDP- 495 based DNS. Implementations utilizing HTTP/2 benefit from the TLS 496 profile defined in [RFC7540] Section 9.2. 498 Session level encryption has well known weaknesses with respect to 499 traffic analysis which might be particularly acute when dealing with 500 DNS queries. HTTP/2 provides further advice about the use of 501 compression (Section 10.6 of [RFC7540]) and padding (Section 10.7 of 502 [RFC7540]). 504 The HTTPS connection provides transport security for the interaction 505 between the DNS API server and client, but does not inherently ensure 506 the authenticity of DNS data. A DNS API client may also perform full 507 DNSSEC validation of answers received from a DNS API server or it may 508 choose to trust answers from a particular DNS API server, much as a 509 DNS client might choose to trust answers from its recursive DNS 510 resolver. This capability might be affected by the response media 511 type. 513 Section 6.1 describes the interaction of this protocol with HTTP 514 caching. An adversary that can control the cache used by the client 515 can affect that client's view of the DNS. This is no different than 516 the security implications of HTTP caching for other protocols that 517 use HTTP. 519 A server that is acting both as a normal web server and a DNS API 520 server is in a position to choose which DNS names it forces a client 521 to resolve (through its web service) and also be the one to answer 522 those queries (through its DNS API service). An untrusted DNS API 523 server can thus easily cause damage by poisoning a client's cache 524 with names that the DNS API server chooses to poison. A client MUST 525 NOT trust a DNS API server simply because it was discovered, or 526 because the client was told to trust the DNS API server by an 527 untrusted party. Instead, a client MUST only trust DNS API server 528 that is configured as trustworthy. 530 A client can use DNS over HTTPS as one of multiple mechanisms to 531 obtain DNS data. If a client of this protocol encounters an HTTP 532 error after sending a DNS query, and then falls back to a different 533 DNS retrieval mechanism, doing so can weaken the privacy and 534 authenticity expected by the user of the client. 536 9. Operational Considerations 538 Local policy considerations and similar factors mean different DNS 539 servers may provide different results to the same query: for instance 540 in split DNS configurations [RFC6950]. It logically follows that the 541 server which is queried can influence the end result. Therefore a 542 client's choice of DNS server may affect the responses it gets to its 543 queries. For example, in the case of DNS64 [RFC6147], the choice 544 could affect whether IPv6/IPv4 translation will work at all. 546 The HTTPS channel used by this specification establishes secure two 547 party communication between the DNS API client and the DNS API 548 server. Filtering or inspection systems that rely on unsecured 549 transport of DNS will not function in a DNS over HTTPS environment. 551 Some HTTPS client implementations perform real time third party 552 checks of the revocation status of the certificates being used by 553 TLS. If this check is done as part of the DNS API server connection 554 procedure and the check itself requires DNS resolution to connect to 555 the third party a deadlock can occur. The use of OCSP [RFC6960] 556 servers or AIA for CRL fetching ([RFC5280] Section 4.2.2.1) are 557 examples of how this deadlock can happen. To mitigate the 558 possibility of deadlock, DNS API servers SHOULD NOT rely on DNS based 559 references to external resources in the TLS handshake. For OCSP the 560 server can bundle the certificate status as part of the handshake 561 using a mechanism appropriate to the version of TLS, such as using 562 [RFC6066] Section 8 for TLS version 1.2. AIA deadlocks can be 563 avoided by providing intermediate certificates that might otherwise 564 be obtained through additional requests. 566 A DNS API client may face a similar bootstrapping problem when the 567 HTTP request needs to resolve the hostname portion of the DNS URI. 568 Just as the address of a traditional DNS nameserver cannot be 569 originally determined from that same server, a DNS API client cannot 570 use its DNS API server to initially resolve the server's host name 571 into an address. Alternative strategies a client might employ 572 include making the initial resolution part of the configuration, IP 573 based URIs and corresponding IP based certificates for HTTPS, or 574 resolving the DNS API server's hostname via traditional DNS or 575 another DNS API server while still authenticating the resulting 576 connection via HTTPS. 578 HTTP [RFC7230] is a stateless application level protocol and 579 therefore DOH implementations do not provide stateful ordering 580 guarantees between different requests. DOH cannot be used as a 581 transport for other protocols that require strict ordering. 583 If a DNS API server responds to a DNS API client with a DNS message 584 that has the TC (truncation) bit set in the header, that indicates 585 that the DNS API server was not able to retrieve a full answer for 586 the query and is providing the best answer it could get. This 587 protocol does not require that a DNS API server that cannot get an 588 untruncated answer send back such an answer; it can instead send back 589 an HTTP error to indicate that it cannot give a useful answer. 591 This protocol does not define any use for the "original_transport" 592 optional parameter of the application/dns-udpwireformat media type. 594 10. Acknowledgments 596 This work required a high level of cooperation between experts in 597 different technologies. Thank you Ray Bellis, Stephane Bortzmeyer, 598 Manu Bretelle, Tony Finch, Daniel Kahn Gilmor, Olafur Guomundsson, 599 Wes Hardaker, Rory Hewitt, Joe Hildebrand, David Lawrence, Eliot 600 Lear, John Mattson, Alex Mayrhofer, Mark Nottingham, Jim Reid, Adam 601 Roach, Ben Schwartz, Davey Song, Daniel Stenberg, Andrew Sullivan, 602 Martin Thomson, and Sam Weiler. 604 11. References 606 11.1. Normative References 608 [RFC1035] Mockapetris, P., "Domain names - implementation and 609 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 610 November 1987, . 612 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 613 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 614 . 616 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 617 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 618 . 620 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 621 (TLS) Protocol Version 1.2", RFC 5246, 622 DOI 10.17487/RFC5246, August 2008, 623 . 625 [RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., 626 and D. Orchard, "URI Template", RFC 6570, 627 DOI 10.17487/RFC6570, March 2012, 628 . 630 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 631 Protocol (HTTP/1.1): Message Syntax and Routing", 632 RFC 7230, DOI 10.17487/RFC7230, June 2014, 633 . 635 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 636 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 637 DOI 10.17487/RFC7231, June 2014, 638 . 640 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 641 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 642 RFC 7234, DOI 10.17487/RFC7234, June 2014, 643 . 645 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 646 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 647 DOI 10.17487/RFC7540, May 2015, 648 . 650 [RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for 651 HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, 652 . 654 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 655 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 656 May 2017, . 658 11.2. Informative References 660 [CORS] "Cross-Origin Resource Sharing", n.d., 661 . 663 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 664 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, 665 . 667 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 668 Housley, R., and W. Polk, "Internet X.509 Public Key 669 Infrastructure Certificate and Certificate Revocation List 670 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 671 . 673 [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale 674 Content", RFC 5861, DOI 10.17487/RFC5861, May 2010, 675 . 677 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 678 Extensions: Extension Definitions", RFC 6066, 679 DOI 10.17487/RFC6066, January 2011, 680 . 682 [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van 683 Beijnum, "DNS64: DNS Extensions for Network Address 684 Translation from IPv6 Clients to IPv4 Servers", RFC 6147, 685 DOI 10.17487/RFC6147, April 2011, 686 . 688 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 689 for DNS (EDNS(0))", STD 75, RFC 6891, 690 DOI 10.17487/RFC6891, April 2013, 691 . 693 [RFC6950] Peterson, J., Kolkman, O., Tschofenig, H., and B. Aboba, 694 "Architectural Considerations on Application Features in 695 the DNS", RFC 6950, DOI 10.17487/RFC6950, October 2013, 696 . 698 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 699 Galperin, S., and C. Adams, "X.509 Internet Public Key 700 Infrastructure Online Certificate Status Protocol - OCSP", 701 RFC 6960, DOI 10.17487/RFC6960, June 2013, 702 . 704 [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 705 Terminology", RFC 7719, DOI 10.17487/RFC7719, December 706 2015, . 708 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 709 and P. Hoffman, "Specification for DNS over Transport 710 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 711 2016, . 713 11.3. URIs 715 [1] https://github.com/dohwg/draft-ietf-doh-dns-over-https 717 Appendix A. Previous Work on DNS over HTTP or in Other Formats 719 The following is an incomplete list of earlier work that related to 720 DNS over HTTP/1 or representing DNS data in other formats. 722 The list includes links to the tools.ietf.org site (because these 723 documents are all expired) and web sites of software. 725 o https://tools.ietf.org/html/draft-mohan-dns-query-xml 727 o https://tools.ietf.org/html/draft-daley-dnsxml 729 o https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof 731 o https://tools.ietf.org/html/draft-bortzmeyer-dns-json 733 o https://www.nlnetlabs.nl/projects/dnssec-trigger/ 735 Authors' Addresses 737 Paul Hoffman 738 ICANN 740 Email: paul.hoffman@icann.org 742 Patrick McManus 743 Mozilla 745 Email: mcmanus@ducksong.com