| < draft-ietf-httpbis-origin-frame-00.txt | draft-ietf-httpbis-origin-frame-01.txt > | |||
|---|---|---|---|---|
| HTTP Working Group M. Nottingham | HTTP Working Group M. Nottingham | |||
| Internet-Draft E. Nygren | Internet-Draft E. Nygren | |||
| Intended status: Standards Track Akamai | Intended status: Standards Track Akamai | |||
| Expires: November 11, 2016 May 10, 2016 | Expires: April 1, 2017 September 28, 2016 | |||
| The ORIGIN HTTP/2 Frame | The ORIGIN HTTP/2 Frame | |||
| draft-ietf-httpbis-origin-frame-00 | draft-ietf-httpbis-origin-frame-01 | |||
| Abstract | Abstract | |||
| This document specifies the ORIGIN frame for HTTP/2, to indicate what | This document specifies the ORIGIN frame for HTTP/2, to indicate what | |||
| origins are available on a given connection. | origins are available on a given connection. | |||
| Note to Readers | ||||
| Discussion of this draft takes place on the HTTP working group | ||||
| mailing list (ietf-http-wg@w3.org), which is archived at | ||||
| https://lists.w3.org/Archives/Public/ietf-http-wg/ . | ||||
| Working Group information can be found at http://httpwg.github.io/ ; | ||||
| source code and issues list for this draft can be found at | ||||
| https://github.com/httpwg/http-extensions/labels/origin-frame . | ||||
| Status of This Memo | Status of This Memo | |||
| This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
| provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on November 11, 2016. | This Internet-Draft will expire on April 1, 2017. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2016 IETF Trust and the persons identified as the | Copyright (c) 2016 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
| to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
| include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 2 | 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 2 | |||
| 1.2. The ORIGIN HTTP/2 Frame . . . . . . . . . . . . . . . . . 2 | 2. The ORIGIN HTTP/2 Frame . . . . . . . . . . . . . . . . . . . 2 | |||
| 2. Security Considerations . . . . . . . . . . . . . . . . . . . 3 | 2.1. The Origin Set . . . . . . . . . . . . . . . . . . . . . 3 | |||
| 3. Normative References . . . . . . . . . . . . . . . . . . . . 3 | 2.2. Processing ORIGIN Frames . . . . . . . . . . . . . . . . 4 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 4 | 3. Security Considerations . . . . . . . . . . . . . . . . . . . 5 | |||
| 4. Normative References . . . . . . . . . . . . . . . . . . . . 5 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 5 | ||||
| 1. Introduction | 1. Introduction | |||
| HTTP/2 [RFC7540] allows clients to coalesce different origins | HTTP/2 [RFC7540] allows clients to coalesce different origins | |||
| [RFC6454] onto the same connection when certain conditions are met. | [RFC6454] onto the same connection when certain conditions are met. | |||
| In some cases, the server is not authoritative for a coalesced | However, in certain cases, a connection is is not usable for a | |||
| origin, so the 421 (Misdirected Request) status code was defined. | coalesced origin, so the 421 (Misdirected Request) status code | |||
| ([RFC7540], Section 9.1.2) was defined. | ||||
| Using a status code in this manner allows clients to recover from | Using a status code in this manner allows clients to recover from | |||
| misdirected requests, but at the penalty of adding latency. To | misdirected requests, but at the penalty of adding latency. To | |||
| address that, this specification defines a new HTTP/2 frame type, | address that, this specification defines a new HTTP/2 frame type, | |||
| "ORIGIN", to allow servers to indicate what origins a connection is | "ORIGIN", to allow servers to indicate what origins a connection is | |||
| authoritative for. | usable for. | |||
| 1.1. Notational Conventions | 1.1. Notational Conventions | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | |||
| document are to be interpreted as described in [RFC2119]. | document are to be interpreted as described in [RFC2119]. | |||
| 1.2. The ORIGIN HTTP/2 Frame | 2. The ORIGIN HTTP/2 Frame | |||
| The ORIGIN HTTP/2 frame ([RFC7540], Section 4) indicates what | The ORIGIN HTTP/2 frame ([RFC7540], Section 4) allows a server to | |||
| origin(s) [RFC6454] the sender considers this connection | indicate what origin(s) [RFC6454] the server would like the client to | |||
| authoritative for (in the sense of [RFC7540], Section 10.1). | consider as members of the Origin Set (Section 2.1) for the | |||
| connection it occurs within. | ||||
| The ORIGIN frame is a non-critical extension to HTTP/2. Endpoints | The ORIGIN frame type is 0xb (decimal 11). | |||
| that do not support this frame can safely ignore it. | ||||
| It MUST occur on stream 0; an ORIGIN frame on any other stream is | +-------------------------------+-------------------------------+ | |||
| invalid and MUST be ignored. | | Origin-Len (16) | Origin? (*) ... | |||
| +-------------------------------+-------------------------------+ | ||||
| The ORIGIN frame's payload contains the following fields, sets of | ||||
| which may be repeated within the frame to indicate multiple origins: | ||||
| Origin-Len: An unsigned, 16-bit integer indicating the length, in | ||||
| octets, of the Origin field. | ||||
| Origin: An optional sequence of characters containing the ASCII | ||||
| serialization of an origin ([RFC6454], Section 6.2) that the | ||||
| sender believes this connection is or could be authoritative for. | ||||
| The ORIGIN frame defines the following flags: | ||||
| CLEAR (0x1): Indicates that the Origin Set MUST be reset to an empty | ||||
| set before processing the contents of the frame it occurs upon. | ||||
| REMOVE (0x2): Indicates that the origin(s) carried in the payload | ||||
| must be removed from the Origin Set, if present; if not present, | ||||
| it/they have no effect. | ||||
| 2.1. The Origin Set | ||||
| The set of origins (as per [RFC6454]) that a given connection might | ||||
| be used for is known in this specification as the Origin Set. | ||||
| When a connection is first established, its Origin Set is defined to | ||||
| be those origins that the client would normally consider the | ||||
| connection authoritative for; see [RFC7540], Section 10.1. | ||||
| The ORIGIN frame allows the server to modify the Origin Set. In | ||||
| particular: | ||||
| 1. A server can add to its members by sending an ORIGIN frame | ||||
| (without any flags set); | ||||
| 2. A server can prune one or more origins from it by sending an | ||||
| ORIGIN frame with the REMOVE flag set; | ||||
| 3. A server can remove all its members and then add zero or more | ||||
| members by sending an ORIGIN frame with the CLEAR flag set and a | ||||
| payload containing the new origins. | ||||
| Adding to the Origin Set (cases 1 and 3 above) does not imply that | ||||
| the connection is authoritative for the added origins (in the sense | ||||
| of [RFC7540], Section 10.1) on its own; this MUST be established by | ||||
| some other mechanism. | ||||
| A client that implements this specification MUST NOT use a connection | ||||
| for a given origin unless that origin appears in the Origin Set for | ||||
| the connection, regardless of whether or not it believes that the | ||||
| connection is authoritative for that origin. | ||||
| 2.2. Processing ORIGIN Frames | ||||
| The ORIGIN frame is a non-critical extension to HTTP/2. Endpoints | ||||
| that do not support this frame can safely ignore it upon receipt. | ||||
| When received by a client, it can be used to inform HTTP/2 connection | When received by a client, it can be used to inform HTTP/2 connection | |||
| coalescing (see [RFC7540], Section 9.1.1), but does not relax the | coalescing (see Section 2.1), but does not relax the requirement | |||
| requirement there that the server is authoritative. | there that the server is authoritative. | |||
| If multiple ORIGIN frames are received on the same connection, only | The origin frame MUST be sent on stream 0; an ORIGIN frame on any | |||
| the most recent is to be considered current. | other stream is invalid and MUST be ignored. | |||
| Once an ORIGIN frame has been received and processed, clients that | The ORIGIN frame is processed hop-by-hop. An intermediary MUST NOT | |||
| implement this specification SHOULD NOT use that connection for a | forward ORIGIN frames. Clients configured to use a proxy MUST ignore | |||
| given origin if it did not appear within the current ORIGIN frame. | any ORIGIN frames received from it. | |||
| The ORIGIN frame type is 0xb (decimal 11). | The following algorithm illustrates how a client can handle received | |||
| ORIGIN frames: | ||||
| +-------------------------------+-------------------------------+ | 1. If the client is configured to use a proxy, ignore the frame and | |||
| | Origin-Len (16) | Origin? (*) ... | stop processing. | |||
| +-------------------------------+-------------------------------+ | ||||
| The ORIGIN frame contains the following fields, sets of which may be | 2. If the frame occurs upon any stream except stream 0, ignore the | |||
| repeated within the frame to indicate multiple origins: | frame and stop processing. | |||
| Origin-Len: An unsigned, 16-bit integer indicating the length, in | 3. If the CLEAR flag is set, remove all members from the Origin Set. | |||
| octets, of the Origin field. Origin: An optional sequence of | ||||
| characters containing the ASCII serialization of an origin | ||||
| ([RFC6454], Section 6.2) that the sender believes this connection is | ||||
| authoritative for. | ||||
| The ORIGIN frame does not define any flags. It can contain one or | 4. For each Origin field "origin_raw" in the frame payload: | |||
| more Origin-Len/Origin pairs. | ||||
| The ORIGIN frame is processed hop-by-hop. An intermediary must not | 1. Parse "origin_raw" as an ASCII serialization of an origin | |||
| forward ORIGIN frames. | ([RFC6454], Section 6.2) and let the result be | |||
| "parsed_origin". | ||||
| Clients configured to use a proxy MUST ignore any ORIGIN frames | 2. If the REMOVE flag is set, remove any member of the Origin | |||
| received from it. | Set that is the same as "parsed_origin" (as per [RFC6454], | |||
| Section 5), and continue to the next "parsed_origin". | ||||
| 2. Security Considerations | 3. Otherwise, add "parsed_origin" to the Origin Set. | |||
| 3. Security Considerations | ||||
| Clients that blindly trust the ORIGIN frame's contents will be | Clients that blindly trust the ORIGIN frame's contents will be | |||
| vulnerable to a large number of attacks; hence the reinforcement that | vulnerable to a large number of attacks; hence the reinforcement that | |||
| this specification does not relax the requirement for server | this specification does not relax the requirement for server | |||
| authority in [RFC7540], Section 10.1. | authority in [RFC7540], Section 10.1. | |||
| 3. Normative References | 4. Normative References | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
| DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <http://www.rfc-editor.org/info/rfc2119>. | <http://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, | [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, | |||
| DOI 10.17487/RFC6454, December 2011, | DOI 10.17487/RFC6454, December 2011, | |||
| <http://www.rfc-editor.org/info/rfc6454>. | <http://www.rfc-editor.org/info/rfc6454>. | |||
| skipping to change at page 4, line 16 ¶ | skipping to change at page 5, line 34 ¶ | |||
| Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | |||
| DOI 10.17487/RFC7540, May 2015, | DOI 10.17487/RFC7540, May 2015, | |||
| <http://www.rfc-editor.org/info/rfc7540>. | <http://www.rfc-editor.org/info/rfc7540>. | |||
| Authors' Addresses | Authors' Addresses | |||
| Mark Nottingham | Mark Nottingham | |||
| Akamai | Akamai | |||
| Email: mnot@mnot.net | Email: mnot@mnot.net | |||
| URI: http://www.mnot.net/ | URI: https://www.mnot.net/ | |||
| Erik Nygren | Erik Nygren | |||
| Akamai | Akamai | |||
| Email: nygren@akamai.com | Email: nygren@akamai.com | |||
| End of changes. 24 change blocks. | ||||
| 45 lines changed or deleted | 114 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||