draft-ietf-doh-dns-over-https-04.txt   draft-ietf-doh-dns-over-https-05.txt 
Network Working Group P. Hoffman Network Working Group P. Hoffman
Internet-Draft ICANN Internet-Draft ICANN
Intended status: Standards Track P. McManus Intended status: Standards Track P. McManus
Expires: September 22, 2018 Mozilla Expires: October 4, 2018 Mozilla
March 21, 2018 April 02, 2018
DNS Queries over HTTPS DNS Queries over HTTPS
draft-ietf-doh-dns-over-https-04 draft-ietf-doh-dns-over-https-05
Abstract Abstract
This document describes how to run DNS service over HTTP using This document describes how to run DNS service over HTTP using
https:// URIs. https:// URIs.
[[ There is a repository for this draft at https://github.com/dohwg/ [[ There is a repository for this draft at https://github.com/dohwg/
draft-ietf-doh-dns-over-https [1] ]]. draft-ietf-doh-dns-over-https [1] ]].
Status of This Memo Status of This Memo
skipping to change at page 1, line 35 skipping to change at page 1, line 35
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 22, 2018. This Internet-Draft will expire on October 4, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 16 skipping to change at page 2, line 16
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Protocol Requirements . . . . . . . . . . . . . . . . . . . . 3 3. Protocol Requirements . . . . . . . . . . . . . . . . . . . . 3
3.1. Non-requirements . . . . . . . . . . . . . . . . . . . . 4 3.1. Non-requirements . . . . . . . . . . . . . . . . . . . . 4
4. The HTTP Request . . . . . . . . . . . . . . . . . . . . . . 4 4. The HTTP Request . . . . . . . . . . . . . . . . . . . . . . 4
4.1. DNS Wire Format . . . . . . . . . . . . . . . . . . . . . 5 4.1. DNS Wire Format . . . . . . . . . . . . . . . . . . . . . 5
4.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 5 4.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 5
5. The HTTP Response . . . . . . . . . . . . . . . . . . . . . . 7 5. The HTTP Response . . . . . . . . . . . . . . . . . . . . . . 6
5.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 8 5.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 8
6. HTTP Integration . . . . . . . . . . . . . . . . . . . . . . 8 6. HTTP Integration . . . . . . . . . . . . . . . . . . . . . . 8
6.1. Cache Interaction . . . . . . . . . . . . . . . . . . . . 8 6.1. Cache Interaction . . . . . . . . . . . . . . . . . . . . 8
6.2. HTTP/2 . . . . . . . . . . . . . . . . . . . . . . . . . 9 6.2. HTTP/2 . . . . . . . . . . . . . . . . . . . . . . . . . 9
6.3. Server Push . . . . . . . . . . . . . . . . . . . . . . . 10 6.3. Server Push . . . . . . . . . . . . . . . . . . . . . . . 9
6.4. Content Negotiation . . . . . . . . . . . . . . . . . . . 10
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
7.1. Registration of application/dns-udpwireformat Media Type 10 7.1. Registration of application/dns-udpwireformat Media Type 10
8. Security Considerations . . . . . . . . . . . . . . . . . . . 12 8. Security Considerations . . . . . . . . . . . . . . . . . . . 12
9. Operational Considerations . . . . . . . . . . . . . . . . . 13 9. Operational Considerations . . . . . . . . . . . . . . . . . 13
10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 13 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 14
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 14
11.1. Normative References . . . . . . . . . . . . . . . . . . 14 11.1. Normative References . . . . . . . . . . . . . . . . . . 14
11.2. Informative References . . . . . . . . . . . . . . . . . 15 11.2. Informative References . . . . . . . . . . . . . . . . . 15
11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 16 11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Appendix A. Previous Work on DNS over HTTP or in Other Formats . 16 Appendix A. Previous Work on DNS over HTTP or in Other Formats . 16
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17
1. Introduction 1. Introduction
The Internet does not always provide end to end reachability for
native DNS. On-path network devices may spoof DNS responses, block
DNS requests, or just redirect DNS queries to different DNS servers
that give less-than-honest answers. These are also sometimes
delivered with poor performance or reduced feature sets.
Over time, there have been many proposals for using HTTP and HTTPS as
a substrate for DNS queries and responses. To date, none of those
proposals have made it beyond early discussion, partially due to
disagreement about what the appropriate formatting should be and
partially because they did not follow HTTP best practices.
This document defines a specific protocol for sending DNS [RFC1035] This document defines a specific protocol for sending DNS [RFC1035]
queries and getting DNS responses over HTTP [RFC7540] using https:// queries and getting DNS responses over HTTP [RFC7540] using https://
(and therefore TLS [RFC5246] security for integrity and (and therefore TLS [RFC5246] security for integrity and
confidentiality). Each DNS query-response pair is mapped into a HTTP confidentiality). Each DNS query-response pair is mapped into a HTTP
request-response pair. request-response pair.
The described approach is more than a tunnel over HTTP. It The described approach is more than a tunnel over HTTP. It
establishes default media formatting types for requests and responses establishes default media formatting types for requests and responses
but uses normal HTTP content negotiation mechanisms for selecting but uses normal HTTP content negotiation mechanisms for selecting
alternatives that endpoints may prefer in anticipation of serving new alternatives that endpoints may prefer in anticipation of serving new
skipping to change at page 3, line 47 skipping to change at page 3, line 37
capitals, as shown here. capitals, as shown here.
3. Protocol Requirements 3. Protocol Requirements
The protocol described here bases its design on the following The protocol described here bases its design on the following
protocol requirements: protocol requirements:
o The protocol must use normal HTTP semantics. o The protocol must use normal HTTP semantics.
o The queries and responses must be able to be flexible enough to o The queries and responses must be able to be flexible enough to
express every normal DNS query. 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 allow implementations to use HTTP's content o The protocol must permit the addition of new formats for DNS
negotiation mechanism. queries and responses.
o The protocol must ensure interoperable media formats through a o The protocol must ensure interoperability by specifying a single
mandatory to implement format wherein a query must be able to format for requests and responses that is mandatory to implement.
contain future modifications to the DNS protocol including the That format must be able to support future modifications to the
inclusion of one or more EDNS extensions (including those not yet DNS protocol including the inclusion of one or more EDNS options
defined). (including those not yet defined).
o The protocol must use a secure transport that meets the o The protocol must use a secure transport that meets the
requirements for HTTPS. requirements for HTTPS.
3.1. Non-requirements 3.1. Non-requirements
o Supporting network-specific DNS64 [RFC6147] o Supporting network-specific DNS64 [RFC6147]
o Supporting other network-specific inferences from plaintext DNS o Supporting other network-specific inferences from plaintext DNS
queries queries
o Supporting insecure HTTP o Supporting insecure HTTP
o Supporting legacy HTTP versions
4. The HTTP Request 4. The HTTP Request
To make a DNS API query a DNS API client encodes a single DNS query A DNS API client encodes a single DNS query into an HTTP request
into an HTTP request using either the HTTP GET or POST method and the using either the HTTP GET or POST method and the other requirements
other requirements of this section. The DNS API server defines the of this section. The DNS API server defines the URI used by the
URI used by the request. Configuration and discovery of the URI is request through the use of a URI Template [RFC6570]. Configuration
done out of band from this protocol. and discovery of the URI Template is done out of band from this
protocol.
The URI template defined in this document is processed without any
variables for requests using POST, and with the single variable "dns"
for requests using GET. The value of the dns parameter is the
content of the request (as described in Section 4.1), encoded with
base64url [RFC4648].
Future specifications for new media types MUST define the variables
used for URI Template processing with this protocol.
DNS API servers MUST implement both the POST and GET methods.
When using the POST method the DNS query is included as the message When using the POST method the DNS query is included as the message
body of the HTTP request and the Content-Type request header body of the HTTP request and the Content-Type request header
indicates the media type of the message. POST-ed requests are indicates the media type of the message. POST-ed requests are
smaller than their GET equivalents. smaller than their GET equivalents.
When using the GET method the URI path MUST contain a query parameter
name-value pair [QUERYPARAMETER] with the name of "ct" and a value
indicating the media-format used for the dns parameter. The value
may either be an explicit media type (e.g. ct=application/dns-
udpwireformat&dns=...) or it may be empty. An empty value indicates
the default application/dns-udpwireformat type (e.g. ct&dns=...).
When using the GET method the URI path MUST contain a query parameter
with the name of "dns". The value of the parameter is the content of
the request potentially encoded with base64url [RFC4648].
Specifications that define media types for use with DOH, such as DNS
Wire Format Section 4.1 of this document, MUST indicate if the dns
parameter uses base64url encoding.
Using the GET method is friendlier to many HTTP cache Using the GET method is friendlier to many HTTP cache
implementations. implementations.
The DNS API client SHOULD include an HTTP "Accept:" request header to The DNS API client SHOULD include an HTTP "Accept" request header to
say what type of content can be understood in response. The client indicate what type of content can be understood in response.
Irrespective of the value of the Accept request header, the client
MUST be prepared to process "application/dns-udpwireformat" MUST be prepared to process "application/dns-udpwireformat"
Section 4.1 responses but MAY process any other type it receives. Section 4.1 responses but MAY also process any other type it
receives.
In order to maximize cache friendliness, DNS API clients using media In order to maximize cache friendliness, DNS API clients using media
formats that include DNS ID, such as application/dns-udpwireformat, formats that include DNS ID, such as application/dns-udpwireformat,
SHOULD use a DNS ID of 0 in every DNS request. HTTP correlates SHOULD use a DNS ID of 0 in every DNS request. HTTP correlates
request and response, thus eliminating the need for the ID in a media request and response, thus eliminating the need for the ID in a media
type such as application/dns-udpwireformat and the use of a varying type such as application/dns-udpwireformat and the use of a varying
DNS ID can cause semantically equivalent DNS queries to be cached DNS ID can cause semantically equivalent DNS queries to be cached
separately. separately.
DNS API clients can use HTTP/2 padding and compression in the same DNS API clients can use HTTP/2 padding and compression in the same
way that other HTTP/2 clients use (or don't use) them. way that other HTTP/2 clients use (or don't use) them.
4.1. DNS Wire Format 4.1. DNS Wire Format
The data payload is the DNS on-the-wire format defined in [RFC1035]. The data payload is the DNS on-the-wire format defined in [RFC1035].
The format is for DNS over UDP. (Note that this is different than The format is for DNS over UDP. Note that this is different than the
the wire format used in [RFC7858]. wire format used in [RFC7858]. Also note that while [RFC1035] says
"Messages carried by UDP are restricted to 512 bytes", that was later
updated by [RFC6891], and this protocol allows DNS on-the-wire format
payloads of any size.
When using the GET method, the data payload MUST be encoded with When using the GET method, the data payload MUST be encoded with
base64url [RFC4648] and then placed as a name value pair in the query base64url [RFC4648] and then provided as a variable named "dns" to
portion of the URI with name "dns". Padding characters for base64url the URI Template expansion. Padding characters for base64url MUST
MUST NOT be included. NOT be included.
When using the POST method, the data payload MUST NOT be encoded and When using the POST method, the data payload MUST NOT be encoded and
is used directly as the HTTP message body. is used directly as the HTTP message body.
DNS API clients using the DNS wire format MAY have one or more EDNS DNS API clients using the DNS wire format MAY have one or more EDNS
extensions [RFC6891] in the request. options [RFC6891] in the request.
The media type is "application/dns-udpwireformat". The media type is "application/dns-udpwireformat".
4.2. Examples 4.2. Examples
These examples use HTTP/2 style formatting from [RFC7540]. These examples use HTTP/2 style formatting from [RFC7540].
These examples use a DNS API service located at These examples use a DNS API service with a URI Template of
https://dnsserver.example.net/dns-query to resolve the IN A records. "https://dnsserver.example.net/dns-query{?dns}" to resolve IN A
records.
The requests are represented as application/dns-udpwirefomat typed The requests are represented as application/dns-udpwirefomat typed
bodies. bodies.
The first example request uses GET to request www.example.com The first example request uses GET to request www.example.com
:method = GET :method = GET
:scheme = https :scheme = https
:authority = dnsserver.example.net :authority = dnsserver.example.net
:path = /dns-query?ct& (no space or CR) :path = /dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB
dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB
accept = application/dns-udpwireformat accept = application/dns-udpwireformat
The same DNS query for www.example.com, using the POST method would The same DNS query for www.example.com, using the POST method would
be: be:
:method = POST :method = POST
:scheme = https :scheme = https
:authority = dnsserver.example.net :authority = dnsserver.example.net
:path = /dns-query :path = /dns-query
accept = application/dns-udpwireformat accept = application/dns-udpwireformat
content-type = application/dns-udpwireformat content-type = application/dns-udpwireformat
content-length = 33 content-length = 33
skipping to change at page 6, line 47 skipping to change at page 6, line 37
00 00 01 00 00 01 00 00 00 00 00 00 01 61 3e 36 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 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 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 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 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 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01
:method = GET :method = GET
:scheme = https :scheme = https
:authority = dnsserver.example.net :authority = dnsserver.example.net
:path = /dns-query?ct& (no space or CR) :path = /dns-query? (no space or CR)
dns=AAABAAABAAAAAAAAAWE-NjJjaGFyYWN0ZXJsYWJl (no space or CR) dns=AAABAAABAAAAAAAAAWE-NjJjaGFyYWN0ZXJsYWJl (no space or CR)
bC1tYWtlcy1iYXNlNjR1cmwtZGlzdGluY3QtZnJvbS1z (no space or CR) bC1tYWtlcy1iYXNlNjR1cmwtZGlzdGluY3QtZnJvbS1z (no space or CR)
dGFuZGFyZC1iYXNlNjQHZXhhbXBsZQNjb20AAAEAAQ dGFuZGFyZC1iYXNlNjQHZXhhbXBsZQNjb20AAAEAAQ
accept = application/dns-udpwireformat accept = application/dns-udpwireformat
5. The HTTP Response 5. The HTTP Response
An HTTP response with a 2xx status code ([RFC7231] Section 6.3) An HTTP response with a 2xx status code ([RFC7231] Section 6.3)
indicates a valid DNS response to the query made in the HTTP request. indicates a valid DNS response to the query made in the HTTP request.
A valid DNS response includes both success and failure responses. A valid DNS response includes both success and failure responses.
For example, a DNS failure response such as SERVFAIL or NXDOMAIN will For example, a DNS failure response such as SERVFAIL or NXDOMAIN will
be the message in a successful 2xx HTTP response even though there be the message in a successful 2xx HTTP response even though there
was a failure at the DNS layer. Responses with non-successful HTTP was a failure at the DNS layer. Responses with non-successful HTTP
status codes do not contain DNS answers to the question in the status codes do not contain DNS answers to the question in the
corresponding request. Some of these non-successful HTTP responses corresponding request. Some of these non-successful HTTP responses
(e.g. redirects or authentication failures) could allow clients to (e.g., redirects or authentication failures) could allow clients to
make new requests to satisfy the original question. make new requests to satisfy the original question.
Different response media types will provide more or less information Different response media types will provide more or less information
from a DNS response. For example, one response type might include from a DNS response. For example, one response type might include
the information from the DNS header bytes while another might omit the information from the DNS header bytes while another might omit
it. The amount and type of information that a media type gives is it. The amount and type of information that a media type gives is
solely up to the format, and not defined in this protocol. solely up to the format, and not defined in this protocol.
At the time this is published, the response types are works in At the time this is published, the response types are works in
progress. The only response type defined in this document is progress. The only response type defined in this document is
"application/dns-udpwireformat", but it is possible that other "application/dns-udpwireformat", but it is possible that other
response formats will be defined in the future. response formats will be defined in the future.
The DNS response for "application/dns-udpwireformat" in Section 4.1 The DNS response for "application/dns-udpwireformat" in Section 4.1
MAY have one or more EDNS extensions, depending on the extension MAY have one or more EDNS options, depending on the extension
definition of the extensions given in the DNS request. definition of the extensions given in the DNS request.
Each DNS request-response pair is matched to one HTTP request- Each DNS request-response pair is matched to one HTTP request-
response pair. The responses may be processed and transported in any response pair. The responses may be processed and transported in any
order using HTTP's multi-streaming functionality ([RFC7540] order using HTTP's multi-streaming functionality ([RFC7540]
Section 5}). Section 5}).
The Answer section of a DNS response can contain zero or more RRsets. The Answer section of a DNS response can contain zero or more RRsets.
(RRsets are defined in [RFC7719].) According to [RFC2181], each (RRsets are defined in [RFC7719].) According to [RFC2181], each
resource record in an RRset has Time To Live (TTL) freshness resource record in an RRset has Time To Live (TTL) freshness
skipping to change at page 8, line 8 skipping to change at page 7, line 46
with the smallest TTL in the Answer section of the response. with the smallest TTL in the Answer section of the response.
Specifically, the HTTP freshness lifetime SHOULD be set to expire at Specifically, the HTTP freshness lifetime SHOULD be set to expire at
the same time any of the DNS resource records in the Answer section the same time any of the DNS resource records in the Answer section
reach a 0 TTL. The response freshness lifetime MUST NOT be greater reach a 0 TTL. The response freshness lifetime MUST NOT be greater
than that indicated by the DNS resoruce record with the smallest TTL than that indicated by the DNS resoruce record with the smallest TTL
in the response. in the response.
If the DNS response has no records in the Answer section, and the DNS 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 response has an SOA record in the Authority section, the response
freshness lifetime MUST NOT be greater than the MINIMUM field from freshness lifetime MUST NOT be greater than the MINIMUM field from
that SOA record. Otherwise, the HTTP response MUST set a freshness that SOA record. (See [RFC2308].) Otherwise, the HTTP response MUST
lifetime ([RFC7234] Section 4.2) of 0 by using a mechanism such as set a freshness lifetime ([RFC7234] Section 4.2) of 0 by using a
"Cache-Control: no-cache" ([RFC7234] Section 5.2.1.4). mechanism such as "Cache-Control: no-cache" ([RFC7234]
Section 5.2.1.4).
A DNS API client that receives a response without an explicit A DNS API client that receives a response without an explicit
freshness lifetime MUST NOT assign that response a heuristic freshness lifetime MUST NOT assign that response a heuristic
freshness ([RFC7234] Section 4.2.2.) greater than that indicated by freshness ([RFC7234] Section 4.2.2.) greater than that indicated by
the DNS Record with the smallest TTL in the response. the DNS Record with the smallest TTL in the response.
A DNS API server MUST be able to process application/dns- A DNS API server MUST be able to process application/dns-
udpwireformat request messages. udpwireformat request messages.
A DNS API server SHOULD respond with HTTP status code 415 A DNS API server SHOULD respond with HTTP status code 415
skipping to change at page 8, line 50 skipping to change at page 8, line 43
07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00
01 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 01 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f
6d 00 00 01 00 01 00 00 00 80 00 04 C0 00 02 01 6d 00 00 01 00 01 00 00 00 80 00 04 C0 00 02 01
6. HTTP Integration 6. HTTP Integration
This protocol MUST be used with the https scheme URI [RFC7230]. This protocol MUST be used with the https scheme URI [RFC7230].
6.1. Cache Interaction 6.1. Cache Interaction
A DOH API client may utilize a hierarchy of caches that include both A DNS API client may utilize a hierarchy of caches that include both
HTTP and DNS specific caches. HTTP cache entries may be bypassed HTTP and DNS specific caches. HTTP cache entries may be bypassed
with HTTP mechanisms such as the "Cache-Control no-cache" directive; with HTTP mechanisms such as the "Cache-Control no-cache" directive;
however DNS caches do not have a similar mechanism. however DNS caches do not have a similar mechanism.
A DOH response that was previously stored in an HTTP cache will A DOH response that was previously stored in an HTTP cache will
contain the [RFC7234] Age response header indicating the elapsed time contain the [RFC7234] Age response header indicating the elapsed time
between when the entry was placed in the HTTP cache and the current between when the entry was placed in the HTTP cache and the current
DOH response. DNS API clients should subtract this time from the DNS DOH response. DNS API clients should subtract this time from the DNS
TTL if they are re-sharing the information in a non HTTP context TTL if they are re-sharing the information in a non HTTP context
(e.g. their own DNS cache) to determine the remaining time to live of (e.g., their own DNS cache) to determine the remaining time to live
the DNS record. of the DNS record.
HTTP revalidation (e.g. via If-None-Match request headers) of cached HTTP revalidation (e.g., via If-None-Match request headers) of cached
DNS information may be of limited value to DOH as revalidation DNS information may be of limited value to DOH as revalidation
provides only a bandwidth benefit and DNS transactions are normally provides only a bandwidth benefit and DNS transactions are normally
latency bound. Furthermore, the HTTP response headers that enable latency bound. Furthermore, the HTTP response headers that enable
revalidation (such as "Last-Modified" and "Etag") are often fairly revalidation (such as "Last-Modified" and "Etag") are often fairly
large when compared to the overall DNS response size, and have a large when compared to the overall DNS response size, and have a
variable nature that creates constant pressure on the HTTP/2 variable nature that creates constant pressure on the HTTP/2
compression dictionary [RFC7541]. Other types of DNS data, such as compression dictionary [RFC7541]. Other types of DNS data, such as
zone transfers, may be larger and benefit more from revalidation. zone transfers, may be larger and benefit more from revalidation.
DNS API servers may wish to consider whether providing these DNS API servers may wish to consider whether providing these
validation enabling response headers is worthwhile. validation enabling response headers is worthwhile.
skipping to change at page 10, line 17 skipping to change at page 10, line 9
Before using DOH response data for DNS resolution, the client MUST Before using DOH response data for DNS resolution, the client MUST
establish that the HTTP request URI is a trusted service for the DOH establish that the HTTP request URI is a trusted service for the DOH
query. For HTTP requests initiated by the DNS API client this trust query. For HTTP requests initiated by the DNS API client this trust
is implicit in the selection of URI. For HTTP server push ([RFC7540] is implicit in the selection of URI. For HTTP server push ([RFC7540]
Section 8.2) extra care must be taken to ensure that the pushed URI Section 8.2) 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 is one that the client would have directed the same query to if the
client had initiated the request. This specification does not extend client had initiated the request. This specification does not extend
DNS resolution privileges to URIs that are not recognized by the DNS resolution privileges to URIs that are not recognized by the
client as trusted DNS API servers. client as trusted DNS API servers.
6.4. Content Negotiation
In order to maximize interoperability, DNS API clients and DNS API
servers MUST support the "application/dns-udpwireformat" media type.
Other media types MAY be used as defined by HTTP Content Negotiation
([RFC7231] Section 3.4).
7. IANA Considerations 7. IANA Considerations
7.1. Registration of application/dns-udpwireformat Media Type 7.1. Registration of application/dns-udpwireformat Media Type
To: ietf-types@iana.org To: ietf-types@iana.org
Subject: Registration of MIME media type Subject: Registration of MIME media type
application/dns-udpwireformat application/dns-udpwireformat
MIME media type name: application MIME media type name: application
MIME subtype name: dns-udpwireformat MIME subtype name: dns-udpwireformat
Required parameters: n/a Required parameters: n/a
Optional parameters: n/a Optional parameters: original_transport
The "original_transport" parameter has two defined values,
"udp" and "tcp". This parameter is only expected to be used by
servers.
Encoding considerations: This is a binary format. The contents are a Encoding considerations: This is a binary format. The contents are a
DNS message as defined in RFC 1035. The format used here is for DNS DNS message as defined in RFC 1035. The format used here is for DNS
over UDP, which is the format defined in the diagrams in RFC 1035. over UDP, which is the format defined in the diagrams in RFC 1035.
Security considerations: The security considerations for carrying Security considerations: The security considerations for carrying
this data are the same for carrying DNS without encryption. this data are the same for carrying DNS without encryption.
Interoperability considerations: None. Interoperability considerations: None.
skipping to change at page 12, line 8 skipping to change at page 12, line 8
Restrictions on usage: n/a Restrictions on usage: n/a
Author: Paul Hoffman, paul.hoffman@icann.org Author: Paul Hoffman, paul.hoffman@icann.org
Change controller: IESG Change controller: IESG
8. Security Considerations 8. Security Considerations
Running DNS over HTTPS relies on the security of the underlying HTTP Running DNS over HTTPS relies on the security of the underlying HTTP
transport. This mitigates classic amplication attacks for UDP-based transport. This mitigates classic amplification attacks for UDP-
DNS. Implementations utilizing HTTP/2 benefit from the TLS profile based DNS. Implementations utilizing HTTP/2 benefit from the TLS
defined in [RFC7540] Section 9.2. profile defined in [RFC7540] Section 9.2.
Session level encryption has well known weaknesses with respect to Session level encryption has well known weaknesses with respect to
traffic analysis which might be particularly acute when dealing with traffic analysis which might be particularly acute when dealing with
DNS queries. HTTP/2 provides further advice about the use of DNS queries. HTTP/2 provides further advice about the use of
compression (Section 10.6 of [RFC7540]) and padding (Section 10.7 of compression (Section 10.6 of [RFC7540]) and padding (Section 10.7 of
[RFC7540]). [RFC7540]).
The HTTPS connection provides transport security for the interaction The HTTPS connection provides transport security for the interaction
between the DNS API server and client, but does not inherently ensure between the DNS API server and client, but does not inherently ensure
the authenticity of DNS data. A DNS API client may also perform full the authenticity of DNS data. A DNS API client may also perform full
skipping to change at page 12, line 47 skipping to change at page 12, line 47
server can thus easily cause damage by poisoning a client's cache server can thus easily cause damage by poisoning a client's cache
with names that the DNS API server chooses to poison. A client MUST with names that the DNS API server chooses to poison. A client MUST
NOT trust a DNS API server simply because it was discovered, or NOT trust a DNS API server simply because it was discovered, or
because the client was told to trust the DNS API server by an because the client was told to trust the DNS API server by an
untrusted party. Instead, a client MUST only trust DNS API server untrusted party. Instead, a client MUST only trust DNS API server
that is configured as trustworthy. that is configured as trustworthy.
A client can use DNS over HTTPS as one of multiple mechanisms to A client can use DNS over HTTPS as one of multiple mechanisms to
obtain DNS data. If a client of this protocol encounters an HTTP obtain DNS data. If a client of this protocol encounters an HTTP
error after sending a DNS query, and then falls back to a different error after sending a DNS query, and then falls back to a different
DNS retrieval mechanism, doing so can weaken the privacy expected by DNS retrieval mechanism, doing so can weaken the privacy and
the user of the client. authenticity expected by the user of the client.
9. Operational Considerations 9. Operational Considerations
Local policy considerations and similar factors mean different DNS Local policy considerations and similar factors mean different DNS
servers may provide different results to the same query: for instance servers may provide different results to the same query: for instance
in split DNS configurations [RFC6950]. It logically follows that the in split DNS configurations [RFC6950]. It logically follows that the
server which is queried can influence the end result. Therefore a server which is queried can influence the end result. Therefore a
client's choice of DNS server may affect the responses it gets to its client's choice of DNS server may affect the responses it gets to its
queries. For example, in the case of DNS64 [RFC6147], the choice queries. For example, in the case of DNS64 [RFC6147], the choice
could affect whether IPv6/IPv4 translation will work at all. could affect whether IPv6/IPv4 translation will work at all.
The HTTPS channel used by this specification establishes secure two The HTTPS channel used by this specification establishes secure two
party communication between the DNS API client and the DNS API party communication between the DNS API client and the DNS API
server. Filtering or inspection systems that rely on unsecured server. Filtering or inspection systems that rely on unsecured
transport of DNS will not function in a DNS over HTTPS environment. transport of DNS will not function in a DNS over HTTPS environment.
Many HTTPS implementations perform real time third party checks of Some HTTPS client implementations perform real time third party
the revocation status of the certificates being used by TLS. If this checks of the revocation status of the certificates being used by
check is done as part of the DNS API server connection procedure and TLS. If this check is done as part of the DNS API server connection
the check itself requires DNS resolution to connect to the third procedure and the check itself requires DNS resolution to connect to
party a deadlock can occur. The use of an OCSP [RFC6960] server is the third party a deadlock can occur. The use of OCSP [RFC6960]
one example of how this can happen. DNS API servers SHOULD utilize servers or AIA for CRL fetching ([RFC5280] Section 4.2.2.1) are
OCSP Stapling [RFC6961] to provide the client with certificate examples of how this deadlock can happen. To mitigate the
revocation information that does not require contacting a third possibility of deadlock, DNS API servers SHOULD NOT rely on DNS based
party. 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
[RFC6066] Section 8 for TLS version 1.2. AIA deadlocks can be
avoided by providing intermediate certificates that might otherwise
be obtained through additional requests.
A DNS API client may face a similar bootstrapping problem when the A DNS API client may face a similar bootstrapping problem when the
HTTP request needs to resolve the hostname portion of the DNS URI. HTTP request needs to resolve the hostname portion of the DNS URI.
Just as the address of a traditional DNS nameserver cannot be Just as the address of a traditional DNS nameserver cannot be
originally determined from that same server, a DOH client cannot use originally determined from that same server, a DNS API client cannot
its DOH server to initially resolve the server's host name into an use its DNS API server to initially resolve the server's host name
address. Alternative strategies a client might employ include making into an address. Alternative strategies a client might employ
the initial resolution part of the configuration, IP based URIs and include making the initial resolution part of the configuration, IP
corresponding IP based certificates for HTTPS, or resolving the DNS based URIs and corresponding IP based certificates for HTTPS, or
API server's hostname via traditional DNS or another DOH server while resolving the DNS API server's hostname via traditional DNS or
still authenticating the resulting connection via HTTPS. another DNS API server while still authenticating the resulting
connection via HTTPS.
HTTP [RFC7230] is a stateless application level protocol and HTTP [RFC7230] is a stateless application level protocol and
therefore DOH implementations do not provide stateful ordering therefore DOH implementations do not provide stateful ordering
guarantees between different requests. DOH cannot be used as a guarantees between different requests. DOH cannot be used as a
transport for other protocols that require strict ordering. transport for other protocols that require strict ordering.
If a DNS API server responds to a DNS API client with a DNS message
that has the TC (truncation) bit set in the header, that indicates
that the DNS API server was not able to retrieve a full answer for
the query and is providing the best answer it could get. This
protocol does not require that a DNS API server that cannot get an
untruncated answer send back such an answer; it can instead send back
an HTTP error to indicate that it cannot give a useful answer.
This protocol does not define any use for the "original_transport"
optional parameter of the application/dns-udpwireformat media type.
10. Acknowledgments 10. Acknowledgments
Joe Hildebrand contributed lots of material for a different iteration This work required a high level of cooperation between experts in
of this document. Helpful early comments were given by Ben Schwartz different technologies. Thank you Ray Bellis, Stephane Bortzmeyer,
and Mark Nottingham. Manu Bretelle, Tony Finch, Daniel Kahn Gilmor, Olafur Guomundsson,
Wes Hardaker, Rory Hewitt, Joe Hildebrand, David Lawrence, Eliot
Lear, John Mattson, Alex Mayrhofer, Mark Nottingham, Jim Reid, Adam
Roach, Ben Schwartz, Davey Song, Daniel Stenberg, Andrew Sullivan,
Martin Thomson, and Sam Weiler.
11. References 11. References
11.1. Normative References 11.1. Normative References
[RFC1035] Mockapetris, P., "Domain names - implementation and [RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
November 1987, <https://www.rfc-editor.org/info/rfc1035>. November 1987, <https://www.rfc-editor.org/info/rfc1035>.
[RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS
NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998,
<https://www.rfc-editor.org/info/rfc2308>.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006,
<https://www.rfc-editor.org/info/rfc4648>. <https://www.rfc-editor.org/info/rfc4648>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008, DOI 10.17487/RFC5246, August 2008,
<https://www.rfc-editor.org/info/rfc5246>. <https://www.rfc-editor.org/info/rfc5246>.
[RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., [RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M.,
Galperin, S., and C. Adams, "X.509 Internet Public Key and D. Orchard, "URI Template", RFC 6570,
Infrastructure Online Certificate Status Protocol - OCSP", DOI 10.17487/RFC6570, March 2012,
RFC 6960, DOI 10.17487/RFC6960, June 2013, <https://www.rfc-editor.org/info/rfc6570>.
<https://www.rfc-editor.org/info/rfc6960>.
[RFC6961] Pettersen, Y., "The Transport Layer Security (TLS)
Multiple Certificate Status Request Extension", RFC 6961,
DOI 10.17487/RFC6961, June 2013,
<https://www.rfc-editor.org/info/rfc6961>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing", Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014, RFC 7230, DOI 10.17487/RFC7230, June 2014,
<https://www.rfc-editor.org/info/rfc7230>. <https://www.rfc-editor.org/info/rfc7230>.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Semantics and Content", RFC 7231, Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
DOI 10.17487/RFC7231, June 2014, DOI 10.17487/RFC7231, June 2014,
<https://www.rfc-editor.org/info/rfc7231>. <https://www.rfc-editor.org/info/rfc7231>.
skipping to change at page 15, line 18 skipping to change at page 15, line 38
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
11.2. Informative References 11.2. Informative References
[CORS] "Cross-Origin Resource Sharing", n.d., [CORS] "Cross-Origin Resource Sharing", n.d.,
<https://fetch.spec.whatwg.org/#http-cors-protocol>. <https://fetch.spec.whatwg.org/#http-cors-protocol>.
[QUERYPARAMETER]
"application/x-www-form-urlencoded Parsing", n.d.,
<https://url.spec.whatwg.org/#application/
x-www-form-urlencoded>.
[RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997,
<https://www.rfc-editor.org/info/rfc2181>. <https://www.rfc-editor.org/info/rfc2181>.
[RFC5280] 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", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<https://www.rfc-editor.org/info/rfc5280>.
[RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale
Content", RFC 5861, DOI 10.17487/RFC5861, May 2010, Content", RFC 5861, DOI 10.17487/RFC5861, May 2010,
<https://www.rfc-editor.org/info/rfc5861>. <https://www.rfc-editor.org/info/rfc5861>.
[RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS)
Extensions: Extension Definitions", RFC 6066,
DOI 10.17487/RFC6066, January 2011,
<https://www.rfc-editor.org/info/rfc6066>.
[RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van
Beijnum, "DNS64: DNS Extensions for Network Address Beijnum, "DNS64: DNS Extensions for Network Address
Translation from IPv6 Clients to IPv4 Servers", RFC 6147, Translation from IPv6 Clients to IPv4 Servers", RFC 6147,
DOI 10.17487/RFC6147, April 2011, DOI 10.17487/RFC6147, April 2011,
<https://www.rfc-editor.org/info/rfc6147>. <https://www.rfc-editor.org/info/rfc6147>.
[RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms
for DNS (EDNS(0))", STD 75, RFC 6891, for DNS (EDNS(0))", STD 75, RFC 6891,
DOI 10.17487/RFC6891, April 2013, DOI 10.17487/RFC6891, April 2013,
<https://www.rfc-editor.org/info/rfc6891>. <https://www.rfc-editor.org/info/rfc6891>.
[RFC6950] Peterson, J., Kolkman, O., Tschofenig, H., and B. Aboba, [RFC6950] Peterson, J., Kolkman, O., Tschofenig, H., and B. Aboba,
"Architectural Considerations on Application Features in "Architectural Considerations on Application Features in
the DNS", RFC 6950, DOI 10.17487/RFC6950, October 2013, the DNS", RFC 6950, DOI 10.17487/RFC6950, October 2013,
<https://www.rfc-editor.org/info/rfc6950>. <https://www.rfc-editor.org/info/rfc6950>.
[RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A.,
Galperin, S., and C. Adams, "X.509 Internet Public Key
Infrastructure Online Certificate Status Protocol - OCSP",
RFC 6960, DOI 10.17487/RFC6960, June 2013,
<https://www.rfc-editor.org/info/rfc6960>.
[RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS
Terminology", RFC 7719, DOI 10.17487/RFC7719, December Terminology", RFC 7719, DOI 10.17487/RFC7719, December
2015, <https://www.rfc-editor.org/info/rfc7719>. 2015, <https://www.rfc-editor.org/info/rfc7719>.
[RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D.,
and P. Hoffman, "Specification for DNS over Transport and P. Hoffman, "Specification for DNS over Transport
Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May
2016, <https://www.rfc-editor.org/info/rfc7858>. 2016, <https://www.rfc-editor.org/info/rfc7858>.
11.3. URIs 11.3. URIs
skipping to change at page 16, line 42 skipping to change at page 17, line 25
Authors' Addresses Authors' Addresses
Paul Hoffman Paul Hoffman
ICANN ICANN
Email: paul.hoffman@icann.org Email: paul.hoffman@icann.org
Patrick McManus Patrick McManus
Mozilla Mozilla
Email: pmcmanus@mozilla.com Email: mcmanus@ducksong.com
 End of changes. 44 change blocks. 
113 lines changed or deleted 146 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/