1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173
|
<pre>Internet Engineering Task Force (IETF) P. Hoffman
Request for Comments: 8484 ICANN
Category: Standards Track P. McManus
ISSN: 2070-1721 Mozilla
October 2018
<span class="h1">DNS Queries over HTTPS (DoH)</span>
Abstract
This document defines a protocol for sending DNS queries and getting
DNS responses over HTTPS. Each DNS query-response pair is mapped
into an HTTP exchange.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="https://www.rfc-editor.org/info/rfc8484">https://www.rfc-editor.org/info/rfc8484</a>.
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Hoffman & McManus Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-2">2</a>. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3">3</a>. Selection of DoH Server . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4">4</a>. The HTTP Exchange . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4.1">4.1</a>. The HTTP Request . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4.1.1">4.1.1</a>. HTTP Request Examples . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-4.2">4.2</a>. The HTTP Response . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-4.2.1">4.2.1</a>. Handling DNS and HTTP Errors . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-4.2.2">4.2.2</a>. HTTP Response Example . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-5">5</a>. HTTP Integration . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-5.1">5.1</a>. Cache Interaction . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-5.2">5.2</a>. HTTP/2 . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-5.3">5.3</a>. Server Push . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-5.4">5.4</a>. Content Negotiation . . . . . . . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-6">6</a>. Definition of the "application/dns-message" Media Type . . . <a href="#page-10">10</a>
<a href="#section-7">7</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
7.1. Registration of the "application/dns-message" Media Type 11
<a href="#section-8">8</a>. Privacy Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-8.1">8.1</a>. On the Wire . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-8.2">8.2</a>. In the Server . . . . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-9">9</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-10">10</a>. Operational Considerations . . . . . . . . . . . . . . . . . <a href="#page-15">15</a>
<a href="#section-11">11</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-16">16</a>
<a href="#section-11.1">11.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-16">16</a>
<a href="#section-11.2">11.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-18">18</a>
<a href="#appendix-A">Appendix A</a>. Protocol Development . . . . . . . . . . . . . . . . <a href="#page-20">20</a>
<a href="#appendix-B">Appendix B</a>. Previous Work on DNS over HTTP or in Other Formats . 20
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-21">21</a>
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-21">21</a>
<span class="grey">Hoffman & McManus Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document defines a specific protocol, DNS over HTTPS (DoH), for
sending DNS [<a href="./rfc1035" title=""Domain names - implementation and specification"">RFC1035</a>] queries and getting DNS responses over HTTP
[<a href="./rfc7540" title=""Hypertext Transfer Protocol Version 2 (HTTP/2)"">RFC7540</a>] using https [<a href="./rfc2818" title=""HTTP Over TLS"">RFC2818</a>] URIs (and therefore TLS [<a href="./rfc8446" title=""The Transport Layer Security (TLS) Protocol Version 1.3"">RFC8446</a>]
security for integrity and confidentiality). Each DNS query-response
pair is mapped into an HTTP exchange.
The described approach is more than a tunnel over HTTP. It
establishes default media formatting types for requests and responses
but uses normal HTTP content negotiation mechanisms for selecting
alternatives that endpoints may prefer in anticipation of serving new
use cases. In addition to this media type negotiation, it aligns
itself with HTTP features such as caching, redirection, proxying,
authentication, and compression.
The integration with HTTP provides a transport suitable for both
existing DNS clients and native web applications seeking access to
the DNS.
Two primary use cases were considered during this protocol's
development. These use cases are preventing on-path devices from
interfering with DNS operations, and also allowing web applications
to access DNS information via existing browser APIs in a safe way
consistent with Cross Origin Resource Sharing (CORS) [<a href="#ref-FETCH" title=""Fetch Living Standard"">FETCH</a>]. No
special effort has been taken to enable or prevent application to
other use cases. This document focuses on communication between DNS
clients (such as operating system stub resolvers) and recursive
resolvers.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Terminology</span>
A server that supports this protocol is called a "DoH server" to
differentiate it from a "DNS server" (one that only provides DNS
service over one or more of the other transport protocols
standardized for DNS). Similarly, a client that supports this
protocol is called a "DoH client".
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
<a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>] [<a href="./rfc8174" title=""Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"">RFC8174</a>] when, and only when, they appear in all
capitals, as shown here.
<span class="grey">Hoffman & McManus Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Selection of DoH Server</span>
The DoH client is configured with a URI Template [<a href="./rfc6570" title=""URI Template"">RFC6570</a>], which
describes how to construct the URL to use for resolution.
Configuration, discovery, and updating of the URI Template is done
out of band from this protocol. Note that configuration might be
manual (such as a user typing URI Templates in a user interface for
"options") or automatic (such as URI Templates being supplied in
responses from DHCP or similar protocols). DoH servers MAY support
more than one URI Template. This allows the different endpoints to
have different properties, such as different authentication
requirements or service-level guarantees.
A DoH client uses configuration to select the URI, and thus the DoH
server, that is to be used for resolution. [<a href="./rfc2818" title=""HTTP Over TLS"">RFC2818</a>] defines how
HTTPS verifies the DoH server's identity.
A DoH client MUST NOT use a different URI simply because it was
discovered outside of the client's configuration (such as through
HTTP/2 server push) or because a server offers an unsolicited
response that appears to be a valid answer to a DNS query. This
specification does not extend DNS resolution privileges to URIs that
are not recognized by the DoH client as configured URIs. Such
scenarios may create additional operational, tracking, and security
hazards that require limitations for safe usage. A future
specification may support this use case.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. The HTTP Exchange</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. The HTTP Request</span>
A DoH client encodes a single DNS query into an HTTP request using
either the HTTP GET or POST method and the other requirements of this
section. The DoH server defines the URI used by the request through
the use of a URI Template.
The URI Template defined in this document is processed without any
variables when the HTTP method is POST. When the HTTP method is GET,
the single variable "dns" is defined as the content of the DNS
request (as described in <a href="#section-6">Section 6</a>), encoded with base64url
[<a href="./rfc4648" title=""The Base16, Base32, and Base64 Data Encodings"">RFC4648</a>].
Future specifications for new media types for DoH MUST define the
variables used for URI Template processing with this protocol.
DoH servers MUST implement both the POST and GET methods.
<span class="grey">Hoffman & McManus Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
When using the POST method, the DNS query is included as the message
body of the HTTP request, and the Content-Type request header field
indicates the media type of the message. POSTed requests are
generally smaller than their GET equivalents.
Using the GET method is friendlier to many HTTP cache
implementations.
The DoH client SHOULD include an HTTP Accept request header field to
indicate what type of content can be understood in response.
Irrespective of the value of the Accept request header field, the
client MUST be prepared to process "application/dns-message" (as
described in <a href="#section-6">Section 6</a>) responses but MAY also process other DNS-
related media types it receives.
In order to maximize HTTP cache friendliness, DoH clients using media
formats that include the ID field from the DNS message header, such
as "application/dns-message", SHOULD use a DNS ID of 0 in every DNS
request. HTTP correlates the request and response, thus eliminating
the need for the ID in a media type such as "application/dns-
message". The use of a varying DNS ID can cause semantically
equivalent DNS queries to be cached separately.
DoH clients can use HTTP/2 padding and compression [<a href="./rfc7540" title=""Hypertext Transfer Protocol Version 2 (HTTP/2)"">RFC7540</a>] in the
same way that other HTTP/2 clients use (or don't use) them.
<span class="h4"><a class="selflink" id="section-4.1.1" href="#section-4.1.1">4.1.1</a>. HTTP Request Examples</span>
These examples use HTTP/2-style formatting from [<a href="./rfc7540" title=""Hypertext Transfer Protocol Version 2 (HTTP/2)"">RFC7540</a>].
These examples use a DoH service with a URI Template of
"https://dnsserver.example.net/dns-query{?dns}" to resolve IN A
records.
The requests are represented as bodies with media type "application/
dns-message".
The first example request uses GET to request "www.example.com".
:method = GET
:scheme = https
:authority = dnsserver.example.net
:path = /dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB
accept = application/dns-message
<span class="grey">Hoffman & McManus Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
The same DNS query for "www.example.com", using the POST method would
be:
:method = POST
:scheme = https
:authority = dnsserver.example.net
:path = /dns-query
accept = application/dns-message
content-type = application/dns-message
content-length = 33
<33 bytes represented by the following hex encoding>
00 00 01 00 00 01 00 00 00 00 00 00 03 77 77 77
07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00
01
In this example, the 33 bytes are the DNS message in DNS wire format
[<a href="./rfc1035" title=""Domain names - implementation and specification"">RFC1035</a>], starting with the DNS header.
Finally, a GET-based query for "a.62characterlabel-makes-base64url-
distinct-from-standard-base64.example.com" is shown as an example to
emphasize that the encoding alphabet of base64url is different than
regular base64 and that padding is omitted.
The DNS query, expressed in DNS wire format, is 94 bytes represented
by the following:
00 00 01 00 00 01 00 00 00 00 00 00 01 61 3e 36
32 63 68 61 72 61 63 74 65 72 6c 61 62 65 6c 2d
6d 61 6b 65 73 2d 62 61 73 65 36 34 75 72 6c 2d
64 69 73 74 69 6e 63 74 2d 66 72 6f 6d 2d 73 74
61 6e 64 61 72 64 2d 62 61 73 65 36 34 07 65 78
61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01
:method = GET
:scheme = https
:authority = dnsserver.example.net
:path = /dns-query? (no space or Carriage Return (CR))
dns=AAABAAABAAAAAAAAAWE-NjJjaGFyYWN0ZXJsYWJl (no space or CR)
bC1tYWtlcy1iYXNlNjR1cmwtZGlzdGluY3QtZnJvbS1z (no space or CR)
dGFuZGFyZC1iYXNlNjQHZXhhbXBsZQNjb20AAAEAAQ
accept = application/dns-message
<span class="grey">Hoffman & McManus Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. The HTTP Response</span>
The only response type defined in this document is "application/dns-
message", but it is possible that other response formats will be
defined in the future. A DoH server MUST be able to process
"application/dns-message" request messages.
Different response media types will provide more or less information
from a DNS response. For example, one response type might include
information from the DNS header bytes while another might omit it.
The amount and type of information that a media type gives are solely
up to the format, which is not defined in this protocol.
Each DNS request-response pair is mapped to one HTTP exchange. The
responses may be processed and transported in any order using HTTP's
multi-streaming functionality (see <a href="./rfc7540#section-5">Section 5 of [RFC7540]</a>).
<a href="#section-5.1">Section 5.1</a> discusses the relationship between DNS and HTTP response
caching.
<span class="h4"><a class="selflink" id="section-4.2.1" href="#section-4.2.1">4.2.1</a>. Handling DNS and HTTP Errors</span>
DNS response codes indicate either success or failure for the DNS
query. A successful HTTP response with a 2xx status code (see
<a href="./rfc7231#section-6.3">Section 6.3 of [RFC7231]</a>) is used for any valid DNS response,
regardless of the DNS response code. For example, a successful 2xx
HTTP status code is used even with a DNS message whose DNS response
code indicates failure, such as SERVFAIL or NXDOMAIN.
HTTP responses with non-successful HTTP status codes do not contain
replies to the original DNS question in the HTTP request. DoH
clients need to use the same semantic processing of non-successful
HTTP status codes as other HTTP clients. This might mean that the
DoH client retries the query with the same DoH server, such as if
there are authorization failures (HTTP status code 401; see
<a href="./rfc7235#section-3.1">Section 3.1 of [RFC7235]</a>). It could also mean that the DoH client
retries with a different DoH server, such as for unsupported media
types (HTTP status code 415; see <a href="./rfc7231#section-6.5.13">Section 6.5.13 of [RFC7231]</a>), or
where the server cannot generate a representation suitable for the
client (HTTP status code 406; see <a href="./rfc7231#section-6.5.6">Section 6.5.6 of [RFC7231]</a>), and so
on.
<span class="grey">Hoffman & McManus Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
<span class="h4"><a class="selflink" id="section-4.2.2" href="#section-4.2.2">4.2.2</a>. HTTP Response Example</span>
This is an example response for a query for the IN AAAA records for
"www.example.com" with recursion turned on. The response bears one
answer record with an address of 2001:db8:abcd:12:1:2:3:4 and a TTL
of 3709 seconds.
:status = 200
content-type = application/dns-message
content-length = 61
cache-control = max-age=3709
<61 bytes represented by the following hex encoding>
00 00 81 80 00 01 00 01 00 00 00 00 03 77 77 77
07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 1c 00
01 c0 0c 00 1c 00 01 00 00 0e 7d 00 10 20 01 0d
b8 ab cd 00 12 00 01 00 02 00 03 00 04
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. HTTP Integration</span>
This protocol MUST be used with the https URI scheme [<a href="./rfc7230" title=""Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing"">RFC7230</a>].
Sections <a href="#section-8">8</a> and <a href="#section-9">9</a> discuss additional considerations for the
integration with HTTP.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Cache Interaction</span>
A DoH exchange can pass through a hierarchy of caches that include
both HTTP- and DNS-specific caches. These caches may exist between
the DoH server and client, or they may exist on the DoH client
itself. HTTP caches are generic by design; that is, they do not
understand this protocol. Even if a DoH client has modified its
cache implementation to be aware of DoH semantics, it does not follow
that all upstream caches (for example, inline proxies, server-side
gateways, and content delivery networks) will be.
As a result, DoH servers need to carefully consider the HTTP caching
metadata they send in response to GET requests (responses to POST
requests are not cacheable unless specific response header fields are
sent; this is not widely implemented and is not advised for DoH).
In particular, DoH servers SHOULD assign an explicit HTTP freshness
lifetime (see <a href="./rfc7234#section-4.2">Section 4.2 of [RFC7234]</a>) so that the DoH client is
more likely to use fresh DNS data. This requirement is due to HTTP
caches being able to assign their own heuristic freshness (such as
that described in <a href="./rfc7234#section-4.2.2">Section 4.2.2 of [RFC7234]</a>), which would take
control of the cache contents out of the hands of the DoH server.
<span class="grey">Hoffman & McManus Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
The assigned freshness lifetime of a DoH HTTP response MUST be less
than or equal to the smallest TTL in the Answer section of the DNS
response. A freshness lifetime equal to the smallest TTL in the
Answer section is RECOMMENDED. For example, if a HTTP response
carries three RRsets with TTLs of 30, 600, and 300, the HTTP
freshness lifetime should be 30 seconds (which could be specified as
"Cache-Control: max-age=30"). This requirement helps prevent expired
RRsets in messages in an HTTP cache from unintentionally being
served.
If the DNS response has no records in the Answer section, and the DNS
response has an SOA record in the Authority section, the response
freshness lifetime MUST NOT be greater than the MINIMUM field from
that SOA record (see [<a href="./rfc2308" title=""Negative Caching of DNS Queries (DNS NCACHE)"">RFC2308</a>]).
The stale-while-revalidate and stale-if-error Cache-Control
directives [<a href="./rfc5861" title=""HTTP Cache-Control Extensions for Stale Content"">RFC5861</a>] could be well suited to a DoH implementation
when allowed by server policy. Those mechanisms allow a client, at
the server's discretion, to reuse an HTTP cache entry that is no
longer fresh. In such a case, the client reuses either all of a
cached entry or none of it.
DoH servers also need to consider HTTP caching when generating
responses that are not globally valid. For instance, if a DoH server
customizes a response based on the client's identity, it would not
want to allow global reuse of that response. This could be
accomplished through a variety of HTTP techniques, such as a Cache-
Control max-age of 0, or by using the Vary response header field (see
<a href="./rfc7231#section-7.1.4">Section 7.1.4 of [RFC7231]</a>) to establish a secondary cache key (see
<a href="./rfc7234#section-4.1">Section 4.1 of [RFC7234]</a>).
DoH clients MUST account for the Age response header field's value
[<a href="./rfc7234" title=""Hypertext Transfer Protocol (HTTP/1.1): Caching"">RFC7234</a>] when calculating the DNS TTL of a response. For example,
if an RRset is received with a DNS TTL of 600, but the Age header
field indicates that the response has been cached for 250 seconds,
the remaining lifetime of the RRset is 350 seconds. This requirement
applies to both DoH client HTTP caches and DoH client DNS caches.
DoH clients can request an uncached copy of a HTTP response by using
the "no-cache" request Cache-Control directive (see <a href="./rfc7234#section-5.2.1.4">Section 5.2.1.4
of [RFC7234]</a>) and similar controls. Note that some caches might not
honor these directives, either due to configuration or interaction
with traditional DNS caches that do not have such a mechanism.
HTTP conditional requests [<a href="./rfc7232" title=""Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests"">RFC7232</a>] may be of limited value to DoH,
as revalidation provides only a bandwidth benefit and DNS
transactions are normally latency bound. Furthermore, the HTTP
response header fields that enable revalidation (such as "Last-
<span class="grey">Hoffman & McManus Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
Modified" and "Etag") are often fairly large when compared to the
overall DNS response size and have a variable nature that creates
constant pressure on the HTTP/2 compression dictionary [<a href="./rfc7541" title=""HPACK: Header Compression for HTTP/2"">RFC7541</a>].
Other types of DNS data, such as zone transfers, may be larger and
benefit more from revalidation.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. HTTP/2</span>
HTTP/2 [<a href="./rfc7540" title=""Hypertext Transfer Protocol Version 2 (HTTP/2)"">RFC7540</a>] is the minimum RECOMMENDED version of HTTP for use
with DoH.
The messages in classic UDP-based DNS [<a href="./rfc1035" title=""Domain names - implementation and specification"">RFC1035</a>] are inherently
unordered and have low overhead. A competitive HTTP transport needs
to support reordering, parallelism, priority, and header compression
to achieve similar performance. Those features were introduced to
HTTP in HTTP/2 [<a href="./rfc7540" title=""Hypertext Transfer Protocol Version 2 (HTTP/2)"">RFC7540</a>]. Earlier versions of HTTP are capable of
conveying the semantic requirements of DoH but may result in very
poor performance.
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Server Push</span>
Before using DoH response data for DNS resolution, the client MUST
establish that the HTTP request URI can be used for the DoH query.
For HTTP requests initiated by the DoH client, this is implicit in
the selection of URI. For HTTP server push (see <a href="./rfc7540#section-8.2">Section 8.2 of
[RFC7540]</a>), extra care must be taken to ensure that the pushed URI is
one that the client would have directed the same query to if the
client had initiated the request (in addition to the other security
checks normally needed for server push).
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. Content Negotiation</span>
In order to maximize interoperability, DoH clients and DoH servers
MUST support the "application/dns-message" media type. Other media
types MAY be used as defined by HTTP Content Negotiation (see
<a href="./rfc7231#section-3.4">Section 3.4 of [RFC7231]</a>). Those media types MUST be flexible enough
to express every DNS query that would normally be sent in DNS over
UDP (including queries and responses that use DNS extensions, but not
those that require multiple responses).
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Definition of the "application/dns-message" Media Type</span>
The data payload for the "application/dns-message" media type is a
single message of the DNS on-the-wire format defined in <a href="./rfc1035#section-4.2.1">Section 4.2.1
of [RFC1035]</a>, which in turn refers to the full wire format defined in
<a href="#section-4.1">Section 4.1</a> of that RFC.
<span class="grey">Hoffman & McManus Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
Although [<a href="./rfc1035" title=""Domain names - implementation and specification"">RFC1035</a>] says "Messages carried by UDP are restricted to
512 bytes", that was later updated by [<a href="./rfc6891" title=""Extension Mechanisms for DNS (EDNS(0))"">RFC6891</a>]. This media type
restricts the maximum size of the DNS message to 65535 bytes.
Note that the wire format used in this media type is different than
the wire format used in [<a href="./rfc7858" title=""Specification for DNS over Transport Layer Security (TLS)"">RFC7858</a>] (which uses the format defined in
<a href="./rfc1035#section-4.2.2">Section 4.2.2 of [RFC1035]</a> that includes two length bytes).
DoH clients using this media type MAY have one or more Extension
Mechanisms for DNS (EDNS) options [<a href="./rfc6891" title=""Extension Mechanisms for DNS (EDNS(0))"">RFC6891</a>] in the request. DoH
servers using this media type MUST ignore the value given for the
EDNS UDP payload size in DNS requests.
When using the GET method, the data payload for this media type MUST
be encoded with base64url [<a href="./rfc4648" title=""The Base16, Base32, and Base64 Data Encodings"">RFC4648</a>] and then provided as a variable
named "dns" to the URI Template expansion. Padding characters for
base64url MUST NOT be included.
When using the POST method, the data payload for this media type MUST
NOT be encoded and is used directly as the HTTP message body.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. IANA Considerations</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Registration of the "application/dns-message" Media Type</span>
Type name: application
Subtype name: dns-message
Required parameters: N/A
Optional parameters: N/A
Encoding considerations: This is a binary format. The contents are a
DNS message as defined in <a href="./rfc1035">RFC 1035</a>. The format used here is for
DNS over UDP, which is the format defined in the diagrams in
<a href="./rfc1035">RFC 1035</a>.
Security considerations: See <a href="./rfc8484">RFC 8484</a>. The content is a DNS message
and thus not executable code.
Interoperability considerations: None.
Published specification: <a href="./rfc8484">RFC 8484</a>.
Applications that use this media type:
Systems that want to exchange full DNS messages.
<span class="grey">Hoffman & McManus Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
Additional information:
Deprecated alias names for this type: N/A
Magic number(s): N/A
File extension(s): N/A
Macintosh file type code(s): N/A
Person & email address to contact for further information:
Paul Hoffman <paul.hoffman@icann.org>
Intended usage: COMMON
Restrictions on usage: N/A
Author: Paul Hoffman <paul.hoffman@icann.org>
Change controller: IESG
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Privacy Considerations</span>
[<a id="ref-RFC7626">RFC7626</a>] discusses DNS privacy considerations in both "on the wire"
(<a href="./rfc7626#section-2.4">Section 2.4 of [RFC7626]</a>) and "in the server" (<a href="./rfc7626#section-2.5">Section 2.5 of
[RFC7626]</a>) contexts. This is also a useful framing for DoH's privacy
considerations.
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. On the Wire</span>
DoH encrypts DNS traffic and requires authentication of the server.
This mitigates both passive surveillance [<a href="./rfc7258" title=""Pervasive Monitoring Is an Attack"">RFC7258</a>] and active attacks
that attempt to divert DNS traffic to rogue servers (see
<a href="./rfc7626#section-2.5.1">Section 2.5.1 of [RFC7626]</a>). DNS over TLS [<a href="./rfc7858" title=""Specification for DNS over Transport Layer Security (TLS)"">RFC7858</a>] provides similar
protections, while direct UDP- and TCP-based transports are
vulnerable to this class of attack. An experimental effort to offer
guidance on choosing the padding length can be found in [<a href="./rfc8467" title=""Padding Policies for Extension Mechanisms for DNS (EDNS(0))"">RFC8467</a>].
Additionally, the use of the HTTPS default port 443 and the ability
to mix DoH traffic with other HTTPS traffic on the same connection
can deter unprivileged on-path devices from interfering with DNS
operations and make DNS traffic analysis more difficult.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. In the Server</span>
The DNS wire format [<a href="./rfc1035" title=""Domain names - implementation and specification"">RFC1035</a>] contains no client identifiers;
however, various transports of DNS queries and responses do provide
data that can be used to correlate requests. HTTPS presents new
considerations for correlation, such as explicit HTTP cookies and
implicit fingerprinting of the unique set and ordering of HTTP
request header fields.
<span class="grey">Hoffman & McManus Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
A DoH implementation is built on IP, TCP, TLS, and HTTP. Each layer
contains one or more common features that can be used to correlate
queries to the same identity. DNS transports will generally carry
the same privacy properties of the layers used to implement them.
For example, the properties of IP, TCP, and TLS apply to
implementations of DNS over TLS.
The privacy considerations of using the HTTPS layer in DoH are
incremental to those of DNS over TLS. DoH is not known to introduce
new concerns beyond those associated with HTTPS.
At the IP level, the client address provides obvious correlation
information. This can be mitigated by use of a NAT, proxy, VPN, or
simple address rotation over time. It may be aggravated by use of a
DNS server that can correlate real-time addressing information with
other personal identifiers, such as when a DNS server and DHCP server
are operated by the same entity.
DNS implementations that use one TCP connection for multiple DNS
requests directly group those requests. Long-lived connections have
better performance behaviors than short-lived connections; however,
they group more requests, which can expose more information to
correlation and consolidation. TCP-based solutions may also seek
performance through the use of TCP Fast Open [<a href="./rfc7413" title=""TCP Fast Open"">RFC7413</a>]. The cookies
used in TCP Fast Open allow servers to correlate TCP sessions.
TLS-based implementations often achieve better handshake performance
through the use of some form of session resumption mechanism, such as
<a href="./rfc8446#section-2.2">Section 2.2 of [RFC8446]</a>. Session resumption creates trivial
mechanisms for a server to correlate TLS connections together.
HTTP's feature set can also be used for identification and tracking
in a number of different ways. For example, Authentication request
header fields explicitly identify profiles in use, and HTTP cookies
are designed as an explicit state-tracking mechanism between the
client and serving site and often are used as an authentication
mechanism.
Additionally, the User-Agent and Accept-Language request header
fields often convey specific information about the client version or
locale. This facilitates content negotiation and operational work-
arounds for implementation bugs. Request header fields that control
caching can expose state information about a subset of the client's
history. Mixing DoH requests with other HTTP requests on the same
connection also provides an opportunity for richer data correlation.
<span class="grey">Hoffman & McManus Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
The DoH protocol design allows applications to fully leverage the
HTTP ecosystem, including features that are not enumerated here.
Utilizing the full set of HTTP features enables DoH to be more than
an HTTP tunnel, but it is at the cost of opening up implementations
to the full set of privacy considerations of HTTP.
Implementations of DoH clients and servers need to consider the
benefit and privacy impact of these features, and their deployment
context, when deciding whether or not to enable them.
Implementations are advised to expose the minimal set of data needed
to achieve the desired feature set.
Determining whether or not a DoH implementation requires HTTP cookie
[<a href="./rfc6265" title=""HTTP State Management Mechanism"">RFC6265</a>] support is particularly important because HTTP cookies are
the primary state tracking mechanism in HTTP. HTTP cookies SHOULD
NOT be accepted by DOH clients unless they are explicitly required by
a use case.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Security Considerations</span>
Running DNS over HTTPS relies on the security of the underlying HTTP
transport. This mitigates classic amplification attacks for UDP-
based DNS. Implementations utilizing HTTP/2 benefit from the TLS
profile defined in <a href="./rfc7540#section-9.2">Section 9.2 of [RFC7540]</a>.
Session-level encryption has well-known weaknesses with respect to
traffic analysis, which might be particularly acute when dealing with
DNS queries. HTTP/2 provides further advice about the use of
compression (see <a href="./rfc7540#section-10.6">Section 10.6 of [RFC7540]</a>) and padding (see
<a href="./rfc7540#section-10.7">Section 10.7 of [RFC7540]</a>). DoH servers can also add DNS padding
[<a href="./rfc7830" title=""The EDNS(0) Padding Option"">RFC7830</a>] if the DoH client requests it in the DNS query. An
experimental effort to offer guidance on choosing the padding length
can be found in [<a href="./rfc8467" title=""Padding Policies for Extension Mechanisms for DNS (EDNS(0))"">RFC8467</a>].
The HTTPS connection provides transport security for the interaction
between the DoH server and client, but it does not provide the
response integrity of DNS data provided by DNSSEC. DNSSEC and DoH
are independent and fully compatible protocols, each solving
different problems. The use of one does not diminish the need nor
the usefulness of the other. It is the choice of a client to either
perform full DNSSEC validation of answers or to trust the DoH server
to do DNSSEC validation and inspect the AD (Authentic Data) bit in
the returned message to determine whether an answer was authentic or
not. As noted in <a href="#section-4.2">Section 4.2</a>, different response media types will
provide more or less information from a DNS response, so this choice
may be affected by the response media type.
<span class="grey">Hoffman & McManus Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
<a href="#section-5.1">Section 5.1</a> describes the interaction of this protocol with HTTP
caching. An adversary that can control the cache used by the client
can affect that client's view of the DNS. This is no different than
the security implications of HTTP caching for other protocols that
use HTTP.
In the absence of DNSSEC information, a DoH server can give a client
invalid data in response to a DNS query. <a href="#section-3">Section 3</a> disallows the use
of DoH DNS responses that do not originate from configured servers.
This prohibition does not guarantee protection against invalid data,
but it does reduce the risk.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Operational Considerations</span>
Local policy considerations and similar factors mean different DNS
servers may provide different results to the same query, for
instance, in split DNS configurations [<a href="./rfc6950" title=""Architectural Considerations on Application Features in the DNS"">RFC6950</a>]. It logically
follows that the server that is queried can influence the end result.
Therefore, a client's choice of DNS server may affect the responses
it gets to its queries. For example, in the case of DNS64 [<a href="./rfc6147" title=""DNS64: DNS Extensions for Network Address Translation from IPv6 Clients to IPv4 Servers"">RFC6147</a>],
the choice could affect whether IPv6/IPv4 translation will work at
all.
The HTTPS channel used by this specification establishes secure two-
party communication between the DoH client and the DoH server.
Filtering or inspection systems that rely on unsecured transport of
DNS will not function in a DNS over HTTPS environment due to the
confidentiality and integrity protection provided by TLS.
Some HTTPS client implementations perform real time third-party
checks of the revocation status of the certificates being used by
TLS. If this check is done as part of the DoH server connection
procedure and the check itself requires DNS resolution to connect to
the third party, a deadlock can occur. The use of Online Certificate
Status Protocol (OCSP) [<a href="./rfc6960" title=""X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP"">RFC6960</a>] servers or Authority Information
Access (AIA) for Certificate Revocation List (CRL) fetching (see
<a href="./rfc5280#section-4.2.2.1">Section 4.2.2.1 of [RFC5280]</a>) are examples of how this deadlock can
happen. To mitigate the possibility of deadlock, the authentication
given DoH servers SHOULD NOT rely on DNS-based references to external
resources in the TLS handshake. For OCSP, the server can bundle the
certificate status as part of the handshake using a mechanism
appropriate to the version of TLS, such as using <a href="./rfc8446#section-4.4.2.1">Section 4.4.2.1 of
[RFC8446]</a> for TLS version 1.3. AIA deadlocks can be avoided by
providing intermediate certificates that might otherwise be obtained
through additional requests. Note that these deadlocks also need to
be considered for servers that a DoH server might redirect to.
<span class="grey">Hoffman & McManus Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
A DoH client may face a similar bootstrapping problem when the HTTP
request needs to resolve the hostname portion of the DNS URI. Just
as the address of a traditional DNS nameserver cannot be originally
determined from that same server, a DoH client cannot use its DoH
server to initially resolve the server's host name into an address.
Alternative strategies a client might employ include 1) making the
initial resolution part of the configuration, 2) IP-based URIs and
corresponding IP-based certificates for HTTPS, or 3) resolving the
DNS API server's hostname via traditional DNS or another DoH server
while still authenticating the resulting connection via HTTPS.
HTTP [<a href="./rfc7230" title=""Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing"">RFC7230</a>] is a stateless application-level protocol, and
therefore DoH implementations do not provide stateful ordering
guarantees between different requests. DoH cannot be used as a
transport for other protocols that require strict ordering.
A DoH server is allowed to answer queries with any valid DNS
response. For example, a valid DNS response might have the TC
(truncation) bit set in the DNS header to indicate that the server
was not able to retrieve a full answer for the query but is providing
the best answer it could get. A DoH server can reply to queries with
an HTTP error for queries that it cannot fulfill. In this same
example, a DoH server could use an HTTP error instead of a non-error
response that has the TC bit set.
Many extensions to DNS, using [<a href="./rfc6891" title=""Extension Mechanisms for DNS (EDNS(0))"">RFC6891</a>], have been defined over the
years. Extensions that are specific to the choice of transport, such
as [<a href="./rfc7828" title=""The edns-tcp-keepalive EDNS0 Option"">RFC7828</a>], are not applicable to DoH.
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. References</span>
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a>. Normative References</span>
[<a id="ref-RFC1035">RFC1035</a>] Mockapetris, P., "Domain names - implementation and
specification", STD 13, <a href="./rfc1035">RFC 1035</a>, DOI 10.17487/RFC1035,
November 1987, <<a href="https://www.rfc-editor.org/info/rfc1035">https://www.rfc-editor.org/info/rfc1035</a>>.
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC2308">RFC2308</a>] Andrews, M., "Negative Caching of DNS Queries (DNS
NCACHE)", <a href="./rfc2308">RFC 2308</a>, DOI 10.17487/RFC2308, March 1998,
<<a href="https://www.rfc-editor.org/info/rfc2308">https://www.rfc-editor.org/info/rfc2308</a>>.
<span class="grey">Hoffman & McManus Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
[<a id="ref-RFC4648">RFC4648</a>] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", <a href="./rfc4648">RFC 4648</a>, DOI 10.17487/RFC4648, October 2006,
<<a href="https://www.rfc-editor.org/info/rfc4648">https://www.rfc-editor.org/info/rfc4648</a>>.
[<a id="ref-RFC6265">RFC6265</a>] Barth, A., "HTTP State Management Mechanism", <a href="./rfc6265">RFC 6265</a>,
DOI 10.17487/RFC6265, April 2011,
<<a href="https://www.rfc-editor.org/info/rfc6265">https://www.rfc-editor.org/info/rfc6265</a>>.
[<a id="ref-RFC6570">RFC6570</a>] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M.,
and D. Orchard, "URI Template", <a href="./rfc6570">RFC 6570</a>,
DOI 10.17487/RFC6570, March 2012,
<<a href="https://www.rfc-editor.org/info/rfc6570">https://www.rfc-editor.org/info/rfc6570</a>>.
[<a id="ref-RFC7230">RFC7230</a>] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing",
<a href="./rfc7230">RFC 7230</a>, DOI 10.17487/RFC7230, June 2014,
<<a href="https://www.rfc-editor.org/info/rfc7230">https://www.rfc-editor.org/info/rfc7230</a>>.
[<a id="ref-RFC7231">RFC7231</a>] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Semantics and Content", <a href="./rfc7231">RFC 7231</a>,
DOI 10.17487/RFC7231, June 2014,
<<a href="https://www.rfc-editor.org/info/rfc7231">https://www.rfc-editor.org/info/rfc7231</a>>.
[<a id="ref-RFC7232">RFC7232</a>] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Conditional Requests", <a href="./rfc7232">RFC 7232</a>,
DOI 10.17487/RFC7232, June 2014,
<<a href="https://www.rfc-editor.org/info/rfc7232">https://www.rfc-editor.org/info/rfc7232</a>>.
[<a id="ref-RFC7234">RFC7234</a>] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching",
<a href="./rfc7234">RFC 7234</a>, DOI 10.17487/RFC7234, June 2014,
<<a href="https://www.rfc-editor.org/info/rfc7234">https://www.rfc-editor.org/info/rfc7234</a>>.
[<a id="ref-RFC7235">RFC7235</a>] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Authentication", <a href="./rfc7235">RFC 7235</a>,
DOI 10.17487/RFC7235, June 2014,
<<a href="https://www.rfc-editor.org/info/rfc7235">https://www.rfc-editor.org/info/rfc7235</a>>.
[<a id="ref-RFC7540">RFC7540</a>] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
Transfer Protocol Version 2 (HTTP/2)", <a href="./rfc7540">RFC 7540</a>,
DOI 10.17487/RFC7540, May 2015,
<<a href="https://www.rfc-editor.org/info/rfc7540">https://www.rfc-editor.org/info/rfc7540</a>>.
[<a id="ref-RFC7541">RFC7541</a>] Peon, R. and H. Ruellan, "HPACK: Header Compression for
HTTP/2", <a href="./rfc7541">RFC 7541</a>, DOI 10.17487/RFC7541, May 2015,
<<a href="https://www.rfc-editor.org/info/rfc7541">https://www.rfc-editor.org/info/rfc7541</a>>.
<span class="grey">Hoffman & McManus Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
[<a id="ref-RFC7626">RFC7626</a>] Bortzmeyer, S., "DNS Privacy Considerations", <a href="./rfc7626">RFC 7626</a>,
DOI 10.17487/RFC7626, August 2015,
<<a href="https://www.rfc-editor.org/info/rfc7626">https://www.rfc-editor.org/info/rfc7626</a>>.
[<a id="ref-RFC8174">RFC8174</a>] Leiba, B., "Ambiguity of Uppercase vs Lowercase in <a href="./rfc2119">RFC</a>
<a href="./rfc2119">2119</a> Key Words", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc8174">RFC 8174</a>, DOI 10.17487/RFC8174,
May 2017, <<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>>.
[<a id="ref-RFC8446">RFC8446</a>] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", <a href="./rfc8446">RFC 8446</a>, DOI 10.17487/RFC8446, August 2018,
<<a href="https://www.rfc-editor.org/info/rfc8446">https://www.rfc-editor.org/info/rfc8446</a>>.
<span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a>. Informative References</span>
[<a id="ref-FETCH">FETCH</a>] "Fetch Living Standard", August 2018,
<<a href="https://fetch.spec.whatwg.org/">https://fetch.spec.whatwg.org/</a>>.
[<a id="ref-RFC2818">RFC2818</a>] Rescorla, E., "HTTP Over TLS", <a href="./rfc2818">RFC 2818</a>,
DOI 10.17487/RFC2818, May 2000,
<<a href="https://www.rfc-editor.org/info/rfc2818">https://www.rfc-editor.org/info/rfc2818</a>>.
[<a id="ref-RFC5280">RFC5280</a>] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", <a href="./rfc5280">RFC 5280</a>, DOI 10.17487/RFC5280, May 2008,
<<a href="https://www.rfc-editor.org/info/rfc5280">https://www.rfc-editor.org/info/rfc5280</a>>.
[<a id="ref-RFC5861">RFC5861</a>] Nottingham, M., "HTTP Cache-Control Extensions for Stale
Content", <a href="./rfc5861">RFC 5861</a>, DOI 10.17487/RFC5861, May 2010,
<<a href="https://www.rfc-editor.org/info/rfc5861">https://www.rfc-editor.org/info/rfc5861</a>>.
[<a id="ref-RFC6147">RFC6147</a>] Bagnulo, M., Sullivan, A., Matthews, P., and I. van
Beijnum, "DNS64: DNS Extensions for Network Address
Translation from IPv6 Clients to IPv4 Servers", <a href="./rfc6147">RFC 6147</a>,
DOI 10.17487/RFC6147, April 2011,
<<a href="https://www.rfc-editor.org/info/rfc6147">https://www.rfc-editor.org/info/rfc6147</a>>.
[<a id="ref-RFC6891">RFC6891</a>] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms
for DNS (EDNS(0))", STD 75, <a href="./rfc6891">RFC 6891</a>,
DOI 10.17487/RFC6891, April 2013,
<<a href="https://www.rfc-editor.org/info/rfc6891">https://www.rfc-editor.org/info/rfc6891</a>>.
[<a id="ref-RFC6950">RFC6950</a>] Peterson, J., Kolkman, O., Tschofenig, H., and B. Aboba,
"Architectural Considerations on Application Features in
the DNS", <a href="./rfc6950">RFC 6950</a>, DOI 10.17487/RFC6950, October 2013,
<<a href="https://www.rfc-editor.org/info/rfc6950">https://www.rfc-editor.org/info/rfc6950</a>>.
<span class="grey">Hoffman & McManus Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
[<a id="ref-RFC6960">RFC6960</a>] Santesson, S., Myers, M., Ankney, R., Malpani, A.,
Galperin, S., and C. Adams, "X.509 Internet Public Key
Infrastructure Online Certificate Status Protocol - OCSP",
<a href="./rfc6960">RFC 6960</a>, DOI 10.17487/RFC6960, June 2013,
<<a href="https://www.rfc-editor.org/info/rfc6960">https://www.rfc-editor.org/info/rfc6960</a>>.
[<a id="ref-RFC7258">RFC7258</a>] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an
Attack", <a href="https://www.rfc-editor.org/bcp/bcp188">BCP 188</a>, <a href="./rfc7258">RFC 7258</a>, DOI 10.17487/RFC7258, May
2014, <<a href="https://www.rfc-editor.org/info/rfc7258">https://www.rfc-editor.org/info/rfc7258</a>>.
[<a id="ref-RFC7413">RFC7413</a>] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP
Fast Open", <a href="./rfc7413">RFC 7413</a>, DOI 10.17487/RFC7413, December 2014,
<<a href="https://www.rfc-editor.org/info/rfc7413">https://www.rfc-editor.org/info/rfc7413</a>>.
[<a id="ref-RFC7828">RFC7828</a>] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The
edns-tcp-keepalive EDNS0 Option", <a href="./rfc7828">RFC 7828</a>,
DOI 10.17487/RFC7828, April 2016,
<<a href="https://www.rfc-editor.org/info/rfc7828">https://www.rfc-editor.org/info/rfc7828</a>>.
[<a id="ref-RFC7830">RFC7830</a>] Mayrhofer, A., "The EDNS(0) Padding Option", <a href="./rfc7830">RFC 7830</a>,
DOI 10.17487/RFC7830, May 2016,
<<a href="https://www.rfc-editor.org/info/rfc7830">https://www.rfc-editor.org/info/rfc7830</a>>.
[<a id="ref-RFC7858">RFC7858</a>] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D.,
and P. Hoffman, "Specification for DNS over Transport
Layer Security (TLS)", <a href="./rfc7858">RFC 7858</a>, DOI 10.17487/RFC7858, May
2016, <<a href="https://www.rfc-editor.org/info/rfc7858">https://www.rfc-editor.org/info/rfc7858</a>>.
[<a id="ref-RFC8467">RFC8467</a>] Mayrhofer, A., "Padding Policies for Extension Mechanisms
for DNS (EDNS(0))", <a href="./rfc8467">RFC 8467</a>, DOI 10.17487/RFC8467,
October 2018, <<a href="https://www.rfc-editor.org/info/rfc8467">https://www.rfc-editor.org/info/rfc8467</a>>.
<span class="grey">Hoffman & McManus Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Protocol Development</span>
This appendix describes the requirements used to design DoH. These
requirements are listed here to help readers understand the current
protocol, not to limit how the protocol might be developed in the
future. This appendix is non-normative.
The protocol described in this document based its design on the
following protocol requirements:
o The protocol must use normal HTTP semantics.
o The queries and responses must be able to be flexible enough to
express every DNS query that would normally be sent in DNS over
UDP (including queries and responses that use DNS extensions, but
not those that require multiple responses).
o The protocol must permit the addition of new formats for DNS
queries and responses.
o The protocol must ensure interoperability by specifying a single
format for requests and responses that is mandatory to implement.
That format must be able to support future modifications to the
DNS protocol including the inclusion of one or more EDNS options
(including those not yet defined).
o The protocol must use a secure transport that meets the
requirements for HTTPS.
The following were considered non-requirements:
o Supporting network-specific DNS64 [<a href="./rfc6147" title=""DNS64: DNS Extensions for Network Address Translation from IPv6 Clients to IPv4 Servers"">RFC6147</a>]
o Supporting other network-specific inferences from plaintext DNS
queries
o Supporting insecure HTTP
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Previous Work on DNS over HTTP or in Other Formats</span>
The following is an incomplete list of earlier work that related to
DNS over HTTP/1 or representing DNS data in other formats.
The list includes links to the tools.ietf.org site (because these
documents are all expired) and web sites of software.
o <<a href="https://tools.ietf.org/html/draft-mohan-dns-query-xml">https://tools.ietf.org/html/draft-mohan-dns-query-xml</a>>
<span class="grey">Hoffman & McManus Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc8484">RFC 8484</a> DNS Queries over HTTPS (DoH) October 2018</span>
o <<a href="https://tools.ietf.org/html/draft-daley-dnsxml">https://tools.ietf.org/html/draft-daley-dnsxml</a>>
o <<a href="https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof">https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof</a>>
o <<a href="https://tools.ietf.org/html/draft-bortzmeyer-dns-json">https://tools.ietf.org/html/draft-bortzmeyer-dns-json</a>>
o <<a href="https://www.nlnetlabs.nl/projects/dnssec-trigger/">https://www.nlnetlabs.nl/projects/dnssec-trigger/</a>>
Acknowledgments
This work required a high level of cooperation between experts in
different technologies. Thank you Ray Bellis, Stephane Bortzmeyer,
Manu Bretelle, Sara Dickinson, Massimiliano Fantuzzi, Tony Finch,
Daniel Kahn Gilmor, Olafur Gudmundsson, Wes Hardaker, Rory Hewitt,
Joe Hildebrand, David Lawrence, Eliot Lear, John Mattsson, Alex
Mayrhofer, Mark Nottingham, Jim Reid, Adam Roach, Ben Schwartz, Davey
Song, Daniel Stenberg, Andrew Sullivan, Martin Thomson, and Sam
Weiler.
Authors' Addresses
Paul Hoffman
ICANN
Email: paul.hoffman@icann.org
Patrick McManus
Mozilla
Email: mcmanus@ducksong.com
Hoffman & McManus Standards Track [Page 21]
</pre>
|