ステータス:
PROPOSED STANDARD
原文:
RFC 7239
その他の情報:
Datatracker|Info page

RFC 7239

Forwarded HTTP Extension

RFC 7239

Forwarded HTTP拡張

Abstract

概要

This document defines an HTTP extension header field that allows proxy components to disclose information lost in the proxying process, for example, the originating IP address of a request or IP address of the proxy on the user-agent-facing interface. In a path of proxying components, this makes it possible to arrange it so that each subsequent component will have access to, for example, all IP addresses used in the chain of proxied HTTP requests.

この文書では、プロキシコンポーネントがプロキシ処理で失われた情報、例えば、リクエストの発信IPアドレスやユーザーエージェント向けインターフェースのプロキシのIPアドレスを開示するためのHTTP拡張ヘッダーフィールドを定義します。プロキシコンポーネントのパスでは、これにより、例えば、プロキシ化されたHTTPリクエストのチェーンで使用されたすべてのIPアドレスに、各後続コンポーネントがアクセスできるように配置することが可能になります。

This document also specifies guidelines for a proxy administrator to anonymize the origin of a request.

この文書では、リクエストの発信元を匿名化するためのプロキシ管理者のガイドラインも指定します。

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 5741.

この文書は、インターネットエンジニアリングタスクフォース(IETF)の製品です。これはIETFコミュニティの合意を表しています。公開レビューを受け、インターネットエンジニアリングステアリンググループ(IESG)により出版が承認されました。インターネット標準に関する詳細な情報は、RFC 5741のセクション2にあります。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7239.

この文書の現在のステータス、任意のエラータ、そしてそれに対するフィードバックの提供方法についての情報は、http://www.rfc-editor.org/info/rfc7239 で取得できます。

Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.

Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://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)にしたがう必要があります。これらの文書をよく確認し、この文書に関するあなたの権利と制限を説明しています。この文書から抽出されたコードコンポーネントには、Trust Legal Provisionsのセクション4.eに記載されているSimplified BSD Licenseのテキストが含まれている必要があり、Simplified BSD Licenseに記載されているように保証なしで提供されます。

In today's HTTP landscape, there are a multitude of different applications that act as proxies for the user agents. In many cases, these proxies exists without the action or knowledge of the end-user. These cases occur, for example, when the proxy exists as a part of the infrastructure within the organization running the web server. Such proxies may be used for features such as load balancing or crypto offload. Another example is when the proxy is used within the same organization as the user, and the proxy is used to cache resources. However, these proxies make the requests appear as if they originated from the proxy's IP address, and they may change other information in the original request. This represents a loss of information from the original request.

今日のHTTPの風景では、ユーザーエージェントの代理として機能するさまざまなアプリケーションがあります。多くの場合、これらのプロキシはエンドユーザーの行動や知識なしに存在します。これらのケースは、例えば、プロキシがウェブサーバーを運用する組織内のインフラの一部として存在するときに発生します。このようなプロキシは、ロードバランシングや暗号化オフロードのような機能に使用されることがあります。別の例は、プロキシがユーザーと同じ組織内で使用され、プロキシがリソースをキャッシュするために使用される場合です。しかし、これらのプロキシは、リクエストがプロキシのIPアドレスから発生したかのように見せ、元のリクエストの他の情報を変更する可能性があります。これは、元のリクエストからの情報の損失を表しています。

This loss of information can cause problems for a web server that has a specific use for the clients' IP addresses that will not be met by using the address of the proxy or other information changed by the proxy. The main uses of this information are for diagnostics, access control, and abuse management. Diagnostic functions can include event logging, troubleshooting, and statistics gathering, and the information collected is usually only stored for short periods of time and only gathered in response to a particular problem or a complaint from the client. Access control can be operated by configuring a list of client IP addresses from which access is permitted, but this approach will not work if a proxy is used, unless the proxy is trusted and is, itself, configured with a list of allowed client addresses for the server. Cases of abuse require identification of the abuser and this uses many of the same features identified for diagnostics.

この情報の損失は、クライアントのIPアドレスを特定の目的で使用しているウェブサーバーに問題を引き起こす可能性があります。これは、プロキシのアドレスやプロキシによって変更された他の情報を使用しても満たされません。この情報の主な用途は、診断、アクセス制御、および不正利用管理です。診断機能には、イベントログ、トラブルシューティング、統計収集が含まれ、収集された情報は通常、特定の問題やクライアントからの苦情に対応して短期間だけ保存されます。アクセス制御は、アクセスが許可されるクライアントのIPアドレスのリストを設定することで運用できますが、プロキシを使用する場合、このアプローチは機能しません。ただし、プロキシが信頼されており、サーバーの許可されるクライアントアドレスのリストで設定されている場合は例外です。不正利用のケースでは、不正利用者の特定が必要であり、これは診断のために特定された多くの機能を使用します。

Most of the time that a proxy is used, this loss of information is not the primary purpose, or even a desired effect, of using the proxy. Thus, to restore the desired functionality when a proxy is in use, a way of disclosing the original information at the HTTP level is needed. Clearly, however, when the purpose of using a proxy is to provide client anonymity, the proxy will not use the feature defined in this document.

プロキシが使用されるほとんどの場合、この情報の損失はプロキシの使用の主な目的でも、望ましい効果でもありません。したがって、プロキシが使用中の場合に望ましい機能を復元するためには、HTTPレベルで元の情報を開示する方法が必要です。ただし、明らかに、プロキシを使用する目的がクライアントの匿名性を提供することである場合、プロキシはこの文書で定義されている機能を使用しません。

It should be noted that the use of a reverse proxy also hides information. Again, where the loss of information is not a deliberate function of the use of the reverse proxy, it can be desirable to find a way to encode the information within the HTTP messages so that the consumer can see it.

リバースプロキシの使用も情報を隠すことに注意すべきです。再度、情報の損失がリバースプロキシの使用の意図的な機能ではない場合、消費者がそれを見ることができるようにHTTPメッセージ内に情報をエンコードする方法を見つけることが望ましいです。

A common way to disclose this information is by using the non- standard header fields such as X-Forwarded-For, X-Forwarded-By, and X-Forwarded-Proto. There are many benefits to using a standardized approach to commonly desired protocol function: not least is interoperability between implementations. This document standardizes a header field called "Forwarded" and provides the syntax and semantics for disclosing such information. "Forwarded" also combines all the information within one single header field, making it possible to correlate that information. With the header field format described in this document, it is possible to know what information belongs together, as long as the proxies are trusted. Such conclusions are not possible to make with the X-Forwarded class of header fields. The header field defined in this document is optional such that implementations of proxies that are intended to provide privacy are not required to operate or implement the header field.

この情報を開示する一般的な方法は、X-Forwarded-For、X-Forwarded-By、およびX-Forwarded-Protoのような非標準のヘッダーフィールドを使用することです。一般的に望まれるプロトコル機能への標準化されたアプローチを使用することには多くの利点があります。その中でも最も重要なのは、実装間の相互運用性です。この文書では、"Forwarded"というヘッダーフィールドを標準化し、そのような情報を開示するための構文とセマンティクスを提供します。"Forwarded"は、すべての情報を1つのヘッダーフィールド内に組み合わせ、その情報を相関させることを可能にします。この文書で説明されているヘッダーフィールド形式を使用すると、プロキシが信頼されている限り、どの情報が一緒に属しているかを知ることが可能です。このような結論は、X-Forwardedクラスのヘッダーフィールドでは得ることができません。この文書で定義されているヘッダーフィールドはオプションであり、プライバシーを提供することを目的としたプロキシの実装は、ヘッダーフィールドを操作または実装することを必要としません。

Note that similar issues to those described for proxies also arise with use of NATs. This is discussed further in [RFC6269].

プロキシで説明された問題と同様の問題がNATの使用でも発生することに注意してください。これについては、[RFC6269]でさらに議論されています。

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

キーワード「しなければなりません(MUST)」、「してはなりません(MUST NOT)」、 「要求されています(REQUIRED)」、 「することになります(SHALL)」、「することはありません(SHALL NOT)」、 「すべきです(SHOULD)」、「すべきではありません(SHOULD NOT)」、 「推奨されます(RECOMMENDED)」、「推奨されません(NOT RECOMMENDED)」、 「してもよいです(MAY)」、「選択できます(OPTIONAL)」は、 [RFC2119]に記載されているとおりに解釈されるものとします。

This specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] with the list rule extension defined in Section 7 of [RFC7230].

この仕様は、[RFC5234]の拡張バッカス・ナウア形式(ABNF)表記法と、[RFC7230]のSection 7で定義されたリストルール拡張を使用します。

The "Forwarded" HTTP header field is an OPTIONAL header field that, when used, contains a list of parameter-identifier pairs that disclose information that is altered or lost when a proxy is involved in the path of the request. Due to the sensitive nature of the data passed in this header field (see Sections 8.2 and 8.3), this header field should be turned off by default. Further, each parameter should be configured individually. "Forwarded" is only for use in HTTP requests and is not to be used in HTTP responses. This applies to forwarding proxies, as well as reverse proxies. Information passed in this header field can be, for example, the source IP address of the request, the IP address of the incoming interface on the proxy, or whether HTTP or HTTPS was used. If the request is passing through several proxies, each proxy can add a set of parameters; it can also remove previously added "Forwarded" header fields.

"Forwarded" HTTPヘッダーフィールドは、プロキシがリクエストのパスに関与するときに変更されたり失われたりする情報を開示する、パラメーター識別子ペアのリストです。"Forwarded" HTTPヘッダーフィールドの使用は選択できます(OPTIONAL)。このヘッダーフィールドで渡されるデータの性質がデリケートであるため(セクション8.2および8.3を参照)、このヘッダーフィールドはデフォルトでオフにする必要があります。さらに、各パラメーターは個別に設定する必要があります。"Forwarded"はHTTPリクエストでのみ使用し、HTTPレスポンスでは使用しません。これは、フォワーディングプロキシとリバースプロキシの両方に適用されます。このヘッダーフィールドで渡される情報には、例えば、リクエストのソースIPアドレス、プロキシの受信インターフェースのIPアドレス、またはHTTPまたはHTTPSが使用されたかどうかが含まれます。リクエストが複数のプロキシを通過している場合、各プロキシは一連のパラメーターを追加することができます。また、以前に追加された"Forwarded"ヘッダーフィールドを削除することもできます。

The top-level list is represented as a list of HTTP header field-values as defined in Section 3.2 of [RFC7230]. The first element in this list holds information added by the first proxy that implements and uses this header field, and each subsequent element holds information added by each subsequent proxy. Because this header field is optional, any proxy in the chain may choose not to update this header field. Each field-value is a semicolon-separated list; this sublist consists of parameter-identifier pairs. Parameter-identifier pairs are grouped together by an equals sign. Each parameter MUST NOT occur more than once per field-value. The parameter names are case-insensitive. The header field value can be defined in ABNF syntax as:

トップレベルのリストは、[RFC7230]のSection 3.2で定義されているHTTPヘッダーフィールド値のリストとして表現されます。このリストの最初の要素には、このヘッダーフィールドを実装し使用する最初のプロキシによって追加された情報が含まれ、各後続の要素には各後続のプロキシによって追加された情報が含まれます。このヘッダーフィールドはオプションなので、チェーン内の任意のプロキシがこのヘッダーフィールドを更新しないことを選択することができます。各フィールド値はセミコロンで区切られたリストであり、このサブリストはパラメーター識別子ペアで構成されます。パラメーター識別子ペアは等号でグループ化されます。各パラメーターは、フィールド値ごとに1回以上現れてはなりません(MUST NOT)。パラメーター名は大文字と小文字を区別しません。ヘッダーフィールド値はABNF構文で定義することができます。

    Forwarded   = 1#forwarded-element

    Forwarded   = 1#forwarded-element

    forwarded-element =
        [ forwarded-pair ] *( ";" [ forwarded-pair ] )

    forwarded-element =
        [ forwarded-pair ] *( ";" [ forwarded-pair ] )

    forwarded-pair = token "=" value
    value          = token / quoted-string

    forwarded-pair = token "=" value
    value          = token / quoted-string

    token = <Defined in [RFC7230], Section 3.2.6>
    quoted-string = <Defined in [RFC7230], Section 3.2.6>

        token = <[RFC7230]のセクション3.2.6で定義>
        quoted-string = <[RFC7230]のセクション3.2.6で定義>

Examples:

Examples:

    Forwarded: for="_gazonk"
    Forwarded: For="[2001:db8:cafe::17]:4711"
    Forwarded: for=192.0.2.60;proto=http;by=203.0.113.43
    Forwarded: for=192.0.2.43, for=198.51.100.17

    Forwarded: for="_gazonk"
    Forwarded: For="[2001:db8:cafe::17]:4711"
    Forwarded: for=192.0.2.60;proto=http;by=203.0.113.43
    Forwarded: for=192.0.2.43, for=198.51.100.17

Note that as ":" and "[]" are not valid characters in "token", IPv6 addresses are written as "quoted-string".

":"および"[]"は"token"では有効な文字ではないため、IPv6アドレスは"quoted-string"として記述されることに注意してください。

A proxy server that wants to add a new "Forwarded" header field value can either append it to the last existing "Forwarded" header field after a comma separator or add a new field at the end of the header block. A proxy MAY remove all "Forwarded" header fields from a request. It MUST, however, ensure that the correct header field is updated in case of multiple "Forwarded" header fields.

新しい"Forwarded"ヘッダーフィールド値を追加したいプロキシサーバーは、カンマ区切りの後に最後の既存の"Forwarded"ヘッダーフィールドに追加するか、ヘッダーブロックの最後に新しいフィールドを追加することができます。プロキシはリクエストからすべての"Forwarded"ヘッダーフィールドを削除してもよいです(MAY)。しかし、複数の"Forwarded"ヘッダーフィールドがある場合には、正しいヘッダーフィールドが更新されることを確認しなければなりません(MUST)

This document specifies a number of parameters and valid values for each of them:

この文書では、いくつかのパラメーターとそれぞれの有効な値を指定しています:

  • "by" identifies the user-agent facing interface of the proxy.
  • "by"はプロキシのユーザーエージェント向けインターフェースを識別します。
  • "for" identifies the node making the request to the proxy.
  • "for"はプロキシへのリクエストを行うノードを識別します。
  • "host" is the host request header field as received by the proxy.
  • "host"はプロキシによって受信されたホストリクエストヘッダーフィールドです。
  • "proto" indicates what protocol was used to make the request.
  • "proto"はリクエストを行うために使用されたプロトコルを示します。

The "by" parameter is used to disclose the interface where the request came in to the proxy server. When proxies choose to use the "by" parameter, its default configuration SHOULD contain an obfuscated identifier as described in Section 6.3. If the server receiving proxied requests requires some address-based functionality, this parameter MAY instead contain an IP address (and, potentially, a port number). A third option is the "unknown" identifier described in Section 6.2.

"by"パラメーターは、リクエストがプロキシサーバーに入ってきたインターフェースを開示するために使用されます。プロキシが"by"パラメーターを使用することを選択した場合、そのデフォルトの設定は、セクション6.3で説明されているような難読化された識別子を含むべきです(SHOULD)。プロキシ化されたリクエストを受信するサーバーが何らかのアドレスベースの機能を必要とする場合、このパラメーターは代わりにIPアドレス(および可能性としてはポート番号)を含む場合があります(MAY)。3つ目のオプションは、セクション6.2で説明されている"unknown"識別子です。

The syntax of a "by" value, after potential quoted-string unescaping, conforms to the "node" ABNF described in Section 6.

潜在的なquoted-stringのアンエスケープ後の"by"値の構文は、セクション6で説明されている"node"のABNFに準拠します。

This is primarily added by reverse proxies that wish to forward this information to the backend server. It can also be interesting in a multihomed environment to signal to backend servers from which the request came.

これは主に、この情報をバックエンドサーバーに転送したいリバースプロキシによって追加されます。また、マルチホーム環境では、どのリクエストが来たかをバックエンドサーバーに通知するのにも有用です。

The "for" parameter is used to disclose information about the client that initiated the request and subsequent proxies in a chain of proxies. When proxies choose to use the "for" parameter, its default configuration SHOULD contain an obfuscated identifier as described in Section 6.3. If the server receiving proxied requests requires some address-based functionality, this parameter MAY instead contain an IP address (and, potentially, a port number). A third option is the "unknown" identifier described in Section 6.2.

"for"パラメーターは、リクエストを開始したクライアントとプロキシチェーン内の後続のプロキシに関する情報を開示するために使用されます。プロキシが"for"パラメーターを使用することを選択した場合、そのデフォルトの設定は、セクション6.3で説明されているような難読化された識別子を含むべきです(SHOULD)。プロキシ化されたリクエストを受信するサーバーが何らかのアドレスベースの機能を必要とする場合、このパラメーターは代わりにIPアドレス(および可能性としてはポート番号)を含む場合があります(MAY)。3つ目のオプションは、セクション6.2で説明されている"unknown"識別子です。

The syntax of a "for" value, after potential quoted-string unescaping, conforms to the "node" ABNF described in Section 6.

潜在的なquoted-stringのアンエスケープ後の"for"値の構文は、セクション6で説明されている"node"のABNFに準拠します。

In a chain of proxy servers where this is fully utilized, the first "for" parameter will disclose the client where the request was first made, followed by any subsequent proxy identifiers. The last proxy in the chain is not part of the list of "for" parameters. The last proxy's IP address, and optionally a port number, are, however, readily available as the remote IP address at the transport layer. It can, however, be more relevant to read information about the last proxy from preceding "Forwarded" header field's "by" parameter, if present.

これが完全に利用されているプロキシサーバーのチェーンでは、最初の"for"パラメーターは、リクエストが最初に行われたクライアントを開示し、その後に続く任意のプロキシ識別子を続けます。チェーン内の最後のプロキシは"for"パラメーターのリストの一部ではありません。ただし、最後のプロキシのIPアドレスと、オプションでポート番号は、トランスポート層のリモートIPアドレスとして容易に利用できます。ただし、存在する場合、先行する"Forwarded"ヘッダーフィールドの"by"パラメーターから最後のプロキシに関する情報を読み取る方が関連性があります。

The "host" parameter is used to forward the original value of the "Host" header field. This can be used, for example, by the origin server if a reverse proxy is rewriting the "Host" header field to some internal host name.

"host"パラメーターは、元の"Host"ヘッダーフィールドの値を転送するために使用されます。これは、例えば、リバースプロキシが"Host"ヘッダーフィールドを何らかの内部ホスト名に書き換えている場合、オリジンサーバーによって使用することができます。

The syntax for a "host" value, after potential quoted-string unescaping, MUST conform to the Host ABNF described in Section 5.4 of [RFC7230].

潜在的なquoted-stringのアンエスケープ後の"host"値の構文は、[RFC7230]のSection 5.4で説明されているHost ABNFに準拠しなければなりません(MUST)

The "proto" parameter has the value of the used protocol type. The syntax of a "proto" value, after potential quoted-string unescaping, MUST conform to the URI scheme name as defined in Section 3.1 in [RFC3986] and registered with IANA according to [RFC4395]. Typical values are "http" or "https".

"proto"パラメーターは、使用されたプロトコルタイプの値を持ちます。潜在的なquoted-stringのアンエスケープ後の"proto"値の構文は、[RFC3986]のセクション3.1で定義されているURIスキーム名に準拠しなければなりません(MUST)。そして、[RFC4395]に従ってIANAに登録されます。典型的な値は"http"または"https"です。

For example, in an environment where a reverse proxy is also used as a crypto offloader, this allows the origin server to rewrite URLs in a document to match the type of connection as the user agent requested, even though all connections to the origin server are unencrypted HTTP.

例えば、リバースプロキシが暗号化オフローダとしても使用されている環境では、オリジンサーバーは、オリジンサーバーへのすべての接続が暗号化されていないHTTPであるにもかかわらず、ユーザーエージェントが要求した接続のタイプに合わせてドキュメント内のURLを書き換えることができます。

Extensions allow for additional parameters and values. Extensions can be particularly useful in reverse proxy environments. All extension parameters SHOULD be registered in the "HTTP Forwarded Parameter" registry. If certain extensions are expected to have widespread deployment, they SHOULD also be standardized. This is further discussed in Section 9.

拡張機能により、追加のパラメーターと値が可能になります。拡張機能は、特にリバースプロキシ環境で特に有用です。すべての拡張パラメーターは"HTTP Forwarded Parameter"レジストリに登録すべきです(SHOULD)。特定の拡張機能が広範囲に展開されることが予想される場合、それらもまた標準化すべきです(SHOULD)。これについてはセクション9でさらに議論されています。

The node identifier is one of the following:

ノード識別子は次のいずれかです:

  • The client's IP address, with an optional port number
  • クライアントのIPアドレス、オプションでポート番号
  • A token indicating that the IP address of the client is not known to the proxy server
  • クライアントのIPアドレスがプロキシサーバーには不明であることを示すトークン
  • A generated token, allowing for tracing and debugging, while allowing the internal structure or sensitive information to be hidden
  • トレースとデバッグを可能にする生成されたトークン、内部構造や機密情報を隠すことができます

The node identifier is defined by the ABNF syntax as:

ノード識別子は、次のABNF構文によって定義されます:

    node     = nodename [ ":" node-port ]
    nodename = IPv4address / "[" IPv6address "]" /
                "unknown" / obfnode

    node     = nodename [ ":" node-port ]
    nodename = IPv4address / "[" IPv6address "]" /
                "unknown" / obfnode

    IPv4address = <Defined in [RFC3986], Section 3.2.2>
    IPv6address = <Defined in [RFC3986], Section 3.2.2>
    obfnode = "_" 1*( ALPHA / DIGIT / "." / "_" / "-")

    IPv4address = <[RFC3986]のセクション3.2.2で定義>
    IPv6address = <[RFC3986]のセクション3.2.2で定義>
    obfnode = "_" 1*( ALPHA / DIGIT / "." / "_" / "-")

    node-port     = port / obfport
    port          = 1*5DIGIT
    obfport       = "_" 1*(ALPHA / DIGIT / "." / "_" / "-")

    node-port     = port / obfport
    port          = 1*5DIGIT
    obfport       = "_" 1*(ALPHA / DIGIT / "." / "_" / "-")

    DIGIT = <Defined in [RFC5234], Section 3.4>
    ALPHA = <Defined in [RFC5234], Section B.1>

        DIGIT = <[RFC5234]のセクション3.4で定義>
        ALPHA = <[RFC5234]のセクションB.1で定義>

Each of the identifiers may optionally have the port identifier, for example, allowing the identification of the endpoint in a NATed environment. The "node-port" can be identified either by its port number or by a generated token obfuscating the real port number. An obfuscated port may be used in situations where the possessor of the proxy wants the ability to trace requests -- for example, in debug purposes -- but does not want to reveal internal information.

各識別子はオプションでポート識別子を持つことができ、例えば、NATed環境でのエンドポイントの識別を可能にします。"node-port"は、そのポート番号または実際のポート番号を隠蔽する生成されたトークンによって識別することができます。内部情報を明らかにしたくないが、例えばデバッグ目的でリクエストをトレースする能力をプロキシの所有者が欲しい場合に、隠蔽されたポートを使用することができます。

Note that the ABNF above also allows port numbers to be appended to the "unknown" identifier. Interpretation of such notation is, however, left to the possessor of a proxy adding such a value to the header field. To distinguish an "obfport" from a port, the "obfport" MUST have a leading underscore. Further, it MUST also consist of only "ALPHA", "DIGIT", and the characters ".", "_", and "-".

上記のABNFは、"unknown"識別子にポート番号を追加することも許可していることに注意してください。ただし、そのような表記の解釈は、ヘッダーフィールドにそのような値を追加するプロキシの所有者に委ねられています。"obfport"をポートから区別するために、"obfport"はアンダースコアで始まる必要があります(MUST)。さらに、"ALPHA"、"DIGIT"、そして文字"."、"_"、および"-"のみで構成される必要があります(MUST)

It is important to note that an IPv6 address and any nodename with node-port specified MUST be quoted, since ":" is not an allowed character in "token".

重要な注意点として、IPv6アドレスとノードポートが指定された任意のノード名は引用符で囲む必要があります(MUST)。":"が"token"で許可されていない文字であるためです。

Examples:

例:

          "192.0.2.43:47011"
          "[2001:db8:cafe::17]:47011"

          "192.0.2.43:47011"
          "[2001:db8:cafe::17]:47011"

The ABNF rules for "IPv6address" and "IPv4address" are defined in [RFC3986]. The "IPv6address" SHOULD comply with textual representation recommendations [RFC5952] (for example, lowercase, compression of zeros).

"IPv6address"と"IPv4address"のABNFルールは、[RFC3986]で定義されています。"IPv6address"は、テキスト表現の推奨事項[RFC5952](例えば、小文字、ゼロの圧縮)に準拠すべきです(SHOULD)

Note that the IP address may be one from the internal nets, as defined in [RFC1918] and [RFC4193]. Also, note that an IPv6 address is always enclosed in square brackets.

IPアドレスは、[RFC1918]および[RFC4193]で定義されている内部ネットのものである可能性があることに注意してください。また、IPv6アドレスは常に角括弧で囲まれていることに注意してください。

The "unknown" identifier is used when the identity of the preceding entity is not known, but the proxy server still wants to signal that a forwarding of the request was made. One example would be a proxy server process generating an outgoing request without direct access to the incoming request TCP socket.

"unknown"識別子は、前のエンティティの識別が不明であるが、プロキシサーバーがリクエストの転送が行われたことを示したい場合に使用されます。一つの例として、直接的なアクセスなしに受信リクエストのTCPソケットを生成するプロキシサーバープロセスがあります。

A generated identifier may be used where there is a wish to keep the internal IP addresses secret, while still allowing the "Forwarded" header field to be used for tracing and debugging. This can also be useful if the proxy uses some sort of interface labels and there is a desire to pass them rather than an IP address. Unless static assignment of identifiers is necessary for the server's use of the identifiers, obfuscated identifiers SHOULD be randomly generated for each request. If the server requires that identifiers persist across requests, they SHOULD NOT persist longer than client IP addresses. To distinguish the obfuscated identifier from other identifiers, it MUST have a leading underscore "_". Furthermore, it MUST also consist of only "ALPHA", "DIGIT", and the characters ".", "_", and "-". Example:

生成された識別子は、内部IPアドレスを秘密に保ちつつ、"Forwarded"ヘッダーフィールドをトレースとデバッグに使用したい場合に使用できます。これは、プロキシが何らかのインターフェースラベルを使用しており、IPアドレスではなくそれらを渡したいという願望がある場合にも便利です。識別子のサーバーによる使用に静的な識別子の割り当てが必要でない限り、難読化された識別子は各リクエストごとにランダムに生成すべきです(SHOULD)。識別子がリクエストを超えて持続することがサーバーに必要な場合、それらはクライアントIPアドレスより長く持続すべきではありません(SHOULD NOT)。難読化された識別子を他の識別子と区別するために、それは先頭にアンダースコア"_"を持つ必要があります(MUST)。さらに、それは"ALPHA"、"DIGIT"、そして文字"."、"_"、および"-"のみで構成される必要があります(MUST)。 例:

    Forwarded: for=_hidden, for=_SEVKISEK

    Forwarded: for=_hidden, for=_SEVKISEK

Note that an HTTP list allows white spaces to occur between the identifiers, and the list may be split over multiple header fields. As an example, the header field

HTTPリストでは、識別子の間に空白を許可し、リストは複数のヘッダーフィールドに分割することができることに注意してください。例として、ヘッダーフィールドは次のようになります。

    Forwarded: for=192.0.2.43,for="[2001:db8:cafe::17]",for=unknown

    Forwarded: for=192.0.2.43,for="[2001:db8:cafe::17]",for=unknown

is equivalent to the header field

は、ヘッダーフィールドと同等です

    Forwarded: for=192.0.2.43, for="[2001:db8:cafe::17]", for=unknown

    Forwarded: for=192.0.2.43, for="[2001:db8:cafe::17]", for=unknown

which is equivalent to the header fields

これは、ヘッダーフィールドと同等です

    Forwarded: for=192.0.2.43
    Forwarded: for="[2001:db8:cafe::17]", for=unknown

    Forwarded: for=192.0.2.43
    Forwarded: for="[2001:db8:cafe::17]", for=unknown

There are some cases when this header field should be kept and some cases where it should not be kept. A directly forwarded request should preserve and possibly extend it. If a single incoming request causes the proxy to make multiple outbound requests, special care must be taken to decide whether or not the header field should be preserved. In many cases, the header field should be preserved, but if the outbound request is not a direct consequence of the incoming request, the header field should not be preserved. Consider also the case when a proxy has detected a content mismatch in a 304 response and is following the instructions in [RFC7232], Section 4.1 to repeat the request unconditionally, in which case the new request is still basically a direct consequence of the origin request, and the header field should probably be kept.

このヘッダーフィールドを保持すべき場合とそうでない場合があります。直接転送されたリクエストは、それを保持し、可能であれば拡張すべきです。単一の受信リクエストがプロキシに複数の送信リクエストを行わせる場合、ヘッダーフィールドを保持すべきかどうかを決定する際には特別な注意が必要です。多くの場合、ヘッダーフィールドは保持すべきですが、送信リクエストが受信リクエストの直接的な結果でない場合、ヘッダーフィールドは保持すべきではありません。また、プロキシが304レスポンスのコンテンツの不一致を検出し、[RFC7232], Section 4.1の指示に従ってリクエストを無条件に繰り返す場合も考慮してください。この場合、新しいリクエストは基本的には元のリクエストの直接的な結果であり、ヘッダーフィールドはおそらく保持すべきです。

The "Via" header field (see [RFC7230], Section 5.7.1) is a header field with a similar use case as this header field. The "Via" header field, however, only provides information about the proxy itself, and thereby leaves out the information about the client connecting to the proxy server. The "Forwarded" header field, on the other hand, has relaying information from the client-facing side of the proxy server as its main purpose. As "Via" is already widely deployed, its format cannot be changed to address the problems that "Forwarded" addresses.

"Via"ヘッダーフィールド(参照 [RFC7230], Section 5.7.1)は、このヘッダーフィールドと同様の使用ケースを持つヘッダーフィールドです。しかし、"Via"ヘッダーフィールドは、プロキシ自体についての情報のみを提供し、プロキシサーバーに接続するクライアントについての情報は省略します。一方、"Forwarded"ヘッダーフィールドは、プロキシサーバーのクライアント対面側からの中継情報を主な目的としています。"Via"はすでに広く展開されているため、その形式を変更して"Forwarded"が解決する問題を対処することはできません。

Note that it is not possible to combine information from this header field with the information from the Via header field. Some proxies will not update the "Forwarded" header field, some proxies will not update the Via header field, and some proxies will update both.

このヘッダーフィールドからの情報とViaヘッダーフィールドからの情報を組み合わせることはできないことに注意してください。一部のプロキシは"Forwarded"ヘッダーフィールドを更新しない、一部のプロキシはViaヘッダーフィールドを更新しない、そして一部のプロキシは両方を更新します。

If a proxy gets incoming requests with X-Forwarded-* header fields present, it is encouraged to convert these into the header field described in this document, if it can be done in a sensible way. If the request only contains one type -- for example, X-Forwarded-For -- this can be translated to "Forwarded", by prepending each element with "for=". Note that IPv6 addresses may not be quoted in X-Forwarded-For and may not be enclosed by square brackets, but they are quoted and enclosed in square brackets in "Forwarded".

プロキシがX-Forwarded-*ヘッダーフィールドを含む受信リクエストを取得した場合、それをこのドキュメントで説明されているヘッダーフィールドに変換することが推奨されます。これは、それが適切な方法で行うことができる場合に限ります。リクエストが一種類のみを含む場合 -- 例えば、X-Forwarded-For -- これは、各要素の前に"for="を追加することで"Forwarded"に変換できます。X-Forwarded-ForではIPv6アドレスは引用符で囲まれず、角括弧で囲まれませんが、"Forwarded"では引用符と角括弧で囲まれます。

    X-Forwarded-For: 192.0.2.43, 2001:db8:cafe::17

    X-Forwarded-For: 192.0.2.43, 2001:db8:cafe::17

becomes:

次のようになります:

    Forwarded: for=192.0.2.43, for="[2001:db8:cafe::17]"

    Forwarded: for=192.0.2.43, for="[2001:db8:cafe::17]"

However, special care must be taken if, for example, both X-Forwarded-For and X-Forwarded-By exist. In such cases, it may not be possible to do a conversion, since it is not possible to know in which order the already existing fields were added. Also, note that removing the X-Forwarded-For header field may cause issues for parties that have not yet implemented support for this new header field.

ただし、例えば、X-Forwarded-ForとX-Forwarded-Byの両方が存在する場合には、特別な注意が必要です。そのような場合、既存のフィールドがどの順序で追加されたかを知ることができないため、変換を行うことができないかもしれません。また、X-Forwarded-Forヘッダーフィールドを削除すると、この新しいヘッダーフィールドのサポートをまだ実装していない当事者に問題を引き起こす可能性があることに注意してください。

A request from a client with IP address 192.0.2.43 passes through a proxy with IP address 198.51.100.17, then through another proxy with IP address 203.0.113.60 before reaching an origin server. This could, for example, be an office client behind a corporate malware filter talking to a origin server through a reverse proxy.

IPアドレス192.0.2.43のクライアントからのリクエストが、IPアドレス198.51.100.17のプロキシを経由し、その後IPアドレス203.0.113.60の別のプロキシを経由してオリジンサーバーに到達します。これは、例えば、企業のマルウェアフィルターの背後にあるオフィスクライアントが、リバースプロキシを経由してオリジンサーバーと通信する場合などです。

  • The HTTP request between the client and the first proxy has no "Forwarded" header field.
  • クライアントと最初のプロキシ間のHTTPリクエストには"Forwarded"ヘッダーフィールドはありません。
  • The HTTP request between the first and second proxy has a "Forwarded: for=192.0.2.43" header field.
  • 最初のプロキシと二番目のプロキシ間のHTTPリクエストには"Forwarded: for=192.0.2.43"ヘッダーフィールドがあります。
  • The HTTP request between the second proxy and the origin server has a "Forwarded: for=192.0.2.43, for=198.51.100.17;by=203.0.113.60;proto=http;host=example.com" header field.
  • 二番目のプロキシとオリジンサーバー間のHTTPリクエストには"Forwarded: for=192.0.2.43, for=198.51.100.17;by=203.0.113.60;proto=http;host=example.com"ヘッダーフィールドがあります。

Note that, at some points in a connection chain, the information might not be updated in the "Forwarded" header field, either because of lack of support of this HTTP extension or because of a policy decision not to disclose information about this network component.

接続チェーンの一部のポイントでは、このHTTP拡張のサポートがないため、またはこのネットワークコンポーネントに関する情報を公開しないというポリシー決定のため、"Forwarded"ヘッダーフィールドの情報が更新されない可能性があることに注意してください。

The "Forwarded" HTTP header field cannot be relied upon to be correct, as it may be modified, whether mistakenly or for malicious reasons, by every node on the way to the server, including the client making the request.

"Forwarded" HTTPヘッダーフィールドは、間違ってまたは悪意を持って変更される可能性があり、リクエストを行うクライアントを含むサーバーへの道のり上のすべてのノードによって、正確であるとは限らないことに注意してください。

One approach to ensure that the "Forwarded" HTTP header field is correct is to verify the correctness of proxies and to whitelist them as trusted. This approach has at least two weaknesses. First, the chain of IP addresses listed before the request came to the proxy cannot be trusted. Second, unless the communication between proxies and the endpoint is secured, the data can be modified by an attacker with access to the network.

"Forwarded" HTTPヘッダーフィールドが正しいことを確認する一つの方法は、プロキシの正確さを検証し、それらを信頼できるものとしてホワイトリストに登録することです。この方法には少なくとも二つの弱点があります。第一に、リクエストがプロキシに到達する前にリストされたIPアドレスのチェーンは信頼できません。第二に、プロキシとエンドポイント間の通信が保護されていない限り、ネットワークにアクセス可能な攻撃者によってデータが改ざんされる可能性があります。

The "Forwarded" HTTP header field can reveal internal structures of the network setup behind the NAT or proxy setup, which may be undesired. This can be addressed either by using obfuscated elements, by preventing the internal nodes from updating the HTTP header field, or by having an egress proxy remove entries that reveal internal network information.

"Forwarded" HTTPヘッダーフィールドは、NATまたはプロキシ設定の背後にあるネットワーク構造を明らかにする可能性があり、これは望ましくないかもしれません。これは、難読化された要素を使用する、内部ノードがHTTPヘッダーフィールドを更新するのを防ぐ、または内部ネットワーク情報を明らかにするエントリを削除する出口プロキシを持つことで対処できます。

This header field should never be copied into response messages by origin servers or intermediaries, as it can reveal the whole proxy chain to the client. As a side effect, special care must be taken in hosting environments not to allow the TRACE request where the "Forwarded" field is used, as it would appear in the body of the response message.

このヘッダーフィールドは、クライアントにプロキシチェーン全体を明らかにする可能性があるため、オリジンサーバーや中間者によってレスポンスメッセージにコピーされるべきではありません。副作用として、ホスティング環境では、"Forwarded"フィールドが使用されている場合にTRACEリクエストを許可しないように特別な注意が必要です。なぜなら、それはレスポンスメッセージの本文に表示されるからです。

In recent years, there have been growing concerns about privacy. There is a trade-off between ensuring privacy for users versus disclosing information that is useful, for example, for debugging, statistics, and generating location-dependent content. The "Forwarded" HTTP header field, by design, exposes information that some users consider privacy sensitive, in order to allow for such uses. For any proxy, if the HTTP request contains header fields that specifically request privacy semantics, the proxy SHOULD NOT use the "Forwarded" header field, nor in any other manner pass private information, such as IP addresses, on to the next hop.

近年、プライバシーに対する懸念が高まっています。ユーザーのプライバシーを確保するという目標と、デバッグ、統計、位置依存のコンテンツ生成などに有用な情報を開示するという目標との間にはトレードオフが存在します。"Forwarded" HTTPヘッダーフィールドは、その設計上、ユーザーがプライバシーに敏感と考える情報を公開し、そのような用途を可能にします。任意のプロキシについて、HTTPリクエストがプライバシーのセマンティクスを特に要求するヘッダーフィールドを含む場合、プロキシは"Forwarded"ヘッダーフィールドを使用すべきではなく、また、IPアドレスなどのプライベート情報を次のホップに渡すべきではありません(SHOULD NOT)

The client's IP address, that may be forwarded in the "for" parameter of this header field, is considered to be privacy sensitive by many people, as the IP address may be able to uniquely identify a client, what operator the user is using, and possibly a rough estimation of where the user is geographically located.

このヘッダーフィールドの"for"パラメーターで転送される可能性があるクライアントのIPアドレスは、多くの人々にとってプライバシーに敏感な情報と考えられています。なぜなら、IPアドレスによってクライアントを一意に識別したり、ユーザーがどのオペレーターを使用しているか、おそらくユーザーが地理的にどこに位置しているかの大まかな推定を可能にするからです。

Proxies using this extension will preserve the information of a direct connection. This has an end-user privacy impact regardless of whether the end-user or deployer knows or expects that this is the case.

この拡張を使用するプロキシは、直接接続の情報を保持します。これは、エンドユーザーまたはデプロイヤーがこれが事実であることを知っているか、または予期しているかどうかに関係なく、エンドユーザーのプライバシーに影響を与えます。

Implementers and deployers of such proxies need to consider whether, and how, deploying this extension affects user privacy.

このようなプロキシの実装者やデプロイヤーは、この拡張をデプロイすることがユーザープライバシーにどのように影響を与えるか、または影響を与えるかどうかを考慮する必要があります。

The default configuration for both the "by" and "for" parameters SHOULD contain obfuscated identifiers. These identifiers SHOULD be randomly generated per request. If identifiers that persist across requests are required, their lifetimes SHOULD be limited and they SHOULD NOT persist longer than client IP addresses. When generating obfuscated identifiers, care must be taken not to include potentially sensitive information in them.

"by"パラメーターと"for"パラメーターのデフォルトの設定は、難読化された識別子を含むべきです(SHOULD)。これらの識別子は、リクエストごとにランダムに生成されるべきです(SHOULD)。リクエストを超えて持続する識別子が必要な場合、その寿命は制限され、クライアントのIPアドレスよりも長く持続すべきではありません(SHOULD NOT)。難読化された識別子を生成する際には、それらに潜在的に敏感な情報を含めないように注意を払う必要があります。

Note that users' IP addresses may already be forwarded by proxies using the header field X-Forwarded-For, which is widely used. It should also be noted that if the user were doing the connection directly without passing the proxy, the client's IP address would be sent to the web server. Users that do not actively choose an anonymizing proxy cannot rely on having their IP address shielded. These users who want to minimize the risk of being tracked must also note that there are other ways information may leak, for example, by browser header field fingerprinting. The Forwarded header field itself, even when used without a uniquely identifying client identifier, may make fingerprinting more feasible by revealing the chain of proxies traversed by the client's request.

ユーザーのIPアドレスは、すでに広く使用されているヘッダーフィールドX-Forwarded-Forを使用してプロキシによって転送されている可能性があることに注意してください。また、ユーザーがプロキシを経由せずに直接接続を行っていた場合、クライアントのIPアドレスはウェブサーバーに送信されます。匿名化プロキシを積極的に選択しないユーザーは、IPアドレスが保護されることを期待することはできません。追跡のリスクを最小限に抑えたいと考えるこれらのユーザーは、ブラウザのヘッダーフィールドのフィンガープリントによって情報が漏洩する可能性がある他の方法にも注意を払う必要があります。クライアントの一意に識別する識別子なしで使用された場合でも、Forwardedヘッダーフィールド自体が、クライアントのリクエストが通過したプロキシのチェーンを明らかにすることで、フィンガープリントをより実行可能にする可能性があります。

This document specifies the HTTP header field listed below, which has been added to the "Permanent Message Header Field Names" registry defined in [RFC3864].

本文書では、以下に示すHTTPヘッダーフィールドを指定します。これは、[RFC3864]で定義された"Permanent Message Header Field Names"レジストリに追加されました。

Header field: Forwarded Applicable protocol: http Status: standard Author/Change controller: IETF (iesg@ietf.org) Internet Engineering Task Force Specification document(s): this specification (Section 4) Related information: None

Header field: Forwarded Applicable protocol: http Status: standard Author/Change controller: IETF (iesg@ietf.org) Internet Engineering Task Force Specification document(s): this specification (Section 4) Related information: None

The "Forwarded" header field contains parameters for which IANA has created and now maintains a new registry entitled "HTTP Forwarded Parameters". Initial registrations are given below. For future assignments, the registration procedure is IETF Review [RFC5226]. The security and privacy implications of all new parameters should be thoroughly documented. New parameters and their values MUST conform with the forwarded-pair as defined in ABNF in Section 4. Further, a short description should be provided in the registration.

"Forwarded"ヘッダーフィールドには、IANAが新たに作成し、現在維持している"HTTP Forwarded Parameters"という新しいレジストリに登録されたパラメーターが含まれています。初期の登録は以下に示されています。将来の割り当てについては、登録手続きはIETF Review [RFC5226]です。すべての新しいパラメーターのセキュリティーとプライバシーに関する影響は、十分に文書化されるべきです。新しいパラメーターとその値は、セクション4のABNFで定義されたforwarded-pairに準拠しなければなりません(MUST)。さらに、登録時には短い説明を提供するべきです。

Parameter name Description Reference
by IP address of incoming interface of a proxy Section 5.1
for IP address of client making a request through a proxy Section 5.2
host Host header field of the incoming request Section 5.3
proto Application protocol used for incoming request Section 5.4

パラメーター名 説明 参照
by プロキシの入力インターフェースのIPアドレス セクション 5.1
for プロキシを経由してリクエストを行うクライアントのIPアドレス セクション 5.2
host 着信リクエストのホストヘッダーフィールド セクション 5.3
proto 着信リクエストに使用されるアプリケーションプロトコル セクション 5.4

                    Table 1: Initial Assignments

                    Table 1: Initial Assignments

References

Normative References

[RFC1918]
"Address Allocation for Private Internets", BCP None, RFC None, ,
[RFC2119]
"Key words for use in RFCs to Indicate Requirement Levels", BCP None, RFC None, ,
[RFC3864]
"Registration Procedures for Message Header Fields", BCP None, RFC None, ,
[RFC3986]
"Uniform Resource Identifier (URI): Generic Syntax", STD None, RFC None, ,
[RFC4193]
"Unique Local IPv6 Unicast Addresses", RFC None, ,
[RFC4395]
"Guidelines and Registration Procedures for New URI Schemes", BCP None, RFC None, ,
[RFC5226]
"Guidelines for Writing an IANA Considerations Section in RFCs", BCP None, RFC None, ,
[RFC5234]
"Augmented BNF for Syntax Specifications: ABNF", STD None, RFC None, ,
[RFC5952]
"A Recommendation for IPv6 Address Text Representation", RFC None, ,
[RFC7230]
"Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC None, ,
[RFC7232]
"Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests", RFC None, ,

Informative References

[RFC6269]
"Issues with IP Address Sharing", RFC None, ,

参考文献

引用規格

[RFC1918]
"Address Allocation for Private Internets", BCP None, RFC None, ,
[RFC2119]
"Key words for use in RFCs to Indicate Requirement Levels", BCP None, RFC None, ,
[RFC3864]
"Registration Procedures for Message Header Fields", BCP None, RFC None, ,
[RFC3986]
"Uniform Resource Identifier (URI): Generic Syntax", STD None, RFC None, ,
[RFC4193]
"Unique Local IPv6 Unicast Addresses", RFC None, ,
[RFC4395]
"Guidelines and Registration Procedures for New URI Schemes", BCP None, RFC None, ,
[RFC5226]
"Guidelines for Writing an IANA Considerations Section in RFCs", BCP None, RFC None, ,
[RFC5234]
"Augmented BNF for Syntax Specifications: ABNF", STD None, RFC None, ,
[RFC5952]
"A Recommendation for IPv6 Address Text Representation", RFC None, ,
[RFC7230]
"Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC None, ,
[RFC7232]
"Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests", RFC None, ,

参考文献

[RFC6269]
"Issues with IP Address Sharing", RFC None, ,

Thanks to Per Cederqvist, Alissa Cooper, Adrian Farrel, Stephen Farrell, Ned Freed, Per Hedbor, Amos Jeffries, Poul-Henning Kamp, Murray S. Kucherawy, Barry Leiba, Salvatore Loreto, Alexey Melnikov, S. Moonesamy, Susan Nichols, Mark Nottingham, Julian Reschke, John Sullivan, Willy Tarreau, and Dan Wing for their feedback.

Per Cederqvist、Alissa Cooper、Adrian Farrel、Stephen Farrell、Ned Freed、Per Hedbor、Amos Jeffries、Poul-Henning Kamp、Murray S. Kucherawy、Barry Leiba、Salvatore Loreto、Alexey Melnikov、S. Moonesamy、Susan Nichols、Mark Nottingham、Julian Reschke、John Sullivan、Willy Tarreau、Dan Wingの皆様からのフィードバックに感謝します。