idnits 2.17.1 draft-ietf-dnsop-svcb-https-08.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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([HTTP]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (12 October 2021) is 920 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-13 -- Possible downref: Normative reference to a draft: ref. 'HTTP' -- Duplicate reference: draft-ietf-httpbis-semantics, mentioned in 'I-D.draft-ietf-httpbis-semantics', was also mentioned in 'HTTP'. -- Possible downref: Normative reference to a draft: ref. 'I-D.draft-ietf-httpbis-semantics' ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) ** Downref: Normative reference to an Informational RFC: RFC 7871 -- Obsolete informational reference (is this intentional?): RFC 8499 (ref. 'DNSTerm') (Obsoleted by RFC 9499) Summary: 3 errors (**), 0 flaws (~~), 3 warnings (==), 5 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: 15 April 2022 E. Nygren 6 Akamai Technologies 7 12 October 2021 9 Service binding and parameter specification via the DNS (DNS SVCB and 10 HTTPS RRs) 11 draft-ietf-dnsop-svcb-https-08 13 Abstract 15 This document specifies the "SVCB" and "HTTPS" DNS resource record 16 (RR) types to facilitate the lookup of information needed to make 17 connections to network services, such as for HTTP origins. SVCB 18 records allow a service to be provided from multiple alternative 19 endpoints, each with associated parameters (such as transport 20 protocol configuration and keys for encrypting the TLS ClientHello). 21 They also enable aliasing of apex domains, which is not possible with 22 CNAME. The HTTPS RR is a variation of SVCB for use with HTTP [HTTP]. 23 By providing more information to the client before it attempts to 24 establish a connection, these records offer potential benefits to 25 both performance and privacy. 27 TO BE REMOVED: This document is being collaborated on in Github at: 28 https://github.com/MikeBishop/dns-alt-svc 29 (https://github.com/MikeBishop/dns-alt-svc). The most recent working 30 version of the document, open issues, etc. should all be available 31 there. The authors (gratefully) accept pull requests. 33 Status of This Memo 35 This Internet-Draft is submitted in full conformance with the 36 provisions of BCP 78 and BCP 79. 38 Internet-Drafts are working documents of the Internet Engineering 39 Task Force (IETF). Note that other groups may also distribute 40 working documents as Internet-Drafts. The list of current Internet- 41 Drafts is at https://datatracker.ietf.org/drafts/current/. 43 Internet-Drafts are draft documents valid for a maximum of six months 44 and may be updated, replaced, or obsoleted by other documents at any 45 time. It is inappropriate to use Internet-Drafts as reference 46 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on 15 April 2022. 50 Copyright Notice 52 Copyright (c) 2021 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 57 license-info) in effect on the date of publication of this document. 58 Please review these documents carefully, as they describe your rights 59 and restrictions with respect to this document. Code Components 60 extracted from this document must include Simplified BSD License text 61 as described in Section 4.e of the Trust Legal Provisions and are 62 provided without warranty as described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 67 1.1. Goals of the SVCB RR . . . . . . . . . . . . . . . . . . 5 68 1.2. Overview of the SVCB RR . . . . . . . . . . . . . . . . . 5 69 1.3. Parameter for Encrypted ClientHello . . . . . . . . . . . 6 70 1.4. Terminology . . . . . . . . . . . . . . . . . . . . . . . 7 71 2. The SVCB record type . . . . . . . . . . . . . . . . . . . . 7 72 2.1. Zone file presentation format . . . . . . . . . . . . . . 8 73 2.2. RDATA wire format . . . . . . . . . . . . . . . . . . . . 9 74 2.3. SVCB query names . . . . . . . . . . . . . . . . . . . . 10 75 2.4. Interpretation . . . . . . . . . . . . . . . . . . . . . 10 76 2.4.1. SvcPriority . . . . . . . . . . . . . . . . . . . . . 11 77 2.4.2. AliasMode . . . . . . . . . . . . . . . . . . . . . . 11 78 2.4.3. ServiceMode . . . . . . . . . . . . . . . . . . . . . 12 79 2.5. Special handling of "." in TargetName . . . . . . . . . . 13 80 2.5.1. AliasMode . . . . . . . . . . . . . . . . . . . . . . 13 81 2.5.2. ServiceMode . . . . . . . . . . . . . . . . . . . . . 13 82 3. Client behavior . . . . . . . . . . . . . . . . . . . . . . . 13 83 3.1. Handling resolution failures . . . . . . . . . . . . . . 14 84 3.2. Clients using a Proxy . . . . . . . . . . . . . . . . . . 15 85 4. DNS Server Behavior . . . . . . . . . . . . . . . . . . . . . 16 86 4.1. Authoritative servers . . . . . . . . . . . . . . . . . . 16 87 4.2. Recursive resolvers . . . . . . . . . . . . . . . . . . . 16 88 4.3. General requirements . . . . . . . . . . . . . . . . . . 17 89 4.4. EDNS Client Subnet (ECS) . . . . . . . . . . . . . . . . 17 90 5. Performance optimizations . . . . . . . . . . . . . . . . . . 18 91 5.1. Optimistic pre-connection and connection reuse . . . . . 18 92 5.2. Generating and using incomplete responses . . . . . . . . 19 93 6. SVCB-compatible . . . . . . . . . . . . . . . . . . . . . . . 19 94 7. Initial SvcParamKeys . . . . . . . . . . . . . . . . . . . . 20 95 7.1. "alpn" and "no-default-alpn" . . . . . . . . . . . . . . 20 96 7.1.1. Representation . . . . . . . . . . . . . . . . . . . 21 97 7.1.2. Use . . . . . . . . . . . . . . . . . . . . . . . . . 22 99 7.2. "port" . . . . . . . . . . . . . . . . . . . . . . . . . 23 100 7.3. "ech" . . . . . . . . . . . . . . . . . . . . . . . . . . 23 101 7.4. "ipv4hint" and "ipv6hint" . . . . . . . . . . . . . . . . 23 102 7.5. "mandatory" . . . . . . . . . . . . . . . . . . . . . . . 24 103 8. ServiceMode RR compatibility and mandatory keys . . . . . . . 24 104 9. Using Service Bindings with HTTP . . . . . . . . . . . . . . 25 105 9.1. Query names for HTTPS RRs . . . . . . . . . . . . . . . . 26 106 9.2. Comparison with Alt-Svc . . . . . . . . . . . . . . . . . 27 107 9.2.1. ALPN usage . . . . . . . . . . . . . . . . . . . . . 27 108 9.2.2. Untrusted channel . . . . . . . . . . . . . . . . . . 27 109 9.2.3. Cache lifetime . . . . . . . . . . . . . . . . . . . 27 110 9.2.4. Granularity . . . . . . . . . . . . . . . . . . . . . 28 111 9.3. Interaction with Alt-Svc . . . . . . . . . . . . . . . . 28 112 9.4. Requiring Server Name Indication . . . . . . . . . . . . 29 113 9.5. HTTP Strict Transport Security . . . . . . . . . . . . . 29 114 9.6. Use of HTTPS RRs in other protocols . . . . . . . . . . . 30 115 10. SVCB/HTTPS RR parameter for ECH configuration . . . . . . . . 30 116 10.1. Client behavior . . . . . . . . . . . . . . . . . . . . 31 117 10.2. Deployment considerations . . . . . . . . . . . . . . . 31 118 11. Zone Structures . . . . . . . . . . . . . . . . . . . . . . . 31 119 11.1. Structuring zones for flexibility . . . . . . . . . . . 31 120 11.2. Structuring zones for performance . . . . . . . . . . . 32 121 11.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 32 122 11.3.1. Protocol enhancements . . . . . . . . . . . . . . . 32 123 11.3.2. Apex aliasing . . . . . . . . . . . . . . . . . . . 33 124 11.3.3. Parameter binding . . . . . . . . . . . . . . . . . 33 125 11.3.4. Multi-CDN . . . . . . . . . . . . . . . . . . . . . 34 126 11.3.5. Non-HTTP uses . . . . . . . . . . . . . . . . . . . 36 127 12. Interaction with other standards . . . . . . . . . . . . . . 36 128 13. Security Considerations . . . . . . . . . . . . . . . . . . . 36 129 14. Privacy Considerations . . . . . . . . . . . . . . . . . . . 37 130 15. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 131 15.1. SVCB RRType . . . . . . . . . . . . . . . . . . . . . . 37 132 15.2. HTTPS RRType . . . . . . . . . . . . . . . . . . . . . . 38 133 15.3. New registry for Service Parameters . . . . . . . . . . 38 134 15.3.1. Procedure . . . . . . . . . . . . . . . . . . . . . 38 135 15.3.2. Initial contents . . . . . . . . . . . . . . . . . . 39 136 15.4. Other registry updates . . . . . . . . . . . . . . . . . 40 137 16. Acknowledgments and Related Proposals . . . . . . . . . . . . 41 138 17. References . . . . . . . . . . . . . . . . . . . . . . . . . 41 139 17.1. Normative References . . . . . . . . . . . . . . . . . . 41 140 17.2. Informative References . . . . . . . . . . . . . . . . . 44 141 Appendix A. Decoding text in zone files . . . . . . . . . . . . 45 142 A.1. Decoding a comma-separated list . . . . . . . . . . . . . 46 143 Appendix B. HTTP Mapping Summary . . . . . . . . . . . . . . . . 46 144 Appendix C. Comparison with alternatives . . . . . . . . . . . . 47 145 C.1. Differences from the SRV RR type . . . . . . . . . . . . 47 146 C.2. Differences from the proposed HTTP record . . . . . . . . 48 147 C.3. Differences from the proposed ANAME record . . . . . . . 48 148 C.4. Comparison with separate RR types for AliasMode and 149 ServiceMode . . . . . . . . . . . . . . . . . . . . . . . 48 150 Appendix D. Test vectors . . . . . . . . . . . . . . . . . . . . 49 151 D.1. AliasMode . . . . . . . . . . . . . . . . . . . . . . . . 49 152 D.2. ServiceMode . . . . . . . . . . . . . . . . . . . . . . . 49 153 D.3. Failure cases . . . . . . . . . . . . . . . . . . . . . . 54 154 Appendix E. Change history . . . . . . . . . . . . . . . . . . . 55 155 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 59 157 1. Introduction 159 The SVCB ("Service Binding") and HTTPS RRs provide clients with 160 complete instructions for access to a service. This information 161 enables improved performance and privacy by avoiding transient 162 connections to a sub-optimal default server, negotiating a preferred 163 protocol, and providing relevant public keys. 165 For example, HTTP clients currently resolve only A and/or AAAA 166 records for the origin hostname, learning only its IP addresses. If 167 an HTTP client learns more about the origin before connecting, it may 168 be able to upgrade "http" URLs to "https", enable HTTP/3 or Encrypted 169 ClientHello [ECH], or switch to an operationally preferable endpoint. 170 It is highly desirable to minimize the number of round-trips and 171 lookups required to learn this additional information. 173 The SVCB and HTTPS RRs also help when the operator of a service 174 wishes to delegate operational control to one or more other domains, 175 e.g. delegating the origin "https://example.com" to a service 176 operator endpoint at "svc.example.net". While this case can 177 sometimes be handled by a CNAME, that does not cover all use-cases. 178 CNAME is also inadequate when the service operator needs to provide a 179 bound collection of consistent configuration parameters through the 180 DNS (such as network location, protocol, and keying information). 182 This document first describes the SVCB RR as a general-purpose 183 resource record that can be applied directly and efficiently to a 184 wide range of services (Section 2). It also describes the rules for 185 defining other SVCB-compatible RR types (Section 6), starting with 186 the HTTPS RR type (Section 9), which provides improved efficiency and 187 convenience with HTTP by avoiding the need for an Attrleaf label 188 [Attrleaf] (Section 9.1). 190 The SVCB RR has two modes: 1) "AliasMode", which simply delegates 191 operational control for a resource; 2) "ServiceMode", which binds 192 together configuration information for a service endpoint. 193 ServiceMode provides additional key=value parameters within each 194 RDATA set. 196 1.1. Goals of the SVCB RR 198 The goal of the SVCB RR is to allow clients to resolve a single 199 additional DNS RR in a way that: 201 * Provides alternative endpoints that are authoritative for the 202 service, along with parameters associated with each of these 203 endpoints. 205 * Does not assume that all alternative endpoints have the same 206 parameters or capabilities, or are even operated by the same 207 entity. This is important, as DNS does not provide any way to tie 208 together multiple RRSets for the same name. For example, if 209 www.example.com is a CNAME alias that switches between one of 210 three CDNs or hosting environments, successive queries for that 211 name may return records that correspond to different environments. 213 * Enables CNAME-like functionality at a zone apex (such as 214 "example.com") for participating protocols, and generally enables 215 delegation of operational authority for an origin within the DNS 216 to an alternate name. 218 Additional goals specific to HTTPS RRs and the HTTP use-cases 219 include: 221 * Connect directly to HTTP/3 (QUIC transport) alternative endpoints 222 [HTTP3] 224 * Obtain the Encrypted ClientHello [ECH] keys associated with an 225 alternative endpoint 227 * Support non-default TCP and UDP ports 229 * Enable SRV-like benefits (e.g. apex delegation, as mentioned 230 above) for HTTP, where SRV [SRV] has not been widely adopted 232 * Provide an HSTS-like indication [HSTS] signaling that the "https" 233 scheme should be used instead of "http" for this request (see 234 Section 9.5). 236 1.2. Overview of the SVCB RR 238 This subsection briefly describes the SVCB RR in a non-normative 239 manner. (As mentioned above, this all applies equally to the HTTPS 240 RR which shares the same encoding, format, and high-level semantics.) 241 The SVCB RR has two modes: AliasMode, which aliases a name to another 242 name, and ServiceMode, which provides connection information bound to 243 a service endpoint domain. Placing both forms in a single RR type 244 allows clients to fetch the relevant information with a single query. 246 The SVCB RR has two required fields and one optional. The fields 247 are: 249 1. SvcPriority: The priority of this record (relative to others, 250 with lower values preferred). A value of 0 indicates AliasMode. 251 (Described in Section 2.4.1.) 253 2. TargetName: The domain name of either the alias target (for 254 AliasMode) or the alternative endpoint (for ServiceMode). 256 3. SvcParams (optional): A list of key=value pairs describing the 257 alternative endpoint at TargetName (only used in ServiceMode and 258 otherwise ignored). Described in Section 2.1. 260 Cooperating DNS recursive resolvers will perform subsequent record 261 resolution (for SVCB, A, and AAAA records) and return them in the 262 Additional Section of the response. Clients either use responses 263 included in the additional section returned by the recursive resolver 264 or perform necessary SVCB, A, and AAAA record resolutions. DNS 265 authoritative servers can attach in-bailiwick SVCB, A, AAAA, and 266 CNAME records in the Additional Section to responses for a SVCB 267 query. 269 In ServiceMode, the SvcParams of the SVCB RR provide an extensible 270 data model for describing alternative endpoints that are 271 authoritative for the origin, along with parameters associated with 272 each of these alternative endpoints. 274 For HTTP use-cases, the HTTPS RR enables many of the benefits of Alt- 275 Svc [AltSvc] without waiting for a full HTTP connection initiation 276 (multiple roundtrips) before learning of the preferred alternative, 277 and without necessarily revealing the user's intended destination to 278 all entities along the network path. 280 1.3. Parameter for Encrypted ClientHello 282 This document also defines a parameter for Encrypted ClientHello 283 [ECH] keys. See Section 10. 285 1.4. Terminology 287 Our terminology is based on the common case where the SVCB record is 288 used to access a resource identified by a URI whose authority field 289 contains a DNS hostname as the host. 291 * The "service" is the information source identified by the 292 authority and scheme of the URI, capable of providing access to 293 the resource. For "https" URIs, the "service" corresponds to an 294 "origin" [RFC6454]. 296 * The "service name" is the host portion of the authority. 298 * The "authority endpoint" is the authority's hostname and a port 299 number implied by the scheme or specified in the URI. 301 * An "alternative endpoint" is a hostname, port number, and other 302 associated instructions to the client on how to reach an instance 303 of service. 305 Additional DNS terminology intends to be consistent with [DNSTerm]. 307 SVCB is a contraction of "service binding". The SVCB RR, HTTPS RR, 308 and future RR types that share SVCB's formats and registry are 309 collectively known as SVCB-compatible RR types. The contraction 310 "SVCB" is also used to refer to this system as a whole. 312 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 313 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 314 "OPTIONAL" in this document are to be interpreted as described in BCP 315 14 [RFC2119] [RFC8174] when, and only when, they appear in all 316 capitals, as shown here. 318 2. The SVCB record type 320 The SVCB DNS resource record (RR) type (RR type 64) is used to locate 321 alternative endpoints for a service. 323 The algorithm for resolving SVCB records and associated address 324 records is specified in Section 3. 326 Other SVCB-compatible resource record types can also be defined as- 327 needed (see Section 6). In particular, the HTTPS RR (RR type 65) 328 provides special handling for the case of "https" origins as 329 described in Section 9. 331 SVCB RRs are extensible by a list of SvcParams, which are pairs 332 consisting of a SvcParamKey and a SvcParamValue. Each SvcParamKey 333 has a presentation name and a registered number. Values are in a 334 format specific to the SvcParamKey. Their definition should specify 335 both their presentation format and wire encoding (e.g., domain names, 336 binary data, or numeric values). The initial SvcParamKeys and 337 formats are defined in Section 7. 339 2.1. Zone file presentation format 341 The presentation format of the record is: 343 Name TTL IN SVCB SvcPriority TargetName SvcParams 345 The SVCB record is defined specifically within the Internet ("IN") 346 Class ([RFC1035]). 348 SvcPriority is a number in the range 0-65535, TargetName is a 349 ([RFC1035], Section 5.1), and the SvcParams are a 350 whitespace-separated list, with each SvcParam consisting of a 351 SvcParamKey=SvcParamValue pair or a standalone SvcParamKey. 352 SvcParamKeys are subject to IANA control (Section 15.3). 354 Each SvcParamKey SHALL appear at most once in the SvcParams. In 355 presentation format, SvcParamKeys are lower-case alphanumeric 356 strings. Key names should contain 1-63 characters from the ranges 357 "a"-"z", "0"-"9", and "-". In ABNF [RFC5234], 359 alpha-lc = %x61-7A ; a-z 360 SvcParamKey = 1*63(alpha-lc / DIGIT / "-") 361 SvcParam = SvcParamKey ["=" SvcParamValue] 362 SvcParamValue = char-string 363 value = *OCTET 365 The SvcParamValue is parsed using the character-string decoding 366 algorithm (Appendix A), producing a value. The value is then 367 validated and converted into wire-format in a manner specific to each 368 key. 370 When the "=" is omitted, the value is interpreted as empty. 372 Arbitrary keys can be represented using the unknown-key presentation 373 format "keyNNNNN" where NNNNN is the numeric value of the key type 374 without leading zeros. A SvcParam in this form SHALL be parsed as 375 specified above, and the decoded value SHALL be used as its wire 376 format encoding. 378 For some SvcParamKeys, the value corresponds to a list or set of 379 items. Presentation formats for such keys SHOULD use a comma- 380 separated list (Appendix A.1). 382 SvcParams in presentation format MAY appear in any order, but keys 383 MUST NOT be repeated. 385 2.2. RDATA wire format 387 The RDATA for the SVCB RR consists of: 389 * a 2 octet field for SvcPriority as an integer in network byte 390 order. 392 * the uncompressed, fully-qualified TargetName, represented as a 393 sequence of length-prefixed labels as in Section 3.1 of [RFC1035]. 395 * the SvcParams, consuming the remainder of the record (so smaller 396 than 65535 octets and constrained by the RDATA and DNS message 397 sizes). 399 When the list of SvcParams is non-empty, it contains a series of 400 SvcParamKey=SvcParamValue pairs, represented as: 402 * a 2 octet field containing the SvcParamKey as an integer in 403 network byte order. (See Section 15.3.2 for the defined values.) 405 * a 2 octet field containing the length of the SvcParamValue as an 406 integer between 0 and 65535 in network byte order. 408 * an octet string of this length whose contents are the 409 SvcParamValue in a format determined by the SvcParamKey. 411 SvcParamKeys SHALL appear in increasing numeric order. 413 Clients MUST consider an RR malformed if: 415 * the end of the RDATA occurs within a SvcParam. 417 * SvcParamKeys are not in strictly increasing numeric order. 419 * the SvcParamValue for an SvcParamKey does not have the expected 420 format. 422 Note that the second condition implies that there are no duplicate 423 SvcParamKeys. 425 If any RRs are malformed, the client MUST reject the entire RRSet and 426 fall back to non-SVCB connection establishment. 428 2.3. SVCB query names 430 When querying the SVCB RR, a service is translated into a QNAME by 431 prepending the service name with a label indicating the scheme, 432 prefixed with an underscore, resulting in a domain name like 433 "_examplescheme.api.example.com.". This follows the Attrleaf naming 434 pattern [Attrleaf], so the scheme MUST be registered appropriately 435 with IANA (see Section 12). 437 Protocol mapping documents MAY specify additional underscore-prefixed 438 labels to be prepended. For schemes that specify a port 439 (Section 3.2.3 of [URI]), one reasonable possibility is to prepend 440 the indicated port number if a non-default port number is specified. 441 We term this behavior "Port Prefix Naming", and use it in the 442 examples throughout this document. 444 See Section 9.1 for the HTTPS RR behavior. 446 When a prior CNAME or SVCB record has aliased to a SVCB record, each 447 RR shall be returned under its own owner name. 449 Note that none of these forms alter the origin or authority for 450 validation purposes. For example, TLS clients MUST continue to 451 validate TLS certificates for the original service name. 453 As an example, the owner of example.com could publish this record: 455 _8443._foo.api.example.com. 7200 IN SVCB 0 svc4.example.net. 457 to indicate that "foo://api.example.com:8443" is aliased to 458 "svc4.example.net". The owner of example.net, in turn, could publish 459 this record: 461 svc4.example.net. 7200 IN SVCB 3 svc4.example.net. ( 462 alpn="bar" port="8004" ech="..." ) 464 to indicate that these services are served on port number 8004, which 465 supports the protocol "bar" and its associated transport in addition 466 to the default transport protocol for "foo://". 468 (Parentheses are used to ignore a line break in DNS zone file 469 presentation format ([RFC1035], Section 5.1).) 471 2.4. Interpretation 472 2.4.1. SvcPriority 474 When SvcPriority is 0 the SVCB record is in AliasMode 475 (Section 2.4.2). Otherwise, it is in ServiceMode (Section 2.4.3). 477 Within a SVCB RRSet, all RRs SHOULD have the same Mode. If an RRSet 478 contains a record in AliasMode, the recipient MUST ignore any 479 ServiceMode records in the set. 481 RRSets are explicitly unordered collections, so the SvcPriority field 482 is used to impose an ordering on SVCB RRs. SVCB RRs with a smaller 483 SvcPriority value SHOULD be given preference over RRs with a larger 484 SvcPriority value. 486 When receiving an RRSet containing multiple SVCB records with the 487 same SvcPriority value, clients SHOULD apply a random shuffle within 488 a priority level to the records before using them, to ensure uniform 489 load-balancing. 491 2.4.2. AliasMode 493 In AliasMode, the SVCB record aliases a service to a TargetName. 494 SVCB RRSets SHOULD only have a single resource record in AliasMode. 495 If multiple are present, clients or recursive resolvers SHOULD pick 496 one at random. 498 The primary purpose of AliasMode is to allow aliasing at the zone 499 apex, where CNAME is not allowed. In AliasMode, the TargetName will 500 be the name of a domain that resolves to SVCB, AAAA, and/or A 501 records. (See Section 6 for aliasing of SVCB-compatible RR types.) 502 The TargetName SHOULD NOT be equal to the owner name, as this would 503 result in a loop. 505 In AliasMode, records SHOULD NOT include any SvcParams, and 506 recipients MUST ignore any SvcParams that are present. 508 For example, the operator of foo://example.com:8080 could point 509 requests to a service operating at foosvc.example.net by publishing: 511 _8080._foo.example.com. 3600 IN SVCB 0 foosvc.example.net. 513 Using AliasMode maintains a separation of concerns: the owner of 514 foosvc.example.net can add or remove ServiceMode SVCB records without 515 requiring a corresponding change to example.com. Note that if 516 foosvc.example.net promises to always publish a SVCB record, this 517 AliasMode record can be replaced by a CNAME, which would likely 518 improve performance. 520 AliasMode is especially useful for SVCB-compatible RR types that do 521 not require an underscore prefix, such as the HTTPS RR type. For 522 example, the operator of https://example.com could point requests to 523 a server at svc.example.net by publishing this record at the zone 524 apex: 526 example.com. 3600 IN HTTPS 0 svc.example.net. 528 Note that the SVCB record's owner name MAY be the canonical name of a 529 CNAME record, and the TargetName MAY be the owner of a CNAME record. 530 Clients and recursive resolvers MUST follow CNAMEs as normal. 532 To avoid unbounded alias chains, clients and recursive resolvers MUST 533 impose a limit on the total number of SVCB aliases they will follow 534 for each resolution request. This limit MUST NOT be zero, i.e. 535 implementations MUST be able to follow at least one AliasMode record. 536 The exact value of this limit is left to implementations. 538 For compatibility and performance, zone owners SHOULD NOT configure 539 their zones to require following multiple AliasMode records. 541 As legacy clients will not know to use this record, service operators 542 will likely need to retain fallback AAAA and A records alongside this 543 SVCB record, although in a common case the target of the SVCB record 544 might offer better performance, and therefore would be preferable for 545 clients implementing this specification to use. 547 AliasMode records only apply to queries for the specific RR type. 548 For example, a SVCB record cannot alias to an HTTPS record, nor vice- 549 versa. 551 2.4.3. ServiceMode 553 In ServiceMode, the TargetName and SvcParams within each resource 554 record associate an alternative endpoint for the service with its 555 connection parameters. 557 Each protocol scheme that uses SVCB MUST define a protocol mapping 558 that explains how SvcParams are applied for connections of that 559 scheme. Unless specified otherwise by the protocol mapping, clients 560 MUST ignore any SvcParam that they do not recognize. 562 Some SvcParams impose requirements on other SvcParams in the RR. A 563 ServiceMode RR is called "self-consistent" if its SvcParams all 564 comply with each others' requirements. Zone-file implementations 565 SHOULD enforce self-consistency. Clients MUST reject any RR whose 566 recognized SvcParams are not self-consistent, and MAY reject the 567 entire RRSet. 569 2.5. Special handling of "." in TargetName 571 If TargetName has the value "." (represented in the wire format as a 572 zero-length label), special rules apply. 574 2.5.1. AliasMode 576 For AliasMode SVCB RRs, a TargetName of "." indicates that the 577 service is not available or does not exist. This indication is 578 advisory: clients encountering this indication MAY ignore it and 579 attempt to connect without the use of SVCB. 581 2.5.2. ServiceMode 583 For ServiceMode SVCB RRs, if TargetName has the value ".", then the 584 owner name of this record MUST be used as the effective TargetName. 586 For example, in the following example "svc2.example.net" is the 587 effective TargetName: 589 example.com. 7200 IN HTTPS 0 svc.example.net. 590 svc.example.net. 7200 IN CNAME svc2.example.net. 591 svc2.example.net. 7200 IN HTTPS 1 . port=8002 ech="..." 592 svc2.example.net. 300 IN A 192.0.2.2 593 svc2.example.net. 300 IN AAAA 2001:db8::2 595 3. Client behavior 597 "SVCB resolution" is the process of enumerating the priority-ordered 598 endpoints for a service, as performed by the client. SVCB resolution 599 is implemented as follows: 601 1. Let $QNAME be the service name plus appropriate prefixes for the 602 scheme (see Section 2.3). 604 2. Issue a SVCB query for $QNAME. 606 3. If an AliasMode SVCB record is returned for $QNAME (after 607 following CNAMEs as normal), set $QNAME to its TargetName 608 (without additional prefixes) and loop back to step 2, subject to 609 chain length limits and loop detection heuristics (see 610 Section 3.1). 612 4. If one or more "compatible" (Section 8) ServiceMode records are 613 returned, these represent the alternative endpoints. 615 5. Otherwise, SVCB resolution has failed, and the list of known 616 endpoints is empty. 618 This procedure does not rely on any recursive or authoritative DNS 619 server to comply with this specification or have any awareness of 620 SVCB. 622 A client is called "SVCB-optional" if it can connect without the use 623 of ServiceMode records, and "SVCB-reliant" otherwise. Clients for 624 pre-existing protocols (e.g. HTTP) SHALL implement SVCB-optional 625 behavior (except as noted in Section 3.1 and Section 10.1). 627 SVCB-optional clients SHOULD issue in parallel any other DNS queries 628 that might be needed for connection establishment if the SVCB record 629 is absent, in order to minimize delay in that case and enable the 630 optimizations discussed in Section 5. 632 Once SVCB resolution has concluded, whether successful or not, SVCB- 633 optional clients SHALL append to the priority list an endpoint 634 consisting of the final value of $QNAME, the authority endpoint's 635 port number, and no SvcParams. (This endpoint will be attempted 636 before falling back to non-SVCB connection modes. This ensures that 637 SVCB-optional clients will make use of an AliasMode record whose 638 TargetName has A and/or AAAA records but no SVCB records.) 640 The client proceeds with connection establishment using the resolved 641 list of endpoints. Clients SHOULD try higher-priority alternatives 642 first, with fallback to lower-priority alternatives. Clients resolve 643 AAAA and/or A records for the selected TargetName, and MAY choose 644 between them using an approach such as Happy Eyeballs 645 [HappyEyeballsV2]. 647 If the client is SVCB-optional, and connecting using this list of 648 endpoints has failed, the client SHOULD attempt non-SVCB connection 649 modes. 651 Some important optimizations are discussed in Section 5 to avoid 652 additional latency in comparison to ordinary AAAA/A lookups. 654 3.1. Handling resolution failures 656 If DNS responses are cryptographically protected (e.g. using DNSSEC 657 or TLS [DoT][DoH]), and SVCB resolution fails due to an 658 authentication error, SERVFAIL response, transport error, or timeout, 659 the client SHOULD abandon the connection attempt even if the client 660 is SVCB-optional. Otherwise, an active attacker could mount a 661 downgrade attack by denying the user access to the SvcParams. 663 A SERVFAIL error can occur if the domain is DNSSEC-signed, the 664 recursive resolver is DNSSEC-validating, and the attacker is between 665 the recursive resolver and the authoritative DNS server. A transport 666 error or timeout can occur if an active attacker between the client 667 and the recursive resolver is selectively dropping SVCB queries or 668 responses, based on their size or other observable patterns. 670 If the client enforces DNSSEC validation on A/AAAA responses, it 671 SHOULD apply the same validation policy to SVCB. 673 If the client is unable to complete SVCB resolution due to its chain 674 length limit, the client SHOULD fall back to the authority endpoint, 675 as if the origin's SVCB record did not exist. 677 3.2. Clients using a Proxy 679 Clients using a domain-oriented transport proxy like HTTP CONNECT 680 ([RFC7231], Section 4.3.6) or SOCKS5 ([RFC1928]) have the option to 681 use named destinations, in which case the client does not perform any 682 A or AAAA queries for destination domains. If the client is using 683 named destinations with a proxy that does not provide SVCB query 684 capability (e.g. through an affiliated DNS resolver), the client 685 would have to perform SVCB resolution separately, likely disclosing 686 the destinations to additional parties. Clients that support such 687 proxies SHOULD arrange for a separate SVCB resolution procedure with 688 appropriate privacy properties, or disable SVCB resolution entirely 689 if SVCB-optional. 691 If the client does use SVCB and named destinations, the client SHOULD 692 follow the standard SVCB resolution process, selecting the smallest- 693 SvcPriority option that is compatible with the client and the proxy. 694 When connecting using a SVCB record, clients MUST provide the final 695 TargetName and port to the proxy, which will perform any required A 696 and AAAA lookups. 698 This arrangement has several benefits: 700 * Compared to disabling SVCB: 702 - It allows the client to use the SvcParams, if present, which 703 are only usable with a specific TargetName. The SvcParams may 704 include information that enhances performance (e.g. alpn) and 705 privacy (e.g. ech). 707 - It allows the service to delegate the apex domain. 709 * Compared to providing the proxy with an IP address: 711 - It allows the proxy to select between IPv4 and IPv6 addresses 712 for the server according to its configuration. 714 - It ensures that the proxy receives addresses based on its 715 network geolocation, not the client's. 717 - It enables faster fallback for TCP destinations with multiple 718 addresses of the same family. 720 4. DNS Server Behavior 722 4.1. Authoritative servers 724 When replying to a SVCB query, authoritative DNS servers SHOULD 725 return A, AAAA, and SVCB records in the Additional Section for any 726 TargetNames that are in the zone. If the zone is signed, the server 727 SHOULD also include positive or negative DNSSEC responses for these 728 records in the Additional section. 730 See Section 4.4 for exceptions. 732 4.2. Recursive resolvers 734 Whether or not the recursive resolver is aware of SVCB, the normal 735 response construction process (i.e. unknown RR type resolution under 736 [RFC3597]) generates the Answer section of the response. Recursive 737 resolvers that are aware of SVCB SHOULD help the client to execute 738 the procedure in Section 3 with minimum overall latency by 739 incorporating additional useful information into the Additional 740 section of the response as follows: 742 1. Incorporate the results of SVCB resolution. If the chain length 743 limit has been reached, terminate. 745 2. If any of the resolved SVCB records are in AliasMode, choose one 746 of them at random, and resolve SVCB, A, and AAAA records for its 747 TargetName. 749 * If any SVCB records are resolved, go to step 1. 751 * Otherwise, incorporate the results of A and AAAA resolution, 752 and terminate. 754 3. All the resolved SVCB records are in ServiceMode. Resolve A and 755 AAAA queries for each TargetName (or for the owner name if 756 TargetName is "."), incorporate all the results, and terminate. 758 In this procedure, "resolve" means the resolver's ordinary recursive 759 resolution procedure, as if processing a query for that RRSet. This 760 includes following any aliases that the resolver would ordinarily 761 follow (e.g. CNAME, DNAME [DNAME]). Errors or anomalies in 762 obtaining additional records MAY cause this process to terminate, but 763 MUST NOT themselves cause the resolver to send a failure response. 765 See Section 2.4.2 for additional safeguards for recursive resolvers 766 to implement to mitigate loops. 768 See Section 5.2 for possible optimizations of this procedure. 770 4.3. General requirements 772 Recursive resolvers MUST be able to convey SVCB records with 773 unrecognized SvcParamKeys, and MAY treat the entire SvcParams portion 774 of the record as opaque, even if the contents are invalid. 775 Alternatively, recursive resolvers MAY report an error such as 776 SERVFAIL to avoid returning a SvcParamValue that is invalid according 777 to the SvcParam's specification. For complex value types whose 778 interpretation might differ between implementations or have 779 additional future allowed values added (e.g. URIs or "alpn"), 780 resolvers SHOULD limit validation to specified constraints. 782 When responding to a query that includes the DNSSEC OK bit 783 ([RFC3225]), DNSSEC-capable recursive and authoritative DNS servers 784 MUST accompany each RRSet in the Additional section with the same 785 DNSSEC-related records that they would send when providing that RRSet 786 as an Answer (e.g. RRSIG, NSEC, NSEC3). 788 According to Section 5.4.1 of [RFC2181], "Unauthenticated RRs 789 received and cached from ... the additional data section ... should 790 not be cached in such a way that they would ever be returned as 791 answers to a received query. They may be returned as additional 792 information where appropriate.". Recursive resolvers therefore MAY 793 cache records from the Additional section for use in populating 794 Additional section responses, and MAY cache them for general use if 795 they are authenticated by DNSSEC. 797 4.4. EDNS Client Subnet (ECS) 799 The EDNS Client Subnet option (ECS, [RFC7871]) allows recursive 800 resolvers to request IP addresses that are suitable for a particular 801 client IP range. SVCB records may contain IP addresses (in ipv*hint 802 SvcParams), or direct users to a subnet-specific TargetName, so 803 recursive resolvers SHOULD include the same ECS option in SVCB 804 queries as in A/AAAA queries. 806 According to Section 7.3.1 of [RFC7871], "Any records from [the 807 Additional section] MUST NOT be tied to a network". Accordingly, 808 when processing a response whose QTYPE is SVCB-compatible, resolvers 809 SHOULD treat any records in the Additional section as having SOURCE 810 PREFIX-LENGTH zero and SCOPE PREFIX-LENGTH as specified in the ECS 811 option. Authoritative servers MUST omit such records if they are not 812 suitable for use by any stub resolvers that set SOURCE PREFIX-LENGTH 813 to zero. This will cause the resolver to perform a followup query 814 that can receive properly tailored ECS. (This is similar to the 815 usage of CNAME with ECS discussed in [RFC7871], Section 7.2.1.) 817 Authoritative servers that omit Additional records can avoid the 818 added latency of a followup query by following the advice in 819 Section 11.2. 821 5. Performance optimizations 823 For optimal performance (i.e. minimum connection setup time), clients 824 SHOULD implement a client-side DNS cache. Responses in the 825 Additional section of a SVCB response SHOULD be placed in cache 826 before performing any followup queries. With this behavior, and 827 conforming DNS servers, using SVCB does not add network latency to 828 connection setup. 830 To improve performance when using a non-conforming recursive 831 resolver, clients SHOULD issue speculative A and/or AAAA queries in 832 parallel with each SVCB query, based on a predicted value of 833 TargetName (see Section 11.2). 835 After a ServiceMode RRSet is received, clients MAY try more than one 836 option in parallel, and MAY prefetch A and AAAA records for multiple 837 TargetNames. 839 5.1. Optimistic pre-connection and connection reuse 841 If an address response arrives before the corresponding SVCB 842 response, the client MAY initiate a connection as if the SVCB query 843 returned NODATA, but MUST NOT transmit any information that could be 844 altered by the SVCB response until it arrives. For example, a TLS 845 ClientHello can be altered by the "ech" value of a SVCB response 846 (Section 7.3). Clients implementing this optimization SHOULD wait 847 for 50 milliseconds before starting optimistic pre-connection, as per 848 the guidance in [HappyEyeballsV2]. 850 A SVCB record is consistent with a connection if the client would 851 attempt an equivalent connection when making use of that record. If 852 a SVCB record is consistent with an active or in-progress connection 853 C, the client MAY prefer that record and use C as its connection. 854 For example, suppose the client receives this SVCB RRSet for a 855 protocol that uses TLS over TCP: 857 _1234._bar.example.com. 300 IN SVCB 1 svc1.example.net. ( 858 ech="111..." ipv6hint=2001:db8::1 port=1234 ) 859 SVCB 2 svc2.example.net. ( 860 ech="222..." ipv6hint=2001:db8::2 port=1234 ) 862 If the client has an in-progress TCP connection to 863 [2001:db8::2]:1234, it MAY proceed with TLS on that connection using 864 ech="222...", even though the other record in the RRSet has higher 865 priority. 867 If none of the SVCB records are consistent with any active or in- 868 progress connection, clients proceed with connection establishment as 869 described in Section 3. 871 5.2. Generating and using incomplete responses 873 When following the procedure in Section 4.2, recursive resolvers MAY 874 terminate the procedure early and produce a reply that omits some of 875 the associated RRSets. This is REQUIRED when the chain length limit 876 is reached (Section 4.2 step 1), but might also be appropriate when 877 the maximum response size is reached, or when responding before fully 878 chasing dependencies would improve performance. When omitting 879 certain RRSets, recursive resolvers SHOULD prioritize information for 880 smaller-SvcPriority records. 882 As discussed in Section 3, clients MUST be able to fetch additional 883 information that is required to use a SVCB record, if it is not 884 included in the initial response. As a performance optimization, if 885 some of the SVCB records in the response can be used without 886 requiring additional DNS queries, the client MAY prefer those 887 records, regardless of their priorities. 889 6. SVCB-compatible 891 An RR type is called "SVCB-compatible" if it permits an 892 implementation that is identical to SVCB in its: 894 * RDATA presentation format 896 * RDATA wire format 897 * IANA registry used for SvcParamKeys 899 * Authoritative server Additional Section processing 901 * Recursive resolution process 903 * Relevant Class (i.e. Internet ("IN") [RFC1035]) 905 This allows authoritative and recursive DNS servers to apply 906 identical processing to all SVCB-compatible RR types. 908 All other behaviors described as applying to the SVCB RR also apply 909 to all SVCB-compatible RR types unless explicitly stated otherwise. 910 When following an AliasMode record (Section 2.4.2) of RR type $T , 911 the followup query to the TargetName MUST also be for type $T. 913 This document defines one SVCB-compatible RR type (other than SVCB 914 itself): the HTTPS RR type (Section 9), which avoids Attrleaf label 915 prefixes [Attrleaf] in order to improve compatibility with wildcards 916 and CNAMEs, which are widely used with HTTP. 918 Standards authors should consider carefully whether to use SVCB or 919 define a new SVCB-compatible RR type, as this choice cannot easily be 920 reversed after deployment. 922 7. Initial SvcParamKeys 924 A few initial SvcParamKeys are defined here. These keys are useful 925 for the "https" scheme, and most are applicable to other schemes as 926 well. 928 Each new protocol mapping document MUST specify which keys are 929 applicable and safe to use. Protocol mappings MAY alter the 930 interpretation of SvcParamKeys but MUST NOT alter their presentation 931 or wire formats. 933 7.1. "alpn" and "no-default-alpn" 935 The "alpn" and "no-default-alpn" SvcParamKeys together indicate the 936 set of Application Layer Protocol Negotiation (ALPN) protocol 937 identifiers [ALPN] and associated transport protocols supported by 938 this service endpoint (the "SVCB ALPN set"). 940 As with Alt-Svc [AltSvc], each ALPN protocol identifier is used to 941 identify the application protocol and associated suite of protocols 942 supported by the endpoint (the "protocol suite"). The presence of an 943 ALPN protocol identifier in the SVCB ALPN set indicates that this 944 service endpoint, described by TargetName and the other parameters 945 (e.g. "port") offers service with the protocol suite associated with 946 this ALPN identifier. 948 Clients filter the set of ALPN identifiers to match the protocol 949 suites they support, and this informs the underlying transport 950 protocol used (such as QUIC-over-UDP or TLS-over-TCP). ALPN protocol 951 identifiers that do not uniquely identify a protocol suite (e.g. an 952 Identification Sequence that can be used with both TLS and DTLS) are 953 not compatible with this SvcParamKey and MUST NOT be included in the 954 SVCB ALPN set. 956 7.1.1. Representation 958 ALPNs are identified by their registered "Identification Sequence" 959 (alpn-id), which is a sequence of 1-255 octets. 961 alpn-id = 1*255OCTET 963 For "alpn", the presentation value SHALL be a comma-separated list 964 (Appendix A.1) of one or more alpn-ids. Zone file implementations 965 MAY disallow the "," and "\" characters instead of implementing the 966 value-list escaping procedure, relying on the opaque key format (e.g. 967 key1=\002h2) in the event that these characters are needed. 969 The wire format value for "alpn" consists of at least one alpn-id 970 prefixed by its length as a single octet, and these length-value 971 pairs are concatenated to form the SvcParamValue. These pairs MUST 972 exactly fill the SvcParamValue; otherwise, the SvcParamValue is 973 malformed. 975 For "no-default-alpn", the presentation and wire format values MUST 976 be empty. When "no-default-alpn" is specified in an RR, "alpn" must 977 also be specified in order for the RR to be "self-consistent" 978 (Section 2.4.3). 980 Each scheme that uses this SvcParamKey defines a "default set" of 981 ALPNs that are supported by nearly all clients and servers, which MAY 982 be empty. To determine the SVCB ALPN set, the client starts with the 983 list of alpn-ids from the "alpn" SvcParamKey, and adds the default 984 set unless the "no-default-alpn" SvcParamKey is present. 986 7.1.2. Use 988 To establish a connection to the endpoint, clients MUST 990 1. Let SVCB-ALPN-Intersection be the set of protocols in the SVCB 991 ALPN set that the client supports. 993 2. Let Intersection-Transports be the set of transports (e.g. TLS, 994 DTLS, QUIC) implied by the protocols in SVCB-ALPN-Intersection. 996 3. For each transport in Intersection-Transports, construct a 997 ProtocolNameList containing the Identification Sequences of all 998 the client's supported ALPN protocols for that transport, without 999 regard to the SVCB ALPN set. 1001 For example, if the SVCB ALPN set is ["http/1.1", "h3"], and the 1002 client supports HTTP/1.1, HTTP/2, and HTTP/3, the client could 1003 attempt to connect using TLS over TCP with a ProtocolNameList of 1004 ["http/1.1", "h2"], and could also attempt a connection using QUIC, 1005 with a ProtocolNameList of ["h3"]. 1007 Once the client has constructed a ClientHello, protocol negotiation 1008 in that handshake proceeds as specified in [ALPN], without regard to 1009 the SVCB ALPN set. 1011 Clients MAY implement a fallback procedure, using a less-preferred 1012 transport if more-preferred transports fail to connect. This 1013 fallback behavior is vulnerable to manipulation by a network attacker 1014 who blocks the more-preferred transports, but it may be necessary for 1015 compatibility with existing networks. 1017 With this procedure in place, an attacker who can modify DNS and 1018 network traffic can prevent a successful transport connection, but 1019 cannot otherwise interfere with ALPN protocol selection. This 1020 procedure also ensures that each ProtocolNameList includes at least 1021 one protocol from the SVCB ALPN set. 1023 Clients SHOULD NOT attempt connection to a service endpoint whose 1024 SVCB ALPN set does not contain any supported protocols. To ensure 1025 consistency of behavior, clients MAY reject the entire SVCB RRSet and 1026 fall back to basic connection establishment if all of the RRs 1027 indicate "no-default-alpn", even if connection could have succeeded 1028 using a non-default alpn. 1030 For compatibility with clients that require default transports, zone 1031 operators SHOULD ensure that at least one RR in each RRSet supports 1032 the default transports. 1034 7.2. "port" 1036 The "port" SvcParamKey defines the TCP or UDP port that should be 1037 used to reach this alternative endpoint. If this key is not present, 1038 clients SHALL use the authority endpoint's port number. 1040 The presentation value of the SvcParamValue is a single decimal 1041 integer between 0 and 65535 in ASCII. Any other value (e.g. an empty 1042 value) is a syntax error. To enable simpler parsing, this SvcParam 1043 MUST NOT contain escape sequences. 1045 The wire format of the SvcParamValue is the corresponding 2 octet 1046 numeric value in network byte order. 1048 If a port-restricting firewall is in place between some client and 1049 the service endpoint, changing the port number might cause that 1050 client to lose access to the service, so operators should exercise 1051 caution when using this SvcParamKey to specify a non-default port. 1053 7.3. "ech" 1055 The SvcParamKey to enable Encrypted ClientHello (ECH) is "ech". Its 1056 value is defined in Section 10. It is applicable to most TLS-based 1057 protocols. 1059 When publishing a record containing an "ech" parameter, the publisher 1060 MUST ensure that all IP addresses of TargetName correspond to servers 1061 that have access to the corresponding private key or are 1062 authoritative for the public name. (See Section 7.2.2 of [ECH] for 1063 more details about the public name.) This yields an anonymity set of 1064 cardinality equal to the number of ECH-enabled server domains 1065 supported by a given client-facing server. Thus, even with an 1066 encrypted ClientHello, an attacker who can enumerate the set of ECH- 1067 enabled domains supported by a client-facing server can guess the 1068 correct SNI with probability at least 1/K, where K is the size of 1069 this ECH-enabled server anonymity set. This probability may be 1070 increased via traffic analysis or other mechanisms. 1072 7.4. "ipv4hint" and "ipv6hint" 1074 The "ipv4hint" and "ipv6hint" keys convey IP addresses that clients 1075 MAY use to reach the service. If A and AAAA records for TargetName 1076 are locally available, the client SHOULD ignore these hints. 1077 Otherwise, clients SHOULD perform A and/or AAAA queries for 1078 TargetName as in Section 3, and clients SHOULD use the IP address in 1079 those responses for future connections. Clients MAY opt to terminate 1080 any connections using the addresses in hints and instead switch to 1081 the addresses in response to the TargetName query. Failure to use A 1082 and/or AAAA response addresses could negatively impact load balancing 1083 or other geo-aware features and thereby degrade client performance. 1085 The presentation value SHALL be a comma-separated list (Appendix A.1) 1086 of one or more IP addresses of the appropriate family in standard 1087 textual format [RFC5952]. To enable simpler parsing, this 1088 SvcParamValue MUST NOT contain escape sequences. 1090 The wire format for each parameter is a sequence of IP addresses in 1091 network byte order. Like an A or AAAA RRSet, the list of addresses 1092 represents an unordered collection, and clients SHOULD pick addresses 1093 to use in a random order. An empty list of addresses is invalid. 1095 When selecting between IPv4 and IPv6 addresses to use, clients may 1096 use an approach such as Happy Eyeballs [HappyEyeballsV2]. When only 1097 "ipv4hint" is present, IPv6-only clients may synthesize IPv6 1098 addresses as specified in [RFC7050] or ignore the "ipv4hint" key and 1099 wait for AAAA resolution (Section 3). Recursive resolvers MUST NOT 1100 perform DNS64 ([RFC6147]) on parameters within a SVCB record. For 1101 best performance, server operators SHOULD include an "ipv6hint" 1102 parameter whenever they include an "ipv4hint" parameter. 1104 These parameters are intended to minimize additional connection 1105 latency when a recursive resolver is not compliant with the 1106 requirements in Section 4, and SHOULD NOT be included if most clients 1107 are using compliant recursive resolvers. When TargetName is the 1108 origin hostname or the owner name (which can be written as "."), 1109 server operators SHOULD NOT include these hints, because they are 1110 unlikely to convey any performance benefit. 1112 7.5. "mandatory" 1114 See Section 8. 1116 8. ServiceMode RR compatibility and mandatory keys 1118 In a ServiceMode RR, a SvcParamKey is considered "mandatory" if the 1119 RR will not function correctly for clients that ignore this 1120 SvcParamKey. Each SVCB protocol mapping SHOULD specify a set of keys 1121 that are "automatically mandatory", i.e. mandatory if they are 1122 present in an RR. The SvcParamKey "mandatory" is used to indicate 1123 any mandatory keys for this RR, in addition to any automatically 1124 mandatory keys that are present. 1126 A ServiceMode RR is considered "compatible" with a client if the 1127 client recognizes all the mandatory keys, and their values indicate 1128 that successful connection establishment is possible. If the SVCB 1129 RRSet contains no compatible RRs, the client will generally act as if 1130 the RRSet is empty. 1132 The presentation value SHALL be a comma-separated list (Appendix A.1) 1133 of one or more valid SvcParamKeys, either by their registered name or 1134 in the unknown-key format (Section 2.1). Keys MAY appear in any 1135 order, but MUST NOT appear more than once. For self-consistency 1136 (Section 2.4.3), listed keys MUST also appear in the SvcParams. 1138 To enable simpler parsing, this SvcParamValue MUST NOT contain escape 1139 sequences. 1141 For example, the following is a valid list of SvcParams: 1143 ech=... key65333=ex1 key65444=ex2 mandatory=key65444,ech 1145 In wire format, the keys are represented by their numeric values in 1146 network byte order, concatenated in ascending order. 1148 This SvcParamKey is always automatically mandatory, and MUST NOT 1149 appear in its own value-list. Other automatically mandatory keys 1150 SHOULD NOT appear in the list either. (Including them wastes space 1151 and otherwise has no effect.) 1153 9. Using Service Bindings with HTTP 1155 Use of any protocol with SVCB requires a protocol-specific mapping 1156 specification. This section specifies the mapping for the "http" and 1157 "https" URI schemes [I-D.draft-ietf-httpbis-semantics]. 1159 To enable special handling for HTTP use-cases, the HTTPS RR type is 1160 defined as a SVCB-compatible RR type, specific to the "https" and 1161 "http" schemes. Clients MUST NOT perform SVCB queries or accept SVCB 1162 responses for "https" or "http" schemes. 1164 The presentation format of the record is: 1166 Name TTL IN HTTPS SvcPriority TargetName SvcParams 1167 All the SvcParamKeys defined in Section 7 are permitted for use in 1168 HTTPS RRs. The default set of ALPN IDs is the single value 1169 "http/1.1". The "automatically mandatory" keys (Section 8) are 1170 "port" and "no-default-alpn". (As described in Section 8, clients 1171 must either implement these keys or ignore any RR in which they 1172 appear.) Clients that restrict the destination port in "https" URIs 1173 (e.g. using the "bad ports" list from [FETCH]) SHOULD apply the same 1174 restriction to the "port" SvcParam. 1176 The presence of an HTTPS RR for an origin also indicates that clients 1177 should connect securely and use the "https" scheme, as discussed in 1178 Section 9.5. This allows HTTPS RRs to apply to pre-existing "http" 1179 scheme URLs, while ensuring that the client uses a secure and 1180 authenticated connection. 1182 The HTTPS RR parallels the concepts introduced in the HTTP 1183 Alternative Services proposed standard [AltSvc]. Clients and servers 1184 that implement HTTPS RRs are not required to implement Alt-Svc. 1186 9.1. Query names for HTTPS RRs 1188 The HTTPS RR uses Port Prefix Naming (Section 2.3), with one 1189 modification: if the scheme is "https" and the port is 443, then the 1190 client's original QNAME is equal to the service name (i.e. the 1191 origin's hostname), without any prefix labels. 1193 By removing the Attrleaf labels [Attrleaf] used in SVCB, this 1194 construction enables offline DNSSEC signing of wildcard domains, 1195 which are commonly used with HTTP. Using the service name as the 1196 owner name of the HTTPS record, without prefixes, also allows the 1197 targets of existing CNAME chains (e.g. CDN hosts) to start returning 1198 HTTPS RR responses without requiring origin domains to configure and 1199 maintain an additional delegation. 1201 Following of HTTPS AliasMode RRs and CNAME aliases is unchanged from 1202 SVCB. 1204 Clients always convert "http" URLs to "https" before performing an 1205 HTTPS RR query using the process described in Section 9.5, so domain 1206 owners MUST NOT publish HTTPS RRs with a prefix of "_http". 1208 Note that none of these forms alter the HTTPS origin or authority. 1209 For example, clients MUST continue to validate TLS certificate 1210 hostnames based on the origin. 1212 9.2. Comparison with Alt-Svc 1214 Publishing a ServiceMode HTTPS RR in DNS is intended to be similar to 1215 transmitting an Alt-Svc field value over HTTP, and receiving an HTTPS 1216 RR is intended to be similar to receiving that field value over HTTP. 1217 However, there are some differences in the intended client and server 1218 behavior. 1220 9.2.1. ALPN usage 1222 Unlike Alt-Svc Field Values, HTTPS RRs can contain multiple ALPN IDs. 1223 The meaning and use of these IDs is discussed in Section 7.1.2. 1225 9.2.2. Untrusted channel 1227 HTTPS records do not require or provide any assurance of 1228 authenticity. (DNSSEC signing and verification, which would provide 1229 such assurance, are OPTIONAL.) The DNS resolution process is modeled 1230 as an untrusted channel that might be controlled by an attacker, so 1231 Alt-Svc parameters that cannot be safely received in this model MUST 1232 NOT have a corresponding defined SvcParamKey. For example, there is 1233 no SvcParamKey corresponding to the Alt-Svc "persist" parameter, 1234 because this parameter is not safe to accept over an untrusted 1235 channel. 1237 9.2.3. Cache lifetime 1239 There is no SvcParamKey corresponding to the Alt-Svc "ma" (max age) 1240 parameter. Instead, server operators encode the expiration time in 1241 the DNS TTL. 1243 The appropriate TTL value might be different from the "ma" value used 1244 for Alt-Svc, depending on the desired efficiency and agility. Some 1245 DNS caches incorrectly extend the lifetime of DNS records beyond the 1246 stated TTL, so server operators cannot rely on HTTPS RRs expiring on 1247 time. Shortening the TTL to compensate for incorrect caching is NOT 1248 RECOMMENDED, as this practice impairs the performance of correctly 1249 functioning caches and does not guarantee faster expiration from 1250 incorrect caches. Instead, server operators SHOULD maintain 1251 compatibility with expired records until they observe that nearly all 1252 connections have migrated to the new configuration. 1254 9.2.4. Granularity 1256 Sending Alt-Svc over HTTP allows the server to tailor the Alt-Svc 1257 Field Value specifically to the client. When using an HTTPS RR, 1258 groups of clients will necessarily receive the same SvcParams. 1259 Therefore, HTTPS RRs are not suitable for uses that require single- 1260 client granularity. 1262 9.3. Interaction with Alt-Svc 1264 Clients that implement support for both Alt-Svc and HTTPS records 1265 SHOULD retrieve any HTTPS records for the Alt-Svc alt-authority, and 1266 ensure that their connection attempts are consistent with both the 1267 Alt-Svc parameters and any received HTTPS SvcParams. If present, the 1268 HTTPS record's TargetName and port are used for connection 1269 establishment (as in Section 3). For example, suppose that 1270 "https://example.com" sends an Alt-Svc field value of: 1272 Alt-Svc: h2="alt.example:443", h2="alt2.example:443", h3=":8443" 1274 The client would retrieve the following HTTPS records: 1276 alt.example. IN HTTPS 1 . alpn=h2,h3 ech=... 1277 alt2.example. IN HTTPS 1 alt2b.example. alpn=h3 ech=... 1278 _8443._https.example.com. IN HTTPS 1 alt3.example. ( 1279 port=9443 alpn=h2,h3 ech=... ) 1281 Based on these inputs, the following connection attempts would always 1282 be allowed: 1284 * HTTP/2 to alt.example:443 1286 * HTTP/3 to alt3.example:9443 1288 * Fallback to the the client's non-Alt-Svc connection behavior 1290 ECH-capable clients would use ECH when establishing any of these 1291 connections. 1293 The following connection attempts would not be allowed: 1295 * HTTP/3 to alt.example:443 (not consistent with Alt-Svc) 1297 * Any connection to alt2b.example (no ALPN consistent with both the 1298 HTTPS record and Alt-Svc) 1300 * HTTPS over TCP to any port on alt3.example (not consistent with 1301 Alt-Svc) 1303 The following Alt-Svc-only connection attempts would be allowed only 1304 if the client does not support ECH, as they rely on SVCB-optional 1305 fallback behavior that the client will disable if it implements 1306 support for ECH and the "ech" SvcParam is present (Section 10.1): 1308 * HTTP/2 to alt2.example:443 1310 * HTTP/3 to example.com:8443 1312 Origins that publish an "ech" SvcParam in their HTTPS record SHOULD 1313 also publish an "ech" SvcParam for any alt-authorities. Otherwise, 1314 clients might reveal the name of the server in an unencrypted 1315 ClientHello. Similar consistency considerations could apply to 1316 future SvcParamKeys, so alt-authorities SHOULD carry the same 1317 SvcParams as the origin unless a deviation is specifically known to 1318 be safe. 1320 As noted in Section 2.4 of [AltSvc], clients MAY disallow any Alt-Svc 1321 connection according to their own criteria, e.g. disallowing Alt-Svc 1322 connections that lack ECH support when there is an active ECH- 1323 protected connection for this origin. 1325 9.4. Requiring Server Name Indication 1327 Clients MUST NOT use an HTTPS RR response unless the client supports 1328 TLS Server Name Indication (SNI) and indicates the origin name when 1329 negotiating TLS. This supports the conservation of IP addresses. 1331 Note that the TLS SNI (and also the HTTP "Host" or ":authority") will 1332 indicate the origin, not the TargetName. 1334 9.5. HTTP Strict Transport Security 1336 An HTTPS RR directs the client to communicate with this host only 1337 over a secure transport, similar to HTTP Strict Transport Security 1338 [HSTS]. Prior to making an "http" scheme request, the client SHOULD 1339 perform a lookup to determine if any HTTPS RRs exist for that origin. 1340 To do so, the client SHOULD construct a corresponding "https" URL as 1341 follows: 1343 1. Replace the "http" scheme with "https". 1345 2. If the "http" URL explicitly specifies port 80, specify port 443. 1347 3. Do not alter any other aspect of the URL. 1349 This construction is equivalent to Section 8.3 of [HSTS], point 5. 1351 If an HTTPS RR query for this "https" URL returns any AliasMode HTTPS 1352 RRs, or any compatible ServiceMode HTTPS RRs (see Section 8), the 1353 client SHOULD behave as if it has received an HTTP 307 (Temporary 1354 Redirect) status code with this "https" URL in the "Location" field. 1355 (Receipt of an incompatible ServiceMode RR does not trigger the 1356 redirect behavior.) Because HTTPS RRs are received over an often 1357 insecure channel (DNS), clients MUST NOT place any more trust in this 1358 signal than if they had received a 307 redirect over cleartext HTTP. 1359 If this redirection would result in a loss of functionality (e.g. 1360 important resources that are only available on the "http" origin), 1361 the operator MUST NOT publish an HTTPS RR. 1363 When an "https" connection fails due to an error in the underlying 1364 secure transport, such as an error in certificate validation, some 1365 clients currently offer a "user recourse" that allows the user to 1366 bypass the security error and connect anyway. When making an "https" 1367 scheme request to an origin with an HTTPS RR, either directly or via 1368 the above redirect, such a client MAY remove the user recourse 1369 option. Origins that publish HTTPS RRs therefore MUST NOT rely on 1370 user recourse for access. For more information, see Section 8.4 and 1371 Section 12.1 of [HSTS]. 1373 9.6. Use of HTTPS RRs in other protocols 1375 All protocols employing "http://" or "https://" URLs SHOULD respect 1376 HTTPS RRs. For example, clients that support HTTPS RRs and implement 1377 the altered WebSocket [WebSocket] opening handshake from the W3C 1378 Fetch specification [FETCH] SHOULD use HTTPS RRs for the requestURL. 1380 Such protocols MAY define their own SVCB mappings, which MAY be 1381 defined to take precedence over HTTPS RRs. 1383 10. SVCB/HTTPS RR parameter for ECH configuration 1385 The SVCB "ech" parameter is defined for conveying the ECH 1386 configuration of an alternative endpoint. In wire format, the value 1387 of the parameter is an ECHConfigList [ECH], including the redundant 1388 length prefix. In presentation format, the value is a single 1389 ECHConfigList encoded in Base64 [base64]. Base64 is used here to 1390 simplify integration with TLS server software. To enable simpler 1391 parsing, this SvcParam MUST NOT contain escape sequences. 1393 When ECH is in use, the TLS ClientHello is divided into an 1394 unencrypted "outer" and an encrypted "inner" ClientHello. The outer 1395 ClientHello is an implementation detail of ECH, and its contents are 1396 controlled by the ECHConfig in accordance with [ECH]. The inner 1397 ClientHello is used for establishing a connection to the service, so 1398 its contents may be influenced by other SVCB parameters. For 1399 example, the requirements on the ProtocolNameList in Section 7.1 1400 apply only to the inner ClientHello. Similarly, it is the inner 1401 ClientHello whose Server Name Indication identifies the desired 1402 service. 1404 10.1. Client behavior 1406 The SVCB-optional client behavior specified in Section 3 permits 1407 clients to fall back to a direct connection if all SVCB options fail. 1408 This behavior is not suitable for ECH, because fallback would negate 1409 the privacy benefits of ECH. Accordingly, ECH-capable SVCB-optional 1410 clients MUST switch to SVCB-reliant connection establishment if SVCB 1411 resolution succeeded (following Section 3) and all alternative 1412 endpoints have an "ech" key. 1414 As a latency optimization, clients MAY prefetch DNS records that will 1415 only be used in SVCB-optional mode. 1417 10.2. Deployment considerations 1419 An HTTPS RRSet containing some RRs with "ech" and some without is 1420 vulnerable to a downgrade attack. This configuration is NOT 1421 RECOMMENDED. Zone owners who do use such a mixed configuration 1422 SHOULD mark the RRs with "ech" as more preferred (i.e. smaller 1423 SvcPriority) than those without, in order to maximize the likelihood 1424 that ECH will be used in the absence of an active adversary. 1426 11. Zone Structures 1428 11.1. Structuring zones for flexibility 1430 Each ServiceMode RRSet can only serve a single scheme. The scheme is 1431 indicated by the owner name and the RR type. For the generic SVCB RR 1432 type, this means that each owner name can only be used for a single 1433 scheme. The underscore prefixing requirement (Section 2.3) ensures 1434 that this is true for the initial query, but it is the responsibility 1435 of zone owners to choose names that satisfy this constraint when 1436 using aliases, including CNAME and AliasMode records. 1438 When using the generic SVCB RR type with aliasing, zone owners SHOULD 1439 choose alias target names that indicate the scheme in use (e.g. 1440 foosvc.example.net for foo:// schemes). This will help to avoid 1441 confusion when another scheme needs to be added to the configuration. 1443 11.2. Structuring zones for performance 1445 To avoid a delay for clients using a nonconforming recursive 1446 resolver, domain owners SHOULD minimize the use of AliasMode records, 1447 and SHOULD choose TargetName according to a predictable convention 1448 that is known to the client, so that clients can issue A and/or AAAA 1449 queries for TargetName in advance (see Section 5). Unless otherwise 1450 specified, the convention is to set TargetName to the service name 1451 for an initial ServiceMode record, or to "." if it is reached via an 1452 alias. For foo://foo.example.com:8080, this might look like: 1454 $ORIGIN example.com. ; Origin 1455 foo 3600 IN CNAME foosvc.example.net. 1456 _8080._foo.foo 3600 IN CNAME foosvc.example.net. 1458 $ORIGIN example.net. ; Service provider zone 1459 foosvc 3600 IN SVCB 1 . key65333=... 1460 foosvc 300 IN AAAA 2001:db8::1 1462 Domain owners SHOULD avoid using a TargetName that is below a DNAME, 1463 as this is likely unnecessary and makes responses slower and larger. 1464 Also, zone structures that require following more than 8 aliases 1465 (counting both AliasMode and CNAME records) are NOT RECOMMENDED. 1467 11.3. Examples 1469 11.3.1. Protocol enhancements 1471 Consider a simple zone of the form: 1473 $ORIGIN simple.example. ; Simple example zone 1474 @ 300 IN A 192.0.2.1 1475 AAAA 2001:db8::1 1477 The domain owner could add this record: 1479 @ 7200 IN HTTPS 1 . alpn=h3 1481 to indicate that https://simple.example supports QUIC in addition to 1482 TLS over TCP (the implicit default). The record could also include 1483 other information (e.g. non-standard port, ECH configuration). For 1484 https://simple.example:8443, the record would be: 1486 _8443._https 7200 IN HTTPS 1 . alpn=h3 1488 These records also respectively tell clients to replace the scheme 1489 with "https" when loading http://simple.example or 1490 http://simple.example:8443. 1492 11.3.2. Apex aliasing 1494 Consider a zone that is using CNAME aliasing: 1496 $ORIGIN aliased.example. ; A zone that is using a hosting service 1497 ; Subdomain aliased to a high-performance server pool 1498 www 7200 IN CNAME pool.svc.example. 1499 ; Apex domain on fixed IPs because CNAME is not allowed at the apex 1500 @ 300 IN A 192.0.2.1 1501 IN AAAA 2001:db8::1 1503 With HTTPS RRs, the owner of aliased.example could alias the apex by 1504 adding one additional record: 1506 @ 7200 IN HTTPS 0 pool.svc.example. 1508 With this record in place, HTTPS-RR-aware clients will use the same 1509 server pool for aliased.example and www.aliased.example. (They will 1510 also upgrade "http://aliased.example/..." to "https".) Non-HTTPS-RR- 1511 aware clients will just ignore the new record. 1513 Similar to CNAME, HTTPS RRs have no impact on the origin name. When 1514 connecting, clients will continue to treat the authoritative origins 1515 as "https://www.aliased.example" and "https://aliased.example", 1516 respectively, and will validate TLS server certificates accordingly. 1518 11.3.3. Parameter binding 1520 Suppose that svc.example's default server pool supports HTTP/2, and 1521 it has deployed HTTP/3 on a new server pool with a different 1522 configuration. This can be expressed in the following form: 1524 $ORIGIN svc.example. ; A hosting provider. 1525 pool 7200 IN HTTPS 1 h3pool alpn=h2,h3 ech="123..." 1526 HTTPS 2 . alpn=h2 ech="abc..." 1527 pool 300 IN A 192.0.2.2 1528 AAAA 2001:db8::2 1529 h3pool 300 IN A 192.0.2.3 1530 AAAA 2001:db8::3 1532 This configuration is entirely compatible with the "Apex aliasing" 1533 example, whether the client supports HTTPS RRs or not. If the client 1534 does support HTTPS RRs, all connections will be upgraded to HTTPS, 1535 and clients will use HTTP/3 if they can. Parameters are "bound" to 1536 each server pool, so each server pool can have its own protocol, ECH 1537 configuration, etc. 1539 11.3.4. Multi-CDN 1541 The HTTPS RR is intended to support HTTPS services operated by 1542 multiple independent entities, such as different Content Delivery 1543 Networks (CDNs) or different hosting providers. This includes the 1544 case where a service is migrated from one operator to another, as 1545 well as the case where the service is multiplexed between multiple 1546 operators for performance, redundancy, etc. 1548 This example shows such a configuration, with www.customer.example 1549 having different DNS responses to different queries, either over time 1550 or due to logic within the authoritative DNS server: 1552 ; This zone contains/returns different CNAME records 1553 ; at different points-in-time. The RRset for "www" can 1554 ; only ever contain a single CNAME. 1556 ; Sometimes the zone has: 1557 $ORIGIN customer.example. ; A Multi-CDN customer domain 1558 www 900 IN CNAME cdn1.svc1.example. 1560 ; and other times it contains: 1561 $ORIGIN customer.example. 1562 www 900 IN CNAME customer.svc2.example. 1564 ; and yet other times it contains: 1565 $ORIGIN customer.example. 1566 www 900 IN CNAME cdn3.svc3.example. 1568 ; With the following remaining constant and always included: 1569 $ORIGIN customer.example. ; A Multi-CDN customer domain 1570 ; The apex is also aliased to www to match its configuration 1571 @ 7200 IN HTTPS 0 www 1572 ; Non-HTTPS-aware clients use non-CDN IPs 1573 A 203.0.113.82 1574 AAAA 2001:db8:203::2 1576 ; Resolutions following the cdn1.svc1.example 1577 ; path use these records. 1578 ; This CDN uses a different alternative service for HTTP/3. 1579 $ORIGIN svc1.example. ; domain for CDN 1 1580 cdn1 1800 IN HTTPS 1 h3pool alpn=h3 ech="123..." 1581 HTTPS 2 . alpn=h2 ech="123..." 1582 A 192.0.2.2 1583 AAAA 2001:db8:192::4 1584 h3pool 300 IN A 192.0.2.3 1585 AAAA 2001:db8:192:7::3 1587 ; Resolutions following the customer.svc2.example 1588 ; path use these records. 1589 ; Note that this CDN only supports HTTP/2. 1590 $ORIGIN svc2.example. ; domain operated by CDN 2 1591 customer 300 IN HTTPS 1 . alpn=h2 ech="xyz..." 1592 60 IN A 198.51.100.2 1593 A 198.51.100.3 1594 A 198.51.100.4 1595 AAAA 2001:db8:198::7 1596 AAAA 2001:db8:198::12 1598 ; Resolutions following the customer.svc2.example 1599 ; path use these records. 1600 ; Note that this CDN has no HTTPS records 1601 ; and thus no ECH support. 1602 $ORIGIN svc3.example. ; domain operated by CDN 3 1603 cdn3 60 IN A 203.0.113.8 1604 AAAA 2001:db8:113::8 1606 Note that in the above example, the different CDNs have different ECH 1607 configurations and different capabilities, but clients will use HTTPS 1608 RRs as a bound-together unit. 1610 Domain owners should be cautious when using a multi-CDN 1611 configuration, as it introduces a number of complexities highlighted 1612 by this example: 1614 * If CDN 1 supports ECH, and CDN 2 does not, the client is 1615 vulnerable to ECH downgrade by a network adversary who forces 1616 clients to get CDN 2 records. 1618 * Aliasing the apex to its subdomain simplifies the zone file but 1619 likely increases resolution latency, especially when using a non- 1620 HTTPS-aware recursive resolver. An alternative would be to alias 1621 the zone apex directly to a name managed by a CDN. 1623 * The A, AAAA, and HTTPS resolutions are independent lookups, so 1624 clients may observe and follow different CNAMEs to different CDNs. 1625 Clients may thus find a TargetName pointing to a name other than 1626 the one which returned along with the A and AAAA lookups and will 1627 need to do an additional resolution for them. Including ipv6hint 1628 and ipv4hint will reduce the performance impact of this case. 1630 * If not all CDNs publish HTTPS records, clients will sometimes 1631 receive NODATA for HTTPS queries (as with cdn3.svc3.example 1632 above), and thus no "ech" SvcParam, but could receive A/AAAA 1633 records from a different CDN which does support ECH. Clients will 1634 be unable to use ECH in this case. 1636 11.3.5. Non-HTTP uses 1638 For protocols other than HTTP, the SVCB RR and an Attrleaf label 1639 [Attrleaf] will be used. For example, to reach an example resource 1640 of "baz://api.example.com:8765", the following SVCB record would be 1641 used to alias it to "svc4-baz.example.net." which in-turn could 1642 return AAAA/A records and/or SVCB records in ServiceMode: 1644 _8765._baz.api.example.com. 7200 IN SVCB 0 svc4-baz.example.net. 1646 HTTPS RRs use similar Attrleaf labels if the origin contains a non- 1647 default port. 1649 12. Interaction with other standards 1651 This standard is intended to reduce connection latency and improve 1652 user privacy. Server operators implementing this standard SHOULD 1653 also implement TLS 1.3 [RFC8446] and OCSP Stapling [RFC6066], both of 1654 which confer substantial performance and privacy benefits when used 1655 in combination with SVCB records. 1657 To realize the greatest privacy benefits, this proposal is intended 1658 for use over a privacy-preserving DNS transport (like DNS over TLS 1659 [DoT] or DNS over HTTPS [DoH]). However, performance improvements, 1660 and some modest privacy improvements, are possible without the use of 1661 those standards. 1663 Any specification for use of SVCB with a protocol MUST have an entry 1664 for its scheme under the SVCB RR type in the IANA DNS Underscore 1665 Global Scoped Entry Registry [Attrleaf]. The scheme SHOULD have an 1666 entry in the IANA URI Schemes Registry [RFC7595]. The scheme SHOULD 1667 have a defined specification for use with SVCB. 1669 13. Security Considerations 1671 SVCB/HTTPS RRs are intended for distribution over untrusted channels, 1672 and clients are REQUIRED to verify that the alternative endpoint is 1673 authoritative for the service (similar to Section 2.1 of [AltSvc]). 1674 Therefore, DNSSEC signing and validation are OPTIONAL for publishing 1675 and using SVCB and HTTPS RRs. 1677 Clients MUST ensure that their DNS cache is partitioned for each 1678 local network, or flushed on network changes, to prevent a local 1679 adversary in one network from implanting a forged DNS record that 1680 allows them to track users or hinder their connections after they 1681 leave that network. 1683 An attacker who can prevent SVCB resolution can deny clients any 1684 associated security benefits. A hostile recursive resolver can 1685 always deny service to SVCB queries, but network intermediaries can 1686 often prevent resolution as well, even when the client and recursive 1687 resolver validate DNSSEC and use a secure transport. These downgrade 1688 attacks can prevent the "https" upgrade provided by the HTTPS RR 1689 (Section 9.5), and disable the encryption enabled by the "ech" 1690 SvcParamKey (Section 10). To prevent downgrades, Section 3.1 1691 recommends that clients abandon the connection attempt when such an 1692 attack is detected. 1694 A hostile DNS intermediary might forge AliasMode "." records 1695 (Section 2.5.1) as a way to block clients from accessing particular 1696 services. Such an adversary could already block entire domains by 1697 forging erroneous responses, but this mechanism allows them to target 1698 particular protocols or ports within a domain. Clients that might be 1699 subject to such attacks SHOULD ignore AliasMode "." records. 1701 A hostile DNS intermediary or origin can return SVCB records 1702 indicating any IP address and port number, including IP addresses 1703 inside the local network and port numbers assigned to internal 1704 services. If the attacker can influence the client's payload (e.g. 1705 TLS session ticket contents), and an internal service has a 1706 sufficiently lax parser, it's possible that the attacker could gain 1707 unintended access. (The same concerns apply to SRV records, HTTP 1708 Alt-Svc, and HTTP redirects.) As a mitigation, SVCB mapping 1709 documents SHOULD indicate any port number restrictions that are 1710 appropriate for the supported transports. 1712 14. Privacy Considerations 1714 Standard address queries reveal the user's intent to access a 1715 particular domain. This information is visible to the recursive 1716 resolver, and to many other parties when plaintext DNS transport is 1717 used. SVCB queries, like queries for SRV records and other specific 1718 RR types, additionally reveal the user's intent to use a particular 1719 protocol. This is not normally sensitive information, but it should 1720 be considered when adding SVCB support in a new context. 1722 15. IANA Considerations 1724 15.1. SVCB RRType 1726 This document defines a new DNS RR type, SVCB, whose value 64 has 1727 been allocated by IANA from the "Resource Record (RR) TYPEs" 1728 subregistry of the "Domain Name System (DNS) Parameters" registry: 1730 * Type: SVCB 1731 * Value: 64 1733 * Meaning: General Purpose Service Binding 1735 * Reference: This document 1737 15.2. HTTPS RRType 1739 This document defines a new DNS RR type, "HTTPS", whose value 65 has 1740 been allocated by IANA from the "Resource Record (RR) TYPEs" 1741 subregistry of the "Domain Name System (DNS) Parameters" registry: 1743 * Type: HTTPS 1745 * Value: 65 1747 * Meaning: Service Binding type for use with HTTP 1749 * Reference: This document 1751 15.3. New registry for Service Parameters 1753 IANA is requested to create a new registry, entitled "Service 1754 Parameter Keys (SvcParamKeys)". This registry defines the namespace 1755 for parameters, including string representations and numeric 1756 SvcParamKey values. This registry is shared with other SVCB- 1757 compatible RR types, such as the HTTPS RR. 1759 ACTION: create this registry, on a new page entitled "DNS Service 1760 Bindings (SVCB)" under the "Domain Name System (DNS) Parameters" 1761 category. 1763 15.3.1. Procedure 1765 A registration MUST include the following fields: 1767 * Number: wire format numeric identifier (range 0-65535) 1769 * Name: unique presentation name 1771 * Meaning: a short description 1773 * Format Reference: pointer to specification text 1775 The characters in the registered Name MUST be lower-case alphanumeric 1776 or "-" (Section 2.1). The name MUST NOT start with "key" or 1777 "invalid". 1779 Entries in this registry are subject to a First Come First Served 1780 registration policy ([RFC8126], Section 4.4). The Format Reference 1781 MUST specify how to convert the SvcParamValue's presentation format 1782 to wire format and MAY detail its intended meaning and use. An entry 1783 MAY specify a Format Reference of the form "Same as (other key Name)" 1784 if it uses the same presentation and wire formats as an existing key. 1786 This arrangement supports the development of new parameters while 1787 ensuring that zone files can be made interoperable. 1789 15.3.2. Initial contents 1791 The "Service Binding (SVCB) Parameter Registry" shall initially be 1792 populated with the registrations below: 1794 +=============+=================+================+=================+ 1795 | Number | Name | Meaning | Format | 1796 | | | | Reference | 1797 +=============+=================+================+=================+ 1798 | 0 | mandatory | Mandatory keys | (This document) | 1799 | | | in this RR | Section 8 | 1800 +-------------+-----------------+----------------+-----------------+ 1801 | 1 | alpn | Additional | (This document) | 1802 | | | supported | Section 7.1 | 1803 | | | protocols | | 1804 +-------------+-----------------+----------------+-----------------+ 1805 | 2 | no-default-alpn | No support for | (This document) | 1806 | | | default | Section 7.1 | 1807 | | | protocol | | 1808 +-------------+-----------------+----------------+-----------------+ 1809 | 3 | port | Port for | (This document) | 1810 | | | alternative | Section 7.2 | 1811 | | | endpoint | | 1812 +-------------+-----------------+----------------+-----------------+ 1813 | 4 | ipv4hint | IPv4 address | (This document) | 1814 | | | hints | Section 7.4 | 1815 +-------------+-----------------+----------------+-----------------+ 1816 | 5 | ech | Encrypted | (This document) | 1817 | | | ClientHello | Section 7.3 | 1818 | | | info | | 1819 +-------------+-----------------+----------------+-----------------+ 1820 | 6 | ipv6hint | IPv6 address | (This document) | 1821 | | | hints | Section 7.4 | 1822 +-------------+-----------------+----------------+-----------------+ 1823 | 65280-65534 | N/A | Private Use | (This document) | 1824 +-------------+-----------------+----------------+-----------------+ 1825 | 65535 | N/A | Reserved | (This document) | 1826 | | | ("Invalid | | 1827 | | | key") | | 1828 +-------------+-----------------+----------------+-----------------+ 1830 Table 1 1832 15.4. Other registry updates 1834 Per [Attrleaf], please add the following entry to the DNS Underscore 1835 Global Scoped Entry Registry: 1837 +=========+============+=================+=================+ 1838 | RR TYPE | _NODE NAME | Meaning | Reference | 1839 +=========+============+=================+=================+ 1840 | HTTPS | _https | HTTPS SVCB info | (This document) | 1841 +---------+------------+-----------------+-----------------+ 1843 Table 2 1845 16. Acknowledgments and Related Proposals 1847 There have been a wide range of proposed solutions over the years to 1848 the "CNAME at the Zone Apex" challenge proposed. These include 1849 [I-D.bellis-dnsop-http-record], [I-D.ietf-dnsop-aname], and others. 1851 Thank you to Ian Swett, Ralf Weber, Jon Reed, Martin Thomson, Lucas 1852 Pardue, Ilari Liusvaara, Tim Wicinski, Tommy Pauly, Chris Wood, David 1853 Benjamin, Mark Andrews, Emily Stark, Eric Orth, Kyle Rose, Craig 1854 Taylor, Dan McArdle, Brian Dickson, Willem Toorop, Pieter Lexis, 1855 Puneet Sood, Olivier Poitrey, Mashooq Muhaimen, Tom Carpay, and many 1856 others for their feedback and suggestions on this draft. 1858 17. References 1860 17.1. Normative References 1862 [ALPN] Friedl, S., Popov, A., Langley, A., and E. Stephan, 1863 "Transport Layer Security (TLS) Application-Layer Protocol 1864 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 1865 July 2014, . 1867 [Attrleaf] Crocker, D., "Scoped Interpretation of DNS Resource 1868 Records through "Underscored" Naming of Attribute Leaves", 1869 BCP 222, RFC 8552, DOI 10.17487/RFC8552, March 2019, 1870 . 1872 [base64] Josefsson, S., "The Base16, Base32, and Base64 Data 1873 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 1874 . 1876 [DNAME] Rose, S. and W. Wijngaards, "DNAME Redirection in the 1877 DNS", RFC 6672, DOI 10.17487/RFC6672, June 2012, 1878 . 1880 [DoH] Hoffman, P. and P. McManus, "DNS Queries over HTTPS 1881 (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, 1882 . 1884 [DoT] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1885 and P. Hoffman, "Specification for DNS over Transport 1886 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1887 2016, . 1889 [ECH] Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS 1890 Encrypted Client Hello", Work in Progress, Internet-Draft, 1891 draft-ietf-tls-esni-13, 12 August 2021, 1892 . 1895 [HappyEyeballsV2] 1896 Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: 1897 Better Connectivity Using Concurrency", RFC 8305, 1898 DOI 10.17487/RFC8305, December 2017, 1899 . 1901 [HSTS] Hodges, J., Jackson, C., and A. Barth, "HTTP Strict 1902 Transport Security (HSTS)", RFC 6797, 1903 DOI 10.17487/RFC6797, November 2012, 1904 . 1906 [HTTP] Fielding, R. T., Nottingham, M., and J. Reschke, "HTTP 1907 Semantics", Work in Progress, Internet-Draft, draft-ietf- 1908 httpbis-semantics-19, 12 September 2021, 1909 . 1912 [I-D.draft-ietf-httpbis-semantics] 1913 Fielding, R. T., Nottingham, M., and J. Reschke, "HTTP 1914 Semantics", Work in Progress, Internet-Draft, draft-ietf- 1915 httpbis-semantics-19, 12 September 2021, 1916 . 1919 [RFC1035] Mockapetris, P., "Domain names - implementation and 1920 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1921 November 1987, . 1923 [RFC1928] Leech, M., Ganis, M., Lee, Y., Kuris, R., Koblas, D., and 1924 L. Jones, "SOCKS Protocol Version 5", RFC 1928, 1925 DOI 10.17487/RFC1928, March 1996, 1926 . 1928 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1929 Requirement Levels", BCP 14, RFC 2119, 1930 DOI 10.17487/RFC2119, March 1997, 1931 . 1933 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 1934 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, 1935 . 1937 [RFC3225] Conrad, D., "Indicating Resolver Support of DNSSEC", 1938 RFC 3225, DOI 10.17487/RFC3225, December 2001, 1939 . 1941 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record 1942 (RR) Types", RFC 3597, DOI 10.17487/RFC3597, September 1943 2003, . 1945 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1946 Specifications: ABNF", STD 68, RFC 5234, 1947 DOI 10.17487/RFC5234, January 2008, 1948 . 1950 [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 1951 Address Text Representation", RFC 5952, 1952 DOI 10.17487/RFC5952, August 2010, 1953 . 1955 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 1956 Extensions: Extension Definitions", RFC 6066, 1957 DOI 10.17487/RFC6066, January 2011, 1958 . 1960 [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van 1961 Beijnum, "DNS64: DNS Extensions for Network Address 1962 Translation from IPv6 Clients to IPv4 Servers", RFC 6147, 1963 DOI 10.17487/RFC6147, April 2011, 1964 . 1966 [RFC7050] Savolainen, T., Korhonen, J., and D. Wing, "Discovery of 1967 the IPv6 Prefix Used for IPv6 Address Synthesis", 1968 RFC 7050, DOI 10.17487/RFC7050, November 2013, 1969 . 1971 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1972 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 1973 DOI 10.17487/RFC7231, June 2014, 1974 . 1976 [RFC7595] Thaler, D., Ed., Hansen, T., and T. Hardie, "Guidelines 1977 and Registration Procedures for URI Schemes", BCP 35, 1978 RFC 7595, DOI 10.17487/RFC7595, June 2015, 1979 . 1981 [RFC7871] Contavalli, C., van der Gaast, W., Lawrence, D., and W. 1982 Kumari, "Client Subnet in DNS Queries", RFC 7871, 1983 DOI 10.17487/RFC7871, May 2016, 1984 . 1986 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1987 Writing an IANA Considerations Section in RFCs", BCP 26, 1988 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1989 . 1991 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1992 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1993 May 2017, . 1995 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1996 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1997 . 1999 [WebSocket] 2000 Fette, I. and A. Melnikov, "The WebSocket Protocol", 2001 RFC 6455, DOI 10.17487/RFC6455, December 2011, 2002 . 2004 17.2. Informative References 2006 [AltSvc] Nottingham, M., McManus, P., and J. Reschke, "HTTP 2007 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 2008 April 2016, . 2010 [DNSTerm] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 2011 Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, 2012 January 2019, . 2014 [FETCH] "Fetch Living Standard", May 2020, 2015 . 2017 [HTTP3] Bishop, M., "Hypertext Transfer Protocol Version 3 2018 (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf- 2019 quic-http-34, 2 February 2021, 2020 . 2023 [I-D.bellis-dnsop-http-record] 2024 Bellis, R., "A DNS Resource Record for HTTP", Work in 2025 Progress, Internet-Draft, draft-bellis-dnsop-http-record- 2026 00, 3 November 2018, 2027 . 2030 [I-D.ietf-dnsop-aname] 2031 Finch, T., Hunt, E., Dijk, P. V., Eden, A., and M. 2032 Mekking, "Address-specific DNS aliases (ANAME)", Work in 2033 Progress, Internet-Draft, draft-ietf-dnsop-aname-04, 8 2034 July 2019, . 2037 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 2038 DOI 10.17487/RFC6454, December 2011, 2039 . 2041 [SRV] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 2042 specifying the location of services (DNS SRV)", RFC 2782, 2043 DOI 10.17487/RFC2782, February 2000, 2044 . 2046 [URI] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2047 Resource Identifier (URI): Generic Syntax", STD 66, 2048 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2049 . 2051 Appendix A. Decoding text in zone files 2053 DNS zone files are capable of representing arbitrary octet sequences 2054 in basic ASCII text, using various delimiters and encodings. The 2055 algorithm for decoding these character-strings is defined in 2056 Section 5.1 of [RFC1035]. Here we summarize the allowed input to 2057 that algorithm, using ABNF: 2059 ; non-special is VCHAR minus DQUOTE, ";", "(", ")", and "\". 2060 non-special = %x21 / %x23-27 / %x2A-3A / %x3C-5B / %x5D-7E 2061 ; non-digit is VCHAR minus DIGIT 2062 non-digit = %x21-2F / %x3A-7E 2063 ; dec-octet is a number 0-255 as a three-digit decimal number. 2064 dec-octet = ( "0" / "1" ) 2DIGIT / 2065 "2" ( ( %x30-34 DIGIT ) / ( "5" %x30-35 ) ) 2066 escaped = "\" ( non-digit / dec-octet ) 2067 contiguous = 1*( non-special / escaped ) 2068 quoted = DQUOTE *( contiguous / ( ["\"] WSP ) ) DQUOTE 2069 char-string = contiguous / quoted 2071 The decoding algorithm allows char-string to represent any *OCTET. 2072 In this document, this algorithm is referred to as "character-string 2073 decoding". The algorithm is the same as used by 2074 in RFC 1035, although the output length in this document is not 2075 limited to 255 octets. 2077 A.1. Decoding a comma-separated list 2079 In order to represent lists of items in zone files, this 2080 specification uses comma-separated lists. When the allowed items in 2081 the list cannot contain "," or "\", this is trivial. (For 2082 simplicity, empty items are not allowed.) A value-list parser that 2083 splits on "," and prohibits items containing "\" is sufficient to 2084 comply with all requirements in this document. 2086 For implementations that allow "," and "\" in item values, the 2087 following escaping syntax applies: 2089 item = 1*OCTET 2090 ; item-allowed is OCTET minus "," and "\". 2091 item-allowed = %x00-2B / %x2D-5B / %x5D-FF 2092 escaped-item = 1*(item-allowed / "\," / "\\") 2093 comma-separated = [escaped-item *("," escaped-item)] 2095 Decoding of value-lists happens after character-string decoding. For 2096 example, consider these char-string SvcParamValues: 2098 "part1,part2,part3\\,part4\\\\" 2099 part1\,\p\a\r\t2\044part3\092,part4\092\\ 2101 These inputs are equivalent: character-string decoding either of them 2102 would produce the same value: 2104 part1,part2,part3\,part4\\ 2106 Applying comma-separated list decoding to this value would produce a 2107 list of three items: 2109 part1 2110 part2 2111 part3,part4\ 2113 Appendix B. HTTP Mapping Summary 2115 This table serves as a non-normative summary of the HTTP mapping for 2116 SVCB (Section 9). Future protocol mappings may provide a similar 2117 summary table. 2119 +==========================+======================+ 2120 +==========================+======================+ 2121 | *Mapped scheme* | "https" | 2122 +--------------------------+----------------------+ 2123 | *Other affected schemes* | "http", "wss", "ws", | 2124 | | (other HTTP-based) | 2125 +--------------------------+----------------------+ 2126 | *RR type* | HTTPS (65) | 2127 +--------------------------+----------------------+ 2128 | *Name prefix* | None for port 443, | 2129 | | else _$PORT._https | 2130 +--------------------------+----------------------+ 2131 | *Automatically Mandatory | port, no-default- | 2132 | Keys* | alpn | 2133 +--------------------------+----------------------+ 2134 | *SvcParam defaults* | alpn: ["http/1.1"] | 2135 +--------------------------+----------------------+ 2136 | *Special behaviors* | HTTP to HTTPS | 2137 | | upgrade | 2138 +--------------------------+----------------------+ 2139 | *Keys that records must | None | 2140 | include* | | 2141 +--------------------------+----------------------+ 2143 Table 3 2145 Appendix C. Comparison with alternatives 2147 The SVCB and HTTPS RR types closely resemble, and are inspired by, 2148 some existing record types and proposals. A complaint with all of 2149 the alternatives is that web clients have seemed unenthusiastic about 2150 implementing them. The hope here is that by providing an extensible 2151 solution that solves multiple problems we will overcome the inertia 2152 and have a path to achieve client implementation. 2154 C.1. Differences from the SRV RR type 2156 An SRV record [SRV] can perform a similar function to the SVCB 2157 record, informing a client to look in a different location for a 2158 service. However, there are several differences: 2160 * SRV records are typically mandatory, whereas SVCB is intended to 2161 be optional when used with pre-existing protocols. 2163 * SRV records cannot instruct the client to switch or upgrade 2164 protocols, whereas SVCB can signal such an upgrade (e.g. to 2165 HTTP/2). 2167 * SRV records are not extensible, whereas SVCB and HTTPS RRs can be 2168 extended with new parameters. 2170 * SRV records specify a "weight" for unbalanced randomized load- 2171 balancing. SVCB only supports balanced randomized load-balancing, 2172 although weights could be added via a future SvcParam. 2174 C.2. Differences from the proposed HTTP record 2176 Unlike [I-D.bellis-dnsop-http-record], this approach is extensible to 2177 cover Alt-Svc and Encrypted ClientHello use-cases. Like that 2178 proposal, this addresses the zone apex CNAME challenge. 2180 Like that proposal, it remains necessary to continue to include 2181 address records at the zone apex for legacy clients. 2183 C.3. Differences from the proposed ANAME record 2185 Unlike [I-D.ietf-dnsop-aname], this approach is extensible to cover 2186 Alt-Svc and ECH use-cases. This approach also does not require any 2187 changes or special handling on either authoritative or primary 2188 servers, beyond optionally returning in-bailiwick additional records. 2190 Like that proposal, this addresses the zone apex CNAME challenge for 2191 clients that implement this. 2193 However, with this SVCB proposal, it remains necessary to continue to 2194 include address records at the zone apex for legacy clients. If 2195 deployment of this standard is successful, the number of legacy 2196 clients will fall over time. As the number of legacy clients 2197 declines, the operational effort required to serve these users 2198 without the benefit of SVCB indirection should fall. Server 2199 operators can easily observe how much traffic reaches this legacy 2200 endpoint, and may remove the apex's address records if the observed 2201 legacy traffic has fallen to negligible levels. 2203 C.4. Comparison with separate RR types for AliasMode and ServiceMode 2205 Abstractly, functions of AliasMode and ServiceMode are independent, 2206 so it might be tempting to specify them as separate RR types. 2207 However, this would result in a serious performance impairment, 2208 because clients cannot rely on their recursive resolver to follow 2209 SVCB aliases (unlike CNAME). Thus, clients would have to issue 2210 queries for both RR types in parallel, potentially at each step of 2211 the alias chain. Recursive resolvers that implement the 2212 specification would, upon receipt of a ServiceMode query, emit both a 2213 ServiceMode and an AliasMode query to the authoritative. Thus, 2214 splitting the RR type would double, or in some cases triple, the load 2215 on clients and servers, and would not reduce implementation 2216 complexity. 2218 Appendix D. Test vectors 2220 These test vectors only contain the RDATA portion of SVCB/HTTPS 2221 records in presentation format, generic format ([RFC3597]) and wire 2222 format. The wire format uses hexadecimal (\xNN) for each non-ascii 2223 byte. As the wireformat is long, it is broken into several lines. 2225 D.1. AliasMode 2227 example.com. HTTPS 0 foo.example.com. 2229 \# 19 ( 2230 00 00 ; priority 2231 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target 2232 ) 2234 \x00\x00 # priority 2235 \x03foo\x07example\x03com\x00 # target 2237 Figure 1: AliasMode 2239 D.2. ServiceMode 2241 example.com. SVCB 1 . 2243 \# 3 ( 2244 00 01 ; priority 2245 00 ; target (root label) 2246 ) 2248 \x00\x01 # priority 2249 \x00 # target, root label 2251 Figure 2: TargetName is "." 2253 example.com. SVCB 16 foo.example.com. port=53 2255 \# 25 ( 2256 00 10 ; priority 2257 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target 2258 00 03 ; key 3 2259 00 02 ; length 2 2260 00 35 ; value 2261 ) 2263 \x00\x10 # priority 2264 \x03foo\x07example\x03com\x00 # target 2265 \x00\x03 # key 3 2266 \x00\x02 # length: 2 bytes 2267 \x00\x35 # value 2269 Figure 3: Specifies a port 2271 example.com. SVCB 1 foo.example.com. key667=hello 2273 \# 28 ( 2274 00 01 ; priority 2275 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target 2276 02 9b ; key 667 2277 00 05 ; length 5 2278 68 65 6c 6c 6f ; value 2279 ) 2281 \x00\x01 # priority 2282 \x03foo\x07example\x03com\x00 # target 2283 \x02\x9b # key 667 2284 \x00\x05 # length 5 2285 hello # value 2287 Figure 4: A generic key and unquoted value 2289 example.com. SVCB 1 foo.example.com. key667="hello\210qoo" 2291 \# 32 ( 2292 00 01 ; priority 2293 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target 2294 02 9b ; key 667 2295 00 09 ; length 9 2296 68 65 6c 6c 6f d2 71 6f 6f ; value 2297 ) 2299 \x00\x01 # priority 2300 \x03foo\x07example\x03com\x00 # target 2301 \x02\x9b # key 667 2302 \x00\x09 # length 9 2303 hello\xd2qoo # value 2305 Figure 5: A generic key and quoted value with a decimal escape 2307 example.com. SVCB 1 foo.example.com. ( 2308 ipv6hint="2001:db8::1,2001:db8::53:1" 2309 ) 2311 \# 55 ( 2312 00 01 ; priority 2313 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target 2314 00 06 ; key 6 2315 00 20 ; length 32 2316 20 01 0d b8 00 00 00 00 00 00 00 00 00 00 00 01 ; first address 2317 20 01 0d b8 00 00 00 00 00 00 00 00 00 53 00 01 ; second address 2318 ) 2320 \x00\x01 # priority 2321 \x03foo\x07example\x03com\x00 # target 2322 \x00\x06 # key 6 2323 \x00\x20 # length 32 2324 \x20\x01\x0d\xb8\x00\x00\x00\x00 2325 \x00\x00\x00\x00\x00\x00\x00\x01 # first address 2326 \x20\x01\x0d\xb8\x00\x00\x00\x00 2327 \x00\x00\x00\x00\x00\x53\x00\x01 # second address 2329 Figure 6: Two quoted IPv6 hints 2331 example.com. SVCB 1 example.com. ipv6hint="::ffff:198.51.100.100" 2333 \# 35 ( 2334 00 01 ; priority 2335 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target 2336 00 06 ; key 6 2337 00 10 ; length 16 2338 00 00 00 00 00 00 00 00 00 00 ff ff c6 33 64 64 ; address 2339 ) 2341 \x00\x01 # priority 2342 \x07example\x03com\x00 # target 2343 \x00\x06 # key 6 2344 \x00\x10 # length 16 2345 \x00\x00\x00\x00\x00\x00\x00\x00 2346 \x00\x00\xff\xff\xc6\x33\x64\x64 # address 2348 Figure 7: An IPv6 hint in IPv4-mapped format 2350 example.com. SVCB 16 foo.example.org. ( 2351 alpn=h2,h3-19 mandatory=ipv4hint,alpn 2352 ipv4hint=192.0.2.1 2353 ) 2355 \# 48 ( 2356 00 10 ; priority 2357 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target 2358 00 00 ; key 0 2359 00 04 ; param length 4 2360 00 01 ; value: key 1 2361 00 04 ; value: key 4 2362 00 01 ; key 1 2363 00 09 ; param length 9 2364 02 ; alpn length 2 2365 68 32 ; alpn value 2366 05 ; alpn length 5 2367 68 33 2d 31 39 ; alpn value 2368 00 04 ; key 4 2369 00 04 ; param length 4 2370 c0 00 02 01 ; param value 2371 ) 2373 \x00\x10 # priority 2374 \x03foo\x07example\x03org\x00 # target 2375 \x00\x00 # key 0 2376 \x00\x04 # param length 4 2377 \x00\x01 # value: key 1 2378 \x00\x04 # value: key 4 2379 \x00\x01 # key 1 2380 \x00\x09 # param length 9 2381 \x02 # alpn length 2 2382 h2 # alpn value 2383 \x05 # alpn length 5 2384 h3-19 # alpn value 2385 \x00\x04 # key 4 2386 \x00\x04 # param length 4 2387 \xc0\x00\x02\x01 # param value 2389 Figure 8: SvcParamKey ordering is arbitrary in presentation 2390 format but sorted in wire format 2392 example.com. SVCB 16 foo.example.org. alpn="f\\\\oo\\,bar,h2" 2393 example.com. SVCB 16 foo.example.org. alpn=f\\\092oo\092,bar,h2 2395 \# 35 ( 2396 00 10 ; priority 2397 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target 2398 00 01 ; key 1 2399 00 0c ; param length 12 2400 08 ; alpn length 8 2401 66 5c 6f 6f 2c 62 61 72 ; alpn value 2402 02 ; alpn length 2 2403 68 32 ; alpn value 2404 ) 2406 \x00\x10 # priority 2407 \x03foo\x07example\x03org\x00 # target 2408 \x00\x01 # key 1 2409 \x00\x0c # param length 12 2410 \x08 # alpn length 8 2411 f\oo,bar # alpn value 2412 \x02 # alpn length 2 2413 h2 # alpn value 2415 Figure 9: An alpn value with an escaped comma and an escaped 2416 backslash in two presentation formats 2418 D.3. Failure cases 2420 This subsection contains test vectors which are not compliant with 2421 this document. The various reasons for non-compliance are explained 2422 with each example. 2424 example.com. SVCB 1 foo.example.com. ( 2425 key123=abc key123=def 2426 ) 2428 Figure 10: Multiple instances of the same SvcParamKey 2430 example.com. SVCB 1 foo.example.com. mandatory 2431 example.com. SVCB 1 foo.example.com. alpn 2432 example.com. SVCB 1 foo.example.com. port 2433 example.com. SVCB 1 foo.example.com. ipv4hint 2434 example.com. SVCB 1 foo.example.com. ipv6hint 2436 Figure 11: Missing SvcParamValues that must be nonempty 2438 example.com. SVCB 1 foo.example.com. no-default-alpn=abc 2439 Figure 12: The "no-default-alpn" SvcParamKey value must be empty 2441 example.com. SVCB 1 foo.example.com. mandatory=key123 2443 Figure 13: A mandatory SvcParam is missing 2445 example.com. SVCB 1 foo.example.com. mandatory=mandatory 2447 Figure 14: The "mandatory" SvcParamKey must not be included in 2448 the mandatory list 2450 example.com. SVCB 1 foo.example.com. ( 2451 mandatory=key123,key123 key123=abc 2452 ) 2454 Figure 15: Multiple instances of the same SvcParamKey in the 2455 mandatory list 2457 Appendix E. Change history 2459 (This section to be removed by the RFC editor.) 2461 * draft-ietf-dnsop-svcb-https-08 2463 - Extensive structural and editorial adjustments based on area 2464 reviews, including: 2466 o A new section on SVCB-compatible record types 2468 o Reorganized description of client behavior 2470 o Test vectors are now in titled figures 2472 o Adjusted mapping summary 2474 o Improve description of rules for resolver handling of 2475 invalid SvcParamValues. 2477 - New text on cross-transport fallback (e.g. QUIC vs. TCP) 2479 - Improved explanation of use with domain-oriented transport 2480 proxies 2482 - HTTP terminology adjusted to match draft-ietf-httpbis-semantics 2484 - Improved and corrected IANA instructions 2486 * draft-ietf-dnsop-svcb-https-07 2487 - Editorial improvements following AD review. 2489 * draft-ietf-dnsop-svcb-https-06 2491 - Add requirements for HTTPS origins that also use Alt-Svc 2493 - Remove requirement for comma-escaping related to unusual ALPN 2494 values 2496 - Allow resolvers to reject invalid SvcParamValues, with 2497 additional guidance 2499 * draft-ietf-dnsop-svcb-https-05 2501 - Specify interaction with EDNS Client Subnet and Additional 2502 section caching 2504 - Rename "echconfig" to "ech" 2506 - Add a suite of test vectors (both valid and invalid) and more 2507 examples 2509 - Clarify requirements for resolvers' (non-)use of SvcParams 2511 - Clarify guidance regarding default ALPN values 2513 * draft-ietf-dnsop-svcb-https-04 2515 - Simplify the IANA instructions (pure First Come First Served) 2517 - Recommend against publishing chains of >8 aliases 2519 - Clarify requirements for using SVCB with a transport proxy 2521 - Adjust guidance for Port Prefix Naming 2523 - Minor editorial updates 2525 * draft-ietf-dnsop-svcb-https-03 2527 - Simplified escaping of comma-separated values 2529 - Reorganized client requirements 2531 - Added a warning about port filtering for cross-protocol attacks 2533 - Clarified self-consistency rules for SvcParams 2534 - Added a non-normative mapping summary table for HTTPS 2536 * draft-ietf-dnsop-svcb-https-02 2538 - Added a Privacy Considerations section 2540 - Adjusted resolution fallback description 2542 - Clarified status of SvcParams in AliasMode 2544 - Improved advice on zone structuring and use with Alt-Svc 2546 - Improved examples, including a new Multi-CDN example 2548 - Reorganized text on value-list parsing and SvcPriority 2550 - Improved phrasing and other editorial improvements throughout 2552 * draft-ietf-dnsop-svcb-https-01 2554 - Added a "mandatory" SvcParamKey 2556 - Added the ability to indicate that a service does not exist 2558 - Adjusted resolution and ALPN algorithms 2560 - Major terminology revisions for "origin" and CamelCase names 2562 - Revised ABNF 2564 - Include allocated RR type numbers 2566 - Various corrections, explanations, and recommendations 2568 * draft-ietf-dnsop-svcb-https-00 2570 - Rename HTTPSSVC RR to HTTPS RR 2572 - Rename "an SVCB" to "a SVCB" 2574 - Removed "design considerations and open issues" section and 2575 some other "to be removed" text 2577 * draft-ietf-dnsop-svcb-httpssvc-03 2579 - Revised chain length limit requirements 2581 - Revised IANA registry rules for SvcParamKeys 2582 - Require HTTPS clients to implement SNI 2584 - Update terminology for Encrypted ClientHello 2586 - Clarifications: non-default ports, transport proxies, HSTS 2587 procedure, WebSocket behavior, wire format, IP hints, inner/ 2588 outer ClientHello with ECH 2590 - Various textual and ABNF corrections 2592 * draft-ietf-dnsop-svcb-httpssvc-02 2594 - All changes to Alt-Svc have been removed 2596 - Expanded and reorganized examples 2598 - Priority zero is now the definition of AliasForm 2600 - Repeated SvcParamKeys are no longer allowed 2602 - The "=" sign may be omitted in a key=value pair if the value is 2603 also empty 2605 - In the wire format, SvcParamKeys must be in sorted order 2607 - New text regarding how to handle resolution timeouts 2609 - Expanded description of recursive resolver behavior 2611 - Much more precise description of the intended ALPN behavior 2613 - Match the HSTS specification's language on HTTPS enforcement 2615 - Removed 'esniconfig=""' mechanism and simplified ESNI 2616 connection logic 2618 * draft-ietf-dnsop-svcb-httpssvc-01 2620 - Reduce the emphasis on conversion between HTTPSSVC and Alt-Svc 2622 - Make the "untrusted channel" concept more precise. 2624 - Make SvcFieldPriority = 0 the definition of AliasForm, instead 2625 of a requirement. 2627 * draft-ietf-dnsop-svcb-httpssvc-00 2628 - Document an optimization for optimistic pre-connection. (Chris 2629 Wood) 2631 - Relax IP hint handling requirements. (Eric Rescorla) 2633 * draft-nygren-dnsop-svcb-httpssvc-00 2635 - Generalize to an SVCB record, with special-case handling for 2636 Alt-Svc and HTTPS separated out to dedicated sections. 2638 - Split out a separate HTTPSSVC record for the HTTPS use-case. 2640 - Remove the explicit SvcRecordType=0/1 and instead make the 2641 AliasForm vs ServiceForm be implicit. This was based on 2642 feedback recommending against subtyping RR type. 2644 - Remove one optimization. 2646 * draft-nygren-httpbis-httpssvc-03 2648 - Change redirect type for HSTS-style behavior from 302 to 307 to 2649 reduce ambiguities. 2651 * draft-nygren-httpbis-httpssvc-02 2653 - Remove the redundant length fields from the wire format. 2655 - Define a SvcDomainName of "." for SvcRecordType=1 as being the 2656 HTTPSSVC RRNAME. 2658 - Replace "hq" with "h3". 2660 * draft-nygren-httpbis-httpssvc-01 2662 - Fixes of record name. Replace references to "HTTPSVC" with 2663 "HTTPSSVC". 2665 * draft-nygren-httpbis-httpssvc-00 2667 - Initial version 2669 Authors' Addresses 2671 Ben Schwartz 2672 Google 2674 Email: bemasc@google.com 2675 Mike Bishop 2676 Akamai Technologies 2678 Email: mbishop@evequefou.be 2680 Erik Nygren 2681 Akamai Technologies 2683 Email: erik+ietf@nygren.org