idnits 2.17.1 draft-ietf-dnsop-svcb-httpssvc-00.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 : ---------------------------------------------------------------------------- ** There are 4 instances of too long lines in the document, the longest one being 3 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 30, 2019) is 1639 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-18) exists of draft-ietf-tls-esni-04 == Outdated reference: A later version (-34) exists of draft-ietf-quic-http-20 ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 8499 (ref. 'DNSTerm') (Obsoleted by RFC 9499) -- Obsolete informational reference (is this intentional?): RFC 7230 (ref. 'HTTP') (Obsoleted by RFC 9110, RFC 9112) == Outdated reference: A later version (-04) exists of draft-ietf-dnsop-aname-03 Summary: 3 errors (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DNSOP Working Group B. Schwartz 3 Internet-Draft Google 4 Intended status: Standards Track M. Bishop 5 Expires: May 2, 2020 E. Nygren 6 Akamai Technologies 7 October 30, 2019 9 Service binding and parameter specification via the DNS (DNS SVCB and 10 HTTPSSVC) 11 draft-ietf-dnsop-svcb-httpssvc-00 13 Abstract 15 This document specifies the "SVCB" and "HTTPSSVC" DNS resource record 16 types to facilitate the lookup of information needed to make 17 connections for origin resources, such as for HTTPS URLs. SVCB 18 records allow an origin to be served from multiple network locations, 19 each with associated parameters (such as transport protocol 20 configuration and keying material for encrypting TLS SNI). They also 21 enable aliasing of apex domains, which is not possible with CNAME. 22 The HTTPSSVC DNS RR is a variation of SVCB for HTTPS and HTTP 23 origins. By providing more information to the client before it 24 attempts to establish a connection, these records offer potential 25 benefits to both performance and privacy. 27 TO BE REMOVED: This proposal is inspired by and based on recent DNS 28 usage proposals such as ALTSVC, ANAME, and ESNIKEYS (as well as long 29 standing desires to have SRV or a functional equivalent implemented 30 for HTTP). These proposals each provide an important function but 31 are potentially incompatible with each other, such as when an origin 32 is load-balanced across multiple hosting providers (multi-CDN). 33 Furthermore, these each add potential cases for adding additional 34 record lookups in-addition to AAAA/A lookups. This design attempts 35 to provide a unified framework that encompasses the key functionality 36 of these proposals, as well as providing some extensibility for 37 addressing similar future challenges. 39 TO BE REMOVED: The specific name for this RR type is an open topic 40 for discussion. "SVCB" and "HTTPSSVC" are meant as placeholders as 41 they are easy to replace. Other names might include "B", "SRV2", 42 "SVCHTTPS", "HTTPS", and "ALTSVC". 44 Status of This Memo 46 This Internet-Draft is submitted in full conformance with the 47 provisions of BCP 78 and BCP 79. 49 Internet-Drafts are working documents of the Internet Engineering 50 Task Force (IETF). Note that other groups may also distribute 51 working documents as Internet-Drafts. The list of current Internet- 52 Drafts is at https://datatracker.ietf.org/drafts/current/. 54 Internet-Drafts are draft documents valid for a maximum of six months 55 and may be updated, replaced, or obsoleted by other documents at any 56 time. It is inappropriate to use Internet-Drafts as reference 57 material or to cite them other than as "work in progress." 59 This Internet-Draft will expire on May 2, 2020. 61 Copyright Notice 63 Copyright (c) 2019 IETF Trust and the persons identified as the 64 document authors. All rights reserved. 66 This document is subject to BCP 78 and the IETF Trust's Legal 67 Provisions Relating to IETF Documents 68 (https://trustee.ietf.org/license-info) in effect on the date of 69 publication of this document. Please review these documents 70 carefully, as they describe your rights and restrictions with respect 71 to this document. Code Components extracted from this document must 72 include Simplified BSD License text as described in Section 4.e of 73 the Trust Legal Provisions and are provided without warranty as 74 described in the Simplified BSD License. 76 Table of Contents 78 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 79 1.1. Introductory Example . . . . . . . . . . . . . . . . . . 5 80 1.2. Goals of the SVCB RR . . . . . . . . . . . . . . . . . . 6 81 1.3. Overview of the SVCB RR . . . . . . . . . . . . . . . . . 7 82 1.4. Parameter for ESNI . . . . . . . . . . . . . . . . . . . 8 83 1.5. Terminology . . . . . . . . . . . . . . . . . . . . . . . 8 84 2. The SVCB record type . . . . . . . . . . . . . . . . . . . . 8 85 2.1. Parameter specification via ServiceFieldValue . . . . . . 9 86 2.1.1. Presentation format . . . . . . . . . . . . . . . . . 9 87 2.2. SVCB RDATA Wire Format . . . . . . . . . . . . . . . . . 10 88 2.3. SVCB owner names . . . . . . . . . . . . . . . . . . . . 11 89 2.4. SvcRecordType . . . . . . . . . . . . . . . . . . . . . . 11 90 2.5. SVCB records: AliasForm . . . . . . . . . . . . . . . . . 11 91 2.6. SVCB records: ServiceForm . . . . . . . . . . . . . . . . 12 92 2.6.1. Special handling of "." for SvcDomainName in 93 ServiceForm . . . . . . . . . . . . . . . . . . . . . 13 94 2.6.2. SvcFieldPriority . . . . . . . . . . . . . . . . . . 13 95 3. Client behavior . . . . . . . . . . . . . . . . . . . . . . . 13 96 3.1. Clients using a Proxy . . . . . . . . . . . . . . . . . . 14 98 4. DNS Server Behavior . . . . . . . . . . . . . . . . . . . . . 15 99 5. Performance optimizations . . . . . . . . . . . . . . . . . . 15 100 5.1. Optimistic pre-connection and connection reuse . . . . . 15 101 5.2. Preferring usable records . . . . . . . . . . . . . . . . 16 102 5.3. Structuring zones for performance . . . . . . . . . . . . 16 103 6. Initial SvcParamKeys . . . . . . . . . . . . . . . . . . . . 16 104 6.1. "alpn" . . . . . . . . . . . . . . . . . . . . . . . . . 17 105 6.2. "port" . . . . . . . . . . . . . . . . . . . . . . . . . 17 106 6.3. "esnikeys" . . . . . . . . . . . . . . . . . . . . . . . 17 107 6.4. "ipv4hint" and "ipv6hint" . . . . . . . . . . . . . . . . 17 108 7. Using SVCB with HTTPS and HTTP . . . . . . . . . . . . . . . 18 109 7.1. Owner names for HTTPSSVC records . . . . . . . . . . . . 19 110 7.2. Mapping between ServiceForm and Alt-Svc . . . . . . . . . 19 111 7.3. Differences from Alt-Svc as transmitted over HTTP . . . . 21 112 7.3.1. Max Age and Persist . . . . . . . . . . . . . . . . . 21 113 7.4. Multiple records and preference ordering . . . . . . . . 21 114 7.4.1. Constructing Alt-Svc equivalent headers . . . . . . . 21 115 7.5. Granularity and lifetime control . . . . . . . . . . . . 22 116 7.6. HTTP Strict Transport Security . . . . . . . . . . . . . 22 117 7.7. Cache interaction . . . . . . . . . . . . . . . . . . . . 23 118 8. Extensions to enhance privacy . . . . . . . . . . . . . . . . 23 119 8.1. Alt-Svc and SVCB/HTTPSSVC parameter for ESNI keys . . . . 23 120 8.1.1. Handling a mixture of alternatives not supporting 121 esnikeys . . . . . . . . . . . . . . . . . . . . . . 23 122 9. Interaction with other standards . . . . . . . . . . . . . . 24 123 10. Security Considerations . . . . . . . . . . . . . . . . . . . 24 124 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 125 11.1. New registry for Service Parameters . . . . . . . . . . 25 126 11.1.1. Procedure . . . . . . . . . . . . . . . . . . . . . 25 127 11.1.2. Initial contents . . . . . . . . . . . . . . . . . . 25 128 11.2. Registry updates . . . . . . . . . . . . . . . . . . . . 26 129 12. Acknowledgments and Related Proposals . . . . . . . . . . . . 27 130 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 131 13.1. Normative References . . . . . . . . . . . . . . . . . . 27 132 13.2. Informative References . . . . . . . . . . . . . . . . . 30 133 Appendix A. Additional examples . . . . . . . . . . . . . . . . 31 134 A.1. Equivalence to Alt-Svc records . . . . . . . . . . . . . 31 135 Appendix B. Comparison with alternatives . . . . . . . . . . . . 31 136 B.1. Differences from the SRV RR type . . . . . . . . . . . . 31 137 B.2. Differences from the proposed HTTP record . . . . . . . . 32 138 B.3. Differences from the proposed ANAME record . . . . . . . 32 139 B.4. Differences from the proposed ESNI record . . . . . . . . 32 140 B.5. SNI Alt-Svc parameter . . . . . . . . . . . . . . . . . . 33 141 Appendix C. Design Considerations and Open Issues . . . . . . . 33 142 C.1. Record Name . . . . . . . . . . . . . . . . . . . . . . . 33 143 C.2. Generality . . . . . . . . . . . . . . . . . . . . . . . 33 144 C.3. Wire Format . . . . . . . . . . . . . . . . . . . . . . . 33 145 C.4. Where to include Priority . . . . . . . . . . . . . . . . 33 146 C.5. Whether to include Weight . . . . . . . . . . . . . . . . 33 147 Appendix D. Change history . . . . . . . . . . . . . . . . . . . 34 148 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 150 1. Introduction 152 The SVCB and HTTPSSVC RRs provide clients with complete instructions 153 for access to an origin. This information enables improved 154 performance and privacy by avoiding transient connections to a sub- 155 optimal default server, negotiating a preferred protocol, and 156 providing relevant public keys. 158 For example, when clients need to make a connection to fetch 159 resources associated with an HTTPS URI, they currently resolve only A 160 and/or AAAA records for the origin hostname. This is adequate for 161 services that use basic HTTPS (fixed port, no QUIC, no [ESNI]). 162 Going beyond basic HTTPS confers privacy, performance, and 163 operational advantages, but it requires the client to learn 164 additional information, and it is highly desirable to minimize the 165 number of round-trip and lookups required to learn this additional 166 information. 168 The SVCB and HTTPSSVC RRs also help when the operator of an origin 169 wishes to delegate operational control to one or more other domains, 170 e.g. delegating the origin resource "https://example.com" to a 171 service operator endpoint at "svc.example.net". While this case can 172 sometimes be handled by a CNAME, that does not cover all use-cases. 173 CNAME is also inadequate when the service operator needs to provide a 174 bound collection of consistent configuration parameters through the 175 DNS (such as network location, protocol, and keying information). 177 This document first describes the SVCB RR as a general-purpose 178 resource record that can be applied directly and efficiently to a 179 wide range of services. As HTTPS is a primary use-case and has 180 special requirements, the HTTPSSVC RR is also defined within this 181 document as a special case of SVCB. Services wishing to avoid the 182 need for an [Attrleaf] label with SVCB may follow the pattern of 183 HTTPSSVC and assign their own SVCB-compatible RR types. 185 All behaviors described as applying to the SVCB RR also apply to the 186 HTTPSSVC RR unless explicitly stated otherwise. Section 7 describes 187 additional behaviors specific to the HTTPSSVC record. Apart from 188 Section 7 and introductory examples, much of this document refers 189 only to the SVCB RR, but those references should be taken to apply to 190 SVCB, HTTPSSVC, and any future SVCB-compatible RR types. 192 The SVCB RR has two forms: 1) the "Alias Form" simply delegates 193 operational control for a resource; 2) the "Service Form" binds 194 together configuration information for a service endpoint. The 195 Service Form provides additional key=value parameters within each 196 RDATA set. 198 TO BE REMOVED: If we use this for providing configuration for DNS 199 authorities, it is likely we'd specify a distinct "NS2" RR type that 200 is an instantiation of SVCB for authoritative nameserver delegation 201 and parameter specification, similar to HTTPSSVC. 203 TO BE REMOVED: Another open question is whether SVCB records should 204 be self-descriptive and include the service name (eg, "https") in the 205 RDATA section to avoid ambiguity. Perhaps this could be included as 206 a svc="baz" parameter for protocols that are not the default for the 207 RR type? Current inclination is to not do so. 209 1.1. Introductory Example 211 As an introductory example for an HTTPS origin resource, a set of 212 example HTTPSSVC and associated A+AAAA records might be: 214 www.example.com. 7200 IN CNAME svc.example.net. 215 ; AliasForm 216 example.com. 7200 IN HTTPSSVC 0 svc.example.net. 217 ; ServiceForm 218 svc.example.net. 7200 IN HTTPSSVC 2 svc3.example.net. ( alpn=h3 219 port=8003 esnikeys="..." ) 220 svc.example.net. 7200 IN HTTPSSVC 3 svc2.example.net. ( alpn=h2 221 port=8002 esnikeys="..." ) 222 svc2.example.net. 300 IN A 192.0.2.2 223 svc2.example.net. 300 IN AAAA 2001:db8::2 224 svc3.example.net. 300 IN A 192.0.2.3 225 svc3.example.net. 300 IN AAAA 2001:db8::3 226 ; Compatibility records for non-HTTPSSVC-aware clients 227 example.com. 300 IN A 192.0.2.1 228 example.com. 300 IN AAAA 2001:db8::1 229 svc.example.net. 300 IN A 192.0.2.1 230 svc.example.net. 300 IN AAAA 2001:db8::1 232 In the preceding example, both of the "example.com" and 233 "www.example.com" origin names are aliased to use alternative service 234 endpoints offered as "svc.example.net" (with "www.example.com" 235 continuing to use a CNAME alias). HTTP/2 is available on a cluster 236 of machines located at svc2.example.net with TCP port 8002 and HTTP/3 237 is available on a cluster of machines located at svc3.example.net 238 with UDP port 8003. The client can use the specified ESNI keys to 239 encrypt the SNI values of "example.com" and "www.example.com" in the 240 handshake with these alternative service endpoints. When connecting, 241 clients will continue to treat the authoritative origins as 242 "https://example.com" and "https://www.example.com", respectively. 244 For services other than HTTPS (as well as for HTTPS origins with non- 245 default ports), the SVCB RR and an [Attrleaf] label will be used. 246 For example, to reach an example resource of 247 "baz://api.example.com:8765", the following Alias Form SVCB record 248 would be used to delegate to "svc4-baz.example.net." which in-turn 249 could return AAAA/A records and/or SVCB records in ServiceForm. 251 _8765._baz.api.example.com. 7200 IN SVCB 0 svc4-baz.example.net. 253 1.2. Goals of the SVCB RR 255 The goal of the SVCB RR is to allow clients to resolve a single 256 additional DNS RR in a way that: 258 o Provides service endpoints authoritative for the service, along 259 with parameters associated with each of these endpoints. 261 o Does not assume that all alternative service endpoints have the 262 same parameters or capabilities, or are even operated by the same 263 entity. This is important as DNS does not provide any way to tie 264 together multiple RRs for the same name. For example, if 265 www.example.com is a CNAME alias that switches between one of 266 three CDNs or hosting environments, successive queries for that 267 name may return records that correspond to different environments. 269 o Enables CNAME-like functionality at a zone apex (such as 270 "example.com") for participating protocols, and generally enables 271 delegation of operational authority for an origin within the DNS 272 to an alternate name. 274 Additional goals specific to HTTPSSVC and the HTTPS use-case include: 276 o Connect directly to [HTTP3] (QUIC transport) alternative service 277 endpoints 279 o Obtain the [ESNI] keys associated with an alternative service 280 endpoint 282 o Support non-default TCP and UDP ports 284 o Address a set of long-standing issues due to HTTP(S) clients not 285 implementing support for SRV records, as well as due to a 286 limitation that a DNS name can not have both CNAME and NS RRs (as 287 is the case for zone apex names) 289 o Provide an HSTS-like indication signaling for the duration of the 290 DNS RR TTL that the HTTPS scheme should be used instead of HTTP 291 (see Section 7.6). 293 1.3. Overview of the SVCB RR 295 This subsection briefly describes the SVCB RR in a non-normative 296 manner. (As mentioned above, this all applies equally to the 297 HTTPSSVC RR which shares the same encoding, format, and high-level 298 semantics.) 300 The SVCB RR has two forms: AliasForm and ServiceForm. SVCB RR 301 entries with two non-empty fields are in AliasForm. When more fields 302 are present, this indicates that the SVCB RR is in ServiceForm. The 303 fields are: 305 1. SvcFieldPriority: The priority of this record (relative to 306 others, with lower values preferred). Applicable for the 307 ServiceForm, and otherwise has value "0". (Described in 308 Section 7.4.) 310 2. SvcDomainName: The domain name of either the alias target (for 311 AliasForm) or the alternative service endpoint (for ServiceForm). 313 3. SvcFieldValue: A list of key=value pairs describing the 314 alternative service endpoint for the domain name specified in 315 SvcDomainName (only for ServiceForm and otherwise empty). 316 Described in Section 2.1. 318 Cooperating DNS recursive resolvers will perform subsequent record 319 resolution (for SVCB, A, and AAAA records) and return them in the 320 Additional Section of the response. Clients must either use 321 responses included in the additional section returned by the 322 recursive resolver or perform necessary SVCB, A, and AAAA record 323 resolutions. DNS authoritative servers may attach in-bailiwick SVCB, 324 A, AAAA, and CNAME records in the Additional Section to responses for 325 an SVCB query. 327 When in the ServiceForm, the SvcFieldValue of the SVCB RR provides an 328 extensible data model for describing network endpoints that are 329 authoritative for the origin, along with parameters associated with 330 each of these endpoints. 332 For the HTTPS use-case with the HTTPSSVC RR, there is also direct 333 mapping from the SvcDomainName and SvcFieldValue into HTTP 334 Alternative Services (Alt-Svc) entries [AltSvc]. Encoding this 335 information here enables many of the benefits of Alt-Svc, without 336 waiting for a full HTTP connection initiation (multiple roundtrips) 337 before learning of the preferred alternative, and without necessarily 338 revealing the user's intended destination to all entities along the 339 network path. 341 1.4. Parameter for ESNI 343 This document also defines a parameter for Encrypted SNI [ESNI] keys, 344 both as a general SVCB parameter and also as a corresponding Alt-Svc 345 parameter. See Section 8.1. 347 1.5. Terminology 349 For consistency with [AltSvc], we adopt the following definitions: 351 o An "origin" is an information source as in [RFC6454]. For 352 services other than HTTPS, the exact definition will need to be 353 provided by the document mapping that service onto the SVCB RR. 355 o The "origin server" is the server that the client would reach when 356 accessing the origin in the absence of the SVCB record or an HTTPS 357 Alt-Svc. 359 o An "alternative service" is a different server that can serve the 360 origin over a specified protocol. 362 For example within HTTPS, the origin consists of a scheme (typically 363 "https"), a host name, and a port (typically "443"). 365 Additional DNS terminology intends to be consistent with [DNSTerm]. 367 SVCB is a contraction of "service binding". HTTPSSVC is a 368 contraction of "HTTPS service". SVCB, HTTPSSVC, and future RR types 369 that share SVCB's format and registry are collectively known as SVCB- 370 compatible RR types. 372 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 373 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 374 "OPTIONAL" in this document are to be interpreted as described in BCP 375 14 [RFC2119] [RFC8174] when, and only when, they appear in all 376 capitals, as shown here. 378 2. The SVCB record type 380 The SVCB DNS resource record (RR) type (RR type ???) is used to 381 locate endpoints that can service an origin. There is special 382 handling for the case of "https" origins. The presentation format of 383 the record is: 385 Name TTL IN SVCB SvcFieldPriority SvcDomainName SvcFieldValue 387 The SVCB record is defined specifically within the Internet ("IN") 388 Class ([RFC1035]). SvcFieldPriority is a number in the range 389 0-65535, SvcDomainName is a domain name, and SvcFieldValue is a set 390 of key=value pairs present for the ServiceForm. The SvcFieldValue is 391 empty for the AliasForm. 393 The algorithm for resolving SVCB records and associated address 394 records is specified in Section 3. 396 2.1. Parameter specification via ServiceFieldValue 398 In ServiceForm, the SvcFieldValue contains key=value pairs. Keys are 399 IANA-registered SvcParamKeys (Section 11.1) with both a case- 400 insensitive string representation and a numeric representation in the 401 range 0-65535. Registered key names should only contain characters 402 from the ranges "a"-"z", "0"-"9", and "-". In ABNF [RFC5234], 404 ALPHA_LC = %x61-7A ; a-z 405 key = ALPHA_LC / DIGIT / "-" 406 display-key = ALPHA / DIGIT / "-" 408 Values are in a format specific to the SvcParamKey. Their definition 409 should specify both their presentation format and wire encoding 410 (e.g., domain names, binary data, or numeric values). 412 The SVCB format preserves the order of values and can encode multiple 413 values for the same parameter. However, clients MUST consider only 414 the first appearance of a parameter unless its specification 415 explicitly allows multiple values. 417 2.1.1. Presentation format 419 The presentation format for SvcFieldValue is a whitespace-separated 420 list of the key=value pairs. Each pair is presented in the following 421 form: 423 ; basic-visible is VCHAR minus DQUOTE, ";", and "\" 424 basic-visible = %x21 / %x23-3A / %x3C-5B / %x5D-7E 425 escaped-char = "\" (VCHAR / WSP) 426 contiguous = *(basic-visible / escaped-char) 427 quoted-string = DQUOTE *(contiguous / WSP) DQUOTE 428 value = quoted-string / contiguous 429 pair = display-key "=" value 430 The value format is intended to match the definition of in [RFC1035] Section 5.1. (Unlike , the 432 length of a value is not limited to 255 characters.) 434 Unrecognized keys are represented in presentation format as 435 "keyNNNNN" where NNNNN is the numeric value of the key type without 436 leading zeros. In presentation format, values of unrecognized keys 437 should be represented in wire format, using decimal escape codes 438 (e.g. \255) when necessary. 440 2.2. SVCB RDATA Wire Format 442 The RDATA for the SVCB RR consists of: 444 o a 2 octet field for SvcFieldPriority as an integer in network byte 445 order. For AliasForm, SvcFieldPriority MUST be 0. 447 o the uncompressed SvcDomainName, represented as a sequence of 448 length-prefixed labels as in Section 3.1 of [RFC1035]. 450 o the SvcFieldValue byte string, consuming the remainder of the 451 record (so smaller than 65535 octets and constrained by the RDATA 452 and DNS message sizes). 454 AliasForm is defined by SvcFieldValue being empty. 456 When SvcFieldValue is non-empty (ServiceForm), it contains a list of 457 SvcParamKey=SvcParamValue pairs with length-prefixes for the 458 SvcParamValues, each of which contains: 460 o a 2 octet field containing the SvcParamKey as an integer in 461 network byte order. 463 o a 2 octet field containing the length of the SvcParamValue as an 464 integer between 0 and 65535 in network byte order (but constrained 465 by the RDATA and DNS message sizes). 467 o an octet string of the length defined by the previous field. 469 If the parser reaches the end of the RDATA while parsing a 470 SvcFieldValue, the RR is invalid and MUST be discarded. 472 TODO: decide if we want special handling for any SvcParamKey ranges? 473 For example: range for greasing; experimental range; range-of- 474 mandatory-to-use-the-RR vs range of ignore-just-param-if-unknown. 476 2.3. SVCB owner names 478 When querying the SVCB RR, an origin is typically translated into a 479 QNAME by prefixing the port and scheme with "_", then concatenating 480 them with the host name, resulting in a domain name like 481 "_8004._examplescheme.api.example.com.". 483 Protocol mappings for SVCB MAY remove the port or replace it with 484 other protocol-specific information, but MUST retain the scheme in 485 the QNAME. RR types other than SVCB can define additional behavior 486 for translating origins to QNAMEs. See Section 7.1 for the HTTPSSVC 487 behavior. 489 When a prior CNAME or SVCB record has aliased to an SVCB record, each 490 RR shall be returned under its own owner name. 492 Note that none of these forms alter the origin or authority for 493 validation purposes. For example, clients MUST continue to validate 494 TLS certificate hostnames based on the origin host. 496 As an example: 498 _8443._foo.api.example.com. 7200 IN SVCB 0 svc4.example.net. 499 svc4.example.net. 7200 IN SVCB 3 ( svc4.example.net. alpn="bar" 500 port="8004" esnikeys="..." ) 502 would indicate that "foo://api.example.com:8443" is aliased to use 503 ALPN protocol "bar" service endpoints offered at "svc4.example.net" 504 on port 8004. 506 2.4. SvcRecordType 508 The SvcRecordType is implicit based on the presence of SvcFieldValue, 509 and defines the form of the SVCB RR. When SvcFieldValue is empty, 510 the SVCB SvcRecordType is defined to be in AliasForm. Otherwise, the 511 SVCB SvcRecordType is defined to be in ServiceForm. 513 Within an SVCB RRSet, all RRs should have the same SvcRecordType. If 514 an RRSet contains a record in AliasForm, the client MUST ignore any 515 records in the set with ServiceForm. 517 2.5. SVCB records: AliasForm 519 When SvcRecordType is AliasForm, the SVCB record is to be treated 520 similar to a CNAME alias pointing to SvcDomainName. SVCB RRSets 521 SHOULD only have a single resource record in this form. If multiple 522 are present, clients or recursive resolvers SHOULD pick one at 523 random. 525 The AliasForm's primary purpose is to allow aliasing at the zone 526 apex, where CNAME is not allowed. For example, if an operator of 527 https://example.com wanted to point HTTPS requests to a service 528 operating at svc.example.net, they would publish a record such as: 530 example.com. 3600 IN SVCB 0 svc.example.net. 532 The SvcDomainName MUST point to a domain name that contains another 533 SVCB record, address (AAAA and/or A) records, or both address records 534 and a ServiceForm SVCB record. 536 Note that the SVCB record's owner name MAY be the canonical name of a 537 CNAME record, and the SvcDomainName MAY be the owner of a CNAME 538 record. Clients and recursive resolvers MUST follow CNAMEs as 539 normal. 541 Due to the risk of loops, clients and recursive resolvers MUST 542 implement loop detection. Chains of consecutive SVCB and CNAME 543 records SHOULD be limited to (8?) prior to reaching terminal address 544 records. 546 As legacy clients will not know to use this record, service operators 547 will likely need to retain fallback AAAA and A records alongside this 548 SVCB record, although in a common case the target of the SVCB record 549 might offer better performance, and therefore would be preferable for 550 clients implementing this specification to use. 552 Note that SVCB AliasForm RRs do not alias to RR types other than 553 address records (AAAA and A), CNAMEs, and ServiceForm SVCB records. 554 For example, an AliasForm SVCB record does not alias to an HTTPSSVC 555 record, nor vice-versa. 557 2.6. SVCB records: ServiceForm 559 When SvcRecordType is the ServiceForm, the combination of 560 SvcDomainName and SvcFieldValue parameters within each resource 561 record associates an alternative service location with its connection 562 parameters. 564 Section 7.2 defines a direct mapping between Alt-Svc ([AltSvc]) 565 values and the SVCB ServiceForm. Protocols using SVCB may use this 566 Alt-Svc mapping or specify their own semantics. Unless specified 567 otherwise by the protocol mapping, clients MUST ignore SvcFieldValue 568 parameters that they do not recognize. 570 2.6.1. Special handling of "." for SvcDomainName in ServiceForm 572 For ServiceForm SVCB RRs, if SvcDomainName has the value ".", then 573 the owner name of this record MUST be used as the effective 574 SvcDomainName. (The SvcDomainName of an SVCB RR in AliasForm MUST 575 NOT have this value.) 577 For example, in the following example "svc2.example.net" is the 578 effective SvcDomainName: 580 www.example.com. 7200 IN HTTPSSVC svc.example.net. 581 svc.example.net. 7200 IN CNAME svc2.example.net. 582 svc2.example.net. 7200 IN HTTPSSVC 0 . ( alpn=h2 583 port=8002 esnikeys="..." ) 584 svc2.example.net. 300 IN A 192.0.2.2 585 svc2.example.net. 300 IN AAAA 2001:db8::2 587 2.6.2. SvcFieldPriority 589 As RRs within an RRSet are explicitly unordered collections, the 590 SvcFieldPriority value serves to indicate priority. SVCB RRs with a 591 smaller SvcFieldPriority value SHOULD be given preference over RRs 592 with a larger SvcFieldPriority value. 594 When receiving an RRSet containing multiple SVCB records with the 595 same SvcFieldPriority value, clients SHOULD apply a random shuffle 596 within a priority level to the records before using them, to ensure 597 uniform load-balancing. 599 3. Client behavior 601 An SVCB-aware client resolves an origin HOST by attempting to 602 determine the preferred SvcFieldValue and IP addresses for its 603 service, using the following procedure: 605 1. Issue parallel AAAA/A and SVCB queries for the name HOST. The 606 answers for these may or may not include CNAME pointers before 607 reaching one or more of these records. 609 2. If an SVCB record of AliasForm SvcRecordType is returned for 610 HOST, clients MUST loop back to step 1 replacing HOST with 611 SvcDomainName, subject to loop detection heuristics. 613 3. If one or more SVCB records of ServiceForm SvcRecordType are 614 returned for HOST, clients should select the highest-priority 615 option with acceptable parameters, and resolve AAAA and/or A 616 records for its SvcDomainName if they are not already available. 617 These are the preferred SvcFieldValue and IP addresses. If the 618 connection fails, the client MAY try to connect using values from 619 a lower-priority record. If none of the options succeed, the 620 client SHOULD connect to the origin server directly. 622 4. If an SVCB record for HOST does not exist, the received AAAA and/ 623 or A records are the preferred IP addresses and there is no 624 SvcFieldValue. 626 This procedure does not rely on any recursive or authoritative server 627 to comply with this specification or have any awareness of SVCB. 629 When selecting between AAAA and A records to use, clients may use an 630 approach such as [HappyEyeballsV2]. 632 Some important optimizations are discussed in Section 5 to avoid 633 additional latency in comparison to ordinary AAAA/A lookups. 635 3.1. Clients using a Proxy 637 Clients using a domain-oriented transport proxy like HTTP CONNECT 638 ([RFC7231] Section 4.3.6) or SOCKS5 ([RFC1928]) SHOULD disable SVCB 639 support if performing SVCB queries would violate the client's privacy 640 intent. 642 If the client can safely perform SVCB queries (e.g. via the proxy or 643 an affiliated resolver), the client SHOULD follow the standard SVCB 644 resolution process, selecting the highest priority option that is 645 compatible with the client and the proxy. The client SHOULD provide 646 the final SvcDomainName and port (if present) to the proxy as the 647 destination host and port. 649 Providing the proxy with the final SvcDomainName has several 650 benefits: 652 o It allows the client to use the SvcFieldValue, if present, which 653 is only usable with a specific SvcDomainName. The SvcFieldValue 654 may include information that enhances performance (e.g. alpn) and 655 privacy (e.g. esnikeys). 657 o It allows the origin to delegate the apex domain. 659 o It allows the proxy to select between IPv4 and IPv6 addresses for 660 the server according to its configuration, and receive addresses 661 based on its network geolocation. 663 4. DNS Server Behavior 665 When replying to an SVCB query, authoritative DNS servers SHOULD 666 return A, AAAA, and SVCB records (as well as any relevant CNAME 667 records) in the Additional Section for any in-bailiwick 668 SvcDomainNames. 670 Recursive resolvers that are aware of SVCB SHOULD ensure that the 671 client can execute the procedure in Section 3 without issuing a 672 second round of queries, by following this procedure while 673 constructing a response to a stub resolver for an SVCB record query: 675 1. When processing an SVCB response from an authoritative server, 676 add it to the Additional section (unless it is the Answer). 678 2. Inspect whether each record is in AliasForm or ServiceForm. If 679 at least one record is in AliasForm, ignore all other SVCB 680 records in the RRSet. 682 3. If the record is in AliasForm, resolve A, AAAA, and SVCB records 683 for the SvcDomainName. If the SVCB record does not exist, add 684 the A and AAAA records to the Additional section. Otherwise, go 685 to step 1, subject to loop detection heuristics. 687 4. If the records are in ServiceForm, resolve A and AAAA records for 688 each SvcDomainName (or for the owner name if the SvcDomainName is 689 "."), and include all the results in the Additional section. 691 All DNS servers SHOULD treat the SvcParam portion of the SVCB RR as 692 opaque and SHOULD NOT try to alter their behavior based on its 693 contents. 695 5. Performance optimizations 697 For optimal performance (i.e. minimum connection setup time), clients 698 SHOULD issue address (AAAA and/or A) and SVCB queries simultaneously, 699 and SHOULD implement a client-side DNS cache. Responses in the 700 Additional section of an SVCB response SHOULD be placed in cache 701 before performing any followup queries. With these optimizations in 702 place, and conforming DNS servers, using SVCB does not add network 703 latency to connection setup. 705 5.1. Optimistic pre-connection and connection reuse 707 If an address response arrives before the corresponding SVCB 708 response, the client MAY initiate a connection as if the SVCB query 709 returned NODATA, but MUST NOT transmit any information that could be 710 altered by the SVCB response until it arrives. For example, a TLS 711 ClientHello can be altered by the "esnikeys" value of an SVCB 712 response (Section 6.3). Clients implementing this optimization 713 SHOULD wait for 50 milliseconds before starting optimistic pre- 714 connection, as per the guidance in [HappyEyeballsV2]. 716 An SVCB record is consistent with a connection if the client would 717 attempt an equivalent connection when making use of that record. If 718 an SVCB record is consistent with an active or in-progress connection 719 C, the client MAY prefer that record and use C as its connection. 720 For example, suppose the client receives this SVCB RRSet for a 721 protocol that uses TLS over TCP: 723 _1234._bar.example.com. 300 IN SVCB 1 svc1.example.net ( esnikeys="111..." 724 ipv6hint=2001:db8::1 port=1234 ... ) 725 SVCB 2 svc2.example.net ( esnikeys="222..." 726 ipv6hint=2001:db8::2 port=1234 ... ) 728 If the client has an in-progress TCP connection to 729 "[2001:db8::2]:1234", it MAY proceed with TLS on that connection 730 using "esnikeys="222..."", even though the other record in the RRSet 731 has higher priority. 733 If none of the SVCB records are consistent with any active or in- 734 progress connection, clients must proceed as described in Step 3 of 735 the procedure in Section 3. 737 5.2. Preferring usable records 739 A nonconforming recursive resolver might not return all the 740 information required to use all the records in an SVCB response. If 741 some of the SVCB records in the response can be used without 742 requiring additional DNS queries, the client MAY prefer those 743 records, regardless of their priorities. 745 5.3. Structuring zones for performance 747 To avoid a delay for clients using a nonconforming recursive 748 resolver, domain owners SHOULD use a single SVCB record whose 749 SvcDomainName is in the origin hostname's CNAME chain if possible. 750 This will ensure that the required address records are already 751 present in the client's DNS cache as part of the responses to the 752 address queries that were issued in parallel. 754 6. Initial SvcParamKeys 756 A few initial SvcParamKeys are defined here. These keys are useful 757 for HTTPS, and most are applicable to other protocols as well. 759 6.1. "alpn" 761 The "alpn" SvcParamKey defines the Application Layer Protocol (ALPN, 762 as defined in {{!RFC7301}) supported by a TLS-based alternative 763 service. Its value SHOULD be an entry in the IANA registry "TLS 764 Application-Layer Protocol Negotiation (ALPN) Protocol IDs". 766 The presentation format and wire format of SvcParamValue is its 767 registered "Identification Sequence". 769 Clients MUST ignore SVCB RRs where the "alpn" SvcParamValue is 770 unknown or unsupported. 772 6.2. "port" 774 The "port" SvcParamKey defines the TCP or UDP port that should be 775 used to contact this alternative service. 777 The presentation format of the SvcParamValue is a numeric value 778 between 0 and 65535 inclusive. The wire format of the SvcParamValue 779 is the corresponding 2 octet numeric value in network byte order. 781 6.3. "esnikeys" 783 The SvcParamKey for ESNI is "esnikeys". Its value is defined in 784 Section 8.1. It is applicable to most TLS-based protocols. 786 When publishing a record containing an "esnikeys" parameter, the 787 publisher MUST ensure that all IP addresses of SvcDomainName 788 correspond to servers that have access to the corresponding private 789 key or are authoritative for the fallback domain. (See [ESNI] for 790 more details about the fallback domain.) This yields an anonymity 791 set of cardinality equal to the number of ESNI-enabled server domains 792 supported by a given client-facing server. Thus, even with SNI 793 encryption, an attacker who can enumerate the set of ESNI-enabled 794 domains supported by a client-facing server can guess the correct SNI 795 with probability at least 1/K, where K is the size of this ESNI- 796 enabled server anonymity set. This probability may be increased via 797 traffic analysis or other mechanisms. 799 6.4. "ipv4hint" and "ipv6hint" 801 The "ipv4hint" and "ipv6hint" keys represent IP address hints for the 802 service. If A and AAAA records for SvcDomainName are locally 803 available, the client SHOULD ignore these hints. Otherwise, clients 804 SHOULD perform A and/or AAAA queries for SvcDomainName as in 805 Section 3, and clients SHOULD use the IP address in those responses 806 for future connections. Clients MAY opt to terminate any connections 807 using the addresses in hints and instead switch to the addresses in 808 response to the SvcDomainName. Failure to use A and/or AAAA response 809 addresses may negatively impact load balancing or other geo-aware 810 features and thereby degrade client performance. 812 The wire format for each parameter is a sequence of IP addresses in 813 network byte order. Like an A or AAAA RRSet, the list of addresses 814 represents an unordered collection, and clients SHOULD pick addresses 815 to use in a random order. 817 These parameters MAY be repeated multiple times within a record. 818 When receiving such a record, clients SHOULD combine the sets of 819 addresses. 821 When selecting between IPv4 and IPv6 addresses to use, clients may 822 use an approach such as [HappyEyeballsV2]. When only "ipv4hint" 823 parameters are present, IPv6-only clients may synthesize IPv6 824 addresses as specified in [RFC7050] or ignore the "ipv4hint" key and 825 wait for AAAA resolution (Section 3). Recursive resolvers MUST NOT 826 perform DNS64 ([RFC6147]) on parameters within an SVCB record. For 827 best performance, server operators SHOULD include "ipv6hint" 828 parameters whenever they publish "ipv4hint" parameters. 830 The presentation format for each parameter is a comma-separated list 831 of IP addresses in standard textual format [RFC5952]. 833 These parameters are intended to minimize additional connection 834 latency when a recursive resolver is not compliant with the 835 requirements in Section 4, and SHOULD NOT be included if most clients 836 are using compliant recursive resolvers. 838 7. Using SVCB with HTTPS and HTTP 840 Use of any protocol with SVCB requires a protocol-specific mapping 841 specification. This section specifies the mapping for HTTPS and 842 HTTP. 844 To enable special handling for the HTTPS and HTTP use-cases, the 845 HTTPSSVC RR type is defined as an SVCB-compatible RR type, specific 846 to the https and http schemes. This handling includes a mapping from 847 HTTPSSVC records directly into Alt-Svc entries. Clients MUST NOT 848 perform SVCB queries or accept SVCB responses for https or http 849 schemes. 851 The HTTPSSVC wire format and presentation format are identical to 852 SVCB, and both share the SvcParamKey registry. SVCB semantics apply 853 equally to HTTPSSVC unless specified otherwise. 855 The presence of an HTTPSSVC record for an HTTP or HTTPS service also 856 provides an indication that all resources are available over HTTPS, 857 as discussed in Section 7.6. This allows HTTPSSVC RRs to apply to 858 pre-existing HTTP scheme URLs, while ensuring that the client uses a 859 secure and authenticated HTTPS connection. 861 The HTTPSSVC RR extends the concept introduced in the HTTP 862 Alternative Services proposed standard [AltSvc]. Alt-Svc defines: 864 o an extensible data model for describing alternative network 865 endpoints that are authoritative for an origin 867 o the "Alt-Svc Field Value", a text format for representing this 868 information 870 o standards for sending information in this format from a server to 871 a client over HTTP/1.1 and HTTP/2. 873 Each ServiceForm HTTPSSVC RR provides a set of information that can 874 be mapped into an Alt-Svc Field Value. A client receiving this 875 information during DNS resolution can skip the initial connection and 876 proceed directly to an alternative service. 878 7.1. Owner names for HTTPSSVC records 880 The HTTPSSVC RR extends the behavior for determining a QNAME 881 specified above in Section 2.3. In particular, if the scheme is 882 "https" with port 443, or the scheme is "http" and the port is 80, 883 then the client's original QNAME is equal to the origin host name. 885 For origins other than https with port 443 and http with port 80, the 886 port and scheme continue to be prefixed to the hostname as described 887 in Section 2.3. Following of HTTPSSVC AliasForm and CNAME aliases is 888 also unchanged from SVCB. 890 Note that none of these forms alter the HTTPS origin or authority. 891 For example, clients MUST continue to validate TLS certificate 892 hostnames based on the origin host. 894 7.2. Mapping between ServiceForm and Alt-Svc 896 To construct an Alt-Svc Field Value (as defined in Section 4 of 897 [AltSvc]) from an HTTPSSVC record: 899 o The SvcDomainName is mapped into the uri-host portion of alt- 900 authority with the trailing "." removed. (If SvcDomainName is 901 ".", the special handling described in Section 2.6.1 MUST be 902 applied first.) 904 o The SvcParamValue of the "port" service parameter, or 443 if no 905 such parameter is present, is written to the port portion of the 906 alt-authority. 908 o The SvcParamValue of the "alpn" service parameter is mapped to the 909 protocol-id. This MUST follow the normalization and encoding 910 requirements for protocol-id specified in [AltSvc] Section 3. 911 This parameter is MANDATORY. 913 o The DNS TTL is mapped to the "ma" (max age) Alt-Svc parameter. 915 o For SVCB parameters with defined mappings to HTTPS Alt-Svc, each 916 should be included as an Alt-Svc parameter, typically as the 917 SvcParamKey name "=" a defined encoding of the SvcParamValue. 919 Converting an Alt-Svc Field Value into an HTTPSSVC record follows the 920 reverse of this procedure. 922 Conversion from HTTPSSVC to Alt-Svc Field Value SHOULD ignore any 923 unrecognized SvcParamKeys, and conversion from Alt-Svc Field Value to 924 HTTPSSVC SHOULD ignore any Alt-Svc parameters that do not have a 925 corresponding SvcParamKey. 927 For example, if the operator of https://www.example.com intends to 928 include an HTTP response header like 930 Alt-Svc: h3="svc.example.net:8003"; ma=3600; foo=123, \ 931 h2="svc.example.net:8002"; ma=3600; foo=123 933 they could also publish an HTTPSSVC DNS RRSet like 935 www.example.com. 3600 IN HTTPSSVC 2 svc.example.net. ( 936 alpn=h3 port=8003 foo=123 ) 937 HTTPSSVC 3 svc.example.net. ( 938 alpn=h2 port=8002 foo=123 ) 940 Where "foo" is a hypothetical future HTTPSSVC and Alt-Svc parameter. 942 This data type can also be represented as an Unknown RR as described 943 in [RFC3597]: 945 www.example.com. 3600 IN TYPE??? \\# TBD:WRITEME 947 On connections to an HTTPSSVC alternative service, clients SHOULD 948 include the same Alt-Used header that they would include if the 949 corresponding Alt-Svc Field Value were received over HTTPS. 951 7.3. Differences from Alt-Svc as transmitted over HTTP 953 Publishing an alternative services form HTTPSSVC record in DNS is 954 intended to be equivalent to transmitting the corresponding Alt-Svc 955 value over HTTPS, and receiving an HTTPSSVC record is intended to be 956 equivalent to receiving this field value over HTTPS. However, there 957 are some small differences in the intended client and server 958 behavior. 960 7.3.1. Max Age and Persist 962 There is no SvcParamKey corresponding to the Alt-Svc "ma" (max age) 963 parameter. Instead, server operators SHOULD encode the expiration 964 time in the DNS TTL, and MUST NOT set a TTL longer than the intended 965 "max age". 967 For security reasons, there is no SvcParamKey corresponding to the 968 Alt-Svc "persist" parameter. 970 7.4. Multiple records and preference ordering 972 Server operators MAY publish multiple ServiceForm HTTPSSVC records as 973 an RRSet. When converting a collection of alt-values into an 974 HTTPSSVC RRSet, the server operator MUST set the overall TTL to a 975 value no larger than the minimum of the "max age" values (following 976 Section 5.2 of [RFC2181]). 978 Each RR corresponds to exactly one alt-value, as described in 979 Section 3 of [AltSvc]. 981 As discussed in Section 2.6.2, HTTPSSVC RRs with a smaller 982 SvcFieldPriority value SHOULD be sorted ahead of and given preference 983 over RRs with a larger SvcFieldPriority value. 985 Clients SHOULD prefer Alt-values received via HTTPS over any Alt- 986 value received via DNS. 988 7.4.1. Constructing Alt-Svc equivalent headers 990 1. The RRs SHOULD be ordered by increasing SvcFieldPriority, with 991 shuffling for equal SvcFieldPriority values. Clients MAY choose 992 to further prioritize alt-values where address records are 993 immediately available for the alt-value's SvcDomainName. 995 2. The client SHOULD concatenate the thus-transformed-and-ordered 996 SvcFieldValues in the RRSet, separated by commas. (This is 997 semantically equivalent to receiving multiple Alt-Svc HTTP 998 response headers, according to Section 3.2.2 of [HTTP]). 1000 7.5. Granularity and lifetime control 1002 Sending Alt-Svc over HTTP allows the server to tailor the Alt-Svc 1003 Field Value specifically to the client. When using an HTTPSSVC DNS 1004 record, groups of clients will necessarily receive the same Alt-Svc 1005 Field Value. Therefore, this standard is not suitable for uses that 1006 require single-client granularity in Alt-Svc. 1008 Some DNS caching systems incorrectly extend the lifetime of DNS 1009 records beyond the stated TTL. Server operators MUST NOT rely on 1010 HTTPSSVC records expiring on time, and MAY shorten the TTL to 1011 compensate. 1013 7.6. HTTP Strict Transport Security 1015 By publishing an HTTPSSVC record, the server operator indicates that 1016 all useful HTTP resources on that origin are reachable over HTTPS, 1017 similar to HTTP Strict Transport Security [HSTS]. When an HTTPSSVC 1018 record is present for an origin, all "http" scheme requests for that 1019 origin SHOULD logically be redirected to "https". 1021 Prior to making an "http" scheme request, the client SHOULD perform a 1022 lookup to determine if an HTTPSSVC record is available for that 1023 origin. To do so, the client SHOULD construct a corresponding 1024 "https" URL as follows: 1026 1. Replace the "http" scheme with "https". 1028 2. If the "http" URL explicitly specifies port 80, specify port 443. 1030 3. Do not alter any other aspect of the URL. 1032 This construction is equivalent to Section 8.3 of [HSTS], point 5. 1034 If an HTTPSSVC record is present for this "https" URL, the client 1035 should treat this as the equivalent of receiving an HTTP "307 1036 Temporary Redirect" redirect to the "https" URL. Because HTTPSSVC is 1037 received over an often insecure channel (DNS), clients MUST NOT place 1038 any more trust in this signal than if they had received a 307 1039 redirect over cleartext HTTP. 1041 If the HTTPSSVC query results in a SERVFAIL error, and the connection 1042 between the client and the recursive resolver is cryptographically 1043 protected (e.g. using TLS [RFC7858] or HTTPS [RFC8484]), the client 1044 SHOULD abandon the connection attempt and display an error message. 1045 A SERVFAIL error can occur if the domain is DNSSEC-signed, the 1046 recursive resolver is DNSSEC-validating, and an active attacker 1047 between the recursive resolver and the authoritative DNS server is 1048 attempting to prevent the upgrade to HTTPS. 1050 Similarly, if the client enforces DNSSEC validation on A/AAAA 1051 responses, it SHOULD abandon the connection attempt if the HTTPSSVC 1052 response fails to validate. 1054 7.7. Cache interaction 1056 If the client has an Alt-Svc cache, and a usable Alt-Svc value is 1057 present in that cache, then the client SHOULD NOT issue an HTTPSSVC 1058 DNS query. Instead, the client SHOULD proceed with alternative 1059 service connection as usual. 1061 If the client has a cached Alt-Svc entry that is expiring, the client 1062 MAY perform an HTTPSSVC query to refresh the entry. 1064 8. Extensions to enhance privacy 1066 8.1. Alt-Svc and SVCB/HTTPSSVC parameter for ESNI keys 1068 Both SVCB/HTTPSSVC and Alt-Svc "esnikeys" parameters are defined for 1069 specifying ESNI keys corresponding to an alternative service. The 1070 value of the parameter is an ESNIKeys structure [ESNI] or the empty 1071 string. ESNI-aware clients SHOULD prefer alt-values and SVCB/ 1072 HTTPSSVC RRs with non-empty esnikeys. 1074 Both the SVCB SvcParamValue presentation format as well as the Alt- 1075 Svc parameter value is the ESNIKeys structure [ESNI] encoded in 1076 [base64] or the empty string. The SVCB SvcParamValue wire format is 1077 the octet string containing the binary ESNIKeys structure. 1079 This parameter MAY also be sent in Alt-Svc HTTP response headers and 1080 HTTP/2 ALTSVC frames. This parameter MUST NOT appear more than once 1081 in a single alt-value. 1083 8.1.1. Handling a mixture of alternatives not supporting esnikeys 1085 The Alt-Svc specification states that "the client MAY fall back to 1086 using the origin" in case of connection failure (Section 2.4 of 1087 [AltSvc]). This behavior is not suitable for ESNI, because fallback 1088 would negate the privacy benefits of ESNI. 1090 Accordingly, any connection attempt that uses ESNI MUST fall back 1091 only to another alt-value that also has the esnikeys parameter. If 1092 the parameter's value is the empty string, the client SHOULD connect 1093 as it would in the absence of any ESNIKeys information. 1095 For example, suppose a server operator has two alternatives. 1096 Alternative A is reliably accessible but does not support ESNI. 1097 Alternative B supports ESNI but is not reliably accessible. The 1098 server operator could include a full esnikeys value in Alternative B, 1099 and mark Alternative A with esnikeys="" to indicate that fallback 1100 from B to A is allowed. 1102 Other clients and services implementing SVCB or HTTPSSVC with 1103 esnikeys are encouraged to take a similar approach. 1105 9. Interaction with other standards 1107 This standard is intended to reduce connection latency and improve 1108 user privacy. Server operators implementing this standard SHOULD 1109 also implement TLS 1.3 [RFC8446] and OCSP Stapling [RFC6066], both of 1110 which confer substantial performance and privacy benefits when used 1111 in combination with SVCB records. 1113 To realize the greatest privacy benefits, this proposal is intended 1114 for use over a privacy-preserving DNS transport (like DNS over TLS 1115 [RFC7858] or DNS over HTTPS [RFC8484]). However, performance 1116 improvements, and some modest privacy improvements, are possible 1117 without the use of those standards. 1119 Any specification for use of SVCB with a protocol MUST have an entry 1120 for its scheme under the SVCB RR type in the IANA DNS Underscore 1121 Global Scoped Entry Registry [Attrleaf]. The scheme SHOULD have an 1122 entry in the IANA URI Schemes Registry [RFC7595]. The scheme SHOULD 1123 have a defined specification for use with SVCB, unless it already has 1124 a specification for use with Alt-Svc. 1126 10. Security Considerations 1128 SVCB/HTTPSSVC RRs and Alt-Svc Field Values are intended for 1129 distribution over untrusted channels, and clients are REQUIRED to 1130 verify that the alternative service is authoritative for the origin 1131 (Section 2.1 of [AltSvc]). Therefore, DNSSEC signing and validation 1132 are OPTIONAL for publishing and using SVCB and HTTPSSVC records. 1134 Clients MUST ensure that their DNS cache is partitioned for each 1135 local network, or flushed on network changes, to prevent a local 1136 adversary in one network from implanting a forged DNS record that 1137 allows them to track users or hinder their connections after they 1138 leave that network. 1140 11. IANA Considerations 1142 11.1. New registry for Service Parameters 1144 The "Service Binding (SVCB) Parameter Registry" defines the name 1145 space for parameters, including string representations and numeric 1146 SvcParamKey values. This registry is shared with other SVCB- 1147 compatible RR types, such as HTTPSSVC. 1149 ACTION: create and include a reference to this registry. 1151 11.1.1. Procedure 1153 A registration MUST include the following fields: 1155 o Name: Service parameter key name 1157 o SvcParamKey: Service parameter key numeric identifier (range 1158 0-65535) 1160 o Meaning: a short description 1162 o Pointer to specification text 1164 Values to be added to this name space require Expert Review (see 1165 [RFC5226], Section 4.1). Apart from the initial contents, the name 1166 MUST NOT start with "key". 1168 11.1.2. Initial contents 1170 The "Service Binding (SVCB) Parameter Registry" shall initially be 1171 populated with the registrations below: 1173 +-------------+----------+--------------------------+---------------+ 1174 | SvcParamKey | NAME | Meaning | Reference | 1175 +-------------+----------+--------------------------+---------------+ 1176 | 0 | key0 | Reserved | (This | 1177 | | | | document) | 1178 | | | | | 1179 | 1 | alpn | ALPN for alternative | (This | 1180 | | | service | document) | 1181 | | | | | 1182 | 2 | port | Port for alternative | (This | 1183 | | | service | document) | 1184 | | | | | 1185 | 3 | esnikeys | ESNI keys literal | (This | 1186 | | | | document) | 1187 | | | | | 1188 | 4 | ipv4hint | IPv4 address hints | (This | 1189 | | | | document) | 1190 | | | | | 1191 | 5 | key5 | Reserved | (This | 1192 | | | | document) | 1193 | | | | | 1194 | 6 | ipv6hint | IPv6 address hints | (This | 1195 | | | | document) | 1196 | | | | | 1197 | 65280-65534 | keyNNNNN | Private Use | (This | 1198 | | | | document) | 1199 | | | | | 1200 | 65535 | key65535 | Reserved | (This | 1201 | | | | document) | 1202 +-------------+----------+--------------------------+---------------+ 1204 TODO: do we also want to reserve a range for greasing? 1206 11.2. Registry updates 1208 Per [RFC6895], please add the following entry to the data type range 1209 of the Resource Record (RR) TYPEs registry: 1211 +----------+----------------------------------------+---------------+ 1212 | TYPE | Meaning | Reference | 1213 +----------+----------------------------------------+---------------+ 1214 | SVCB | Service Location and Parameter Binding | (This | 1215 | | | document) | 1216 | | | | 1217 | HTTPSSVC | HTTPS Service Location and Parameter | (This | 1218 | | Binding | document) | 1219 +----------+----------------------------------------+---------------+ 1220 Per [Attrleaf], please add the following entries to the DNS 1221 Underscore Global Scoped Entry Registry: 1223 +----------+------------+-------------------+-----------------+ 1224 | RR TYPE | _NODE NAME | Meaning | Reference | 1225 +----------+------------+-------------------+-----------------+ 1226 | HTTPSSVC | _https | Alt-Svc for HTTPS | (This document) | 1227 | | | | | 1228 | HTTPSSVC | _http | Alt-Svc for HTTPS | (This document) | 1229 +----------+------------+-------------------+-----------------+ 1231 Per [AltSvc], please add the following entry to the HTTP Alt-Svc 1232 Parameter Registry: 1234 +-------------------+--------------------+-----------------+ 1235 | Alt-Svc Parameter | Meaning | Reference | 1236 +-------------------+--------------------+-----------------+ 1237 | esnikeys | Encrypted SNI keys | (This document) | 1238 +-------------------+--------------------+-----------------+ 1240 12. Acknowledgments and Related Proposals 1242 There have been a wide range of proposed solutions over the years to 1243 the "CNAME at the Zone Apex" challenge proposed. These include 1244 [I-D.draft-bellis-dnsop-http-record-00], 1245 [I-D.draft-ietf-dnsop-aname-03], and others. 1247 Thank you to Ian Swett, Ralf Weber, Jon Reed, Martin Thompson, Lucas 1248 Pardue, Ilari Liusvaara, Tim Wicinski, Tommy Pauly, Chris Wood, and 1249 others for their feedback and suggestions on this draft. 1251 13. References 1253 13.1. Normative References 1255 [AltSvc] Nottingham, M., McManus, P., and J. Reschke, "HTTP 1256 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 1257 April 2016, . 1259 [AltSvcSNI] 1260 Bishop, M., "The "SNI" Alt-Svc Parameter", draft-bishop- 1261 httpbis-sni-altsvc-02 (work in progress), May 2018. 1263 [Attrleaf] 1264 Crocker, D., "DNS Scoped Data Through "Underscore" Naming 1265 of Attribute Leaves", draft-ietf-dnsop-attrleaf-16 (work 1266 in progress), November 2018. 1268 [base64] Josefsson, S., "The Base16, Base32, and Base64 Data 1269 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 1270 . 1272 [ESNI] Rescorla, E., Oku, K., Sullivan, N., and C. Wood, 1273 "Encrypted Server Name Indication for TLS 1.3", draft- 1274 ietf-tls-esni-04 (work in progress), July 2019. 1276 [HappyEyeballsV2] 1277 Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: 1278 Better Connectivity Using Concurrency", RFC 8305, 1279 DOI 10.17487/RFC8305, December 2017, 1280 . 1282 [HSTS] Hodges, J., Jackson, C., and A. Barth, "HTTP Strict 1283 Transport Security (HSTS)", RFC 6797, 1284 DOI 10.17487/RFC6797, November 2012, 1285 . 1287 [HTTP3] Bishop, M., "Hypertext Transfer Protocol Version 3 1288 (HTTP/3)", draft-ietf-quic-http-20 (work in progress), 1289 April 2019. 1291 [RFC1035] Mockapetris, P., "Domain names - implementation and 1292 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1293 November 1987, . 1295 [RFC1928] Leech, M., Ganis, M., Lee, Y., Kuris, R., Koblas, D., and 1296 L. Jones, "SOCKS Protocol Version 5", RFC 1928, 1297 DOI 10.17487/RFC1928, March 1996, 1298 . 1300 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1301 Requirement Levels", BCP 14, RFC 2119, 1302 DOI 10.17487/RFC2119, March 1997, 1303 . 1305 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 1306 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, 1307 . 1309 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record 1310 (RR) Types", RFC 3597, DOI 10.17487/RFC3597, September 1311 2003, . 1313 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1314 IANA Considerations Section in RFCs", RFC 5226, 1315 DOI 10.17487/RFC5226, May 2008, 1316 . 1318 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1319 Specifications: ABNF", STD 68, RFC 5234, 1320 DOI 10.17487/RFC5234, January 2008, 1321 . 1323 [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 1324 Address Text Representation", RFC 5952, 1325 DOI 10.17487/RFC5952, August 2010, 1326 . 1328 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 1329 Extensions: Extension Definitions", RFC 6066, 1330 DOI 10.17487/RFC6066, January 2011, 1331 . 1333 [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van 1334 Beijnum, "DNS64: DNS Extensions for Network Address 1335 Translation from IPv6 Clients to IPv4 Servers", RFC 6147, 1336 DOI 10.17487/RFC6147, April 2011, 1337 . 1339 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 1340 DOI 10.17487/RFC6454, December 2011, 1341 . 1343 [RFC7050] Savolainen, T., Korhonen, J., and D. Wing, "Discovery of 1344 the IPv6 Prefix Used for IPv6 Address Synthesis", 1345 RFC 7050, DOI 10.17487/RFC7050, November 2013, 1346 . 1348 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1349 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 1350 DOI 10.17487/RFC7231, June 2014, 1351 . 1353 [RFC7595] Thaler, D., Ed., Hansen, T., and T. Hardie, "Guidelines 1354 and Registration Procedures for URI Schemes", BCP 35, 1355 RFC 7595, DOI 10.17487/RFC7595, June 2015, 1356 . 1358 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1359 and P. Hoffman, "Specification for DNS over Transport 1360 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1361 2016, . 1363 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1364 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1365 May 2017, . 1367 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1368 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1369 . 1371 [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 1372 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 1373 . 1375 13.2. Informative References 1377 [DNSTerm] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1378 Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, 1379 January 2019, . 1381 [HTTP] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1382 Protocol (HTTP/1.1): Message Syntax and Routing", 1383 RFC 7230, DOI 10.17487/RFC7230, June 2014, 1384 . 1386 [I-D.draft-bellis-dnsop-http-record-00] 1387 Bellis, R., "A DNS Resource Record for HTTP", draft- 1388 bellis-dnsop-http-record-00 (work in progress), November 1389 2018. 1391 [I-D.draft-ietf-dnsop-aname-03] 1392 Finch, T., Hunt, E., Dijk, P., Eden, A., and W. Mekking, 1393 "Address-specific DNS aliases (ANAME)", draft-ietf-dnsop- 1394 aname-03 (work in progress), April 2019. 1396 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 1397 specifying the location of services (DNS SRV)", RFC 2782, 1398 DOI 10.17487/RFC2782, February 2000, 1399 . 1401 [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA 1402 Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, 1403 April 2013, . 1405 Appendix A. Additional examples 1407 A.1. Equivalence to Alt-Svc records 1409 The following: 1411 www.example.com. 7200 IN CNAME svc.example.net. 1412 example.com. 7200 IN HTTPSSVC 0 svc.example.net. 1413 svc.example.net. 7200 IN HTTPSSVC 2 svc3.example.net. ( 1414 alpn=h3 port=8003 esnikeys="ABC..." ) 1415 svc.example.net. 7200 IN HTTPSSVC 3 . alpn=h2 port=8002 esnikeys="123..." 1417 is equivalent to the Alt-Svc record: 1419 Alt-Svc: h3="svc3.example.net:8003"; esnikeys="ABC..."; ma=7200, \ 1420 h2="svc.example.net:8002"; esnikeys="123..."; ma=7200 1422 for the origins of both "https://www.example.com" and 1423 "https://example.com". 1425 Appendix B. Comparison with alternatives 1427 The SVCB and HTTPSSVC record types closely resemble, and are inspired 1428 by, some existing record types and proposals. A complaint with all 1429 of the alternatives is that web clients have seemed unenthusiastic 1430 about implementing them. The hope here is that by providing an 1431 extensible solution that solves multiple problems we will overcome 1432 the inertia and have a path to achieve client implementation. 1434 B.1. Differences from the SRV RR type 1436 An SRV record [RFC2782] can perform a similar function to the SVCB 1437 record, informing a client to look in a different location for a 1438 service. However, there are several differences: 1440 o SRV records are typically mandatory, whereas clients will always 1441 continue to function correctly without making use of Alt-Svc or 1442 SVCB. 1444 o SRV records cannot instruct the client to switch or upgrade 1445 protocols, whereas Alt-Svc can signal such an upgrade (e.g. to 1446 HTTP/2). 1448 o SRV records are not extensible, whereas SVCB and HTTPSSVC can be 1449 extended with new parameters. 1451 o Using SRV records would not allow an HTTPS client to skip 1452 processing of the Alt-Svc information in a subsequent connection, 1453 so it does not confer a performance advantage. 1455 B.2. Differences from the proposed HTTP record 1457 Unlike [I-D.draft-bellis-dnsop-http-record-00], this approach is 1458 extensible to cover Alt-Svc and ESNIKeys use-cases. Like that 1459 proposal, this addresses the zone apex CNAME challenge. 1461 Like that proposal it remains necessary to continue to include 1462 address records at the zone apex for legacy clients. 1464 B.3. Differences from the proposed ANAME record 1466 Unlike [I-D.draft-ietf-dnsop-aname-03], this approach is extensible 1467 to cover Alt-Svc and ESNIKeys use-cases. This approach also does not 1468 require any changes or special handling on either authoritative or 1469 master servers, beyond optionally returning in-bailiwick additional 1470 records. 1472 Like that proposal, this addresses the zone apex CNAME challenge for 1473 clients that implement this. 1475 However with this SVCB proposal it remains necessary to continue to 1476 include address records at the zone apex for legacy clients. If 1477 deployment of this standard is successful, the number of legacy 1478 clients will fall over time. As the number of legacy clients 1479 declines, the operational effort required to serve these users 1480 without the benefit of SVCB indirection should fall. Server 1481 operators can easily observe how much traffic reaches this legacy 1482 endpoint, and may remove the apex's address records if the observed 1483 legacy traffic has fallen to negligible levels. 1485 B.4. Differences from the proposed ESNI record 1487 Unlike [ESNI], this approach is extensible and covers the Alt-Svc 1488 case as well as addresses the zone apex CNAME challenge. 1490 By using the Alt-Svc model we also provide a way to solve the ESNI 1491 multi-CDN challenges in a general case. 1493 Unlike ESNI, SVCB allows specifying different ESNI configurations for 1494 different protocols and ports, rather than applying a single 1495 configuration to all ports on a domain. 1497 B.5. SNI Alt-Svc parameter 1499 Defining an Alt-Svc sni= parameter (such as from [AltSvcSNI]) would 1500 have provided some benefits to clients and servers not implementing 1501 ESNI, such as for specifying that "_wildcard.example.com" could be 1502 sent as an SNI value rather than the full name. There is nothing 1503 precluding SVCB from being used with an sni= parameter if one were to 1504 be defined, but it is not included here to reduce scope, complexity, 1505 and additional potential security and tracking risks. 1507 Appendix C. Design Considerations and Open Issues 1509 This draft is intended to be a work-in-progress for discussion. Many 1510 details are expected to change with subsequent refinement. Some 1511 known issues or topics for discussion are listed below. 1513 C.1. Record Name 1515 Naming is hard. "SVCB" and "HTTPSSVC" are proposed as placeholders 1516 that are easy to search for and replace when a final name is chosen. 1517 Other names for this record might include B, ALTSVC, HTTPS, HTTPSSRV, 1518 HTTPSSVC, SVCHTTPS, or something else. 1520 C.2. Generality 1522 The SVCB record was designed as a generalization of HTTPSSVC, based 1523 on feedback requesting a solution that applied to protocols pther 1524 than HTTP. Past efforts to over-generalize have not met with broad 1525 success, but we hope that HTTPSSVC and SVCB have struck an acceptable 1526 balance between generality and focus. 1528 C.3. Wire Format 1530 Advice from experts in DNS wire format best practices would be 1531 greatly appreciated to refine the proposed details, overall. 1533 C.4. Where to include Priority 1535 The SvcFieldPriority could alternately be included as a pri= Alt-Svc 1536 attribute. It wouldn't be applicable for Alt-Svc returned via HTTP, 1537 but it is also not necessarily needed by DNS servers. It is also not 1538 used for AliasForm RRs. 1540 C.5. Whether to include Weight 1542 Some other similar mechanisms such as SRV have a weight in-addition 1543 to priority. That is excluded here for simplicity. It could always 1544 be added as an optional SVCB parameter. 1546 Appendix D. Change history 1548 o draft-ietf-dnsop-svcb-httpssvc-00 1550 * Document an optimization for optimistic pre-connection. (Chris 1551 Wood) 1553 * Relax IP hint handling requirements. (Eric Rescorla) 1555 o draft-nygren-dnsop-svcb-httpssvc-00 1557 * Generalize to an SVCB record, with special-case handling for 1558 Alt-Svc and HTTPS separated out to dedicated sections. 1560 * Split out a separate HTTPSSVC record for the HTTPS use-case. 1562 * Remove the explicit SvcRecordType=0/1 and instead make the 1563 AliasForm vs ServiceForm be implicit. This was based on 1564 feedback recommending against subtyping RR type. 1566 * Remove one optimization. 1568 o draft-nygren-httpbis-httpssvc-03 1570 * Change redirect type for HSTS-style behavior from 302 to 307 to 1571 reduce ambiguities. 1573 o draft-nygren-httpbis-httpssvc-02 1575 * Remove the redundant length fields from the wire format. 1577 * Define a SvcDomainName of "." for SvcRecordType=1 as being the 1578 HTTPSSVC RRNAME. 1580 * Replace "hq" with "h3". 1582 o draft-nygren-httpbis-httpssvc-01 1584 * Fixes of record name. Replace references to "HTTPSVC" with 1585 "HTTPSSVC". 1587 o draft-nygren-httpbis-httpssvc-00 1589 * Initial version 1591 Authors' Addresses 1593 Ben Schwartz 1594 Google 1596 Email: bemasc@google.com 1598 Mike Bishop 1599 Akamai Technologies 1601 Email: mbishop@evequefou.be 1603 Erik Nygren 1604 Akamai Technologies 1606 Email: erik+ietf@nygren.org