idnits 2.17.1 draft-schinazi-httpbis-doh-preference-hints-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 08, 2020) is 1569 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '1' on line 308 ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7234 (Obsoleted by RFC 9111) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group D. Schinazi 3 Internet-Draft Google LLC 4 Intended status: Experimental N. Sullivan 5 Expires: July 11, 2020 J. Kipp 6 Cloudflare 7 January 08, 2020 9 DoH Preference Hints for HTTP 10 draft-schinazi-httpbis-doh-preference-hints-01 12 Abstract 14 When using a publicly available DNS-over-HTTPS (DoH) server, some 15 clients may suffer poor performance when the authoritative DNS server 16 is located far from the DoH server. For example, a publicly 17 available DoH server provided by a Content Delivery Network (CDN) 18 should be able to resolve names hosted by that CDN with good 19 performance but might take longer to resolve names provided by other 20 CDNs, or might provide suboptimal results if that CDN is using DNS- 21 based load balancing and returns different address records depending 22 or where the DNS query originated from. This document attempts to 23 lessen these issues by allowing the web server to indicate to the 24 client which DoH server can best resolve its addresses. This 25 document defines an HTTP header field that enables web host operators 26 to inform user agents of the preferred DoH servers to use for 27 subsequent DNS lookups for the host's domain. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at https://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on July 11, 2020. 46 Copyright Notice 48 Copyright (c) 2020 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (https://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 64 1.1. Conventions and Definitions . . . . . . . . . . . . . . . 3 65 2. The DoH-Preference Header Field . . . . . . . . . . . . . . . 3 66 2.1. The max-age Directive . . . . . . . . . . . . . . . . . . 4 67 2.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 4 68 3. Server Behavior . . . . . . . . . . . . . . . . . . . . . . . 4 69 3.1. Considerations For Choosing a Preferred DoH Server . . . 4 70 4. Client Behavior . . . . . . . . . . . . . . . . . . . . . . . 5 71 4.1. Fallback . . . . . . . . . . . . . . . . . . . . . . . . 5 72 5. Internationalization Considerations . . . . . . . . . . . . . 5 73 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 74 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 75 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 76 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 77 8.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 7 78 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 7 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 81 1. Introduction 83 When using a publicly available DNS-over-HTTPS (DoH) server, some 84 clients may suffer poor performance when the authoritative DNS server 85 is located far from the DoH server. For example, a publicly 86 available DoH server provided by a Content Delivery Network (CDN) 87 should be able to resolve names hosted by that CDN with good 88 performance but might take longer to resolve names provided by other 89 CDNs, or might provide suboptimal results if that CDN is using DNS- 90 based load balancing and returns different address records depending 91 or where the DNS query originated from. This document attempts to 92 lessen these issues by allowing the web server to indicate to the 93 client which DoH server can best resolve its addresses. This 94 document defines an HTTP header field that enables web host operators 95 to inform user agents of the preferred DoH servers to use for 96 subsequent DNS lookups for the host's domain. 98 When a web server wishes its client to use a specific DoH server to 99 resolve its addresses, it can send the DoH-Preference header to 100 indicate that preference to the user agent. The header is not 101 prescriptive, it only indicates the server's preference to the user. 102 It also only applies to the web server's current hostname. 104 The header defined in this document is not intended to be used as a 105 discovery mechanism for clients learning about the existence of new 106 DoH servers. Instead, it is intended to be used as an optimization 107 technique for clients with support for multiple DoH servers who wish 108 to choose the most performant DNS server for a given query. 110 1.1. Conventions and Definitions 112 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 113 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 114 "OPTIONAL" in this document are to be interpreted as described in BCP 115 14 [RFC2119] [RFC8174] when, and only when, they appear in all 116 capitals, as shown here. 118 This document uses the Augmented BNF defined in [RFC5234] and updated 119 by [RFC7405] along with the "#rule" extension defined in Section 7 of 120 [RFC7230]. The rules below are defined in [RFC5234], [RFC7230], and 121 [RFC7234]: 123 OWS = 124 delta-seconds = 125 quoted-string = 126 token = 128 2. The DoH-Preference Header Field 130 An HTTPS origin can indicate its preference regarding DoH servers to 131 the client by adding an DoH-Preference header field to responses. 133 DoH-Preference = doh-uri *( OWS ";" OWS parameter ) 134 doh-uri = quoted-string 135 parameter = token "=" ( token / quoted-string ) 137 The "doh-uri" component consists of the DoH URI Template as defined 138 in [RFC8484]. 140 Sending multiple DoH-Preference header fields indicates that the 141 server prefers multiple DoH servers. They are sent in decreasing 142 order of preference. 144 2.1. The max-age Directive 146 The REQUIRED "max-age" directive specifies the number of seconds, 147 after the reception of the DoH-Preference header field, during which 148 the user agent caches the server's DoH preferences. 150 The syntax of the max-age directive's REQUIRED value (after quoted- 151 string unescaping, if necessary) is defined as: 153 max-age-value = delta-seconds 155 A max-age value of zero (i.e., "max-age=0") signals the user agent to 156 remove the DoH URI template from its cache. 158 2.2. Examples 160 The header below indicates that the user agent should consider 161 querying DNS results for the web server's hostname using 162 "dnsserver.example.net" for approximately six months. (Lines are 163 folded to fit.) 165 DoH-Preference: "https://dnsserver.example.net/dns-query{?dns}"; 166 max-age=15768000 168 3. Server Behavior 170 Web servers MAY send a DoH-Preference header to indicate to clients 171 that it would prefer they use that DoH server when resolving 172 addresses for the hostname of the web server. Web servers MAY send 173 multiple DoH-Preference headers. Web servers MUST NOT send the DoH- 174 Preference header in HTTP responses conveyed over a non-secure 175 transport. 177 3.1. Considerations For Choosing a Preferred DoH Server 179 The choice of DoH server can affect overall performance and 180 responsiveness as perceived by the client. Some example 181 considerations in choosing a preferred DoH server are: 183 o A DoH host specified as a host name rather than an IP address will 184 require one or more additional DNS resolutions when the cached DNS 185 entries for the resolver or resolvers expire. 187 o Support for extension mechanisms (e.g. EDNS(0)) may be desired. 189 o Clients, particularly mobile device clients, may frequently move 190 between networks that have different network paths to the DoH 191 server. 193 4. Client Behavior 195 If a client chooses to act on received DoH-Preference headers, it 196 SHOULD cache the server's hostname and the corresponding DoH URI 197 template and lifetime. It SHOULD then send subsequent DNS requests 198 for A and AAAA records for that host name to the provided DoH server, 199 until the cache entry expires after the time specified in the "max- 200 age" directive. Any received DoH-Preference header replaces and 201 overrides any and all information received in a previous DoH- 202 Preference header for the same host name and DoH URI template. 204 Clients MAY decide to only respect the DoH-Preference header for a 205 subset of vetted DoH servers. 207 Clients MUST NOT use the contents of the DoH-Preference header to 208 impact how it resolves other domain names. Clients MUST ignore the 209 DoH-Preference header in HTTP responses conveyed over a non-secure 210 transport. 212 If the DoH-Preference URI contains a host expressed as a host name 213 rather than as an IP address and that host name is resolved via DoH, 214 the DoH server might also specify a DoH-Preference header. This 215 means that respecting the DoH server recommendation could result in 216 an excessively long chain of DoH queries or a loop of DoH servers. 217 Clients SHOULD be capable of detecting a loop or an excessively long 218 chain of DoH servers and treat these conditions as a query failure. 220 4.1. Fallback 222 If resolution using the recommended DoH server fails, clients MUST 223 fall back and retry their query using another DNS resolution 224 mechanism. 226 5. Internationalization Considerations 228 An internationalized domain name that appears in the header field 229 MUST be expressed using A-labels; see Section 2.3.2.1 of [RFC5890]. 231 6. Security Considerations 233 The DoH-Preference header allows a web server to impact how a user 234 agent resolves DNS A and AAAA records for its own host name. Since 235 the web server has proven ownership of the domain name via its TLS 236 certificate and the DNS result that led to the initial connection, 237 impacting future DNS resolutions to the same host name has limited 238 security impact. 240 The potential exists for the DoH-Preference header to be used as a 241 form of web tracking. Because a DoH URI is chosen by the server, 242 cached by the client, and then subsequently contacted by the client, 243 a uniquely chosen DoH URI could identify a client even after other 244 client-side state has expired or been removed. Clients SHOULD expire 245 cached DoH URIs when other client state expires unless the URIs refer 246 to vetted DoH servers or match common DoH URI patterns that preclude 247 client-unique URIs. 249 7. IANA Considerations 251 This document, if approved, requests IANA to register the DoH- 252 Preference header in the "Permanent Message Header Field Names" 253 registry maintained at https://www.iana.org/assignments/message- 254 headers/ [1]. 256 +-------------------+----------+----------+------------+ 257 | Header Field Name | Protocol | Status | Reference | 258 +-------------------+----------+----------+------------+ 259 | DoH-Preference | http | standard | Section 2 | 260 +-------------------+----------+----------+------------+ 262 The change controller is: "IETF (iesg@ietf.org) - Internet 263 Engineering Task Force". 265 8. References 267 8.1. Normative References 269 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 270 Requirement Levels", BCP 14, RFC 2119, 271 DOI 10.17487/RFC2119, March 1997, 272 . 274 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 275 Specifications: ABNF", STD 68, RFC 5234, 276 DOI 10.17487/RFC5234, January 2008, 277 . 279 [RFC5890] Klensin, J., "Internationalized Domain Names for 280 Applications (IDNA): Definitions and Document Framework", 281 RFC 5890, DOI 10.17487/RFC5890, August 2010, 282 . 284 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 285 Protocol (HTTP/1.1): Message Syntax and Routing", 286 RFC 7230, DOI 10.17487/RFC7230, June 2014, 287 . 289 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 290 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 291 RFC 7234, DOI 10.17487/RFC7234, June 2014, 292 . 294 [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", 295 RFC 7405, DOI 10.17487/RFC7405, December 2014, 296 . 298 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 299 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 300 May 2017, . 302 [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 303 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 304 . 306 8.2. URIs 308 [1] https://www.iana.org/assignments/message-headers/ 310 Acknowledgments 312 The authors would like to thank many members of the IETF community, 313 as this document is the fruit of many hallway conversations. 315 Authors' Addresses 317 David Schinazi 318 Google LLC 319 1600 Amphitheatre Parkway 320 Mountain View, California 94043 321 United States of America 323 Email: dschinazi.ietf@gmail.com 325 Nick Sullivan 326 Cloudflare 328 Email: nick@cloudflare.com 329 Jesse Kipp 330 Cloudflare 332 Email: jkipp@cloudflare.com