Internet Engineering Task Force (IETF) S. Ludin Request for Comments: 8586 Akamai Technologies Category: Standards Track M. Nottingham ISSN: 2070-1721 Fastly N. Sullivan Cloudflare April 2019
Internet Engineering Task Force (IETF) S. Ludin Request for Comments: 8586 Akamai Technologies Category: Standards Track M. Nottingham ISSN: 2070-1721 Fastly N. Sullivan Cloudflare April 2019
Loop Detection in Content Delivery Networks (CDNs)
内容交付网络(CDN)中的环路检测
Abstract
摘要
This document defines the CDN-Loop request header field for HTTP. CDN-Loop addresses an operational need that occurs when an HTTP request is intentionally forwarded between Content Delivery Networks (CDNs), but is then accidentally or maliciously re-routed back into the original CDN causing a non-terminating loop. The new header field can be used to identify the error and terminate the loop.
本文档定义了HTTP的CDN循环请求头字段。CDN循环解决了在内容交付网络(CDN)之间有意转发HTTP请求,但随后意外或恶意地重新路由回原始CDN,从而导致非终止循环时出现的操作需求。新的标头字段可用于识别错误并终止循环。
Status of This Memo
关于下段备忘
This is an Internet Standards Track document.
这是一份互联网标准跟踪文件。
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.
本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 7841第2节。
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8586.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问https://www.rfc-editor.org/info/rfc8586.
Copyright Notice
版权公告
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.
版权(c)2019 IETF信托基金和被确定为文件作者的人员。版权所有。
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(https://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。
Table of Contents
目录
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Relationship to Via . . . . . . . . . . . . . . . . . . . 2 1.2. Conventions and Definitions . . . . . . . . . . . . . . . 3 2. The CDN-Loop Request Header Field . . . . . . . . . . . . . . 3 3. Security Considerations . . . . . . . . . . . . . . . . . . . 4 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 5.1. Normative References . . . . . . . . . . . . . . . . . . 5 5.2. Informative References . . . . . . . . . . . . . . . . . 6 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Relationship to Via . . . . . . . . . . . . . . . . . . . 2 1.2. Conventions and Definitions . . . . . . . . . . . . . . . 3 2. The CDN-Loop Request Header Field . . . . . . . . . . . . . . 3 3. Security Considerations . . . . . . . . . . . . . . . . . . . 4 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 5.1. Normative References . . . . . . . . . . . . . . . . . . 5 5.2. Informative References . . . . . . . . . . . . . . . . . 6 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6
In modern deployments of HTTP servers, it is common to interpose Content Delivery Networks (CDNs) in front of origin servers to improve latency perceived by end users, reduce operational costs, and improve scalability and reliability of services.
在HTTP服务器的现代部署中,通常在源服务器前面插入内容交付网络(CDN),以改善最终用户感知的延迟,降低运营成本,并提高服务的可扩展性和可靠性。
Often, more than one CDN is in use by a given origin. This happens for a variety of reasons, such as cost savings, arranging for failover should one CDN have issues, or direct comparison of the CDNs' services.
通常,给定的源站使用多个CDN。发生这种情况的原因多种多样,例如节约成本、在一个CDN出现问题时安排故障切换,或者直接比较CDN的服务。
As a result, it is possible for forwarding CDNs to be configured in a "loop" accidentally; because routing is achieved through a combination of DNS and forwarding rules, and site configurations are sometimes complex and managed by several parties.
结果,转发cdn可能被意外地配置在“循环”中;因为路由是通过DNS和转发规则的组合来实现的,站点配置有时很复杂,并且由多方管理。
When this happens, it is difficult to debug. Additionally, it sometimes isn't accidental; loops between multiple CDNs can be used as an attack vector (e.g., see [loop-attack]), especially if one CDN unintentionally strips the loop detection headers of another.
发生这种情况时,很难进行调试。此外,它有时不是偶然的;多个CDN之间的循环可以用作攻击向量(例如,参见[循环攻击]),特别是如果一个CDN无意地剥离另一个的循环检测头。
This specification defines the CDN-Loop HTTP request header field to help detect such attacks and accidents among forwarding CDNs that have implemented it; the header field may not be modified by their customers.
本规范定义了CDN Loop HTTP request header字段,以帮助检测已实施该字段的转发CDN之间的此类攻击和事故;标题字段不能由其客户修改。
HTTP defines the Via header field in Section 5.7.1 of [RFC7230] for "tracking message forwards, avoiding request loops, and identifying the protocol capabilities of senders along the request/response chain."
HTTP在[RFC7230]第5.7.1节中定义了Via header字段,用于“跟踪消息转发,避免请求循环,并识别请求/响应链上发送方的协议功能。”
In theory, Via could be used to identify these loops. However, in practice it is not used in this fashion, because some HTTP servers use Via for other purposes -- in particular, some implementations disable some HTTP/1.1 features when the Via header is present.
从理论上讲,Via可以用来识别这些环路。然而,在实践中,它并不是以这种方式使用的,因为一些HTTP服务器将Via用于其他目的——特别是,一些实现在存在Via头时禁用了一些HTTP/1.1功能。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”在所有大写字母出现时(如图所示)应按照BCP 14[RFC2119][RFC8174]所述进行解释。
This specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] with a list extension, defined in Section 7 of [RFC7230], that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). Additionally, it uses a token (OWS), uri-host, and port rules from [RFC7230] and the parameter rule from [RFC7231].
本规范使用[RFC7230]第7节中定义的[RFC5234]的增广巴科斯-诺尔形式(ABNF)符号和列表扩展,允许使用“#”运算符(类似于“*”运算符表示重复)对逗号分隔的列表进行紧凑定义。此外,它还使用[RFC7230]中的令牌(OWS)、uri主机和端口规则以及[RFC7231]中的参数规则。
The CDN-Loop request header field is intended to help a Content Delivery Network identify when an incoming request has already passed through that CDN's servers to detect loops.
CDN Loop request header字段旨在帮助内容交付网络识别何时传入请求已经通过该CDN的服务器来检测循环。
CDN-Loop = #cdn-info cdn-info = cdn-id *( OWS ";" OWS parameter ) cdn-id = ( uri-host [ ":" port ] ) / pseudonym pseudonym = token
CDN-Loop = #cdn-info cdn-info = cdn-id *( OWS ";" OWS parameter ) cdn-id = ( uri-host [ ":" port ] ) / pseudonym pseudonym = token
The cdn-id identifies the CDN using either a hostname under its control or a pseudonym. Hostnames are preferred, to help avoid accidental collisions. If a pseudonym is used, unintentional collisions are more likely, and therefore values should be carefully chosen to prevent them; for example, using a well-known value (such as the recognized name of the CDN in question), or a generated value with enough entropy to make collisions unlikely (such as a UUID [RFC4122]).
cdn id使用其控制下的主机名或假名来标识cdn。最好使用主机名,以避免意外冲突。如果使用假名,则更可能发生意外碰撞,因此应仔细选择值以防止碰撞;例如,使用众所周知的值(例如所讨论的CDN的已识别名称)或具有足够熵的生成值(例如UUID[RFC4122])。
Optionally, cdn-info can have semicolon-separated key/value parameters to accommodate additional information for the CDN's use.
或者,cdn信息可以具有分号分隔的键/值参数,以容纳cdn使用的其他信息。
Conforming Content Delivery Networks SHOULD add a cdn-info to this header field in all requests they generate or forward (creating the header field if necessary).
一致性内容交付网络应在其生成或转发的所有请求中向该标题字段添加cdn信息(必要时创建标题字段)。
As with all HTTP header fields defined using the "#" rule, the CDN-Loop header field can be added to by comma-separating values, or by creating a new header field with the desired value.
与使用“#”规则定义的所有HTTP头字段一样,CDN循环头字段可以通过逗号分隔值添加到,也可以使用所需值创建新的头字段。
For example:
例如:
GET /image.jpg HTTP/1.1 Host: cdn-customer.example User-Agent: ExampleBrowser/5 CDN-Loop: foo123.foocdn.example, barcdn.example; trace="abcdef" CDN-Loop: AnotherCDN; abc=123; def="456"
GET /image.jpg HTTP/1.1 Host: cdn-customer.example User-Agent: ExampleBrowser/5 CDN-Loop: foo123.foocdn.example, barcdn.example; trace="abcdef" CDN-Loop: AnotherCDN; abc=123; def="456"
Note that the pseudonym syntax does not allow whitespace, DQUOTE, or any of the characters "(),/:;<=>?@[]{}". See Section 3.2.6 of [RFC7230]. Likewise, note the rules for when parameter values need to be quoted in Section 3.1.1 of [RFC7231].
请注意,笔名语法不允许空白、DQUOTE或任何字符“(),/:;<=>?@[]{}”。见[RFC7230]第3.2.6节。同样,请注意[RFC7231]第3.1.1节中需要引用参数值的时间规则。
The effectiveness of this mechanism relies on all intermediaries preserving the header field, since removing (or allowing it to be removed, e.g., by customer configuration) would prevent downstream CDNs from using it to detect looping. In general, unknown header fields are not removed by intermediaries, but there may be a need to add CDN-Loop to an implementation's list of header fields that are not to be removed under any circumstances. The header field SHOULD NOT be used for other purposes.
此机制的有效性依赖于所有保留报头字段的中介,因为删除(或允许删除,例如通过客户配置)将阻止下游CDN使用它来检测循环。通常,中介不会删除未知的头字段,但可能需要将CDN循环添加到实现的头字段列表中,这些头字段在任何情况下都不会被删除。标题字段不应用于其他目的。
The threat model that the CDN-Loop header field addresses is a customer who is attacking a service provider by configuring a forwarding loop by accident or malice. For it to function, CDNs cannot allow customers to modify or remove it in their configuration (see Section 2).
CDN循环头字段所针对的威胁模型是通过意外或恶意配置转发循环来攻击服务提供商的客户。为了使it正常运行,CDN不能允许客户在其配置中修改或删除it(请参见第2节)。
Note that a CDN that allows customers to remove or modify the CDN-Loop header field (i.e., they do not implement this specification) remains an attack vector against both implementing and non-implementing CDNs.
注意,允许客户删除或修改CDN循环头字段(即,它们不执行此规范)的CDN仍然是针对实现和不执行CDN的攻击向量。
A CDN's use of the CDN-Loop header field might expose its presence. For example, if CDN A is configured to forward its requests to CDN B for a given origin, CDN B's presence can be revealed if it behaves differently based upon the presence of the CDN-Loop header field.
CDN使用CDN循环头字段可能会暴露其存在。例如,如果CDN A被配置为将其对给定来源的请求转发给CDN B,则如果CDN B的行为基于CDN循环报头字段的存在而不同,则可以显示CDN B的存在。
The CDN-Loop header field can be generated by any client, and therefore its contents cannot be trusted. CDNs who modify their behavior based upon its contents should assure that this does not become an attack vector (e.g., for Denial of Service).
CDN循环头字段可以由任何客户端生成,因此其内容不可信。根据其内容修改其行为的CDN应确保这不会成为攻击向量(例如,拒绝服务)。
It is possible to sign the contents of the header field (either by putting the signature directly into the field's content or using another header field), but such use is not defined (or required) by this specification.
可以对标题字段的内容进行签名(通过将签名直接放入字段内容或使用另一个标题字段),但本规范未定义(或要求)此类使用。
Depending on how it is used, CDN-Loop can expose information about the internal configuration of the CDN; for example, the number of hops inside the CDN, and the hostnames of nodes.
根据使用方式,CDN Loop可以公开有关CDN内部配置的信息;例如,CDN内的跃点数和节点的主机名。
This document registers the "CDN-Loop" header field in the "Permanent Message Header Field Names" registry.
本文档在“永久消息头字段名称”注册表中注册“CDN循环”头字段。
o Header Field Name: CDN-Loop
o 标题字段名称:CDN循环
o Protocol: http
o 协议:http
o Status: standard
o 状态:标准
o Reference: RFC 8586
o 参考:RFC 8586
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<https://www.rfc-editor.org/info/rfc2119>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <https://www.rfc-editor.org/info/rfc5234>.
[RFC5234]Crocker,D.,Ed.和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,DOI 10.17487/RFC5234,2008年1月<https://www.rfc-editor.org/info/rfc5234>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, DOI 10.17487/RFC7230, June 2014, <https://www.rfc-editor.org/info/rfc7230>.
[RFC7230]Fielding,R.,Ed.和J.Reschke,Ed.,“超文本传输协议(HTTP/1.1):消息语法和路由”,RFC 7230,DOI 10.17487/RFC7230,2014年6月<https://www.rfc-editor.org/info/rfc7230>.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 10.17487/RFC7231, June 2014, <https://www.rfc-editor.org/info/rfc7231>.
[RFC7231]Fielding,R.,Ed.和J.Reschke,Ed.,“超文本传输协议(HTTP/1.1):语义和内容”,RFC 7231,DOI 10.17487/RFC72312014年6月<https://www.rfc-editor.org/info/rfc7231>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8174]Leiba,B.,“RFC 2119关键词中大写与小写的歧义”,BCP 14,RFC 8174,DOI 10.17487/RFC8174,2017年5月<https://www.rfc-editor.org/info/rfc8174>.
[loop-attack] Chen, J., Jiang, J., Zheng, X., Duan, H., Liang, J., Li, K., Wan, T., and V. Paxson, "Forwarding-Loop Attacks in Content Delivery Networks", February 2016, <http://www.icir.org/vern/papers/cdn-loops.NDSS16.pdf>.
[loop attack]Chen,J.,Jiang,J.,Zheng,X.,Duan,H.,Liang,J.,Li,K.,Wan,T.,和V.Paxson,“内容交付网络中的转发循环攻击”,2016年2月<http://www.icir.org/vern/papers/cdn-loops.NDSS16.pdf>.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI 10.17487/RFC4122, July 2005, <https://www.rfc-editor.org/info/rfc4122>.
[RFC4122]Leach,P.,Mealling,M.和R.Salz,“通用唯一标识符(UUID)URN名称空间”,RFC 4122,DOI 10.17487/RFC4122,2005年7月<https://www.rfc-editor.org/info/rfc4122>.
Authors' Addresses
作者地址
Stephen Ludin Akamai Technologies
Stephen Ludin Akamai Technologies
Email: sludin@akamai.com
Email: sludin@akamai.com
Mark Nottingham Fastly
马克·诺丁汉·法斯特利
Email: mnot@fastly.com
Email: mnot@fastly.com
Nick Sullivan Cloudflare
尼克沙利文云闪
Email: nick@cloudflare.com
Email: nick@cloudflare.com