idnits 2.17.00 (12 Aug 2021) /tmp/idnits48847/draft-ietf-httpbis-origin-frame-06.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 ([2], [3], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 13, 2018) is 1582 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) -- Looks like a reference, but probably isn't: '1' on line 381 -- Looks like a reference, but probably isn't: '2' on line 383 -- Looks like a reference, but probably isn't: '3' on line 385 ** Downref: Normative reference to an Informational RFC: RFC 2818 -- Obsolete informational reference (is this intentional?): RFC 6962 (Obsoleted by RFC 9162) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTP M. Nottingham 3 Internet-Draft 4 Intended status: Standards Track E. Nygren 5 Expires: July 17, 2018 Akamai 6 January 13, 2018 8 The ORIGIN HTTP/2 Frame 9 draft-ietf-httpbis-origin-frame-06 11 Abstract 13 This document specifies the ORIGIN frame for HTTP/2, to indicate what 14 origins are available on a given connection. 16 Note to Readers 18 Discussion of this draft takes place on the HTTP working group 19 mailing list (ietf-http-wg@w3.org), which is archived at 20 https://lists.w3.org/Archives/Public/ietf-http-wg/ [1]. 22 Working Group information can be found at http://httpwg.github.io/ 23 [2]; source code and issues list for this draft can be found at 24 https://github.com/httpwg/http-extensions/labels/origin-frame [3]. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at https://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on July 17, 2018. 43 Copyright Notice 45 Copyright (c) 2018 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (https://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 62 2. The ORIGIN HTTP/2 Frame . . . . . . . . . . . . . . . . . . . 3 63 2.1. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 2.2. Processing ORIGIN Frames . . . . . . . . . . . . . . . . 4 65 2.3. The Origin Set . . . . . . . . . . . . . . . . . . . . . 5 66 2.4. Authority, Push and Coalescing with ORIGIN . . . . . . . 6 67 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 68 4. Security Considerations . . . . . . . . . . . . . . . . . . . 7 69 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 70 5.1. Normative References . . . . . . . . . . . . . . . . . . 7 71 5.2. Informative References . . . . . . . . . . . . . . . . . 8 72 5.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 9 73 Appendix A. Non-Normative Processing Algorithm . . . . . . . . . 9 74 Appendix B. Operational Considerations for Servers . . . . . . . 9 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 77 1. Introduction 79 HTTP/2 [RFC7540] allows clients to coalesce different origins 80 [RFC6454] onto the same connection when certain conditions are met. 81 However, in certain cases, a connection is not usable for a coalesced 82 origin, so the 421 (Misdirected Request) status code ([RFC7540], 83 Section 9.1.2) was defined. 85 Using a status code in this manner allows clients to recover from 86 misdirected requests, but at the penalty of adding latency. To 87 address that, this specification defines a new HTTP/2 frame type, 88 "ORIGIN", to allow servers to indicate what origins a connection is 89 usable for. 91 Additionally, experience has shown that HTTP/2's requirement to 92 establish server authority using both DNS and the server's 93 certificate is onerous. This specification relaxes the requirement 94 to check DNS when the ORIGIN frame is in use. Doing so has 95 additional benefits, such as removing the latency associated with 96 some DNS lookups. 98 1.1. Notational Conventions 100 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 101 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 102 "OPTIONAL" in this document are to be interpreted as described in BCP 103 14 [RFC2119] [RFC8174] when, and only when, they appear in all 104 capitals, as shown here. 106 2. The ORIGIN HTTP/2 Frame 108 This document defines a new HTTP/2 frame type ([RFC7540], Section 4) 109 called ORIGIN, that allows a server to indicate what origin(s) 110 [RFC6454] the server would like the client to consider as members of 111 the Origin Set (Section 2.3) for the connection it occurs within. 113 2.1. Syntax 115 The ORIGIN frame type is 0xc (decimal 12), and contains zero or more 116 instances of the Origin-Entry field. 118 +-------------------------------+-------------------------------+ 119 | Origin-Entry (*) ... 120 +-------------------------------+-------------------------------+ 122 An Origin-Entry is a length-delimited string: 124 +-------------------------------+-------------------------------+ 125 | Origin-Len (16) | ASCII-Origin? ... 126 +-------------------------------+-------------------------------+ 128 Specifically: 130 Origin-Len: An unsigned, 16-bit integer indicating the length, in 131 octets, of the ASCII-Origin field. 133 Origin: An OPTIONAL sequence of characters containing the ASCII 134 serialization of an origin ([RFC6454], Section 6.2) that the 135 sender asserts this connection is or could be authoritative for. 137 The ORIGIN frame does not define any flags. However, future updates 138 to this specification MAY define flags. See Section 2.2. 140 2.2. Processing ORIGIN Frames 142 The ORIGIN frame is a non-critical extension to HTTP/2. Endpoints 143 that do not support this frame can safely ignore it upon receipt. 145 When received by an implementing client, it is used to initialise and 146 manipulate the Origin Set (see Section 2.3), thereby changing how the 147 client establishes authority for origin servers (see Section 2.4). 149 The ORIGIN frame MUST be sent on stream 0; an ORIGIN frame on any 150 other stream is invalid and MUST be ignored. 152 Likewise, the ORIGIN frame is only valid on connections with the "h2" 153 protocol identifier, or when specifically nominated by the protocol's 154 definition; it MUST be ignored when received on a connection with the 155 "h2c" protocol identifier. 157 This specification does not define any flags for the ORIGIN frame, 158 but future updates to this specification (through IETF consensus) 159 might use them to change its semantics. The first four flags (0x1, 160 0x2, 0x4 and 0x8) are reserved for backwards-incompatible changes, 161 and therefore when any of them are set, the ORIGIN frame containing 162 them MUST be ignored by clients conforming to this specification, 163 unless the flag's semantics are understood. The remaining flags are 164 reserved for backwards-compatible changes, and do not affect 165 processing by clients conformant to this specification. 167 The ORIGIN frame describes a property of the connection, and 168 therefore is processed hop-by-hop. An intermediary MUST NOT forward 169 ORIGIN frames. Clients configured to use a proxy MUST ignore any 170 ORIGIN frames received from it. 172 Each ASCII-Origin field in the frame's payload MUST be parsed as an 173 ASCII serialisation of an origin ([RFC6454], Section 6.2). If 174 parsing fails, the field MUST be ignored. 176 Note that the ORIGIN frame does not support wildcard names (e.g., 177 "*.example.com") in Origin-Entry. As a result, sending ORIGIN when a 178 wildcard certificate is in use effectively disables any origins that 179 are not explicitly listed in the ORIGIN frame(s) (when the client 180 understands ORIGIN). 182 See Appendix A for an illustrative algorithm for processing ORIGIN 183 frames. 185 2.3. The Origin Set 187 The set of origins (as per [RFC6454]) that a given connection might 188 be used for is known in this specification as the Origin Set. 190 By default, the Origin Set for a connection is uninitialised. An 191 uninitialized Origin Set means that clients apply the coalescing 192 rules from Section 9.1.1 of [RFC7540]. 194 When an ORIGIN frame is first received and successfully processed by 195 a client, the connection's Origin Set is defined to contain an 196 initial origin. The initial origin is composed from: 198 o Scheme: "https" 200 o Host: the value sent in Server Name Indication (SNI, [RFC6066], 201 Section 3), converted to lower case; if SNI is not present, the 202 remote address of the connection (i.e., the server's IP address) 204 o Port: the remote port of the connection (i.e., the server's port) 206 The contents of that ORIGIN frame (and subsequent ones) allows the 207 server to incrementally add new origins to the Origin Set, as 208 described in Section 2.2. 210 The Origin Set is also affected by the 421 (Misdirected Request) 211 response status code, defined in [RFC7540], Section 9.1.2. Upon 212 receipt of a response with this status code, implementing clients 213 MUST create the ASCII serialisation of the corresponding request's 214 origin (as per [RFC6454], Section 6.2) and remove it from the 215 connection's Origin Set, if present. 217 Note: When sending an ORIGIN frame to a connection that is 218 initialised as an Alternative Service [RFC7838], the initial 219 origin set (Section 2.3) will contain an origin with the 220 appropriate scheme and hostname (since Alternative Services 221 specifies that the origin's hostname be sent in SNI). However, it 222 is possible that the port will be different than that of the 223 intended origin, since the initial origin set is calculated using 224 the actual port in use, which can be different for the alternative 225 service. In this case, the intended origin needs to be sent in 226 the ORIGIN frame explicitly. 228 For example, a client making requests for "https://example.com" is 229 directed to an alternative service at ("h2", "x.example.net", 230 "8443"). If this alternative service sends an ORIGIN frame, the 231 initial origin will be "https://example.com:8443". The client 232 will not be able to use the alternative service to make requests 233 for "https://example.com" unless that origin is explicitly 234 included in the ORIGIN frame. 236 2.4. Authority, Push and Coalescing with ORIGIN 238 Section 10.1 of [RFC7540] uses both DNS and the presented TLS 239 certificate to establish the origin server(s) that a connection is 240 authoritative for, just as HTTP/1.1 does in [RFC7230]. 242 Furthermore, Section 9.1.1 of [RFC7540] explicitly allows a 243 connection to be used for more than one origin server, if it is 244 authoritative. This affects what responses can be considered 245 authoritative, both for direct responses to requests and for server 246 push (see [RFC7540], Section 8.2.2). Indirectly, it also affects 247 what requests will be sent on a connection, since clients will 248 generally only send requests on connections that they believe to be 249 authoritative for the origin in question. 251 Once an Origin Set has been initialised for a connection, clients 252 that implement this specification use it to help determine what the 253 connection is authoritative for. Specifically, such clients MUST NOT 254 consider a connection to be authoritative for an origin not present 255 in the Origin Set, and SHOULD use the connection for all requests to 256 origins in the Origin Set for which the connection is authoritative, 257 unless there are operational reasons for opening a new connection. 259 Note that for a connection to be considered authoritative for a given 260 origin, the server is still required to authenticate with certificate 261 that passes suitable checks; see Section 9.1.1 of [RFC7540] for more 262 information. This includes verifying that the host matches a 263 "dNSName" value from the certificate "subjectAltName" field (using 264 the rules defined in [RFC2818]; see also [RFC5280], Section 4.2.1.6). 266 Additionally, clients MAY avoid consulting DNS to establish the 267 connection's authority for new requests to origins in the Origin Set; 268 however, those that do so face new risks, as explained in Section 4. 270 Because ORIGIN can change the set of origins a connection is used for 271 over time, it is possible that a client might have more than one 272 viable connection to an origin open at any time. When this occurs, 273 clients SHOULD NOT emit new requests on any connection whose Origin 274 Set is a proper subset of another connection's Origin Set, and SHOULD 275 close it once all outstanding requests are satisfied. 277 The Origin Set is unaffected by any alternative services [RFC7838] 278 advertisements made by the server. Advertising an alternative 279 service does not affect whether a server is authoritative. 281 3. IANA Considerations 283 This specification adds an entry to the "HTTP/2 Frame Type" registry. 285 o Frame Type: ORIGIN 287 o Code: 0xc 289 o Specification: [this document] 291 4. Security Considerations 293 Clients that blindly trust the ORIGIN frame's contents will be 294 vulnerable to a large number of attacks. See Section 2.4 for 295 mitigations. 297 Relaxing the requirement to consult DNS when determining authority 298 for an origin means that an attacker who possesses a valid 299 certificate no longer needs to be on-path to redirect traffic to 300 them; instead of modifying DNS, they need only convince the user to 301 visit another Web site in order to coalesce connections to the target 302 onto their existing connection. 304 As a result, clients opting not to consult DNS ought to employ some 305 alternative means to establish a high degree of confidence that the 306 certificate is legitimate. For example, clients might skip 307 consulting DNS only if they receive proof of inclusion in a 308 Certificate Transparency log [RFC6962] or they have a recent OCSP 309 response [RFC6960] (possibly using the "status_request" TLS extension 310 [RFC6066]) showing that the certificate was not revoked. 312 The Origin Set's size is unbounded by this specification, and thus 313 could be used by attackers to exhaust client resources. To mitigate 314 this risk, clients can monitor their state commitment and close the 315 connection if it is too high. 317 5. References 319 5.1. Normative References 321 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 322 Requirement Levels", BCP 14, RFC 2119, 323 DOI 10.17487/RFC2119, March 1997, 324 . 326 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 327 DOI 10.17487/RFC2818, May 2000, 328 . 330 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 331 Housley, R., and W. Polk, "Internet X.509 Public Key 332 Infrastructure Certificate and Certificate Revocation List 333 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 334 . 336 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 337 Extensions: Extension Definitions", RFC 6066, 338 DOI 10.17487/RFC6066, January 2011, 339 . 341 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 342 DOI 10.17487/RFC6454, December 2011, 343 . 345 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 346 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 347 DOI 10.17487/RFC7540, May 2015, 348 . 350 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 351 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 352 May 2017, . 354 5.2. Informative References 356 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 357 Galperin, S., and C. Adams, "X.509 Internet Public Key 358 Infrastructure Online Certificate Status Protocol - OCSP", 359 RFC 6960, DOI 10.17487/RFC6960, June 2013, 360 . 362 [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate 363 Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, 364 . 366 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 367 Protocol (HTTP/1.1): Message Syntax and Routing", 368 RFC 7230, DOI 10.17487/RFC7230, June 2014, 369 . 371 [RFC7838] Nottingham, M., McManus, P., and J. Reschke, "HTTP 372 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 373 April 2016, . 375 [RFC8288] Nottingham, M., "Web Linking", RFC 8288, 376 DOI 10.17487/RFC8288, October 2017, 377 . 379 5.3. URIs 381 [1] https://lists.w3.org/Archives/Public/ietf-http-wg/ 383 [2] http://httpwg.github.io/ 385 [3] https://github.com/httpwg/http-extensions/labels/origin-frame 387 Appendix A. Non-Normative Processing Algorithm 389 The following algorithm illustrates how a client could handle 390 received ORIGIN frames: 392 1. If the client is configured to use a proxy for the connection, 393 ignore the frame and stop processing. 395 2. If the connection is not identified with the "h2" protocol 396 identifier or another protocol that has explicitly opted into 397 this specification, ignore the frame and stop processing. 399 3. If the frame occurs upon any stream except stream 0, ignore the 400 frame and stop processing. 402 4. If any of the flags 0x1, 0x2, 0x4 or 0x8 are set, ignore the 403 frame and stop processing. 405 5. If no previous ORIGIN frame on the connection has reached this 406 step, initialise the Origin Set as per Section 2.3. 408 6. For each "Origin-Entry" in the frame payload: 410 1. Parse "ASCII-Origin" as an ASCII serialization of an origin 411 ([RFC6454], Section 6.2) and let the result be 412 "parsed_origin". If parsing fails, skip to the next "Origin- 413 Entry". 415 2. Add "parsed_origin" to the Origin Set. 417 Appendix B. Operational Considerations for Servers 419 The ORIGIN frame allows a server to indicate for which origins a 420 given connection ought be used. The set of origins advertised using 421 this mechanism is under control of the server; servers are not 422 obligated to use it, or to advertise all origins which they might be 423 able to answer a request for. 425 For example, it can be used to inform the client that the connection 426 is to only be used for the SNI-based origin, by sending an empty 427 ORIGIN frame. Or, a larger number of origins can be indicated by 428 including a payload. 430 Generally, this information is most useful to send before sending any 431 part of a response that might initiate a new connection; for example, 432 "Link" header fields [RFC8288] in a response HEADERS, or links in the 433 response body. 435 Therefore, the ORIGIN frame ought be sent as soon as possible on a 436 connection, ideally before any HEADERS or PUSH_PROMISE frames. 438 However, if it's desirable to associate a large number of origins 439 with a connection, doing so might introduce end-user perceived 440 latency, due to their size. As a result, it might be necessary to 441 select a "core" set of origins to send initially, expanding the set 442 of origins the connection is used for with subsequent ORIGIN frames 443 later (e.g., when the connection is idle). 445 That said, senders are encouraged to include as many origins as 446 practical within a single ORIGIN frame; clients need to make 447 decisions about creating connections on the fly, and if the origin 448 set is split across many frames, their behaviour might be suboptimal. 450 Senders take note that, as per Section 4, Step 5 of [RFC6454], the 451 values in an ORIGIN header need to be case-normalised before 452 serialisation. 454 Finally, servers that host alternative services [RFC7838] will need 455 to explicitly advertise their origins when sending ORIGIN, because 456 the default contents of the Origin Set (as per Section 2.3) do not 457 contain any Alternative Services' origins, even if they have been 458 used previously on the connection. 460 Authors' Addresses 462 Mark Nottingham 464 Email: mnot@mnot.net 465 URI: https://www.mnot.net/ 467 Erik Nygren 468 Akamai 470 Email: nygren@akamai.com