[要約] RFC 7617は、HTTPの基本認証スキームに関する仕様であり、ユーザー名とパスワードを使用してアクセス制御を行うための方法を定義しています。このRFCの目的は、セキュアな認証メカニズムを提供し、Webサーバーへのアクセスを制限することです。

Internet Engineering Task Force (IETF)                        J. Reschke
Request for Comments: 7617                                    greenbytes
Obsoletes: 2617                                           September 2015
Category: Standards Track
ISSN: 2070-1721
        

The 'Basic' HTTP Authentication Scheme

「基本」HTTP認証スキーム

Abstract

概要

This document defines the "Basic" Hypertext Transfer Protocol (HTTP) authentication scheme, which transmits credentials as user-id/ password pairs, encoded using Base64.

このドキュメントでは、Base64を使用してエンコードされた資格情報をユーザーID /パスワードのペアとして送信する「基本」ハイパーテキスト転送プロトコル(HTTP)認証方式を定義しています。

Status of This Memo

本文書の状態

This is an Internet Standards Track document.

これはInternet Standards Trackドキュメントです。

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(Internet Engineering Task Force)の製品です。これは、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/rfc7617.

このドキュメントの現在のステータス、エラータ、およびフィードバックの提供方法に関する情報は、http://www.rfc-editor.org/info/rfc7617で入手できます。

Copyright Notice

著作権表示

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

Copyright(c)2015 IETF Trustおよびドキュメントの作成者として識別された人物。全著作権所有。

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トラストの法的規定(http://trustee.ietf.org/license-info)の対象であり、この文書の発行日に有効です。これらのドキュメントは、このドキュメントに関するあなたの権利と制限を説明しているため、注意深く確認してください。このドキュメントから抽出されたコードコンポーネントには、Trust Legal Provisionsのセクション4.eに記載されているSimplified BSD Licenseのテキストが含まれている必要があり、Simplified BSD Licenseに記載されているように保証なしで提供されます。

This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.

このドキュメントには、2008年11月10日より前に公開または公開されたIETFドキュメントまたはIETFコントリビューションの素材が含まれている場合があります。 IETF標準プロセス外。このような資料の著作権を管理する人から適切なライセンスを取得せずに、このドキュメントをIETF標準プロセス外で変更したり、その派生物をIETF標準プロセス外で作成したりすることはできません。 RFCとして、またはそれを英語以外の言語に翻訳するための出版物。

Table of Contents

目次

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Terminology and Notation  . . . . . . . . . . . . . . . .   3
   2.  The 'Basic' Authentication Scheme . . . . . . . . . . . . . .   3
     2.1.  The 'charset' auth-param  . . . . . . . . . . . . . . . .   5
     2.2.  Reusing Credentials . . . . . . . . . . . . . . . . . . .   7
   3.  Internationalization Considerations . . . . . . . . . . . . .   8
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .   8
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   9
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  10
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  10
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  11
   Appendix A.  Changes from RFC 2617  . . . . . . . . . . . . . . .  13
   Appendix B.  Deployment Considerations for the 'charset'
                Parameter  . . . . . . . . . . . . . . . . . . . . .  13
     B.1.  User Agents . . . . . . . . . . . . . . . . . . . . . . .  13
     B.2.  Servers . . . . . . . . . . . . . . . . . . . . . . . . .  13
     B.3.  Why not simply switch the default encoding to UTF-8?  . .  14
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  14
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  15
        
1. Introduction
1. はじめに

This document defines the "Basic" Hypertext Transfer Protocol (HTTP) authentication scheme, which transmits credentials as user-id/ password pairs, encoded using Base64 (HTTP authentication schemes are defined in [RFC7235]).

このドキュメントは、Base64を使用してエンコードされたユーザーID /パスワードのペアとして資格情報を送信する「基本」ハイパーテキスト転送プロトコル(HTTP)認証スキームを定義します(HTTP認証スキームは[RFC7235]で定義されています)。

This scheme is not considered to be a secure method of user authentication unless used in conjunction with some external secure system such as TLS (Transport Layer Security, [RFC5246]), as the user-id and password are passed over the network as cleartext.

ユーザーIDとパスワードはネットワーク上をクリアテキストとして渡されるため、TLS(Transport Layer Security、[RFC5246])などの外部の安全なシステムと併用しない限り、このスキームはユーザー認証の安全な方法とは見なされません。

The "Basic" scheme previously was defined in Section 2 of [RFC2617]. This document updates the definition, and also addresses internationalization issues by introducing the 'charset' authentication parameter (Section 2.1).

「基本」スキームは、以前は[RFC2617]のセクション2で定義されていました。このドキュメントでは、定義を更新し、「charset」認証パラメータ(セクション2.1)を導入することで国際化の問題にも対処しています。

Other documents updating RFC 2617 are "Hypertext Transfer Protocol (HTTP/1.1): Authentication" ([RFC7235], defining the authentication framework), "HTTP Digest Access Authentication" ([RFC7616], updating the definition of the "Digest" authentication scheme), and "HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields" ([RFC7615]). Taken together, these four documents obsolete RFC 2617.

RFC 2617を更新する他のドキュメントは、「ハイパーテキスト転送プロトコル(HTTP / 1.1):認証」([RFC7235]、認証フレームワークを定義)、「HTTPダイジェストアクセス認証」([RFC7616]、「ダイジェスト」認証スキームの定義を更新することです。 )、および「HTTP Authentication-InfoおよびProxy-Authentication-Info応答ヘッダーフィールド」([RFC7615])。まとめると、これらの4つのドキュメントはRFC 2617を廃止しました。

1.1. Terminology and Notation
1.1. 用語と表記

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」、「MAY」、および「OPTIONAL」は、 [RFC2119]で説明されているように解釈されます。

The terms "protection space" and "realm" are defined in Section 2.2 of [RFC7235].

「保護スペース」と「レルム」という用語は、[RFC7235]のセクション2.2で定義されています。

The terms "(character) repertoire" and "character encoding scheme" are defined in Section 2 of [RFC6365].

「(文字)レパートリー」および「文字エンコーディングスキーム」という用語は、[RFC6365]のセクション2で定義されています。

2. The 'Basic' Authentication Scheme
2. 「基本」認証スキーム

The Basic authentication scheme is based on the model that the client needs to authenticate itself with a user-id and a password for each protection space ("realm"). The realm value is a free-form string that can only be compared for equality with other realms on that server. The server will service the request only if it can validate the user-id and password for the protection space applying to the requested resource.

基本認証スキームは、クライアントが各保護スペース(「レルム」)のユーザーIDとパスワードで自身を認証する必要があるモデルに基づいています。レルム値は自由形式の文字列であり、そのサーバー上の他のレルムと等しいかどうかのみを比較できます。サーバーは、要求されたリソースに適用される保護スペースのユーザーIDとパスワードを検証できる場合にのみ、要求を処理します。

The Basic authentication scheme utilizes the Authentication Framework as follows.

基本認証スキームは、次のように認証フレームワークを利用します。

In challenges:

課題:

o The scheme name is "Basic".

o スキーム名は「Basic」です。

o The authentication parameter 'realm' is REQUIRED ([RFC7235], Section 2.2).

o 認証パラメーター「レルム」は必須です([RFC7235]、セクション2.2)。

o The authentication parameter 'charset' is OPTIONAL (see Section 2.1).

o 認証パラメータ 'charset'はオプションです(2.1節を参照)。

o No other authentication parameters are defined -- unknown parameters MUST be ignored by recipients, and new parameters can only be defined by revising this specification.

o 他の認証パラメーターは定義されていません-受信者は不明なパラメーターを無視する必要があり、新しいパラメーターはこの仕様を改訂することによってのみ定義できます。

See also Section 4.1 of [RFC7235], which discusses the complexity of parsing challenges properly.

[RFC7235]のセクション4.1も参照してください。このセクションでは、問題の解析の複雑さについて適切に説明しています。

Note that both scheme and parameter names are matched case-insensitively.

スキーム名とパラメータ名はどちらも大文字と小文字を区別せずに一致することに注意してください。

For credentials, the "token68" syntax defined in Section 2.1 of [RFC7235] is used. The value is computed based on user-id and password as defined below.

認証情報には、[RFC7235]のセクション2.1で定義されている「token68」構文が使用されます。値は、以下に定義されているユーザーIDとパスワードに基づいて計算されます。

Upon receipt of a request for a URI within the protection space that lacks credentials, the server can reply with a challenge using the 401 (Unauthorized) status code ([RFC7235], Section 3.1) and the WWW-Authenticate header field ([RFC7235], Section 4.1).

資格情報のない保護スペース内のURIのリクエストを受信すると、サーバーは401(Unauthorized)ステータスコード([RFC7235]、セクション3.1)とWWW-Authenticateヘッダーフィールド([RFC7235])を使用してチャレンジで応答できます。 、セクション4.1)。

For instance:

例えば:

      HTTP/1.1 401 Unauthorized
      Date: Mon, 04 Feb 2014 16:50:53 GMT
      WWW-Authenticate: Basic realm="WallyWorld"
        

where "WallyWorld" is the string assigned by the server to identify the protection space.

「WallyWorld」は、保護スペースを識別するためにサーバーによって割り当てられた文字列です。

A proxy can respond with a similar challenge using the 407 (Proxy Authentication Required) status code ([RFC7235], Section 3.2) and the Proxy-Authenticate header field ([RFC7235], Section 4.3).

プロキシは、407(プロキシ認証が必要)ステータスコード([RFC7235]、セクション3.2)およびProxy-Authenticateヘッダーフィールド([RFC7235]、セクション4.3)を使用して、同様のチャレンジで応答できます。

To receive authorization, the client

認可を受けるために、クライアントは

1. obtains the user-id and password from the user,

1. ユーザーからユーザーIDとパスワードを取得します。

2. constructs the user-pass by concatenating the user-id, a single colon (":") character, and the password,

2. ユーザーID、単一のコロン( ":")文字、およびパスワードを連結してユーザーパスを作成します。

3. encodes the user-pass into an octet sequence (see below for a discussion of character encoding schemes),

3. ユーザーパスをオクテットシーケンスにエンコードします(文字エンコードスキームの説明については、以下を参照してください)。

4. and obtains the basic-credentials by encoding this octet sequence using Base64 ([RFC4648], Section 4) into a sequence of US-ASCII characters ([RFC0020]).

4. そして、Base64([RFC4648]、セクション4)を使用してこのオクテットシーケンスをUS-ASCII文字のシーケンス([RFC0020])にエンコードすることにより、基本認証情報を取得します。

The original definition of this authentication scheme failed to specify the character encoding scheme used to convert the user-pass into an octet sequence. In practice, most implementations chose either a locale-specific encoding such as ISO-8859-1 ([ISO-8859-1]), or UTF-8 ([RFC3629]). For backwards compatibility reasons, this specification continues to leave the default encoding undefined, as long as it is compatible with US-ASCII (mapping any US-ASCII character to a single octet matching the US-ASCII character code).

この認証スキームの元の定義では、ユーザーパスをオクテットシーケンスに変換するために使用される文字エンコードスキームを指定できませんでした。実際には、ほとんどの実装は、ISO-8859-1([ISO-8859-1])などのロケール固有のエンコーディング、またはUTF-8([RFC3629])のいずれかを選択しました。後方互換性の理由から、この仕様は、US-ASCIIと互換性がある限り、デフォルトのエンコーディングを未定義のままにします(US-ASCII文字をUS-ASCII文字コードと一致する単一のオクテットにマッピングします)。

The user-id and password MUST NOT contain any control characters (see "CTL" in Appendix B.1 of [RFC5234]).

ユーザーIDとパスワードに制御文字を含めてはなりません([RFC5234]の付録B.1の「CTL」を参照)。

Furthermore, a user-id containing a colon character is invalid, as the first colon in a user-pass string separates user-id and password from one another; text after the first colon is part of the password. User-ids containing colons cannot be encoded in user-pass strings.

さらに、ユーザーパス文字列の最初のコロンはユーザーIDとパスワードを互いに分離するため、コロン文字を含むユーザーIDは無効です。最初のコロンの後のテキストはパスワードの一部です。コロンを含むユーザーIDは、ユーザーパス文字列にエンコードできません。

Note that many user agents produce user-pass strings without checking that user-ids supplied by users do not contain colons; recipients will then treat part of the username input as part of the password.

多くのユーザーエージェントは、ユーザーが指定したユーザーIDにコロンが含まれていないことを確認せずにユーザーパス文字列を生成することに注意してください。受信者は、ユーザー名入力の一部をパスワードの一部として扱います。

If the user agent wishes to send the user-id "Aladdin" and password "open sesame", it would use the following header field:

ユーザーエージェントがユーザーID「Aladdin」とパスワード「open sesame」を送信する場合は、次のヘッダーフィールドを使用します。

      Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
        
2.1. The 'charset' auth-param
2.1. 'charset' auth-param

In challenges, servers can use the 'charset' authentication parameter to indicate the character encoding scheme they expect the user agent to use when generating "user-pass" (a sequence of octets). This information is purely advisory.

チャレンジでは、サーバーは「charset」認証パラメーターを使用して、「ユーザーパス」(オクテットのシーケンス)を生成するときにユーザーエージェントが使用すると予想される文字エンコード方式を示すことができます。この情報はあくまで参考です。

The only allowed value is "UTF-8"; it is to be matched case-insensitively (see [RFC2978], Section 2.3). It indicates that the server expects character data to be converted to Unicode Normalization Form C ("NFC"; see Section 3 of [RFC5198]) and to be encoded into octets using the UTF-8 character encoding scheme ([RFC3629]).

許可される値は "UTF-8"のみです。大文字と小文字を区別せずに照合されます([RFC2978]、セクション2.3を参照)。これは、サーバーが文字データがUnicode正規化フォームC(「NFC」; [RFC5198]のセクション3を参照)に変換され、UTF-8文字エンコード方式([RFC3629])を使用してオクテットにエンコードされることを期待していることを示します。

For the user-id, recipients MUST support all characters defined in the "UsernameCasePreserved" profile defined in Section 3.3 of [RFC7613], with the exception of the colon (":") character.

ユーザーIDの場合、受信者は、[RFC7613]のセクション3.3で定義されている「UsernameCasePreserved」プロファイルで定義されているすべての文字をサポートする必要があります。ただし、コロン( ":")文字は例外です。

For the password, recipients MUST support all characters defined in the "OpaqueString" profile defined in Section 4.2 of [RFC7613].

パスワードについて、受信者は[RFC7613]のセクション4.2で定義された「OpaqueString」プロファイルで定義されたすべての文字をサポートする必要があります。

Other values are reserved for future use.

他の値は将来の使用のために予約されています。

Note: The 'charset' is only defined on challenges, as Basic authentication uses a single token for credentials ('token68' syntax); thus, the credentials syntax isn't extensible.

注:基本認証は資格情報に単一のトークンを使用するため(「token68」構文)、「charset」はチャレンジでのみ定義されます。したがって、資格情報の構文は拡張できません。

Note: The name 'charset' has been chosen for consistency with Section 2.1.1 of [RFC2831]. A better name would have been 'accept-charset', as it is not about the message it appears in, but the server's expectation.

注:[charset]という名前は、[RFC2831]のセクション2.1.1との一貫性を保つために選択されました。表示されるメッセージではなく、サーバーの期待値であるため、より適切な名前は「accept-charset」でした。

In the example below, the server prompts for authentication in the "foo" realm, using Basic authentication, with a preference for the UTF-8 character encoding scheme:

以下の例では、サーバーは、基本認証を使用し、UTF-8文字エンコード方式を優先して、「foo」レルムでの認証を要求します。

      WWW-Authenticate: Basic realm="foo", charset="UTF-8"
        

Note that the parameter value can be either a token or a quoted string; in this case, the server chose to use the quoted-string notation.

パラメータ値は、トークンまたは引用符付きの文字列のいずれかであることに注意してください。この場合、サーバーは引用符付き文字列表記の使用を選択しました。

The user's name is "test", and the password is the string "123" followed by the Unicode character U+00A3 (POUND SIGN). Using the character encoding scheme UTF-8, the user-pass becomes:

ユーザーの名前は "test"、パスワードは文字列 "123"の後にUnicode文字U + 00A3(POUND SIGN)を続けたものです。文字エンコード方式UTF-8を使用すると、ユーザーパスは次のようになります。

't' 'e' 's' 't' ':' '1' '2' '3' pound 74 65 73 74 3A 31 32 33 C2 A3

「t」「e」「s」「t」「:」「1」「2」「3」ポンド74 65 73 74 3A 31 32 33 C2 A3

Encoding this octet sequence in Base64 ([RFC4648], Section 4) yields:

このオクテットシーケンスをBase64([RFC4648]、セクション4)でエンコードすると、次のようになります。

dGVzdDoxMjPCow==

dGVzdDoxMjPCow ==

Thus, the Authorization header field would be:

したがって、Authorizationヘッダーフィールドは次のようになります。

      Authorization: Basic dGVzdDoxMjPCow==
        

Or, for proxy authentication:

または、プロキシ認証の場合:

      Proxy-Authorization: Basic dGVzdDoxMjPCow==
        
2.2. Reusing Credentials
2.2. 資格情報の再利用

Given the absolute URI ([RFC3986], Section 4.3) of an authenticated request, the authentication scope of that request is obtained by removing all characters after the last slash ("/") character of the path component ("hier_part"; see [RFC3986], Section 3). A client SHOULD assume that resources identified by URIs with a prefix-match of the authentication scope are also within the protection space specified by the realm value of that authenticated request.

認証済みリクエストの絶対URI([RFC3986]、セクション4.3)を指定すると、そのリクエストの認証スコープは、パスコンポーネント( "hier_part"の最後のスラッシュ( "/")文字の後のすべての文字を削除することによって取得されます。[ RFC3986]、セクション3)。クライアントは、認証スコープのプレフィックスが一致するURIで識別されるリソースが、その認証済みリクエストのレルム値で指定された保護スペース内にもあると想定する必要があります(SHOULD)。

A client MAY preemptively send the corresponding Authorization header field with requests for resources in that space without receipt of another challenge from the server. Similarly, when a client sends a request to a proxy, it MAY reuse a user-id and password in the Proxy-Authorization header field without receiving another challenge from the proxy server.

クライアントは、サーバーからの別のチャレンジを受信することなく、対応するAuthorizationヘッダーフィールドをそのスペース内のリソースの要求と共にプリエンプティブに送信できます(MAY)。同様に、クライアントがリクエストをプロキシに送信するとき、プロキシサーバーから別のチャレンジを受信することなく、Proxy-AuthorizationヘッダーフィールドのユーザーIDとパスワードを再利用できます。

For example, given an authenticated request to:

たとえば、次のような認証されたリクエストがあるとします。

      http://example.com/docs/index.html
        

requests to the URIs below could use the known credentials:

以下のURIへのリクエストでは、既知の認証情報を使用できます。

      http://example.com/docs/
      http://example.com/docs/test.doc
      http://example.com/docs/?page=1
        

while the URIs

一方、URI

      http://example.com/other/
      https://example.com/docs/
        

would be considered to be outside the authentication scope.

認証範囲外と見なされます。

Note that a URI can be part of multiple authentication scopes (such as "http://example.com/" and "http://example.com/docs/"). This specification does not define which of these should be treated with higher priority.

URIは複数の認証スコープ(「http://example.com/」や「http://example.com/docs/」など)の一部である可能性があることに注意してください。この仕様では、これらのうちどれを優先的に処理するかを定義していません。

3. Internationalization Considerations
3. 国際化に関する考慮事項

User-ids or passwords containing characters outside the US-ASCII character repertoire will cause interoperability issues, unless both communication partners agree on what character encoding scheme is to be used. Servers can use the new 'charset' parameter (Section 2.1) to indicate a preference of "UTF-8", increasing the probability that clients will switch to that encoding.

US-ASCII文字レパートリー以外の文字を含むユーザーIDまたはパスワードは、両方の通信パートナーが使用する文字エンコード方式に同意しない限り、相互運用性の問題を引き起こします。サーバーは新しい「charset」パラメーター(セクション2.1)を使用して「UTF-8」の優先順位を示すことができ、クライアントがそのエンコーディングに切り替える可能性が高くなります。

The 'realm' parameter carries data that can be considered textual; however, [RFC7235] does not define a way to reliably transport non-US-ASCII characters. This is a known issue that would need to be addressed in a revision to that specification.

「レルム」パラメータには、テキストと見なすことができるデータが含まれています。ただし、[RFC7235]は、非US-ASCII文字を確実に転送する方法を定義していません。これは既知の問題であり、その仕様の改訂で対処する必要があります。

4. Security Considerations
4. セキュリティに関する考慮事項

The Basic authentication scheme is not a secure method of user authentication, nor does it in any way protect the entity, which is transmitted in cleartext across the physical network used as the carrier. HTTP does not prevent the addition of enhancements (such as schemes to use one-time passwords) to Basic authentication.

基本認証スキームは、ユーザー認証の安全な方法ではありません。また、キャリアとして使用される物理ネットワーク全体にクリアテキストで送信されるエンティティを保護することもありません。 HTTPは、基本認証への拡張機能(ワンタイムパスワードを使用するスキームなど)の追加を妨げません。

The most serious flaw of Basic authentication is that it results in the cleartext transmission of the user's password over the physical network. Many other authentication schemes address this problem.

基本認証の最も深刻な欠陥は、物理ネットワークを介してユーザーのパスワードがクリアテキストで送信されることです。他の多くの認証方式がこの問題に対処しています。

Because Basic authentication involves the cleartext transmission of passwords, it SHOULD NOT be used (without enhancements such as HTTPS [RFC2818]) to protect sensitive or valuable information.

基本認証にはパスワードのクリアテキスト送信が含まれるため、機密情報や貴重な情報を保護するために(HTTPS [RFC2818]などの拡張機能なしで)使用しないでください。

A common use of Basic authentication is for identification purposes -- requiring the user to provide a user-id and password as a means of identification, for example, for purposes of gathering accurate usage statistics on a server. When used in this way it is tempting to think that there is no danger in its use if illicit access to the protected documents is not a major concern. This is only correct if the server issues both user-id and password to the users and, in particular, does not allow the user to choose his or her own password. The danger arises because naive users frequently reuse a single password to avoid the task of maintaining multiple passwords.

基本認証の一般的な用途は、識別の目的です。たとえば、サーバーで正確な使用統計を収集する目的などで、識別の手段としてユーザーIDとパスワードを提供する必要があります。この方法で使用する場合、保護されたドキュメントへの不正アクセスが大きな懸念事項でない場合、その使用には危険がないと考えるのは魅力的です。これは、サーバーがユーザーにユーザーIDとパスワードの両方を発行し、特にユーザーが自分のパスワードを選択できない場合にのみ正しいです。危険なのは、単純なユーザーが複数のパスワードを維持するタスクを回避するために1つのパスワードを頻繁に再利用するためです。

If a server permits users to select their own passwords, then the threat is not only unauthorized access to documents on the server but also unauthorized access to any other resources on other systems that the user protects with the same password. Furthermore, in the server's password database, many of the passwords may also be users' passwords for other sites. The owner or administrator of such a system could therefore expose all users of the system to the risk of unauthorized access to all those other sites if this information is not maintained in a secure fashion. This raises both security and privacy concerns ([RFC6973]). If the same user-id and password combination is in use to access other accounts, such as an email or health portal account, personal information could be exposed.

サーバーがユーザーに自分のパスワードの選択を許可する場合、脅威はサーバー上のドキュメントへの不正アクセスだけでなく、ユーザーが同じパスワードで保護している他のシステム上の他のリソースへの不正アクセスでもあります。さらに、サーバーのパスワードデータベースでは、パスワードの多くが他のサイトのユーザーのパスワードである場合もあります。したがって、このようなシステムの所有者または管理者は、この情報が安全な方法で維持されていない場合、システムのすべてのユーザーを他のすべてのサイトへの不正アクセスのリスクにさらす可能性があります。これはセキュリティとプライバシーの両方の懸念を引き起こします([RFC6973])。同じユーザーIDとパスワードの組み合わせを使用して、メールやヘルスポータルアカウントなどの他のアカウントにアクセスすると、個人情報が漏洩する可能性があります。

Basic authentication is also vulnerable to spoofing by counterfeit servers. If a user can be led to believe that she is connecting to a host containing information protected by Basic authentication when, in fact, she is connecting to a hostile server or gateway, then the attacker can request a password, store it for later use, and feign an error. Server implementers ought to guard against this sort of counterfeiting; in particular, software components that can take over control over the message framing on an existing connection need to be used carefully or not at all (for instance: NPH ("Non-Parsed Header") scripts as described in Section 5 of [RFC3875]).

基本認証は、偽造サーバーによるなりすましに対しても脆弱です。ユーザーが実際には悪意のあるサーバーまたはゲートウェイに接続しているときに、基本認証で保護された情報を含むホストに接続しているとユーザーを信じ込ませることができる場合、攻撃者はパスワードを要求し、後で使用するために保存できます。エラーを装います。サーバーの実装者は、この種の偽造を防ぐ必要があります。特に、既存の接続でのメッセージフレーミングの制御を引き継ぐことができるソフトウェアコンポーネントは、慎重に使用するか、まったく使用しない必要があります(例:[RFC3875]のセクション5で説明されているNPH( "Non-Parsed Header")スクリプト)。 )。

Servers and proxies implementing Basic authentication need to store user passwords in some form in order to authenticate a request. These passwords ought to be stored in such a way that a leak of the password data doesn't make them trivially recoverable. This is especially important when users are allowed to set their own passwords, since users are known to choose weak passwords and to reuse them across authentication realms. While a full discussion of good password hashing techniques is beyond the scope of this document, server operators ought to make an effort to minimize risks to their users in the event of a password data leak. For example, servers ought to avoid storing user passwords in plaintext or as unsalted digests. For more discussion about modern password hashing techniques, see the "Password Hashing Competition" (<https://password-hashing.net>).

基本認証を実装するサーバーとプロキシは、要求を認証するために、ユーザーパスワードを何らかの形式で保存する必要があります。これらのパスワードは、パスワードデータの漏洩によって簡単に回復できないような方法で保存する必要があります。ユーザーは弱いパスワードを選択し、認証レルム全体で再利用することが知られているため、ユーザーが自分のパスワードを設定することを許可されている場合、これは特に重要です。適切なパスワードハッシュ手法の完全な説明はこのドキュメントの範囲外ですが、サーバーオペレーターは、パスワードデータの漏洩が発生した場合にユーザーへのリスクを最小限に抑える努力をする必要があります。たとえば、サーバーはユーザーのパスワードをプレーンテキストまたは無塩のダイジェストとして保存しないようにする必要があります。最新のパスワードハッシュ手法の詳細については、「パスワードハッシュコンテスト」(<https://password-hashing.net>)を参照してください。

The use of the UTF-8 character encoding scheme and of normalization introduces additional security considerations; see Section 10 of [RFC3629] and Section 6 of [RFC5198] for more information.

UTF-8文字エンコードスキームと正規化を使用すると、セキュリティに関する追加の考慮事項が導入されます。詳細については、[RFC3629]のセクション10と[RFC5198]のセクション6を参照してください。

5. IANA Considerations
5. IANAに関する考慮事項

IANA maintains the "Hypertext Transfer Protocol (HTTP) Authentication Scheme Registry" ([RFC7235]) at <http://www.iana.org/assignments/ http-authschemes>.

IANAは、<http://www.iana.org/assignments/ http-authschemes>で「Hypertext Transfer Protocol(HTTP)Authentication Scheme Registry」([RFC7235])を維持しています。

The entry for the "Basic" authentication scheme has been updated to reference this specification.

「基本」認証スキームのエントリは、この仕様を参照するように更新されました。

6. References
6. 参考文献
6.1. Normative References
6.1. 引用文献

[RFC20] Cerf, V., "ASCII format for network interchange", STD 80, RFC 20, DOI 10.17487/RFC0020, October 1969, <http://www.rfc-editor.org/info/rfc20>.

[RFC20] Cerf、V。、「ネットワーク交換用のASCII形式」、STD 80、RFC 20、DOI 10.17487 / RFC0020、1969年10月、<http://www.rfc-editor.org/info/rfc20>。

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119] Bradner、S。、「要件レベルを示すためにRFCで使用するキーワード」、BCP 14、RFC 2119、DOI 10.17487 / RFC2119、1997年3月、<http://www.rfc-editor.org/info/ rfc2119>。

[RFC2978] Freed, N. and J. Postel, "IANA Charset Registration Procedures", BCP 19, RFC 2978, DOI 10.17487/RFC2978, October 2000, <http://www.rfc-editor.org/info/rfc2978>.

[RFC2978] Freed、N。およびJ. Postel、「IANA Charset Registration Procedures」、BCP 19、RFC 2978、DOI 10.17487 / RFC2978、2000年10月、<http://www.rfc-editor.org/info/rfc2978> 。

[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2003, <http://www.rfc-editor.org/info/rfc3629>.

[RFC3629] Yergeau、F。、「UTF-8、ISO 10646の変換フォーマット」、STD 63、RFC 3629、DOI 10.17487 / RFC3629、2003年11月、<http://www.rfc-editor.org/info/ rfc3629>。

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, <http://www.rfc-editor.org/info/rfc3986>.

[RFC3986] Berners-Lee、T.、Fielding、R。、およびL. Masinter、「Uniform Resource Identifier(URI):Generic Syntax」、STD 66、RFC 3986、DOI 10.17487 / RFC3986、2005年1月、<http:/ /www.rfc-editor.org/info/rfc3986>。

[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, <http://www.rfc-editor.org/info/rfc4648>.

[RFC4648] Josefsson、S。、「The Base16、Base32、およびBase64データエンコーディング」、RFC 4648、DOI 10.17487 / RFC4648、2006年10月、<http://www.rfc-editor.org/info/rfc4648>。

[RFC5198] Klensin, J. and M. Padlipsky, "Unicode Format for Network Interchange", RFC 5198, DOI 10.17487/RFC5198, March 2008, <http://www.rfc-editor.org/info/rfc5198>.

[RFC5198] Klensin、J。およびM. Padlipsky、「Network InterchangeのUnicode形式」、RFC 5198、DOI 10.17487 / RFC5198、2008年3月、<http://www.rfc-editor.org/info/rfc5198>。

[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <http://www.rfc-editor.org/info/rfc5234>.

[RFC5234]クロッカー、D。、エド。およびP. Overell、「構文仕様の拡張BNF:ABNF」、STD 68、RFC 5234、DOI 10.17487 / RFC5234、2008年1月、<http://www.rfc-editor.org/info/rfc5234>。

[RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in Internationalization in the IETF", BCP 166, RFC 6365, DOI 10.17487/RFC6365, September 2011, <http://www.rfc-editor.org/info/rfc6365>.

[RFC6365] Hoffman、P。およびJ. Klensin、「IETFの国際化で使用される用語」、BCP 166、RFC 6365、DOI 10.17487 / RFC6365、2011年9月、<http://www.rfc-editor.org/info / rfc6365>。

[RFC7235] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Authentication", RFC 7235, DOI 10.17487/RFC7235, June 2014, <http://www.rfc-editor.org/info/rfc7235>.

[RFC7235]フィールディング、R。、エド。およびJ. Reschke編、「Hypertext Transfer Protocol(HTTP / 1.1):Authentication」、RFC 7235、DOI 10.17487 / RFC7235、2014年6月、<http://www.rfc-editor.org/info/rfc7235>。

[RFC7613] Saint-Andre, P. and A. Melnikov, "Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords", RFC 7613, DOI 10.17487/RFC7613, August 2015, <http://www.rfc-editor.org/info/rfc7613>.

[RFC7613] Saint-Andre、P。およびA. Melnikov、「ユーザー名とパスワードを表す国際化された文字列の準備、適用、比較」、RFC 7613、DOI 10.17487 / RFC7613、2015年8月、<http://www.rfc- editor.org/info/rfc7613>。

6.2. Informative References
6.2. 参考引用

[ISO-8859-1] International Organization for Standardization, "Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1", ISO/IEC 8859-1:1998, 1998.

[ISO-8859-1]国際標準化機構、「情報技術-8ビットシングルバイトコード化グラフィック文字セット-パート1:ラテンアルファベットNo. 1」、ISO / IEC 8859-1:1998、1998。

[RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, DOI 10.17487/RFC2617, June 1999, <http://www.rfc-editor.org/info/rfc2617>.

[RFC2617] Franks、J.、Hallam-Baker、P.、Hostetler、J.、Lawrence、S.、Leach、P.、Luotonen、A。、およびL. Stewart、「HTTP Authentication:Basic and Digest Access Authentication」 、RFC 2617、DOI 10.17487 / RFC2617、1999年6月、<http://www.rfc-editor.org/info/rfc2617>。

[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, DOI 10.17487/RFC2818, May 2000, <http://www.rfc-editor.org/info/rfc2818>.

[RFC2818] Rescorla、E。、「HTTP Over TLS」、RFC 2818、DOI 10.17487 / RFC2818、2000年5月、<http://www.rfc-editor.org/info/rfc2818>。

[RFC2831] Leach, P. and C. Newman, "Using Digest Authentication as a SASL Mechanism", RFC 2831, DOI 10.17487/RFC2831, May 2000, <http://www.rfc-editor.org/info/rfc2831>.

[RFC2831] Leach、P。およびC. Newman、「Using Digest Authentication as a SASL Mechanism」、RFC 2831、DOI 10.17487 / RFC2831、2000年5月、<http://www.rfc-editor.org/info/rfc2831> 。

[RFC3875] Robinson, D. and K. Coar, "The Common Gateway Interface (CGI) Version 1.1", RFC 3875, DOI 10.17487/RFC3875, October 2004, <http://www.rfc-editor.org/info/rfc3875>.

[RFC3875] Robinson、D。およびK. Coar、「The Common Gateway Interface(CGI)Version 1.1」、RFC 3875、DOI 10.17487 / RFC3875、2004年10月、<http://www.rfc-editor.org/info/ rfc3875>。

[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008, <http://www.rfc-editor.org/info/rfc5246>.

[RFC5246] Dierks、T。およびE. Rescorla、「The Transport Layer Security(TLS)Protocol Version 1.2」、RFC 5246、DOI 10.17487 / RFC5246、2008年8月、<http://www.rfc-editor.org/info / rfc5246>。

[RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., Morris, J., Hansen, M., and R. Smith, "Privacy Considerations for Internet Protocols", RFC 6973, DOI 10.17487/RFC6973, July 2013, <http://www.rfc-editor.org/info/rfc6973>.

[RFC6973] Cooper、A.、Tschofenig、H.、Aboba、B.、Peterson、J.、Morris、J.、Hansen、M。、およびR. Smith、「インターネットプロトコルのプライバシーに関する考慮事項」、RFC 6973、DOI 10.17487 / RFC6973、2013年7月、<http://www.rfc-editor.org/info/rfc6973>。

[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, <http://www.rfc-editor.org/info/rfc7231>.

[RFC7231]フィールディング、R。、エド。およびJ. Reschke編、「Hypertext Transfer Protocol(HTTP / 1.1):Semantics and Content」、RFC 7231、DOI 10.17487 / RFC7231、2014年6月、<http://www.rfc-editor.org/info/rfc7231 >。

[RFC7615] Reschke, J., "HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields", RFC 7615, DOI 10.17487/RFC7615, September 2015, <http://www.rfc-editor.org/info/rfc7615>.

[RFC7615] Reschke、J。、「HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields」、RFC 7615、DOI 10.17487 / RFC7615、2015年9月、<http://www.rfc-editor.org/info/ rfc7615>。

[RFC7616] Shekh-Yusef, R., Ed., Ahrens, D., and S. Bremer, "HTTP Digest Access Authentication", RFC 7616, DOI 10.17487/RFC7616, September 2015, <http://www.rfc-editor.org/info/rfc7616>.

[RFC7616] Shekh-Yusef、R.、Ed。、Ahrens、D。、およびS. Bremer、「HTTP Digest Access Authentication」、RFC 7616、DOI 10.17487 / RFC7616、2015年9月、<http://www.rfc- editor.org/info/rfc7616>。

Appendix A. Changes from RFC 2617
付録A. RFC 2617からの変更点

The scheme definition has been rewritten to be consistent with newer specifications such as [RFC7235].

スキーム定義は、[RFC7235]などの新しい仕様と整合するように書き直されました。

The new authentication parameter 'charset' has been added. It is purely advisory, so existing implementations do not need to change, unless they want to take advantage of the additional information that previously wasn't available.

新しい認証パラメータ「charset」が追加されました。これは単なる助言であり、既存の実装では、以前は利用できなかった追加情報を利用したい場合を除き、変更する必要はありません。

Appendix B. Deployment Considerations for the 'charset' Parameter
付録B.「charset」パラメーターのデプロイメントに関する考慮事項
B.1. User Agents
B.1. ユーザーエージェント

User agents not implementing 'charset' will continue to work as before, ignoring the new parameter.

「charset」を実装しないユーザーエージェントは、新しいパラメーターを無視して、以前と同様に機能し続けます。

User agents that already default to the UTF-8 encoding implement 'charset' by definition.

すでにデフォルトでUTF-8エンコーディングになっているユーザーエージェントは、定義により「charset」を実装します。

Other user agents can keep their default behavior and switch to UTF-8 when seeing the new parameter.

他のユーザーエージェントは、デフォルトの動作を維持し、新しいパラメーターが表示されたときにUTF-8に切り替えることができます。

B.2. Servers
B.2. サーバー

Servers that do not support non-US-ASCII characters in credentials do not require any changes to support 'charset'.

資格情報でUS-ASCII以外の文字をサポートしていないサーバーでは、「charset」をサポートするための変更は必要ありません。

Servers that need to support non-US-ASCII characters, but cannot use the UTF-8 character encoding scheme will not be affected; they will continue to function as well or as badly as before.

US-ASCII以外の文字をサポートする必要があるが、UTF-8文字エンコード方式を使用できないサーバーは影響を受けません。それらは以前と同じように、または以前と同じように機能し続けます。

Finally, servers that need to support non-US-ASCII characters and can use the UTF-8 character encoding scheme can opt in by specifying the 'charset' parameter in the authentication challenge. Clients that do understand the 'charset' parameter will then start to use UTF-8, while other clients will continue to send credentials in their default encoding, broken credentials, or no credentials at all. Until all clients are upgraded to support UTF-8, servers are likely to see both UTF-8 and "legacy" encodings in requests. When processing as UTF-8 fails (due to a failure to decode as UTF-8 or a mismatch of user-id/password), a server might try a fallback to the previously supported legacy encoding in order to accommodate these legacy clients. Note that implicit retries need to be done carefully; for instance, some subsystems might detect repeated login failures and treat them as a potential credentials-guessing attack.

最後に、US-ASCII以外の文字をサポートする必要があり、UTF-8文字エンコードスキームを使用できるサーバーは、認証チャレンジで 'charset'パラメータを指定することでオプトインできます。 「charset」パラメーターを理解するクライアントは、UTF-8の使用を開始しますが、他のクライアントは、デフォルトのエンコードで資格情報を送信し続けるか、資格情報が壊れるか、資格情報をまったく送信しません。すべてのクライアントがUTF-8をサポートするようにアップグレードされるまで、サーバーはリクエストでUTF-8と「レガシー」エンコーディングの両方を認識する可能性があります。 UTF-8としての処理が失敗した場合(UTF-8としてのデコードの失敗、またはユーザーID /パスワードの不一致が原因)、サーバーはこれらのレガシークライアントに対応するために、以前サポートされていたレガシーエンコーディングへのフォールバックを試みる場合があります。暗黙的な再試行は慎重に行う必要があることに注意してください。たとえば、一部のサブシステムは、繰り返しログインの失敗を検出し、それらを潜在的な資格情報推測攻撃として扱う場合があります。

B.3. Why not simply switch the default encoding to UTF-8?
B.3. 単純にデフォルトのエンコーディングをUTF-8に切り替えないのはなぜですか?

There are sites in use today that default to a local character encoding scheme, such as ISO-8859-1 ([ISO-8859-1]), and expect user agents to use that encoding. Authentication on these sites will stop working if the user agent switches to a different encoding, such as UTF-8.

現在、ISO-8859-1([ISO-8859-1])などのローカル文字エンコーディングスキームをデフォルトとして使用しているサイトがあり、ユーザーエージェントがそのエンコーディングを使用することを期待しています。これらのサイトでの認証は、ユーザーエージェントがUTF-8などの別のエンコーディングに切り替えると機能しなくなります。

Note that sites might even inspect the User-Agent header field ([RFC7231], Section 5.5.3) to decide which character encoding scheme to expect from the client. Therefore, they might support UTF-8 for some user agents, but default to something else for others. User agents in the latter group will have to continue to do what they do today until the majority of these servers have been upgraded to always use UTF-8.

サイトは、User-Agentヘッダーフィールド([RFC7231]、セクション5.5.3)を調べて、クライアントに期待する文字エンコーディングスキームを決定する場合もあります。したがって、一部のユーザーエージェントではUTF-8をサポートしますが、他のユーザーエージェントではデフォルトで別の値を使用します。後者のグループのユーザーエージェントは、これらのサーバーの大部分が常にUTF-8を使用するようにアップグレードされるまで、現在の動作を継続する必要があります。

Acknowledgements

謝辞

This specification takes over the definition of the "Basic" HTTP Authentication Scheme, previously defined in RFC 2617. We thank John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for their work on that specification, from which significant amounts of text were borrowed. See Section 6 of [RFC2617] for further acknowledgements.

この仕様は、RFC 2617で以前に定義された「基本」HTTP認証スキームの定義を引き継ぎます。ジョンフランクス、フィリップM.ハラムベイカー、ジェフリーL.ホストレーラー、スコットD.ローレンス、ポールJ.リーチ、アリルオトネンに感謝します、およびローレンスC.スチュワートがその仕様に取り組んだことに対して感謝し、そこから大量のテキストが借用されました。さらなる謝辞については、[RFC2617]のセクション6を参照してください。

The internationalization problem with respect to the character encoding scheme used for user-pass was reported as a Mozilla bug back in the year 2000 (see <https://bugzilla.mozilla.org/show_bug.cgi?id=41489> and also the more recent <https://bugzilla.mozilla.org/show_bug.cgi?id=656213>). It was Andrew Clover's idea to address it using a new auth-param.

ユーザーパスに使用される文字エンコードスキームに関する国際化の問題は、2000年にMozillaのバグとして報告されました(<https://bugzilla.mozilla.org/show_bug.cgi?id=41489>およびより新しい<https://bugzilla.mozilla.org/show_bug.cgi?id=656213>)。 Andrew Cloverは、新しいauth-paramを使用してそれに対処することを考えていました。

We also thank the members of the HTTPAUTH Working Group and other reviewers, namely, Stephen Farrell, Roy Fielding, Daniel Kahn Gillmor, Tony Hansen, Bjoern Hoehrmann, Kari Hurtta, Amos Jeffries, Benjamin Kaduk, Michael Koeller, Eric Lawrence, Barry Leiba, James Manger, Alexey Melnikov, Kathleen Moriarty, Juergen Schoenwaelder, Yaron Sheffer, Meral Shirazipour, Michael Sweet, and Martin Thomson for feedback on this revision.

また、HTTPAUTHワーキンググループのメンバー、およびその他のレビュアー、すなわち、Stephen Farrell、Roy Fielding、Daniel Kahn Gillmor、Tony Hansen、Bjoern Hoehrmann、Kari Hurtta、Amos Jeffries、Benjamin Kaduk、Michael Koeller、Eric Lawrence、Barry Leiba、この改訂のフィードバックについては、James Manger、Alexey Melnikov、Kathleen Moriarty、Juergen Schoenwaelder、Yaron Sheffer、Meral Shirazipour、Michael Sweet、Martin Thomsonの各氏。

Author's Address

著者のアドレス

Julian F. Reschke greenbytes GmbH Hafenweg 16 Muenster, NW 48155 Germany

Julian F. Reschke greenbytes GmbH Hafenweg 16 Muenster、NW 48155ドイツ

   Email: julian.reschke@greenbytes.de
   URI:   http://greenbytes.de/tech/webdav/