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