idnits 2.17.1 draft-nygren-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 2 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 (September 22, 2019) is 1678 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: March 25, 2020 E. Nygren 6 Akamai Technologies 7 September 22, 2019 9 Service binding and parameter specification via the DNS (DNS SVCB and 10 HTTPSSVC) 11 draft-nygren-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 March 25, 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 . . . . . . . . . . . . . . . . . . . . 10 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 . . . . . . . . . . . . . . . . . . . . . 12 94 2.6.2. SvcFieldPriority . . . . . . . . . . . . . . . . . . 13 95 3. Client behavior . . . . . . . . . . . . . . . . . . . . . . . 13 96 3.1. Clients using a Proxy . . . . . . . . . . . . . . . . . . 14 98 4. DNS Server Behavior . . . . . . . . . . . . . . . . . . . . . 14 99 5. Performance optimizations . . . . . . . . . . . . . . . . . . 15 100 6. Initial SvcParamKeys . . . . . . . . . . . . . . . . . . . . 15 101 6.1. "alpn" . . . . . . . . . . . . . . . . . . . . . . . . . 16 102 6.2. "port" . . . . . . . . . . . . . . . . . . . . . . . . . 16 103 6.3. "esnikeys" . . . . . . . . . . . . . . . . . . . . . . . 16 104 6.4. "ipv4hint" and "ipv6hint" . . . . . . . . . . . . . . . . 16 105 7. Using SVCB with HTTPS and HTTP . . . . . . . . . . . . . . . 17 106 7.1. Owner names for HTTPSSVC records . . . . . . . . . . . . 18 107 7.2. Mapping between ServiceForm and Alt-Svc . . . . . . . . . 18 108 7.3. Differences from Alt-Svc as transmitted over HTTP . . . . 19 109 7.3.1. Max Age and Persist . . . . . . . . . . . . . . . . . 19 110 7.4. Multiple records and preference ordering . . . . . . . . 20 111 7.4.1. Constructing Alt-Svc equivalent headers . . . . . . . 20 112 7.5. Granularity and lifetime control . . . . . . . . . . . . 20 113 7.6. HTTP Strict Transport Security . . . . . . . . . . . . . 20 114 7.7. Cache interaction . . . . . . . . . . . . . . . . . . . . 21 115 8. Extensions to enhance privacy . . . . . . . . . . . . . . . . 22 116 8.1. Alt-Svc and SVCB/HTTPSSVC parameter for ESNI keys . . . . 22 117 8.1.1. Handling a mixture of alternatives not supporting 118 esnikeys . . . . . . . . . . . . . . . . . . . . . . 22 119 9. Interaction with other standards . . . . . . . . . . . . . . 22 120 10. Security Considerations . . . . . . . . . . . . . . . . . . . 23 121 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 122 11.1. New registry for Service Parameters . . . . . . . . . . 23 123 11.1.1. Procedure . . . . . . . . . . . . . . . . . . . . . 23 124 11.1.2. Initial contents . . . . . . . . . . . . . . . . . . 24 125 11.2. Registry updates . . . . . . . . . . . . . . . . . . . . 25 126 12. Acknowledgments and Related Proposals . . . . . . . . . . . . 25 127 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 128 13.1. Normative References . . . . . . . . . . . . . . . . . . 26 129 13.2. Informative References . . . . . . . . . . . . . . . . . 28 130 Appendix A. Additional examples . . . . . . . . . . . . . . . . 29 131 A.1. Equivalence to Alt-Svc records . . . . . . . . . . . . . 29 132 Appendix B. Comparison with alternatives . . . . . . . . . . . . 29 133 B.1. Differences from the SRV RR type . . . . . . . . . . . . 29 134 B.2. Differences from the proposed HTTP record . . . . . . . . 30 135 B.3. Differences from the proposed ANAME record . . . . . . . 30 136 B.4. Differences from the proposed ESNI record . . . . . . . . 30 137 B.5. SNI Alt-Svc parameter . . . . . . . . . . . . . . . . . . 31 138 Appendix C. Design Considerations and Open Issues . . . . . . . 31 139 C.1. Record Name . . . . . . . . . . . . . . . . . . . . . . . 31 140 C.2. Generality . . . . . . . . . . . . . . . . . . . . . . . 31 141 C.3. Wire Format . . . . . . . . . . . . . . . . . . . . . . . 31 142 C.4. Where to include Priority . . . . . . . . . . . . . . . . 31 143 C.5. Whether to include Weight . . . . . . . . . . . . . . . . 32 144 Appendix D. Change history . . . . . . . . . . . . . . . . . . . 32 145 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 147 1. Introduction 149 The SVCB and HTTPSSVC RRs provide clients with complete instructions 150 for access to an origin. This information enables improved 151 performance and privacy by avoiding transient connections to a sub- 152 optimal default server, negotiating a preferred protocol, and 153 providing relevant public keys. 155 For example, when clients need to make a connection to fetch 156 resources associated with an HTTPS URI, they currently resolve only A 157 and/or AAAA records for the origin hostname. This is adequate for 158 services that use basic HTTPS (fixed port, no QUIC, no [ESNI]). 159 Going beyond basic HTTPS confers privacy, performance, and 160 operational advantages, but it requires the client to learn 161 additional information, and it is highly desirable to minimize the 162 number of round-trip and lookups required to learn this additional 163 information. 165 The SVCB and HTTPSSVC RRs also help when the operator of an origin 166 wishes to delegate operational control to one or more other domains, 167 e.g. delegating the origin resource "https://example.com" to a 168 service operator endpoint at "svc.example.net". While this case can 169 sometimes be handled by a CNAME, that does not cover all use-cases. 170 CNAME is also inadequate when the service operator needs to provide a 171 bound collection of consistent configuration parameters through the 172 DNS (such as network location, protocol, and keying information). 174 This document first describes the SVCB RR as a general-purpose 175 resource record that can be applied directly and efficiently to a 176 wide range of services. As HTTPS is a primary use-case and has 177 special requirements, the HTTPSSVC RR is also defined within this 178 document as a special case of SVCB. Services wishing to avoid the 179 need for an [Attrleaf] label with SVCB may follow the pattern of 180 HTTPSSVC and assign their own SVCB-compatible RR types. 182 All behaviors described as applying to the SVCB RR also apply to the 183 HTTPSSVC RR unless explicitly stated otherwise. Section 7 describes 184 additional behaviors specific to the HTTPSSVC record. Apart from 185 Section 7 and introductory examples, much of this document refers 186 only to the SVCB RR, but those references should be taken to apply to 187 SVCB, HTTPSSVC, and any future SVCB-compatible RR types. 189 The SVCB RR has two forms: 1) the "Alias Form" simply delegates 190 operational control for a resource; 2) the "Service Form" binds 191 together configuration information for a service endpoint. The 192 Service Form provides additional key=value parameters within each 193 RDATA set. 195 TO BE REMOVED: If we use this for providing configuration for DNS 196 authorities, it is likely we'd specify a distinct "NS2" RR type that 197 is an instantiation of SVCB for authoritative nameserver delegation 198 and parameter specification, similar to HTTPSSVC. 200 TO BE REMOVED: Another open question is whether SVCB records should 201 be self-descriptive and include the service name (eg, "https") in the 202 RDATA section to avoid ambiguity. Perhaps this could be included as 203 a svc="baz" parameter for protocols that are not the default for the 204 RR type? Current inclination is to not do so. 206 1.1. Introductory Example 208 As an introductory example for an HTTPS origin resource, a set of 209 example HTTPSSVC and associated A+AAAA records might be: 211 www.example.com. 7200 IN CNAME svc.example.net. 212 ; AliasForm 213 example.com. 7200 IN HTTPSSVC 0 svc.example.net. 214 ; ServiceForm 215 svc.example.net. 7200 IN HTTPSSVC 2 svc3.example.net. ( alpn=h3 216 port=8003 esnikeys="..." ) 217 svc.example.net. 7200 IN HTTPSSVC 3 svc2.example.net. ( alpn=h2 218 port=8002 esnikeys="..." ) 219 svc2.example.net. 300 IN A 192.0.2.2 220 svc2.example.net. 300 IN AAAA 2001:db8::2 221 svc3.example.net. 300 IN A 192.0.2.3 222 svc3.example.net. 300 IN AAAA 2001:db8::3 223 ; Compatibility records for non-HTTPSSVC-aware clients 224 example.com. 300 IN A 192.0.2.1 225 example.com. 300 IN AAAA 2001:db8::1 226 svc.example.net. 300 IN A 192.0.2.1 227 svc.example.net. 300 IN AAAA 2001:db8::1 229 In the preceding example, both of the "example.com" and 230 "www.example.com" origin names are aliased to use alternative service 231 endpoints offered as "svc.example.net" (with "www.example.com" 232 continuing to use a CNAME alias). HTTP/2 is available on a cluster 233 of machines located at svc2.example.net with TCP port 8002 and HTTP/3 234 is available on a cluster of machines located at svc3.example.net 235 with UDP port 8003. The client can use the specified ESNI keys to 236 encrypt the SNI values of "example.com" and "www.example.com" in the 237 handshake with these alternative service endpoints. When connecting, 238 clients will continue to treat the authoritative origins as 239 "https://example.com" and "https://www.example.com", respectively. 241 For services other than HTTPS (as well as for HTTPS origins with non- 242 default ports), the SVCB RR and an [Attrleaf] label will be used. 244 For example, to reach an example resource of 245 "baz://api.example.com:8765", the following Alias Form SVCB record 246 would be used to delegate to "svc4-baz.example.net." which in-turn 247 could return AAAA/A records and/or SVCB records in ServiceForm. 249 _8765._baz.api.example.com. 7200 IN SVCB 0 svc4-baz.example.net. 251 1.2. Goals of the SVCB RR 253 The goal of the SVCB RR is to allow clients to resolve a single 254 additional DNS RR in a way that: 256 o Provides service endpoints authoritative for the service, along 257 with parameters associated with each of these endpoints. 259 o Does not assume that all alternative service endpoints have the 260 same parameters or capabilities, or are even operated by the same 261 entity. This is important as DNS does not provide any way to tie 262 together multiple RRs for the same name. For example, if 263 www.example.com is a CNAME alias that switches between one of 264 three CDNs or hosting environments, successive queries for that 265 name may return records that correspond to different environments. 267 o Enables CNAME-like functionality at a zone apex (such as 268 "example.com") for participating protocols, and generally enables 269 delegation of operational authority for an origin within the DNS 270 to an alternate name. 272 Additional goals specific to HTTPSSVC and the HTTPS use-case include: 274 o Connect directly to [HTTP3] (QUIC transport) alternative service 275 endpoints 277 o Obtain the [ESNI] keys associated with an alternative service 278 endpoint 280 o Support non-default TCP and UDP ports 282 o Address a set of long-standing issues due to HTTP(S) clients not 283 implementing support for SRV records, as well as due to a 284 limitation that a DNS name can not have both CNAME and NS RRs (as 285 is the case for zone apex names) 287 o Provide an HSTS-like indication signaling for the duration of the 288 DNS RR TTL that the HTTPS scheme should be used instead of HTTP 289 (see Section 7.6). 291 1.3. Overview of the SVCB RR 293 This subsection briefly describes the SVCB RR in a non-normative 294 manner. (As mentioned above, this all applies equally to the 295 HTTPSSVC RR which shares the same encoding, format, and high-level 296 semantics.) 298 The SVCB RR has two forms: AliasForm and ServiceForm. SVCB RR 299 entries with two non-empty fields are in AliasForm. When more fields 300 are present, this indicates that the SVCB RR is in ServiceForm. The 301 fields are: 303 1. SvcFieldPriority: The priority of this record (relative to 304 others, with lower values preferred). Applicable for the 305 ServiceForm, and otherwise has value "0". (Described in 306 Section 7.4.) 308 2. SvcDomainName: The domain name of either the alias target (for 309 AliasForm) or the alternative service endpoint (for ServiceForm). 311 3. SvcFieldValue: A list of key=value pairs describing the 312 alternative service endpoint for the domain name specified in 313 SvcDomainName (only for ServiceForm and otherwise empty). 314 Described in Section 2.1. 316 Cooperating DNS recursive resolvers will perform subsequent record 317 resolution (for SVCB, A, and AAAA records) and return them in the 318 Additional Section of the response. Clients must either use 319 responses included in the additional section returned by the 320 recursive resolver or perform necessary SVCB, A, and AAAA record 321 resolutions. DNS authoritative servers may attach in-bailiwick SVCB, 322 A, AAAA, and CNAME records in the Additional Section to responses for 323 an SVCB query. 325 When in the ServiceForm, the SvcFieldValue of the SVCB RR provides an 326 extensible data model for describing network endpoints that are 327 authoritative for the origin, along with parameters associated with 328 each of these endpoints. 330 For the HTTPS use-case with the HTTPSSVC RR, there is also direct 331 mapping from the SvcDomainName and SvcFieldValue into HTTP 332 Alternative Services (Alt-Svc) entries [AltSvc]. Encoding this 333 information here enables many of the benefits of Alt-Svc, without 334 waiting for a full HTTP connection initiation (multiple roundtrips) 335 before learning of the preferred alternative, and without necessarily 336 revealing the user's intended destination to all entities along the 337 network path. 339 1.4. Parameter for ESNI 341 This document also defines a parameter for Encrypted SNI [ESNI] keys, 342 both as a general SVCB parameter and also as a corresponding Alt-Svc 343 parameter. See Section 8.1. 345 1.5. Terminology 347 For consistency with [AltSvc], we adopt the following definitions: 349 o An "origin" is an information source as in [RFC6454]. For 350 services other than HTTPS, the exact definition will need to be 351 provided by the document mapping that service onto the SVCB RR. 353 o The "origin server" is the server that the client would reach when 354 accessing the origin in the absence of the SVCB record or an HTTPS 355 Alt-Svc. 357 o An "alternative service" is a different server that can serve the 358 origin over a specified protocol. 360 For example within HTTPS, the origin consists of a scheme (typically 361 "https"), a host name, and a port (typically "443"). 363 Additional DNS terminology intends to be consistent with [DNSTerm]. 365 SVCB is a contraction of "service binding". HTTPSSVC is a 366 contraction of "HTTPS service". SVCB, HTTPSSVC, and future RR types 367 that share SVCB's format and registry are collectively known as SVCB- 368 compatible RR types. 370 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 371 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 372 "OPTIONAL" in this document are to be interpreted as described in BCP 373 14 [RFC2119] [RFC8174] when, and only when, they appear in all 374 capitals, as shown here. 376 2. The SVCB record type 378 The SVCB DNS resource record (RR) type (RR type ???) is used to 379 locate endpoints that can service an origin. There is special 380 handling for the case of "https" origins. The presentation format of 381 the record is: 383 Name TTL IN SVCB SvcFieldPriority SvcDomainName SvcFieldValue 385 The SVCB record is defined specifically within the Internet ("IN") 386 Class ([RFC1035]). SvcFieldPriority is a number in the range 387 0-65535, SvcDomainName is a domain name, and SvcFieldValue is a set 388 of key=value pairs present for the ServiceForm. The SvcFieldValue is 389 empty for the AliasForm. 391 The algorithm for resolving SVCB records and associated address 392 records is specified in Section 3. 394 2.1. Parameter specification via ServiceFieldValue 396 In ServiceForm, the SvcFieldValue contains key=value pairs. Keys are 397 IANA-registered SvcParamKeys (Section 11.1) with both a case- 398 insensitive string representation and a numeric representation in the 399 range 0-65535. Registered key names should only contain characters 400 from the ranges "a"-"z", "0"-"9", and "-". In ABNF [RFC5234], 402 ALPHA_LC = %x61-7A ; a-z 403 key = ALPHA_LC / DIGIT / "-" 404 display-key = ALPHA / DIGIT / "-" 406 Values are in a format specific to the SvcParamKey. Their definition 407 should specify both their presentation format and wire encoding 408 (e.g., domain names, binary data, or numeric values). 410 The SVCB format preserves the order of values and can encode multiple 411 values for the same parameter. However, clients MUST consider only 412 the first appearance of a parameter unless its specification 413 explicitly allows multiple values. 415 2.1.1. Presentation format 417 The presentation format for SvcFieldValue is a whitespace-separated 418 list of the key=value pairs. Each pair is presented in the following 419 form: 421 basic-visible = %x21 / %x23-5B / %x5D-7E ; VCHAR minus DQUOTE and "\" 422 escaped-char = "\" (VCHAR / WSP) 423 contiguous = *(basic-visible / escaped-char) 424 quoted-string = DQUOTE *(contiguous / WSP) DQUOTE 425 value = quoted-string / contiguous 426 pair = display-key "=" value 428 The value format is intended to match the definition of in [RFC1035] Section 5.1. (Unlike , the 430 length of a value is not limited to 255 characters.) 432 Unrecognized keys are represented in presentation format as 433 "keyNNNNN" where NNNNN is the numeric value of the key type without 434 leading zeros. In presentation format, values of unrecognized keys 435 should be represented in wire format, using decimal escape codes 436 (e.g. \255) when necessary. 438 2.2. SVCB RDATA Wire Format 440 The RDATA for the SVCB RR consists of: 442 o a 2 octet field for SvcFieldPriority as an integer in network byte 443 order. For AliasForm, SvcFieldPriority MUST be 0. 445 o the uncompressed SvcDomainName, represented as a sequence of 446 length-prefixed labels as in Section 3.1 of [RFC1035]. 448 o the SvcFieldValue byte string, consuming the remainder of the 449 record (so smaller than 65535 octets and constrained by the RDATA 450 and DNS message sizes). 452 AliasForm is defined by SvcFieldValue being empty. 454 When SvcFieldValue is non-empty (ServiceForm), it contains a list of 455 SvcParamKey=SvcParamValue pairs with length-prefixes for the 456 SvcParamValues, each of which contains: 458 o a 2 octet field containing the SvcParamKey as an integer in 459 network byte order. 461 o a 2 octet field containing the length of the SvcParamValue as an 462 integer between 0 and 65535 in network byte order (but constrained 463 by the RDATA and DNS message sizes). 465 o an octet string of the length defined by the previous field. 467 If the parser reaches the end of the RDATA while parsing a 468 SvcFieldValue, the RR is invalid and MUST be discarded. 470 TODO: decide if we want special handling for any SvcParamKey ranges? 471 For example: range for greasing; experimental range; range-of- 472 mandatory-to-use-the-RR vs range of ignore-just-param-if-unknown. 474 2.3. SVCB owner names 476 When querying the SVCB RR, an origin is typically translated into a 477 QNAME by prefixing the port and scheme with "_", then concatenating 478 them with the host name, resulting in a domain name like 479 "_8004._examplescheme.api.example.com.". 481 Protocol mappings for SVCB MAY remove the port or replace it with 482 other protocol-specific information, but MUST retain the scheme in 483 the QNAME. RR types other than SVCB can define additional behavior 484 for translating origins to QNAMEs. See Section 7.1 for the HTTPSSVC 485 behavior. 487 When a prior CNAME or SVCB record has aliased to an SVCB record, each 488 RR shall be returned under its own owner name. 490 Note that none of these forms alter the origin or authority for 491 validation purposes. For example, clients MUST continue to validate 492 TLS certificate hostnames based on the origin host. 494 As an example: 496 _8443._foo.api.example.com. 7200 IN SVCB 0 svc4.example.net. 497 svc4.example.net. 7200 IN SVCB 3 ( svc4.example.net. alpn="bar" 498 port="8004" esnikeys="..." ) 500 would indicate that "foo://api.example.com:8443" is aliased to use 501 ALPN protocol "bar" service endpoints offered at "svc4.example.net" 502 on port 8004. 504 2.4. SvcRecordType 506 The SvcRecordType is implicit based on the presence of SvcFieldValue, 507 and defines the form of the SVCB RR. When SvcFieldValue is empty, 508 the SVCB SvcRecordType is defined to be in AliasForm. Otherwise, the 509 SVCB SvcRecordType is defined to be in ServiceForm. 511 Within an SVCB RRSet, all RRs should have the same SvcRecordType. If 512 an RRSet contains a record in AliasForm, the client MUST ignore any 513 records in the set with ServiceForm. 515 2.5. SVCB records: AliasForm 517 When SvcRecordType is AliasForm, the SVCB record is to be treated 518 similar to a CNAME alias pointing to SvcDomainName. SVCB RRSets 519 SHOULD only have a single resource record in this form. If multiple 520 are present, clients or recursive resolvers SHOULD pick one at 521 random. 523 The AliasForm's primary purpose is to allow aliasing at the zone 524 apex, where CNAME is not allowed. For example, if an operator of 525 https://example.com wanted to point HTTPS requests to a service 526 operating at svc.example.net, they would publish a record such as: 528 example.com. 3600 IN SVCB 0 svc.example.net. 530 The SvcDomainName MUST point to a domain name that contains another 531 SVCB record, address (AAAA and/or A) records, or both address records 532 and a ServiceForm SVCB record. 534 Note that the SVCB record's owner name MAY be the canonical name of a 535 CNAME record, and the SvcDomainName MAY be the owner of a CNAME 536 record. Clients and recursive resolvers MUST follow CNAMEs as 537 normal. 539 Due to the risk of loops, clients and recursive resolvers MUST 540 implement loop detection. Chains of consecutive SVCB and CNAME 541 records SHOULD be limited to (8?) prior to reaching terminal address 542 records. 544 As legacy clients will not know to use this record, service operators 545 will likely need to retain fallback AAAA and A records alongside this 546 SVCB record, although in a common case the target of the SVCB record 547 might offer better performance, and therefore would be preferable for 548 clients implementing this specification to use. 550 Note that SVCB AliasForm RRs do not alias to RR types other than 551 address records (AAAA and A), CNAMEs, and ServiceForm SVCB records. 552 For example, an AliasForm SVCB record does not alias to an HTTPSSVC 553 record, nor vice-versa. 555 2.6. SVCB records: ServiceForm 557 When SvcRecordType is the ServiceForm, the combination of 558 SvcDomainName and SvcFieldValue parameters within each resource 559 record associates an alternative service location with its connection 560 parameters. 562 Section 7.2 defines a direct mapping between Alt-Svc ([AltSvc]) 563 values and the SVCB ServiceForm. Protocols using SVCB may use this 564 Alt-Svc mapping or specify their own semantics. Unless specified 565 otherwise by the protocol mapping, clients MUST ignore SvcFieldValue 566 parameters that they do not recognize. 568 2.6.1. Special handling of "." for SvcDomainName in ServiceForm 570 For ServiceForm SVCB RRs, if SvcDomainName has the value ".", then 571 the owner name of this record MUST be used as the effective 572 SvcDomainName. (The SvcDomainName of an SVCB RR in AliasForm MUST 573 NOT have this value.) 575 For example, in the following example "svc2.example.net" is the 576 effective SvcDomainName: 578 www.example.com. 7200 IN HTTPSSVC svc.example.net. 579 svc.example.net. 7200 IN CNAME svc2.example.net. 580 svc2.example.net. 7200 IN HTTPSSVC 0 . ( alpn=h2 581 port=8002 esnikeys="..." ) 582 svc2.example.net. 300 IN A 192.0.2.2 583 svc2.example.net. 300 IN AAAA 2001:db8::2 585 2.6.2. SvcFieldPriority 587 As RRs within an RRSet are explicitly unordered collections, the 588 SvcFieldPriority value serves to indicate priority. SVCB RRs with a 589 smaller SvcFieldPriority value SHOULD be given preference over RRs 590 with a larger SvcFieldPriority value. 592 When receiving an RRSet containing multiple SVCB records with the 593 same SvcFieldPriority value, clients SHOULD apply a random shuffle 594 within a priority level to the records before using them, to ensure 595 uniform load-balancing. 597 3. Client behavior 599 An SVCB-aware client resolves an origin by attempting to determine 600 the preferred SvcFieldValue and IP addresses for its service, using 601 the following procedure: 603 1. Issue parallel AAAA/A and SVCB queries for the name HOST. The 604 answers for these may or may not include CNAME pointers before 605 reaching one or more of these records. 607 2. If an SVCB record of AliasForm SvcRecordType is returned for 608 HOST, clients MUST loop back to step 1 replacing HOST with 609 SvcDomainName, subject to loop detection heuristics. 611 3. If one or more SVCB records of ServiceForm SvcRecordType are 612 returned for HOST, clients should select the highest-priority 613 option with acceptable parameters, and resolve AAAA and/or A 614 records for its SvcDomainName if they are not already available. 615 These are the preferred SvcFieldValue and IP addresses. If 616 connection fails, the client MAY try to connect using values from 617 a lower-priority record. If none of the options are acceptable 618 and working, the client SHOULD connect to the origin server 619 directly. 621 4. If an SVCB record for HOST does not exist, the received AAAA and/ 622 or A records are the preferred IP addresses, and there is no 623 SvcFieldValue. 625 This procedure does not rely on any recursive or authoritative server 626 to comply with this specification or have any awareness of SVCB. 628 When selecting between AAAA and A records to use, clients may use an 629 approach such as [HappyEyeballsV2]. 631 Some important optimizations are discussed in Section 5 to avoid 632 additional latency in comparison to ordinary AAAA/A lookups. 634 3.1. Clients using a Proxy 636 Clients using a domain-oriented transport proxy like HTTP CONNECT 637 ([RFC7231] Section 4.3.6) or SOCKS5 ([RFC1928]) SHOULD disable SVCB 638 support if performing SVCB queries would violate the client's privacy 639 intent. 641 If the client can safely perform SVCB queries (e.g. via the proxy or 642 an affiliated resolver), the client SHOULD follow the standard SVCB 643 resolution process, selecting the highest priority option that is 644 compatible with the client and the proxy. The client SHOULD provide 645 the final SvcDomainName and port (if present) to the proxy as the 646 destination host and port. 648 Providing the proxy with the final SvcDomainName has several 649 benefits: 651 o It allows the client to use the SvcFieldValue, if present, which 652 is only usable with a specific SvcDomainName. The SvcFieldValue 653 may include information that enhances performance (e.g. alpn) and 654 privacy (e.g. esnikeys). 656 o It allows the origin to delegate the apex domain. 658 o It allows the proxy to select between IPv4 and IPv6 addresses for 659 the server according to its configuration, and receive addresses 660 based on its network geolocation. 662 4. DNS Server Behavior 664 When replying to an SVCB query, authoritative DNS servers SHOULD 665 return A, AAAA, and SVCB records (as well as any relevant CNAME 666 records) in the Additional Section for any in-bailiwick 667 SvcDomainNames. 669 Recursive resolvers that are aware of SVCB SHOULD ensure that the 670 client can execute the procedure in Section 3 without issuing a 671 second round of queries, by following this procedure while 672 constructing a response to a stub resolver for an SVCB record query: 674 1. When processing an SVCB response from an authoritative server, 675 add it to the Additional section (unless it is the Answer). 677 2. Inspect whether each record is in AliasForm or ServiceForm. If 678 at least one record is in AliasForm, ignore all other SVCB 679 records in the RRSet. 681 3. If the record is in AliasForm, resolve A, AAAA, and SVCB records 682 for the SvcDomainName. If the SVCB record does not exist, add 683 the A and AAAA records to the Additional section. Otherwise, go 684 to step 1, subject to loop detection heuristics. 686 4. If the records are in ServiceForm, resolve A and AAAA records for 687 each SvcDomainName (or for the owner name if the SvcDomainName is 688 "."), and include all the results in the Additional section. 690 All DNS servers SHOULD treat the SvcParam portion of the SVCB RR as 691 opaque and SHOULD NOT try to alter their behavior based on its 692 contents. 694 5. Performance optimizations 696 For optimal performance (i.e. minimum connection setup time), clients 697 SHOULD issue address (AAAA and/or A) and SVCB queries simultaneously, 698 and SHOULD implement a client-side DNS cache. Responses in the 699 Additional section of an SVCB response SHOULD be placed in cache 700 before performing any followup queries. With these optimizations in 701 place, and conforming DNS servers, using SVCB does not add network 702 latency to connection setup. 704 A nonconforming recursive resolver might not return all the 705 information required to use all the records in an SVCB response. If 706 some of the SVCB RRs in the response can be used without requiring 707 additional DNS queries, the client MAY prefer those RRs, regardless 708 of their priorities. 710 To avoid a delay for clients using a nonconforming recursive 711 resolver, domain owners SHOULD use a single SVCB record whose 712 SvcDomainName is in the origin hostname's CNAME chain if possible. 713 This will ensure that the required address records are already 714 present in the client's DNS cache as part of the responses to the 715 address queries that were issued in parallel. 717 6. Initial SvcParamKeys 719 A few initial SvcParamKeys are defined here. These keys are useful 720 for HTTPS, and most are applicable to other protocols as well. 722 6.1. "alpn" 724 The "alpn" SvcParamKey defines the Application Layer Protocol (ALPN, 725 as defined in {{!RFC7301}) supported by a TLS-based alternative 726 service. Its value SHOULD be an entry in the IANA registry "TLS 727 Application-Layer Protocol Negotiation (ALPN) Protocol IDs". 729 The presentation format and wire format of SvcParamValue is its 730 registered "Identification Sequence". 732 Clients MUST ignore SVCB RRs where the "alpn" SvcParamValue is 733 unknown or unsupported. 735 6.2. "port" 737 The "port" SvcParamKey defines the TCP or UDP port that should be 738 used to contact this alternative service. 740 The presentation format of the SvcParamValue is a numeric value 741 between 0 and 65535 inclusive. The wire format of the SvcParamValue 742 is the corresponding 2 octet numeric value in network byte order. 744 6.3. "esnikeys" 746 The SvcParamKey for ESNI is "esnikeys". Its value is defined in 747 Section 8.1. It is applicable to most TLS-based protocols. 749 6.4. "ipv4hint" and "ipv6hint" 751 The "ipv4hint" and "ipv6hint" keys represent IP address hints for the 752 service. If A and AAAA records for SvcDomainName are locally 753 available, the client SHOULD ignore these hints. Otherwise, clients 754 MUST perform A and/or AAAA queries for SvcDomainName as in Section 3, 755 and clients SHOULD switch to an IP address in those records as soon 756 as possible. 758 The wire format for each parameter is a sequence of IP addresses in 759 network byte order. Like an A or AAAA RRSet, the list of addresses 760 represents an unordered collection, and clients SHOULD pick addresses 761 to use in a random order. 763 These parameters MAY be repeated multiple times within a record. 764 When receiving such a record, clients SHOULD combine the sets of 765 addresses. 767 When selecting between IPv4 and IPv6 addresses to use, clients may 768 use an approach such as [HappyEyeballsV2]. When only "ipv4hint" 769 parameters are present, IPv6-only clients may synthesize IPv6 770 addresses as specified in [RFC7050] or ignore the "ipv4hint" key and 771 wait for AAAA resolution (Section 3). Recursive resolvers MUST NOT 772 perform DNS64 ([RFC6147]) on parameters within an SVCB record. For 773 best performance, server operators SHOULD include "ipv6hint" 774 parameters whenever they publish "ipv4hint" parameters. 776 The presentation format for each parameter is a comma-separated list 777 of IP addresses in standard textual format [RFC5952]. 779 These parameters are intended to minimize additional connection 780 latency when a recursive resolver is not compliant with the 781 requirements in Section 4, and SHOULD NOT be included if most clients 782 are using compliant recursive resolvers. 784 7. Using SVCB with HTTPS and HTTP 786 Use of any protocol with SVCB requires a protocol-specific mapping 787 specification. This section specifies the mapping for HTTPS and 788 HTTP. 790 To enable special handling for the HTTPS and HTTP use-cases, the 791 HTTPSSVC RR type is defined as an SVCB-compatible RR type, specific 792 to the https and http schemes. This handling includes a mapping from 793 HTTPSSVC records directly into Alt-Svc entries. Clients MUST NOT 794 perform SVCB queries or accept SVCB responses for https or http 795 schemes. 797 The HTTPSSVC wire format and presentation format are identical to 798 SVCB, and both share the SvcParamKey registry. SVCB semantics apply 799 equally to HTTPSSVC unless specified otherwise. 801 The presence of an HTTPSSVC record for an HTTP or HTTPS service also 802 provides an indication that all resources are available over HTTPS, 803 as discussed in Section 7.6. This allows HTTPSSVC RRs to apply to 804 pre-existing HTTP scheme URLs, while ensuring that the client uses a 805 secure and authenticated HTTPS connection. 807 The HTTPSSVC RR extends the concept introduced in the HTTP 808 Alternative Services proposed standard [AltSvc]. Alt-Svc defines: 810 o an extensible data model for describing alternative network 811 endpoints that are authoritative for an origin 813 o the "Alt-Svc Field Value", a text format for representing this 814 information 816 o standards for sending information in this format from a server to 817 a client over HTTP/1.1 and HTTP/2. 819 Each ServiceForm HTTPSSVC RR provides a set of information that can 820 be mapped into an Alt-Svc Field Value. A client receiving this 821 information during DNS resolution can skip the initial connection and 822 proceed directly to an alternative service. 824 7.1. Owner names for HTTPSSVC records 826 The HTTPSSVC RR extends the behavior for determining a QNAME 827 specified above in Section 2.3. In particular, if the scheme is 828 "https" with port 443, or the scheme is "http" and the port is 80, 829 then the client's original QNAME is equal to the origin host name. 831 For origins other than https with port 443 and http with port 80, the 832 port and scheme continue to be prefixed to the hostname as described 833 in Section 2.3. Following of HTTPSSVC AliasForm and CNAME aliases is 834 also unchanged from SVCB. 836 Note that none of these forms alter the HTTPS origin or authority. 837 For example, clients MUST continue to validate TLS certificate 838 hostnames based on the origin host. 840 7.2. Mapping between ServiceForm and Alt-Svc 842 To construct an Alt-Svc Field Value (as defined in Section 4 of 843 [AltSvc]) from an HTTPSSVC record: 845 o The SvcDomainName is mapped into the uri-host portion of alt- 846 authority with the trailing "." removed. (If SvcDomainName is 847 ".", the special handling described in Section 2.6.1 MUST be 848 applied first.) 850 o The SvcParamValue of the "port" service parameter, or 443 if no 851 such parameter is present, is written to the port portion of the 852 alt-authority. 854 o The SvcParamValue of the "alpn" service parameter is mapped to the 855 protocol-id. This MUST follow the normalization and encoding 856 requirements for protocol-id specified in [AltSvc] Section 3. 857 This parameter is MANDATORY. 859 o The DNS TTL is mapped to the "ma" (max age) Alt-Svc parameter. 861 o For SVCB parameters with defined mappings to HTTPS Alt-Svc, each 862 should be included as an Alt-Svc parameter, typically as the 863 SvcParamKey name "=" a defined encoding of the SvcParamValue. 865 Converting an Alt-Svc Field Value into an HTTPSSVC record follows the 866 reverse of this procedure. 868 Conversion from HTTPSSVC to Alt-Svc Field Value SHOULD ignore any 869 unrecognized SvcParamKeys, and conversion from Alt-Svc Field Value to 870 HTTPSSVC SHOULD ignore any Alt-Svc parameters that do not have a 871 corresponding SvcParamKey. 873 For example, if the operator of https://www.example.com intends to 874 include an HTTP response header like 876 Alt-Svc: h3="svc.example.net:8003"; ma=3600; foo=123, \ 877 h2="svc.example.net:8002"; ma=3600; foo=123 879 they could also publish an HTTPSSVC DNS RRSet like 881 www.example.com. 3600 IN HTTPSSVC 2 svc.example.net. ( 882 alpn=h3 port=8003 foo=123 ) 883 HTTPSSVC 3 svc.example.net. ( 884 alpn=h2 port=8002 foo=123 ) 886 Where "foo" is a hypothetical future HTTPSSVC and Alt-Svc parameter. 888 This data type can also be represented as an Unknown RR as described 889 in [RFC3597]: 891 www.example.com. 3600 IN TYPE??? \\# TBD:WRITEME 893 On connections to an HTTPSSVC alternative service, clients SHOULD 894 include the same Alt-Used header that they would include if the 895 corresponding Alt-Svc Field Value were received over HTTPS. 897 7.3. Differences from Alt-Svc as transmitted over HTTP 899 Publishing an alternative services form HTTPSSVC record in DNS is 900 intended to be equivalent to transmitting the corresponding Alt-Svc 901 value over HTTPS, and receiving an HTTPSSVC record is intended to be 902 equivalent to receiving this field value over HTTPS. However, there 903 are some small differences in the intended client and server 904 behavior. 906 7.3.1. Max Age and Persist 908 There is no SvcParamKey corresponding to the Alt-Svc "ma" (max age) 909 parameter. Instead, server operators SHOULD encode the expiration 910 time in the DNS TTL, and MUST NOT set a TTL longer than the intended 911 "max age". 913 For security reasons, there is no SvcParamKey corresponding to the 914 Alt-Svc "persist" parameter. 916 7.4. Multiple records and preference ordering 918 Server operators MAY publish multiple ServiceForm HTTPSSVC records as 919 an RRSet. When converting a collection of alt-values into an 920 HTTPSSVC RRSet, the server operator MUST set the overall TTL to a 921 value no larger than the minimum of the "max age" values (following 922 Section 5.2 of [RFC2181]). 924 Each RR corresponds to exactly one alt-value, as described in 925 Section 3 of [AltSvc]. 927 As discussed in Section 2.6.2, HTTPSSVC RRs with a smaller 928 SvcFieldPriority value SHOULD be sorted ahead of and given preference 929 over RRs with a larger SvcFieldPriority value. 931 Clients SHOULD prefer Alt-values received via HTTPS over any Alt- 932 value received via DNS. 934 7.4.1. Constructing Alt-Svc equivalent headers 936 1. The RRs SHOULD be ordered by increasing SvcFieldPriority, with 937 shuffling for equal SvcFieldPriority values. Clients MAY choose 938 to further prioritize alt-values where address records are 939 immediately available for the alt-value's SvcDomainName. 941 2. The client SHOULD concatenate the thus-transformed-and-ordered 942 SvcFieldValues in the RRSet, separated by commas. (This is 943 semantically equivalent to receiving multiple Alt-Svc HTTP 944 response headers, according to Section 3.2.2 of [HTTP]). 946 7.5. Granularity and lifetime control 948 Sending Alt-Svc over HTTP allows the server to tailor the Alt-Svc 949 Field Value specifically to the client. When using an HTTPSSVC DNS 950 record, groups of clients will necessarily receive the same Alt-Svc 951 Field Value. Therefore, this standard is not suitable for uses that 952 require single-client granularity in Alt-Svc. 954 Some DNS caching systems incorrectly extend the lifetime of DNS 955 records beyond the stated TTL. Server operators MUST NOT rely on 956 HTTPSSVC records expiring on time, and MAY shorten the TTL to 957 compensate. 959 7.6. HTTP Strict Transport Security 961 By publishing an HTTPSSVC record, the server operator indicates that 962 all useful HTTP resources on that origin are reachable over HTTPS, 963 similar to HTTP Strict Transport Security [HSTS]. When an HTTPSSVC 964 record is present for an origin, all "http" scheme requests for that 965 origin SHOULD logically be redirected to "https". 967 Prior to making an "http" scheme request, the client SHOULD perform a 968 lookup to determine if an HTTPSSVC record is available for that 969 origin. To do so, the client SHOULD construct a corresponding 970 "https" URL as follows: 972 1. Replace the "http" scheme with "https". 974 2. If the "http" URL explicitly specifies port 80, specify port 443. 976 3. Do not alter any other aspect of the URL. 978 This construction is equivalent to Section 8.3 of [HSTS], point 5. 980 If an HTTPSSVC record is present for this "https" URL, the client 981 should treat this as the equivalent of receiving an HTTP "307 982 Temporary Redirect" redirect to the "https" URL. Because HTTPSSVC is 983 received over an often insecure channel (DNS), clients MUST NOT place 984 any more trust in this signal than if they had received a 307 985 redirect over cleartext HTTP. 987 If the HTTPSSVC query results in a SERVFAIL error, and the connection 988 between the client and the recursive resolver is cryptographically 989 protected (e.g. using TLS [RFC7858] or HTTPS [RFC8484]), the client 990 SHOULD abandon the connection attempt and display an error message. 991 A SERVFAIL error can occur if the domain is DNSSEC-signed, the 992 recursive resolver is DNSSEC-validating, and an active attacker 993 between the recursive resolver and the authoritative DNS server is 994 attempting to prevent the upgrade to HTTPS. 996 Similarly, if the client enforces DNSSEC validation on A/AAAA 997 responses, it SHOULD abandon the connection attempt if the HTTPSSVC 998 response fails to validate. 1000 7.7. Cache interaction 1002 If the client has an Alt-Svc cache, and a usable Alt-Svc value is 1003 present in that cache, then the client SHOULD NOT issue an HTTPSSVC 1004 DNS query. Instead, the client SHOULD proceed with alternative 1005 service connection as usual. 1007 If the client has a cached Alt-Svc entry that is expiring, the client 1008 MAY perform an HTTPSSVC query to refresh the entry. 1010 8. Extensions to enhance privacy 1012 8.1. Alt-Svc and SVCB/HTTPSSVC parameter for ESNI keys 1014 Both SVCB/HTTPSSVC and Alt-Svc "esnikeys" parameters are defined for 1015 specifying ESNI keys corresponding to an alternative service. The 1016 value of the parameter is an ESNIKeys structure [ESNI] or the empty 1017 string. ESNI-aware clients SHOULD prefer alt-values and SVCB/ 1018 HTTPSSVC RRs with non-empty esnikeys. 1020 Both the SVCB SvcParamValue presentation format as well as the Alt- 1021 Svc parameter value is the ESNIKeys structure [ESNI] encoded in 1022 [base64] or the empty string. The SVCB SvcParamValue wire format is 1023 the octet string containing the binary ESNIKeys structure. 1025 This parameter MAY also be sent in Alt-Svc HTTP response headers and 1026 HTTP/2 ALTSVC frames. This parameter MUST NOT appear more than once 1027 in a single alt-value. 1029 8.1.1. Handling a mixture of alternatives not supporting esnikeys 1031 The Alt-Svc specification states that "the client MAY fall back to 1032 using the origin" in case of connection failure (Section 2.4 of 1033 [AltSvc]). This behavior is not suitable for ESNI, because fallback 1034 would negate the privacy benefits of ESNI. 1036 Accordingly, any connection attempt that uses ESNI MUST fall back 1037 only to another alt-value that also has the esnikeys parameter. If 1038 the parameter's value is the empty string, the client SHOULD connect 1039 as it would in the absence of any ESNIKeys information. 1041 For example, suppose a server operator has two alternatives. 1042 Alternative A is reliably accessible but does not support ESNI. 1043 Alternative B supports ESNI but is not reliably accessible. The 1044 server operator could include a full esnikeys value in Alternative B, 1045 and mark Alternative A with esnikeys="" to indicate that fallback 1046 from B to A is allowed. 1048 Other clients and services implementing SVCB or HTTPSSVC with 1049 esnikeys are encouraged to take a similar approach. 1051 9. Interaction with other standards 1053 This standard is intended to reduce connection latency and improve 1054 user privacy. Server operators implementing this standard SHOULD 1055 also implement TLS 1.3 [RFC8446] and OCSP Stapling [RFC6066], both of 1056 which confer substantial performance and privacy benefits when used 1057 in combination with SVCB records. 1059 To realize the greatest privacy benefits, this proposal is intended 1060 for use over a privacy-preserving DNS transport (like DNS over TLS 1061 [RFC7858] or DNS over HTTPS [RFC8484]). However, performance 1062 improvements, and some modest privacy improvements, are possible 1063 without the use of those standards. 1065 Any specification for use of SVCB with a protocol MUST have an entry 1066 for its scheme under the SVCB RR type in the IANA DNS Underscore 1067 Global Scoped Entry Registry [Attrleaf]. The scheme SHOULD have an 1068 entry in the IANA URI Schemes Registry [RFC7595]. The scheme SHOULD 1069 have a defined specification for use with SVCB, unless it already has 1070 a specification for use with Alt-Svc. 1072 10. Security Considerations 1074 SVCB/HTTPSSVC RRs and Alt-Svc Field Values are intended for 1075 distribution over untrusted channels, and clients are REQUIRED to 1076 verify that the alternative service is authoritative for the origin 1077 (Section 2.1 of [AltSvc]). Therefore, DNSSEC signing and validation 1078 are OPTIONAL for publishing and using SVCB and HTTPSSVC records. 1080 Clients MUST ensure that their DNS cache is partitioned for each 1081 local network, or flushed on network changes, to prevent a local 1082 adversary in one network from implanting a forged DNS record that 1083 allows them to track users or hinder their connections after they 1084 leave that network. 1086 11. IANA Considerations 1088 11.1. New registry for Service Parameters 1090 The "Service Binding (SVCB) Parameter Registry" defines the name 1091 space for parameters, including string representations and numeric 1092 SvcParamKey values. This registry is shared with other SVCB- 1093 compatible RR types, such as HTTPSSVC. 1095 ACTION: create and include a reference to this registry. 1097 11.1.1. Procedure 1099 A registration MUST include the following fields: 1101 o Name: Service parameter key name 1103 o SvcParamKey: Service parameter key numeric identifier (range 1104 0-65535) 1106 o Meaning: a short description 1107 o Pointer to specification text 1109 Values to be added to this name space require Expert Review (see 1110 [RFC5226], Section 4.1). Apart from the initial contents, the name 1111 MUST NOT start with "key". 1113 11.1.2. Initial contents 1115 The "Service Binding (SVCB) Parameter Registry" shall initially be 1116 populated with the registrations below: 1118 +-------------+----------+--------------------------+---------------+ 1119 | SvcParamKey | NAME | Meaning | Reference | 1120 +-------------+----------+--------------------------+---------------+ 1121 | 0 | key0 | Reserved | (This | 1122 | | | | document) | 1123 | | | | | 1124 | 1 | alpn | ALPN for alternative | (This | 1125 | | | service | document) | 1126 | | | | | 1127 | 2 | port | Port for alternative | (This | 1128 | | | service | document) | 1129 | | | | | 1130 | 3 | esnikeys | ESNI keys literal | (This | 1131 | | | | document) | 1132 | | | | | 1133 | 4 | ipv4hint | IPv4 address hints | (This | 1134 | | | | document) | 1135 | | | | | 1136 | 5 | key5 | Reserved | (This | 1137 | | | | document) | 1138 | | | | | 1139 | 6 | ipv6hint | IPv6 address hints | (This | 1140 | | | | document) | 1141 | | | | | 1142 | 65280-65534 | keyNNNNN | Private Use | (This | 1143 | | | | document) | 1144 | | | | | 1145 | 65535 | key65535 | Reserved | (This | 1146 | | | | document) | 1147 +-------------+----------+--------------------------+---------------+ 1149 TODO: do we also want to reserve a range for greasing? 1151 11.2. Registry updates 1153 Per [RFC6895], please add the following entry to the data type range 1154 of the Resource Record (RR) TYPEs registry: 1156 +----------+----------------------------------------+---------------+ 1157 | TYPE | Meaning | Reference | 1158 +----------+----------------------------------------+---------------+ 1159 | SVCB | Service Location and Parameter Binding | (This | 1160 | | | document) | 1161 | | | | 1162 | HTTPSSVC | HTTPS Service Location and Parameter | (This | 1163 | | Binding | document) | 1164 +----------+----------------------------------------+---------------+ 1166 Per [Attrleaf], please add the following entries to the DNS 1167 Underscore Global Scoped Entry Registry: 1169 +----------+------------+-------------------+-----------------+ 1170 | RR TYPE | _NODE NAME | Meaning | Reference | 1171 +----------+------------+-------------------+-----------------+ 1172 | HTTPSSVC | _https | Alt-Svc for HTTPS | (This document) | 1173 | | | | | 1174 | HTTPSSVC | _http | Alt-Svc for HTTPS | (This document) | 1175 +----------+------------+-------------------+-----------------+ 1177 Per [AltSvc], please add the following entry to the HTTP Alt-Svc 1178 Parameter Registry: 1180 +-------------------+--------------------+-----------------+ 1181 | Alt-Svc Parameter | Meaning | Reference | 1182 +-------------------+--------------------+-----------------+ 1183 | esnikeys | Encrypted SNI keys | (This document) | 1184 +-------------------+--------------------+-----------------+ 1186 12. Acknowledgments and Related Proposals 1188 There have been a wide range of proposed solutions over the years to 1189 the "CNAME at the Zone Apex" challenge proposed. These include 1190 [I-D.draft-bellis-dnsop-http-record-00], 1191 [I-D.draft-ietf-dnsop-aname-03], and others. 1193 Thank you to Ian Swett, Ralf Weber, Jon Reed, Martin Thompson, Lucas 1194 Pardue, Ilari Liusvaara, Tim Wicinski, Tommy Pauly, Chris Wood, and 1195 others for their feedback and suggestions on this draft. 1197 13. References 1199 13.1. Normative References 1201 [AltSvc] Nottingham, M., McManus, P., and J. Reschke, "HTTP 1202 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 1203 April 2016, . 1205 [AltSvcSNI] 1206 Bishop, M., "The "SNI" Alt-Svc Parameter", draft-bishop- 1207 httpbis-sni-altsvc-02 (work in progress), May 2018. 1209 [Attrleaf] 1210 Crocker, D., "DNS Scoped Data Through "Underscore" Naming 1211 of Attribute Leaves", draft-ietf-dnsop-attrleaf-16 (work 1212 in progress), November 2018. 1214 [base64] Josefsson, S., "The Base16, Base32, and Base64 Data 1215 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 1216 . 1218 [ESNI] Rescorla, E., Oku, K., Sullivan, N., and C. Wood, 1219 "Encrypted Server Name Indication for TLS 1.3", draft- 1220 ietf-tls-esni-04 (work in progress), July 2019. 1222 [HappyEyeballsV2] 1223 Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: 1224 Better Connectivity Using Concurrency", RFC 8305, 1225 DOI 10.17487/RFC8305, December 2017, 1226 . 1228 [HSTS] Hodges, J., Jackson, C., and A. Barth, "HTTP Strict 1229 Transport Security (HSTS)", RFC 6797, 1230 DOI 10.17487/RFC6797, November 2012, 1231 . 1233 [HTTP3] Bishop, M., "Hypertext Transfer Protocol Version 3 1234 (HTTP/3)", draft-ietf-quic-http-20 (work in progress), 1235 April 2019. 1237 [RFC1035] Mockapetris, P., "Domain names - implementation and 1238 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1239 November 1987, . 1241 [RFC1928] Leech, M., Ganis, M., Lee, Y., Kuris, R., Koblas, D., and 1242 L. Jones, "SOCKS Protocol Version 5", RFC 1928, 1243 DOI 10.17487/RFC1928, March 1996, 1244 . 1246 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1247 Requirement Levels", BCP 14, RFC 2119, 1248 DOI 10.17487/RFC2119, March 1997, 1249 . 1251 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 1252 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, 1253 . 1255 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record 1256 (RR) Types", RFC 3597, DOI 10.17487/RFC3597, September 1257 2003, . 1259 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1260 IANA Considerations Section in RFCs", RFC 5226, 1261 DOI 10.17487/RFC5226, May 2008, 1262 . 1264 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1265 Specifications: ABNF", STD 68, RFC 5234, 1266 DOI 10.17487/RFC5234, January 2008, 1267 . 1269 [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 1270 Address Text Representation", RFC 5952, 1271 DOI 10.17487/RFC5952, August 2010, 1272 . 1274 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 1275 Extensions: Extension Definitions", RFC 6066, 1276 DOI 10.17487/RFC6066, January 2011, 1277 . 1279 [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van 1280 Beijnum, "DNS64: DNS Extensions for Network Address 1281 Translation from IPv6 Clients to IPv4 Servers", RFC 6147, 1282 DOI 10.17487/RFC6147, April 2011, 1283 . 1285 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 1286 DOI 10.17487/RFC6454, December 2011, 1287 . 1289 [RFC7050] Savolainen, T., Korhonen, J., and D. Wing, "Discovery of 1290 the IPv6 Prefix Used for IPv6 Address Synthesis", 1291 RFC 7050, DOI 10.17487/RFC7050, November 2013, 1292 . 1294 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1295 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 1296 DOI 10.17487/RFC7231, June 2014, 1297 . 1299 [RFC7595] Thaler, D., Ed., Hansen, T., and T. Hardie, "Guidelines 1300 and Registration Procedures for URI Schemes", BCP 35, 1301 RFC 7595, DOI 10.17487/RFC7595, June 2015, 1302 . 1304 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1305 and P. Hoffman, "Specification for DNS over Transport 1306 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1307 2016, . 1309 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1310 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1311 May 2017, . 1313 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1314 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1315 . 1317 [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 1318 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 1319 . 1321 13.2. Informative References 1323 [DNSTerm] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1324 Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, 1325 January 2019, . 1327 [HTTP] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1328 Protocol (HTTP/1.1): Message Syntax and Routing", 1329 RFC 7230, DOI 10.17487/RFC7230, June 2014, 1330 . 1332 [I-D.draft-bellis-dnsop-http-record-00] 1333 Bellis, R., "A DNS Resource Record for HTTP", draft- 1334 bellis-dnsop-http-record-00 (work in progress), November 1335 2018. 1337 [I-D.draft-ietf-dnsop-aname-03] 1338 Finch, T., Hunt, E., Dijk, P., Eden, A., and W. Mekking, 1339 "Address-specific DNS aliases (ANAME)", draft-ietf-dnsop- 1340 aname-03 (work in progress), April 2019. 1342 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 1343 specifying the location of services (DNS SRV)", RFC 2782, 1344 DOI 10.17487/RFC2782, February 2000, 1345 . 1347 [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA 1348 Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, 1349 April 2013, . 1351 Appendix A. Additional examples 1353 A.1. Equivalence to Alt-Svc records 1355 The following: 1357 www.example.com. 7200 IN CNAME svc.example.net. 1358 example.com. 7200 IN HTTPSSVC 0 svc.example.net. 1359 svc.example.net. 7200 IN HTTPSSVC 2 svc3.example.net. ( 1360 alpn=h3 port=8003 esnikeys="ABC..." ) 1361 svc.example.net. 7200 IN HTTPSSVC 3 . alpn=h2 port=8002 esnikeys="123..." 1363 is equivalent to the Alt-Svc record: 1365 Alt-Svc: h3="svc3.example.net:8003"; esnikeys="ABC..."; ma=7200, \ 1366 h2="svc.example.net:8002"; esnikeys="123..."; ma=7200 1368 for the origins of both "https://www.example.com" and 1369 "https://example.com". 1371 Appendix B. Comparison with alternatives 1373 The SVCB and HTTPSSVC record types closely resemble, and are inspired 1374 by, some existing record types and proposals. A complaint with all 1375 of the alternatives is that web clients have seemed unenthusiastic 1376 about implementing them. The hope here is that by providing an 1377 extensible solution that solves multiple problems we will overcome 1378 the inertia and have a path to achieve client implementation. 1380 B.1. Differences from the SRV RR type 1382 An SRV record [RFC2782] can perform a similar function to the SVCB 1383 record, informing a client to look in a different location for a 1384 service. However, there are several differences: 1386 o SRV records are typically mandatory, whereas clients will always 1387 continue to function correctly without making use of Alt-Svc or 1388 SVCB. 1390 o SRV records cannot instruct the client to switch or upgrade 1391 protocols, whereas Alt-Svc can signal such an upgrade (e.g. to 1392 HTTP/2). 1394 o SRV records are not extensible, whereas SVCB and HTTPSSVC can be 1395 extended with new parameters. 1397 o Using SRV records would not allow an HTTPS client to skip 1398 processing of the Alt-Svc information in a subsequent connection, 1399 so it does not confer a performance advantage. 1401 B.2. Differences from the proposed HTTP record 1403 Unlike [I-D.draft-bellis-dnsop-http-record-00], this approach is 1404 extensible to cover Alt-Svc and ESNIKeys use-cases. Like that 1405 proposal, this addresses the zone apex CNAME challenge. 1407 Like that proposal it remains necessary to continue to include 1408 address records at the zone apex for legacy clients. 1410 B.3. Differences from the proposed ANAME record 1412 Unlike [I-D.draft-ietf-dnsop-aname-03], this approach is extensible 1413 to cover Alt-Svc and ESNIKeys use-cases. This approach also does not 1414 require any changes or special handling on either authoritative or 1415 master servers, beyond optionally returning in-bailiwick additional 1416 records. 1418 Like that proposal, this addresses the zone apex CNAME challenge for 1419 clients that implement this. 1421 However with this SVCB proposal it remains necessary to continue to 1422 include address records at the zone apex for legacy clients. If 1423 deployment of this standard is successful, the number of legacy 1424 clients will fall over time. As the number of legacy clients 1425 declines, the operational effort required to serve these users 1426 without the benefit of SVCB indirection should fall. Server 1427 operators can easily observe how much traffic reaches this legacy 1428 endpoint, and may remove the apex's address records if the observed 1429 legacy traffic has fallen to negligible levels. 1431 B.4. Differences from the proposed ESNI record 1433 Unlike [ESNI], this approach is extensible and covers the Alt-Svc 1434 case as well as addresses the zone apex CNAME challenge. 1436 By using the Alt-Svc model we also provide a way to solve the ESNI 1437 multi-CDN challenges in a general case. 1439 Unlike ESNI, SVCB allows specifying different ESNI configurations for 1440 different protocols and ports, rather than applying a single 1441 configuration to all ports on a domain. 1443 B.5. SNI Alt-Svc parameter 1445 Defining an Alt-Svc sni= parameter (such as from [AltSvcSNI]) would 1446 have provided some benefits to clients and servers not implementing 1447 ESNI, such as for specifying that "_wildcard.example.com" could be 1448 sent as an SNI value rather than the full name. There is nothing 1449 precluding SVCB from being used with an sni= parameter if one were to 1450 be defined, but it is not included here to reduce scope, complexity, 1451 and additional potential security and tracking risks. 1453 Appendix C. Design Considerations and Open Issues 1455 This draft is intended to be a work-in-progress for discussion. Many 1456 details are expected to change with subsequent refinement. Some 1457 known issues or topics for discussion are listed below. 1459 C.1. Record Name 1461 Naming is hard. "SVCB" and "HTTPSSVC" are proposed as placeholders 1462 that are easy to search for and replace when a final name is chosen. 1463 Other names for this record might include B, ALTSVC, HTTPS, HTTPSSRV, 1464 HTTPSSVC, SVCHTTPS, or something else. 1466 C.2. Generality 1468 The SVCB record was designed as a generalization of HTTPSSVC, based 1469 on feedback requesting a solution that applied to protocols pther 1470 than HTTP. Past efforts to over-generalize have not met with broad 1471 success, but we hope that HTTPSSVC and SVCB have struck an acceptable 1472 balance between generality and focus. 1474 C.3. Wire Format 1476 Advice from experts in DNS wire format best practices would be 1477 greatly appreciated to refine the proposed details, overall. 1479 C.4. Where to include Priority 1481 The SvcFieldPriority could alternately be included as a pri= Alt-Svc 1482 attribute. It wouldn't be applicable for Alt-Svc returned via HTTP, 1483 but it is also not necessarily needed by DNS servers. It is also not 1484 used for AliasForm RRs. 1486 C.5. Whether to include Weight 1488 Some other similar mechanisms such as SRV have a weight in-addition 1489 to priority. That is excluded here for simplicity. It could always 1490 be added as an optional SVCB parameter. 1492 Appendix D. Change history 1494 o draft-nygren-dnsop-svcb-httpssvc-00 1496 * Generalize to an SVCB record, with special-case handling for 1497 Alt-Svc and HTTPS separated out to dedicated sections. 1499 * Split out a separate HTTPSSVC record for the HTTPS use-case. 1501 * Remove the explicit SvcRecordType=0/1 and instead make the 1502 AliasForm vs ServiceForm be implicit. This was based on 1503 feedback recommending against subtyping RR type. 1505 * Remove one optimization. 1507 o draft-nygren-httpbis-httpssvc-03 1509 * Change redirect type for HSTS-style behavior from 302 to 307 to 1510 reduce ambiguities. 1512 o draft-nygren-httpbis-httpssvc-02 1514 * Remove the redundant length fields from the wire format. 1516 * Define a SvcDomainName of "." for SvcRecordType=1 as being the 1517 HTTPSSVC RRNAME. 1519 * Replace "hq" with "h3". 1521 o draft-nygren-httpbis-httpssvc-01 1523 * Fixes of record name. Replace references to "HTTPSVC" with 1524 "HTTPSSVC". 1526 o draft-nygren-httpbis-httpssvc-00 1528 * Initial version 1530 Authors' Addresses 1532 Ben Schwartz 1533 Google 1535 Email: bemasc@google.com 1537 Mike Bishop 1538 Akamai Technologies 1540 Email: mbishop@evequefou.be 1542 Erik Nygren 1543 Akamai Technologies 1545 Email: erik+ietf@nygren.org