Internet Engineering Task Force (IETF) C. Newman Request for Comments: 5802 Oracle Category: Standards Track A. Menon-Sen ISSN: 2070-1721 Oryx Mail Systems GmbH A. Melnikov Isode, Ltd. N. Williams Oracle July 2010
Internet Engineering Task Force (IETF) C. Newman Request for Comments: 5802 Oracle Category: Standards Track A. Menon-Sen ISSN: 2070-1721 Oryx Mail Systems GmbH A. Melnikov Isode, Ltd. N. Williams Oracle July 2010
Salted Challenge Response Authentication Mechanism (SCRAM) SASL and GSS-API Mechanisms
SALT质询响应认证机制(SCRAM)SASL和GSS-API机制
Abstract
摘要
The secure authentication mechanism most widely deployed and used by Internet application protocols is the transmission of clear-text passwords over a channel protected by Transport Layer Security (TLS). There are some significant security concerns with that mechanism, which could be addressed by the use of a challenge response authentication mechanism protected by TLS. Unfortunately, the challenge response mechanisms presently on the standards track all fail to meet requirements necessary for widespread deployment, and have had success only in limited use.
Internet应用程序协议最广泛部署和使用的安全身份验证机制是通过传输层安全性(TLS)保护的通道传输明文密码。该机制存在一些重大的安全问题,可以通过使用受TLS保护的质询-响应身份验证机制来解决。不幸的是,目前在标准轨道上的挑战响应机制都未能满足广泛部署所需的要求,并且仅在有限的使用中取得了成功。
This specification describes a family of Simple Authentication and Security Layer (SASL; RFC 4422) authentication mechanisms called the Salted Challenge Response Authentication Mechanism (SCRAM), which addresses the security concerns and meets the deployability requirements. When used in combination with TLS or an equivalent security layer, a mechanism from this family could improve the status quo for application protocol authentication and provide a suitable choice for a mandatory-to-implement mechanism for future application protocol standards.
本规范描述了一系列简单身份验证和安全层(SASL;RFC 4422)身份验证机制,称为Salted Challenge Response身份验证机制(SCRAM),它解决了安全问题并满足可部署性要求。当与TLS或等效安全层结合使用时,该系列的机制可以改善应用协议认证的现状,并为未来应用协议标准的强制实现机制提供合适的选择。
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 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/rfc5802.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc5802.
Copyright Notice
版权公告
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2010 IETF信托基金和确定为文件作者的人员。版权所有。
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)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。
Table of Contents
目录
1. Introduction ....................................................4 2. Conventions Used in This Document ...............................5 2.1. Terminology ................................................5 2.2. Notation ...................................................6 3. SCRAM Algorithm Overview ........................................7 4. SCRAM Mechanism Names ...........................................8 5. SCRAM Authentication Exchange ...................................9 5.1. SCRAM Attributes ..........................................10 5.2. Compliance with SASL Mechanism Requirements ...............13 6. Channel Binding ................................................14 6.1. Default Channel Binding ...................................15 7. Formal Syntax ..................................................15 8. SCRAM as a GSS-API Mechanism ...................................19 8.1. GSS-API Principal Name Types for SCRAM ....................19 8.2. GSS-API Per-Message Tokens for SCRAM ......................20 8.3. GSS_Pseudo_random() for SCRAM .............................20 9. Security Considerations ........................................20 10. IANA Considerations ...........................................22 11. Acknowledgements ..............................................23 12. References ....................................................24 12.1. Normative References .....................................24 12.2. Normative References for GSS-API Implementors ............24 12.3. Informative References ...................................25 Appendix A. Other Authentication Mechanisms .......................27 Appendix B. Design Motivations ....................................27
1. Introduction ....................................................4 2. Conventions Used in This Document ...............................5 2.1. Terminology ................................................5 2.2. Notation ...................................................6 3. SCRAM Algorithm Overview ........................................7 4. SCRAM Mechanism Names ...........................................8 5. SCRAM Authentication Exchange ...................................9 5.1. SCRAM Attributes ..........................................10 5.2. Compliance with SASL Mechanism Requirements ...............13 6. Channel Binding ................................................14 6.1. Default Channel Binding ...................................15 7. Formal Syntax ..................................................15 8. SCRAM as a GSS-API Mechanism ...................................19 8.1. GSS-API Principal Name Types for SCRAM ....................19 8.2. GSS-API Per-Message Tokens for SCRAM ......................20 8.3. GSS_Pseudo_random() for SCRAM .............................20 9. Security Considerations ........................................20 10. IANA Considerations ...........................................22 11. Acknowledgements ..............................................23 12. References ....................................................24 12.1. Normative References .....................................24 12.2. Normative References for GSS-API Implementors ............24 12.3. Informative References ...................................25 Appendix A. Other Authentication Mechanisms .......................27 Appendix B. Design Motivations ....................................27
This specification describes a family of authentication mechanisms called the Salted Challenge Response Authentication Mechanism (SCRAM) which addresses the requirements necessary to deploy a challenge-response mechanism more widely than past attempts (see Appendix A and Appendix B). When used in combination with Transport Layer Security (TLS; see [RFC5246]) or an equivalent security layer, a mechanism from this family could improve the status quo for application protocol authentication and provide a suitable choice for a mandatory-to-implement mechanism for future application protocol standards.
本规范描述了一系列认证机制,称为Salted质询-响应认证机制(SCRAM),它解决了比以往尝试更广泛地部署质询-响应机制所需的要求(见附录a和附录B)。当与传输层安全(TLS;见[RFC5246])或等效安全层结合使用时,该系列的机制可以改善应用协议认证的现状,并为未来应用协议标准的强制实施机制提供合适的选择。
For simplicity, this family of mechanisms does not presently include negotiation of a security layer [RFC4422]. It is intended to be used with an external security layer such as that provided by TLS or SSH, with optional channel binding [RFC5056] to the external security layer.
为简单起见,该系列机制目前不包括安全层协商[RFC4422]。它打算与外部安全层(如TLS或SSH提供的安全层)一起使用,可选通道绑定[RFC5056]到外部安全层。
SCRAM is specified herein as a pure Simple Authentication and Security Layer (SASL) [RFC4422] mechanism, but it conforms to the new bridge between SASL and the Generic Security Service Application Program Interface (GSS-API) called "GS2" [RFC5801]. This means that this document defines both, a SASL mechanism and a GSS-API mechanism.
本文将紧急停堆指定为一种纯粹的简单身份验证和安全层(SASL)[RFC4422]机制,但它符合SASL和通用安全服务应用程序接口(GSS-API)(称为“GS2”[RFC5801])之间的新桥梁。这意味着本文档定义了SASL机制和GSS-API机制。
SCRAM provides the following protocol features:
紧急停堆提供以下协议功能:
o The authentication information stored in the authentication database is not sufficient by itself to impersonate the client. The information is salted to prevent a pre-stored dictionary attack if the database is stolen.
o 存储在身份验证数据库中的身份验证信息本身不足以模拟客户端。如果数据库被盗,则对信息进行加密以防止预存储的字典攻击。
o The server does not gain the ability to impersonate the client to other servers (with an exception for server-authorized proxies).
o 服务器无法向其他服务器模拟客户端(服务器授权代理除外)。
o The mechanism permits the use of a server-authorized proxy without requiring that proxy to have super-user rights with the back-end server.
o 该机制允许使用服务器授权的代理,而无需该代理具有后端服务器的超级用户权限。
o Mutual authentication is supported, but only the client is named (i.e., the server has no name).
o 支持相互身份验证,但只命名客户端(即服务器没有名称)。
o When used as a SASL mechanism, SCRAM is capable of transporting authorization identities (see [RFC4422], Section 2) from the client to the server.
o 当用作SASL机制时,SCRAM能够将授权标识(参见[RFC4422],第2节)从客户端传输到服务器。
A separate document defines a standard LDAPv3 [RFC4510] attribute that enables storage of the SCRAM authentication information in LDAP. See [RFC5803].
一个单独的文档定义了一个标准的LDAPv3[RFC4510]属性,该属性支持在LDAP中存储紧急停堆认证信息。参见[RFC5803]。
For an in-depth discussion of why other challenge response mechanisms are not considered sufficient, see Appendix A. For more information about the motivations behind the design of this mechanism, see Appendix B.
有关为什么其他挑战响应机制不充分的深入讨论,请参见附录A。有关该机制设计背后动机的更多信息,请参见附录B。
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].
本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。
Formal syntax is defined by [RFC5234] including the core rules defined in Appendix B of [RFC5234].
形式语法由[RFC5234]定义,包括[RFC5234]附录B中定义的核心规则。
Example lines prefaced by "C:" are sent by the client and ones prefaced by "S:" by the server. If a single "C:" or "S:" label applies to multiple lines, then the line breaks between those lines are for editorial clarity only, and are not part of the actual protocol exchange.
以“C:”开头的示例行由客户端发送,以“S:”开头的示例行由服务器发送。如果单个“C:”或“S:”标签适用于多行,则这些行之间的换行符仅用于编辑清晰性,不属于实际协议交换的一部分。
This document uses several terms defined in [RFC4949] ("Internet Security Glossary") including the following: authentication, authentication exchange, authentication information, brute force, challenge-response, cryptographic hash function, dictionary attack, eavesdropping, hash result, keyed hash, man-in-the-middle, nonce, one-way encryption function, password, replay attack, and salt. Readers not familiar with these terms should use that glossary as a reference.
本文件使用了[RFC4949](“互联网安全术语表”)中定义的几个术语,包括:身份验证、身份验证交换、身份验证信息、暴力、质询响应、加密哈希函数、字典攻击、窃听、哈希结果、密钥哈希、中间人、nonce、,单向加密功能、密码、重放攻击和salt。不熟悉这些术语的读者应使用该术语表作为参考。
Some clarifications and additional definitions follow:
以下是一些澄清和补充定义:
o Authentication information: Information used to verify an identity claimed by a SCRAM client. The authentication information for a SCRAM identity consists of salt, iteration count, "StoredKey" and "ServerKey" (as defined in the algorithm overview) for each supported cryptographic hash function.
o 身份验证信息:用于验证紧急停堆客户端声明的身份的信息。紧急停堆标识的身份验证信息包括每个受支持的加密哈希函数的salt、迭代计数、“StoredKey”和“ServerKey”(定义见算法概述)。
o Authentication database: The database used to look up the authentication information associated with a particular identity. For application protocols, LDAPv3 (see [RFC4510]) is frequently
o 身份验证数据库:用于查找与特定身份相关联的身份验证信息的数据库。对于应用程序协议,LDAPv3(参见[RFC4510])通常是
used as the authentication database. For network-level protocols such as PPP or 802.11x, the use of RADIUS [RFC2865] is more common.
用作身份验证数据库。对于PPP或802.11x等网络级协议,使用RADIUS[RFC2865]更为常见。
o Base64: An encoding mechanism defined in [RFC4648] that converts an octet string input to a textual output string that can be easily displayed to a human. The use of base64 in SCRAM is restricted to the canonical form with no whitespace.
o Base64:[RFC4648]中定义的一种编码机制,它将八位字节字符串输入转换为文本输出字符串,可以方便地显示给用户。在紧急停堆中使用base64仅限于不带空格的规范形式。
o Octet: An 8-bit byte.
o 八位字节:一个8位字节。
o Octet string: A sequence of 8-bit bytes.
o 八位字节字符串:8位字节的序列。
o Salt: A random octet string that is combined with a password before applying a one-way encryption function. This value is used to protect passwords that are stored in an authentication database.
o Salt:在应用单向加密函数之前与密码组合的随机八位字节字符串。此值用于保护存储在身份验证数据库中的密码。
The pseudocode description of the algorithm uses the following notations:
算法的伪代码描述使用以下符号:
o ":=": The variable on the left-hand side represents the octet string resulting from the expression on the right-hand side.
o “:=”:左侧的变量表示由右侧表达式生成的八位字节字符串。
o "+": Octet string concatenation.
o “+”:八位字符串串联。
o "[ ]": A portion of an expression enclosed in "[" and "]" may not be included in the result under some circumstances. See the associated text for a description of those circumstances.
o “[]”:在某些情况下,“[”和“]”中包含的表达式的一部分可能不会包含在结果中。有关这些情况的说明,请参阅相关文本。
o Normalize(str): Apply the SASLprep profile [RFC4013] of the "stringprep" algorithm [RFC3454] as the normalization algorithm to a UTF-8 [RFC3629] encoded "str". The resulting string is also in UTF-8. When applying SASLprep, "str" is treated as a "stored strings", which means that unassigned Unicode codepoints are prohibited (see Section 7 of [RFC3454]). Note that implementations MUST either implement SASLprep or disallow use of non US-ASCII Unicode codepoints in "str".
o 规范化(str):将“stringprep”算法[RFC3454]的SASLprep配置文件[RFC4013]作为规范化算法应用于UTF-8[RFC3629]编码的“str”。结果字符串也是UTF-8格式。应用SASLprep时,“str”被视为“存储字符串”,这意味着禁止未分配的Unicode码点(参见[RFC3454]第7节)。请注意,实现必须实现SASLprep或禁止在“str”中使用非US-ASCII Unicode代码点。
o HMAC(key, str): Apply the HMAC keyed hash algorithm (defined in [RFC2104]) using the octet string represented by "key" as the key and the octet string "str" as the input string. The size of the result is the hash result size for the hash function in use. For example, it is 20 octets for SHA-1 (see [RFC3174]).
o HMAC(key,str):应用HMAC键控哈希算法(在[RFC2104]中定义),使用由“key”表示的八位字符串作为键,八位字符串“str”作为输入字符串。结果的大小是正在使用的哈希函数的哈希结果大小。例如,SHA-1为20个八位字节(参见[RFC3174])。
o H(str): Apply the cryptographic hash function to the octet string "str", producing an octet string as a result. The size of the result depends on the hash result size for the hash function in use.
o H(str):将加密哈希函数应用于八位字节字符串“str”,从而生成一个八位字节字符串。结果的大小取决于正在使用的哈希函数的哈希结果大小。
o XOR: Apply the exclusive-or operation to combine the octet string on the left of this operator with the octet string on the right of this operator. The length of the output and each of the two inputs will be the same for this use.
o 异或:应用异或操作将此运算符左侧的八位字节字符串与此运算符右侧的八位字节字符串组合起来。对于该用途,输出和两个输入的长度将相同。
o Hi(str, salt, i):
o 你好(str,salt,i):
U1 := HMAC(str, salt + INT(1)) U2 := HMAC(str, U1) ... Ui-1 := HMAC(str, Ui-2) Ui := HMAC(str, Ui-1)
U1 := HMAC(str, salt + INT(1)) U2 := HMAC(str, U1) ... Ui-1 := HMAC(str, Ui-2) Ui := HMAC(str, Ui-1)
Hi := U1 XOR U2 XOR ... XOR Ui
嗨:=U1异或U2异或。。。异或用户界面
where "i" is the iteration count, "+" is the string concatenation operator, and INT(g) is a 4-octet encoding of the integer g, most significant octet first.
其中,“i”是迭代计数,“+”是字符串串联运算符,INT(g)是整数g的4个八位组编码,最重要的八位组在前。
Hi() is, essentially, PBKDF2 [RFC2898] with HMAC() as the pseudorandom function (PRF) and with dkLen == output length of HMAC() == output length of H().
Hi()本质上是PBKDF2[RFC2898],其中HMAC()作为伪随机函数(PRF),dkLen==HMAC()的输出长度==H()的输出长度。
The following is a description of a full, uncompressed SASL SCRAM authentication exchange. Nothing in SCRAM prevents either sending the client-first message with the SASL authentication request defined by an application protocol ("initial client response"), or sending the server-final message as additional data of the SASL outcome of authentication exchange defined by an application protocol. See [RFC4422] for more details.
以下是完整、未压缩SASL紧急停堆身份验证交换的说明。紧急停堆中的任何内容都不会阻止使用应用协议定义的SASL身份验证请求发送客户端第一条消息(“初始客户端响应”),或将服务器最终消息作为应用协议定义的身份验证交换SASL结果的附加数据发送。有关更多详细信息,请参阅[RFC4422]。
Note that this section omits some details, such as client and server nonces. See Section 5 for more details.
请注意,本节省略了一些细节,例如客户端和服务器nonce。详见第5节。
To begin with, the SCRAM client is in possession of a username and password (*) (or a ClientKey/ServerKey, or SaltedPassword). It sends the username to the server, which retrieves the corresponding authentication information, i.e., a salt, StoredKey, ServerKey, and the iteration count i. (Note that a server implementation may choose
首先,紧急停堆客户端拥有用户名和密码(*)(或ClientKey/ServerKey或SaltedPassword)。它将用户名发送到服务器,服务器检索相应的身份验证信息,即salt、StoredKey、ServerKey和迭代计数i。(请注意,服务器实现可以选择
to use the same iteration count for all accounts.) The server sends the salt and the iteration count to the client, which then computes the following values and sends a ClientProof to the server:
服务器将salt和迭代计数发送给客户端,然后客户端计算以下值并向服务器发送ClientProof:
(*) Note that both the username and the password MUST be encoded in UTF-8 [RFC3629].
(*)注意,用户名和密码都必须用UTF-8[RFC3629]编码。
Informative Note: Implementors are encouraged to create test cases that use both usernames and passwords with non-ASCII codepoints. In particular, it's useful to test codepoints whose "Unicode Normalization Form C" and "Unicode Normalization Form KC" are different. Some examples of such codepoints include Vulgar Fraction One Half (U+00BD) and Acute Accent (U+00B4).
信息性说明:鼓励实现者创建使用用户名和密码以及非ASCII代码点的测试用例。特别是,测试“Unicode规范化形式C”和“Unicode规范化形式KC”不同的代码点非常有用。这种代码点的一些例子包括粗俗的分数一半(U+00BD)和尖锐的重音(U+00B4)。
SaltedPassword := Hi(Normalize(password), salt, i) ClientKey := HMAC(SaltedPassword, "Client Key") StoredKey := H(ClientKey) AuthMessage := client-first-message-bare + "," + server-first-message + "," + client-final-message-without-proof ClientSignature := HMAC(StoredKey, AuthMessage) ClientProof := ClientKey XOR ClientSignature ServerKey := HMAC(SaltedPassword, "Server Key") ServerSignature := HMAC(ServerKey, AuthMessage)
SaltedPassword := Hi(Normalize(password), salt, i) ClientKey := HMAC(SaltedPassword, "Client Key") StoredKey := H(ClientKey) AuthMessage := client-first-message-bare + "," + server-first-message + "," + client-final-message-without-proof ClientSignature := HMAC(StoredKey, AuthMessage) ClientProof := ClientKey XOR ClientSignature ServerKey := HMAC(SaltedPassword, "Server Key") ServerSignature := HMAC(ServerKey, AuthMessage)
The server authenticates the client by computing the ClientSignature, exclusive-ORing that with the ClientProof to recover the ClientKey and verifying the correctness of the ClientKey by applying the hash function and comparing the result to the StoredKey. If the ClientKey is correct, this proves that the client has access to the user's password.
服务器通过计算ClientSignature对客户端进行身份验证,使用ClientProof对客户端签名进行独占ORing以恢复ClientKey,并通过应用哈希函数并将结果与StoredKey进行比较来验证ClientKey的正确性。如果ClientKey是正确的,这证明客户端可以访问用户的密码。
Similarly, the client authenticates the server by computing the ServerSignature and comparing it to the value sent by the server. If the two are equal, it proves that the server had access to the user's ServerKey.
类似地,客户端通过计算ServerSignature并将其与服务器发送的值进行比较来验证服务器。如果两者相等,则证明服务器可以访问用户的ServerKey。
The AuthMessage is computed by concatenating messages from the authentication exchange. The format of these messages is defined in Section 7.
AuthMessage是通过连接来自身份验证交换的消息来计算的。第7节定义了这些信息的格式。
A SCRAM mechanism name is a string "SCRAM-" followed by the uppercased name of the underlying hash function taken from the IANA "Hash Function Textual Names" registry (see http://www.iana.org), optionally followed by the suffix "-PLUS" (see below). Note that SASL mechanism names are limited to 20 octets, which means that only
紧急停堆机制名称是一个字符串“SCRAM-”,后跟从IANA“哈希函数文本名称”注册表中获取的底层哈希函数的大写名称(请参阅http://www.iana.org),可选择后跟后缀“-PLUS”(见下文)。请注意,SASL机制名称限制为20个八位字节,这意味着
hash function names with lengths shorter or equal to 9 octets (20-length("SCRAM-")-length("-PLUS") can be used. For cases when the underlying hash function name is longer than 9 octets, an alternative 9-octet (or shorter) name can be used to construct the corresponding SCRAM mechanism name, as long as this alternative name doesn't conflict with any other hash function name from the IANA "Hash Function Textual Names" registry. In order to prevent future conflict, such alternative names SHOULD be registered in the IANA "Hash Function Textual Names" registry.
可以使用长度小于或等于9个八位字节(20个长度(“SCRAM-”)-长度(“-PLUS”)的哈希函数名。对于基础哈希函数名大于9个八位字节的情况,可以使用替代的9个八位字节(或更短)名称可用于构造相应的紧急停堆机制名称,只要此备选名称与IANA“哈希函数文本名称”注册表中的任何其他哈希函数名称不冲突。为防止将来发生冲突,应在IANA“哈希函数文本名称”注册表中注册此类备选名称。
For interoperability, all SCRAM clients and servers MUST implement the SCRAM-SHA-1 authentication mechanism, i.e., an authentication mechanism from the SCRAM family that uses the SHA-1 hash function as defined in [RFC3174].
为了实现互操作性,所有紧急停堆客户端和服务器必须实施紧急停堆SHA-1身份验证机制,即来自紧急停堆系列的身份验证机制,该机制使用[RFC3174]中定义的SHA-1哈希函数。
The "-PLUS" suffix is used only when the server supports channel binding to the external channel. If the server supports channel binding, it will advertise both the "bare" and "plus" versions of whatever mechanisms it supports (e.g., if the server supports only SCRAM with SHA-1, then it will advertise support for both SCRAM-SHA-1 and SCRAM-SHA-1-PLUS). If the server does not support channel binding, then it will advertise only the "bare" version of the mechanism (e.g., only SCRAM-SHA-1). The "-PLUS" exists to allow negotiation of the use of channel binding. See Section 6.
“-PLUS”后缀仅在服务器支持到外部通道的通道绑定时使用。如果服务器支持通道绑定,它将公布其支持的任何机制的“裸”和“加”版本(例如,如果服务器仅支持SHA-1紧急停堆,则它将公布对SCRAM-SHA-1和SCRAM-SHA-1-plus的支持)。如果服务器不支持通道绑定,则它将仅公布机制的“裸”版本(例如,仅SCRAM-SHA-1)。“-PLUS”允许协商使用通道绑定。见第6节。
SCRAM is a SASL mechanism whose client response and server challenge messages are text-based messages containing one or more attribute-value pairs separated by commas. Each attribute has a one-letter name. The messages and their attributes are described in Section 5.1, and defined in Section 7.
紧急停堆是一种SASL机制,其客户端响应和服务器质询消息是基于文本的消息,包含一个或多个由逗号分隔的属性值对。每个属性都有一个单字母名称。第5.1节对消息及其属性进行了描述,第7节对其进行了定义。
SCRAM is a client-first SASL mechanism (see [RFC4422], Section 5, item 2a), and returns additional data together with a server's indication of a successful outcome.
紧急停堆是一种客户机优先的SASL机制(参见[RFC4422],第5节,第2a项),并返回附加数据以及服务器对成功结果的指示。
This is a simple example of a SCRAM-SHA-1 authentication exchange when the client doesn't support channel bindings (username 'user' and password 'pencil' are used):
这是当客户端不支持通道绑定时(使用用户名“user”和密码“pencil”)进行SCRAM-SHA-1身份验证交换的一个简单示例:
C: n,,n=user,r=fyko+d2lbbFgONRv9qkxdawL S: r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j,s=QSXCR+Q6sek8bf92, i=4096 C: c=biws,r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j, p=v0X8v3Bz2T0CJGbJQyF0X+HI4Ts= S: v=rmF9pqV8S7suAoZWja4dJRkFsKQ=
C: n,,n=user,r=fyko+d2lbbFgONRv9qkxdawL S: r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j,s=QSXCR+Q6sek8bf92, i=4096 C: c=biws,r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j, p=v0X8v3Bz2T0CJGbJQyF0X+HI4Ts= S: v=rmF9pqV8S7suAoZWja4dJRkFsKQ=
First, the client sends the "client-first-message" containing:
首先,客户端发送“客户端第一条消息”,其中包含:
o a GS2 header consisting of a flag indicating whether channel binding is supported-but-not-used, not supported, or used, and an optional SASL authorization identity;
o GS2报头,包括指示是否支持但未使用、不支持或使用通道绑定的标志,以及可选的SASL授权标识;
o SCRAM username and a random, unique nonce attributes.
o 紧急停堆用户名和随机、唯一的nonce属性。
Note that the client's first message will always start with "n", "y", or "p"; otherwise, the message is invalid and authentication MUST fail. This is important, as it allows for GS2 extensibility (e.g., to add support for security layers).
注意,客户端的第一条消息总是以“n”、“y”或“p”开头;否则,消息无效,身份验证必须失败。这很重要,因为它允许GS2扩展性(例如,添加对安全层的支持)。
In response, the server sends a "server-first-message" containing the user's iteration count i and the user's salt, and appends its own nonce to the client-specified one.
作为响应,服务器发送一条“服务器第一条消息”,其中包含用户的迭代计数i和用户的salt,并将其自身的nonce附加到客户机指定的nonce。
The client then responds by sending a "client-final-message" with the same nonce and a ClientProof computed using the selected hash function as explained earlier.
然后,客户机通过发送一条“客户机最终消息”进行响应,该消息具有相同的nonce和使用所选哈希函数计算的ClientProof,如前所述。
The server verifies the nonce and the proof, verifies that the authorization identity (if supplied by the client in the first message) is authorized to act as the authentication identity, and, finally, it responds with a "server-final-message", concluding the authentication exchange.
服务器验证nonce和证据,验证授权标识(如果在第一条消息中由客户机提供)是否被授权作为身份验证标识,最后,它以“服务器最终消息”进行响应,结束身份验证交换。
The client then authenticates the server by computing the ServerSignature and comparing it to the value sent by the server. If the two are different, the client MUST consider the authentication exchange to be unsuccessful, and it might have to drop the connection.
然后,客户机通过计算ServerSignature并将其与服务器发送的值进行比较来验证服务器。如果两个是不同的,则客户端必须考虑认证交换失败,并且可能不得不放弃连接。
This section describes the permissible attributes, their use, and the format of their values. All attribute names are single US-ASCII letters and are case-sensitive.
本节介绍了允许的属性、它们的使用及其值的格式。所有属性名称均为单个US-ASCII字母,区分大小写。
Note that the order of attributes in client or server messages is fixed, with the exception of extension attributes (described by the "extensions" ABNF production), which can appear in any order in the designated positions. See Section 7 for authoritative reference.
请注意,客户机或服务器消息中的属性顺序是固定的,但扩展属性(由“extensions”ABNF production描述)除外,它可以以任何顺序出现在指定位置。权威参考见第7节。
o a: This is an optional attribute, and is part of the GS2 [RFC5801] bridge between the GSS-API and SASL. This attribute specifies an authorization identity. A client may include it in its first message to the server if it wants to authenticate as one user, but
o 答:这是一个可选属性,是GSS-API和SASL之间的GS2[RFC5801]桥的一部分。此属性指定授权标识。如果客户端希望作为一个用户进行身份验证,则可以将其包含在发送给服务器的第一条消息中,但是
subsequently act as a different user. This is typically used by an administrator to perform some management task on behalf of another user, or by a proxy in some situations.
随后充当不同的用户。这通常由管理员代表其他用户执行某些管理任务,或在某些情况下由代理执行。
Upon the receipt of this value the server verifies its correctness according to the used SASL protocol profile. Failed verification results in failed authentication exchange.
收到此值后,服务器将根据使用的SASL协议配置文件验证其正确性。验证失败导致身份验证交换失败。
If this attribute is omitted (as it normally would be), the authorization identity is assumed to be derived from the username specified with the (required) "n" attribute.
如果省略了该属性(通常是这样),则假定授权标识来自使用(必需的)“n”属性指定的用户名。
The server always authenticates the user specified by the "n" attribute. If the "a" attribute specifies a different user, the server associates that identity with the connection after successful authentication and authorization checks.
服务器始终验证由“n”属性指定的用户。如果“a”属性指定了不同的用户,则服务器会在成功进行身份验证和授权检查后将该标识与连接相关联。
The syntax of this field is the same as that of the "n" field with respect to quoting of '=' and ','.
关于“=”和“,”的引号,此字段的语法与“n”字段的语法相同。
o n: This attribute specifies the name of the user whose password is used for authentication (a.k.a. "authentication identity" [RFC4422]). A client MUST include it in its first message to the server. If the "a" attribute is not specified (which would normally be the case), this username is also the identity that will be associated with the connection subsequent to authentication and authorization.
o n:此属性指定其密码用于身份验证的用户的名称(也称为“身份验证标识”[RFC4422])。客户端必须将其包含在发送给服务器的第一条消息中。如果未指定“a”属性(通常情况下是这样),则此用户名也是身份验证和授权后与连接关联的标识。
Before sending the username to the server, the client SHOULD prepare the username using the "SASLprep" profile [RFC4013] of the "stringprep" algorithm [RFC3454] treating it as a query string (i.e., unassigned Unicode code points are allowed). If the preparation of the username fails or results in an empty string, the client SHOULD abort the authentication exchange (*).
在将用户名发送到服务器之前,客户端应使用“stringprep”算法[RFC3454]的“SASLprep”配置文件[RFC4013]将用户名作为查询字符串进行准备(即,允许使用未分配的Unicode代码点)。如果用户名准备失败或导致空字符串,则客户端应中止身份验证交换(*)。
(*) An interactive client can request a repeated entry of the username value.
(*)交互式客户端可以请求重复输入用户名值。
Upon receipt of the username by the server, the server MUST either prepare it using the "SASLprep" profile [RFC4013] of the "stringprep" algorithm [RFC3454] treating it as a query string (i.e., unassigned Unicode codepoints are allowed) or otherwise be prepared to do SASLprep-aware string comparisons and/or index lookups. If the preparation of the username fails or results in an empty string, the server SHOULD abort the
服务器收到用户名后,服务器必须使用“stringprep”算法[RFC3454]的“SASLprep”配置文件[RFC4013]将其作为查询字符串进行准备(即,允许未分配的Unicode代码点),或者准备进行SASLprep感知的字符串比较和/或索引查找。如果用户名的准备失败或导致空字符串,服务器应中止
authentication exchange. Whether or not the server prepares the username using "SASLprep", it MUST use it as received in hash calculations.
身份验证交换。无论服务器是否使用“SASLprep”准备用户名,它都必须在哈希计算中使用收到的用户名。
The characters ',' or '=' in usernames are sent as '=2C' and '=3D' respectively. If the server receives a username that contains '=' not followed by either '2C' or '3D', then the server MUST fail the authentication.
用户名中的字符“,”或“=”分别作为“=2C”和“=3D”发送。如果服务器收到的用户名包含“=”且后跟“2C”或“3D”,则服务器必须通过身份验证。
o m: This attribute is reserved for future extensibility. In this version of SCRAM, its presence in a client or a server message MUST cause authentication failure when the attribute is parsed by the other end.
o m:这个属性是为将来的扩展保留的。在此版本的紧急停堆中,当另一端解析属性时,其在客户端或服务器消息中的存在必须导致身份验证失败。
o r: This attribute specifies a sequence of random printable ASCII characters excluding ',' (which forms the nonce used as input to the hash function). No quoting is applied to this string. As described earlier, the client supplies an initial value in its first message, and the server augments that value with its own nonce in its first response. It is important that this value be different for each authentication (see [RFC4086] for more details on how to achieve this). The client MUST verify that the initial part of the nonce used in subsequent messages is the same as the nonce it initially specified. The server MUST verify that the nonce sent by the client in the second message is the same as the one sent by the server in its first message.
o r:该属性指定一系列随机可打印的ASCII字符,不包括“,”(构成用作哈希函数输入的nonce)。不对此字符串应用引号。如前所述,客户端在其第一条消息中提供初始值,服务器在其第一个响应中使用自己的nonce来增加该值。对于每个身份验证,此值必须不同(有关如何实现此功能的更多详细信息,请参阅[RFC4086])。客户端必须验证后续消息中使用的nonce的初始部分是否与其最初指定的nonce相同。服务器必须验证客户端在第二条消息中发送的nonce与服务器在第一条消息中发送的nonce相同。
o c: This REQUIRED attribute specifies the base64-encoded GS2 header and channel binding data. It is sent by the client in its second authentication message. The attribute data consist of:
o c:此必需属性指定base64编码的GS2标头和通道绑定数据。它由客户端在其第二个身份验证消息中发送。属性数据包括:
* the GS2 header from the client's first message (recall that the GS2 header contains a channel binding flag and an optional authzid). This header is going to include channel binding type prefix (see [RFC5056]), if and only if the client is using channel binding;
* 来自客户端第一条消息的GS2头(回想一下,GS2头包含一个通道绑定标志和一个可选的authzid)。当且仅当客户端正在使用通道绑定时,此标头将包括通道绑定类型前缀(请参见[RFC5056]);
* followed by the external channel's channel binding data, if and only if the client is using channel binding.
* 当且仅当客户端正在使用通道绑定时,后跟外部通道的通道绑定数据。
o s: This attribute specifies the base64-encoded salt used by the server for this user. It is sent by the server in its first message to the client.
o s:此属性指定服务器为此用户使用的base64编码的salt。它由服务器在第一条消息中发送给客户端。
o i: This attribute specifies an iteration count for the selected hash function and user, and MUST be sent by the server along with the user's salt.
o i:该属性指定所选哈希函数和用户的迭代计数,并且必须由服务器与用户的salt一起发送。
For the SCRAM-SHA-1/SCRAM-SHA-1-PLUS SASL mechanism, servers SHOULD announce a hash iteration-count of at least 4096. Note that a client implementation MAY cache ClientKey&ServerKey (or just SaltedPassword) for later reauthentication to the same service, as it is likely that the server is going to advertise the same salt value upon reauthentication. This might be useful for mobile clients where CPU usage is a concern.
对于SCRAM-SHA-1/SCRAM-SHA-1-PLUS SASL机制,服务器应宣布哈希迭代计数至少为4096。请注意,客户端实现可能会缓存ClientKey和ServerKey(或只是SaltedPassword),以便稍后对同一服务进行重新身份验证,因为服务器很可能会在重新身份验证时公布相同的salt值。这对于关注CPU使用情况的移动客户端可能很有用。
o p: This attribute specifies a base64-encoded ClientProof. The client computes this value as described in the overview and sends it to the server.
o p:该属性指定base64编码的ClientProof。客户端按照概述中所述计算此值,并将其发送到服务器。
o v: This attribute specifies a base64-encoded ServerSignature. It is sent by the server in its final message, and is used by the client to verify that the server has access to the user's authentication information. This value is computed as explained in the overview.
o v:此属性指定base64编码的ServerSignature。它由服务器在其最后一条消息中发送,客户端使用它来验证服务器是否有权访问用户的身份验证信息。按照概述中的说明计算此值。
o e: This attribute specifies an error that occurred during authentication exchange. It is sent by the server in its final message and can help diagnose the reason for the authentication exchange failure. On failed authentication, the entire server-final-message is OPTIONAL; specifically, a server implementation MAY conclude the SASL exchange with a failure without sending the server-final-message. This results in an application-level error response without an extra round-trip. If the server-final-message is sent on authentication failure, then the "e" attribute MUST be included.
o e:此属性指定身份验证交换期间发生的错误。它由服务器在其最后一条消息中发送,可以帮助诊断身份验证交换失败的原因。在身份验证失败时,整个服务器的最终消息是可选的;具体而言,服务器实现可能会以失败结束SASL交换,而不发送服务器最终消息。这将导致应用程序级错误响应,而不需要额外的往返。如果在身份验证失败时发送服务器最终消息,则必须包含“e”属性。
o As-yet unspecified mandatory and optional extensions. Mandatory extensions are encoded as values of the 'm' attribute (see ABNF for reserved-mext in section 7). Optional extensions use as-yet unassigned attribute names.
o 尚未指定的强制性和可选扩展。强制扩展被编码为'm'属性的值(参见第7节中保留的mext的ABNF)。可选扩展使用尚未分配的属性名称。
Mandatory extensions sent by one peer but not understood by the other MUST cause authentication failure (the server SHOULD send the "extensions-not-supported" server-error-value).
由一个对等方发送但另一个对等方无法理解的强制扩展必须导致身份验证失败(服务器应发送“不支持扩展”的服务器错误值)。
Unknown optional extensions MUST be ignored upon receipt.
收到时必须忽略未知的可选扩展名。
This section describes compliance with SASL mechanism requirements specified in Section 5 of [RFC4422].
本节描述了与[RFC4422]第5节中规定的SASL机制要求的符合性。
1) "SCRAM-SHA-1" and "SCRAM-SHA-1-PLUS".
1) “紧急停堆-SHA-1”和“紧急停堆-SHA-1-PLUS”。
2a) SCRAM is a client-first mechanism.
2a)紧急停堆是客户优先的机制。
2b) SCRAM sends additional data with success.
2b)紧急停堆成功发送附加数据。
3) SCRAM is capable of transferring authorization identities from the client to the server.
3) 紧急停堆能够将授权身份从客户端传输到服务器。
4) SCRAM does not offer any security layers (SCRAM offers channel binding instead).
4) 紧急停堆不提供任何安全层(紧急停堆提供通道绑定)。
5) SCRAM has a hash protecting the authorization identity.
5) 紧急停堆具有保护授权标识的哈希。
SCRAM supports channel binding to external secure channels, such as TLS. Clients and servers may or may not support channel binding, therefore the use of channel binding is negotiable. SCRAM does not provide security layers, however, therefore it is imperative that SCRAM provide integrity protection for the negotiation of channel binding.
紧急停堆支持通道绑定到外部安全通道,如TLS。客户端和服务器可能支持也可能不支持通道绑定,因此通道绑定的使用是可以协商的。然而,紧急停堆不提供安全层,因此紧急停堆必须为通道绑定的协商提供完整性保护。
Use of channel binding is negotiated as follows:
通道绑定的使用协商如下:
o Servers that support the use of channel binding SHOULD advertise both the non-PLUS (SCRAM-<hash-function>) and PLUS-variant (SCRAM-<hash-function>-PLUS) mechanism name. If the server cannot support channel binding, it SHOULD advertise only the non-PLUS-variant. If the server would never succeed in the authentication of the non-PLUS-variant due to policy reasons, it MUST advertise only the PLUS-variant.
o 支持使用通道绑定的服务器应同时公布非加号(SCRAM-<hash function>)和加号变量(SCRAM-<hash function>-PLUS)机制名称。如果服务器无法支持通道绑定,则应仅公布非PLUS变量。如果由于策略原因,服务器无法成功验证非加号变量,则必须仅公布加号变量。
o If the client supports channel binding and the server does not appear to (i.e., the client did not see the -PLUS name advertised by the server), then the client MUST NOT use an "n" gs2-cbind-flag.
o 如果客户机支持通道绑定,而服务器似乎不支持(即,客户机没有看到服务器公布的-PLUS名称),则客户机不得使用“n”gs2 cbind标志。
o Clients that support mechanism negotiation and channel binding MUST use a "p" gs2-cbind-flag when the server offers the PLUS-variant of the desired GS2 mechanism.
o 当服务器提供所需gs2机制的加号变体时,支持机制协商和通道绑定的客户端必须使用“p”gs2 cbind标志。
o If the client does not support channel binding, then it MUST use an "n" gs2-cbind-flag. Conversely, if the client requires the use of channel binding then it MUST use a "p" gs2-cbind-flag. Clients that do not support mechanism negotiation never use a "y" gs2- cbind-flag, they use either "p" or "n" according to whether they require and support the use of channel binding or whether they do not, respectively.
o 如果客户端不支持通道绑定,则必须使用“n”gs2 cbind标志。相反,如果客户端需要使用通道绑定,则必须使用“p”gs2 cbind标志。不支持机制协商的客户端从不使用“y”gs2-cbind标志,它们根据是否需要和支持使用通道绑定或不需要使用通道绑定分别使用“p”或“n”。
o Upon receipt of the client-first message, the server checks the channel binding flag (gs2-cbind-flag).
o 在收到客户机第一条消息后,服务器将检查通道绑定标志(gs2 cbind标志)。
* If the flag is set to "y" and the server supports channel binding, the server MUST fail authentication. This is because if the client sets the channel binding flag to "y", then the client must have believed that the server did not support channel binding -- if the server did in fact support channel binding, then this is an indication that there has been a downgrade attack (e.g., an attacker changed the server's mechanism list to exclude the -PLUS suffixed SCRAM mechanism name(s)).
* 如果该标志设置为“y”,并且服务器支持通道绑定,则服务器的身份验证必须失败。这是因为,如果客户端将通道绑定标志设置为“y”,那么客户端一定认为服务器不支持通道绑定——如果服务器确实支持通道绑定,那么这表示存在降级攻击(例如,攻击者更改服务器的机制列表以排除带后缀的紧急停堆机制名称)。
* If the channel binding flag was "p" and the server does not support the indicated channel binding type, then the server MUST fail authentication.
* 如果通道绑定标志为“p”,并且服务器不支持指定的通道绑定类型,则服务器的身份验证必须失败。
The server MUST always validate the client's "c=" field. The server does this by constructing the value of the "c=" attribute and then checking that it matches the client's c= attribute value.
服务器必须始终验证客户端的“c=”字段。服务器通过构造“c=”属性的值,然后检查它是否与客户机的c=属性值匹配来实现这一点。
For more discussions of channel bindings, and the syntax of channel binding data for various security protocols, see [RFC5056].
有关通道绑定以及各种安全协议的通道绑定数据语法的更多讨论,请参阅[RFC5056]。
A default channel binding type agreement process for all SASL application protocols that do not provide their own channel binding type agreement is provided as follows.
对于所有不提供自己的通道绑定类型协议的SASL应用程序协议,默认的通道绑定类型协议过程如下所示。
'tls-unique' is the default channel binding type for any application that doesn't specify one.
“tls unique”是任何未指定通道绑定类型的应用程序的默认通道绑定类型。
Servers MUST implement the "tls-unique" [RFC5929] channel binding type, if they implement any channel binding. Clients SHOULD implement the "tls-unique" [RFC5929] channel binding type, if they implement any channel binding. Clients and servers SHOULD choose the highest-layer/innermost end-to-end TLS channel as the channel to which to bind.
如果服务器实现任何通道绑定,则必须实现“tls唯一”[RFC5929]通道绑定类型。如果客户端实现任何通道绑定,则应实现“tls unique”[RFC5929]通道绑定类型。客户端和服务器应选择最高层/最内层的端到端TLS通道作为要绑定的通道。
Servers MUST choose the channel binding type indicated by the client, or fail authentication if they don't support it.
服务器必须选择客户端指示的通道绑定类型,如果不支持,则验证失败。
The following syntax specification uses the Augmented Backus-Naur form (ABNF) notation as specified in [RFC5234]. "UTF8-2", "UTF8-3", and "UTF8-4" non-terminal are defined in [RFC3629].
以下语法规范使用[RFC5234]中指定的增广巴科斯诺尔形式(ABNF)表示法。[RFC3629]中定义了“UTF8-2”、“UTF8-3”和“UTF8-4”非端子。
ALPHA = <as defined in RFC 5234 appendix B.1> DIGIT = <as defined in RFC 5234 appendix B.1> UTF8-2 = <as defined in RFC 3629 (STD 63)> UTF8-3 = <as defined in RFC 3629 (STD 63)> UTF8-4 = <as defined in RFC 3629 (STD 63)>
ALPHA = <as defined in RFC 5234 appendix B.1> DIGIT = <as defined in RFC 5234 appendix B.1> UTF8-2 = <as defined in RFC 3629 (STD 63)> UTF8-3 = <as defined in RFC 3629 (STD 63)> UTF8-4 = <as defined in RFC 3629 (STD 63)>
attr-val = ALPHA "=" value ;; Generic syntax of any attribute sent ;; by server or client
attr-val = ALPHA "=" value ;; Generic syntax of any attribute sent ;; by server or client
value = 1*value-char
value = 1*value-char
value-safe-char = %x01-2B / %x2D-3C / %x3E-7F / UTF8-2 / UTF8-3 / UTF8-4 ;; UTF8-char except NUL, "=", and ",".
value-safe-char = %x01-2B / %x2D-3C / %x3E-7F / UTF8-2 / UTF8-3 / UTF8-4 ;; UTF8-char except NUL, "=", and ",".
value-char = value-safe-char / "="
value-char = value-safe-char / "="
printable = %x21-2B / %x2D-7E ;; Printable ASCII except ",". ;; Note that any "printable" is also ;; a valid "value".
printable = %x21-2B / %x2D-7E ;; Printable ASCII except ",". ;; Note that any "printable" is also ;; a valid "value".
base64-char = ALPHA / DIGIT / "/" / "+"
base64-char = ALPHA / DIGIT / "/" / "+"
base64-4 = 4base64-char
base64-4 = 4base64-char
base64-3 = 3base64-char "="
base64-3=3base64字符“=”
base64-2 = 2base64-char "=="
base64-2 = 2base64-char "=="
base64 = *base64-4 [base64-3 / base64-2]
base64 = *base64-4 [base64-3 / base64-2]
posit-number = %x31-39 *DIGIT ;; A positive number.
posit-number = %x31-39 *DIGIT ;; A positive number.
saslname = 1*(value-safe-char / "=2C" / "=3D") ;; Conforms to <value>.
saslname = 1*(value-safe-char / "=2C" / "=3D") ;; Conforms to <value>.
authzid = "a=" saslname ;; Protocol specific.
authzid=“a=”saslname;;特定于协议。
cb-name = 1*(ALPHA / DIGIT / "." / "-") ;; See RFC 5056, Section 7. ;; E.g., "tls-server-end-point" or ;; "tls-unique".
cb-name = 1*(ALPHA / DIGIT / "." / "-") ;; See RFC 5056, Section 7. ;; E.g., "tls-server-end-point" or ;; "tls-unique".
gs2-cbind-flag = ("p=" cb-name) / "n" / "y" ;; "n" -> client doesn't support channel binding. ;; "y" -> client does support channel binding ;; but thinks the server does not. ;; "p" -> client requires channel binding. ;; The selected channel binding follows "p=".
gs2-cbind-flag = ("p=" cb-name) / "n" / "y" ;; "n" -> client doesn't support channel binding. ;; "y" -> client does support channel binding ;; but thinks the server does not. ;; "p" -> client requires channel binding. ;; The selected channel binding follows "p=".
gs2-header = gs2-cbind-flag "," [ authzid ] "," ;; GS2 header for SCRAM ;; (the actual GS2 header includes an optional ;; flag to indicate that the GSS mechanism is not ;; "standard", but since SCRAM is "standard", we ;; don't include that flag).
gs2-header = gs2-cbind-flag "," [ authzid ] "," ;; GS2 header for SCRAM ;; (the actual GS2 header includes an optional ;; flag to indicate that the GSS mechanism is not ;; "standard", but since SCRAM is "standard", we ;; don't include that flag).
username = "n=" saslname ;; Usernames are prepared using SASLprep.
username=“n=”saslname;;用户名是使用SASLprep准备的。
reserved-mext = "m=" 1*(value-char) ;; Reserved for signaling mandatory extensions. ;; The exact syntax will be defined in ;; the future.
reserved-mext = "m=" 1*(value-char) ;; Reserved for signaling mandatory extensions. ;; The exact syntax will be defined in ;; the future.
channel-binding = "c=" base64 ;; base64 encoding of cbind-input.
通道绑定=“c=”base64;;cbind输入的base64编码。
proof = "p=" base64
proof=“p=”base64
nonce = "r=" c-nonce [s-nonce] ;; Second part provided by server.
nonce=“r=”c-nonce[s-nonce];;第二部分由服务器提供。
c-nonce = printable
c-nonce = printable
s-nonce = printable
s-nonce = printable
salt = "s=" base64
salt=“s=”base64
verifier = "v=" base64 ;; base-64 encoded ServerSignature.
验证者=“v=”base64;;base-64编码的服务器签名。
iteration-count = "i=" posit-number ;; A positive number.
迭代计数=“i=”位置编号;;正数。
client-first-message-bare = [reserved-mext ","] username "," nonce ["," extensions]
客户端第一条消息bare=[保留的mext“,“]用户名”,“nonce[,”扩展名]
client-first-message = gs2-header client-first-message-bare
client-first-message = gs2-header client-first-message-bare
server-first-message = [reserved-mext ","] nonce "," salt "," iteration-count ["," extensions]
服务器第一条消息=[reserved mext',“]nonce”,“salt”,“迭代计数[”,“扩展名]
client-final-message-without-proof = channel-binding "," nonce ["," extensions]
无证据的客户端最终消息=通道绑定“,”nonce[,”扩展名]
client-final-message = client-final-message-without-proof "," proof
客户端最终消息=无证据的客户端最终消息
server-error = "e=" server-error-value
服务器错误=“e=”服务器错误值
server-error-value = "invalid-encoding" / "extensions-not-supported" / ; unrecognized 'm' value "invalid-proof" / "channel-bindings-dont-match" / "server-does-support-channel-binding" / ; server does not support channel binding "channel-binding-not-supported" / "unsupported-channel-binding-type" / "unknown-user" / "invalid-username-encoding" / ; invalid username encoding (invalid UTF-8 or ; SASLprep failed) "no-resources" / "other-error" / server-error-value-ext ; Unrecognized errors should be treated as "other-error". ; In order to prevent information disclosure, the server ; may substitute the real reason with "other-error".
server-error-value = "invalid-encoding" / "extensions-not-supported" / ; unrecognized 'm' value "invalid-proof" / "channel-bindings-dont-match" / "server-does-support-channel-binding" / ; server does not support channel binding "channel-binding-not-supported" / "unsupported-channel-binding-type" / "unknown-user" / "invalid-username-encoding" / ; invalid username encoding (invalid UTF-8 or ; SASLprep failed) "no-resources" / "other-error" / server-error-value-ext ; Unrecognized errors should be treated as "other-error". ; In order to prevent information disclosure, the server ; may substitute the real reason with "other-error".
server-error-value-ext = value ; Additional error reasons added by extensions ; to this document.
服务器错误值ext=value;扩展添加的其他错误原因;请参阅本文件。
server-final-message = (server-error / verifier) ["," extensions]
server-final-message = (server-error / verifier) ["," extensions]
extensions = attr-val *("," attr-val) ;; All extensions are optional, ;; i.e., unrecognized attributes ;; not defined in this document ;; MUST be ignored.
extensions = attr-val *("," attr-val) ;; All extensions are optional, ;; i.e., unrecognized attributes ;; not defined in this document ;; MUST be ignored.
cbind-data = 1*OCTET
cbind-data = 1*OCTET
cbind-input = gs2-header [ cbind-data ] ;; cbind-data MUST be present for ;; gs2-cbind-flag of "p" and MUST be absent ;; for "y" or "n".
cbind-input = gs2-header [ cbind-data ] ;; cbind-data MUST be present for ;; gs2-cbind-flag of "p" and MUST be absent ;; for "y" or "n".
This section and its sub-sections and all normative references of it not referenced elsewhere in this document are INFORMATIONAL for SASL implementors, but they are NORMATIVE for GSS-API implementors.
本节及其子节以及本文件其他地方未引用的所有规范性参考文件对SASL实施者具有参考意义,但对GSS-API实施者具有规范性。
SCRAM is actually also a GSS-API mechanism. The messages are the same, but a) the GS2 header on the client's first message and channel binding data is excluded when SCRAM is used as a GSS-API mechanism, and b) the RFC2743 section 3.1 initial context token header is prefixed to the client's first authentication message (context token).
紧急停堆实际上也是一种GSS-API机制。消息相同,但a)当紧急停堆用作GSS-API机制时,排除客户端第一条消息和通道绑定数据上的GS2报头,b)RFC2743第3.1节初始上下文令牌报头作为客户端第一条身份验证消息(上下文令牌)的前缀。
The GSS-API mechanism OID for SCRAM-SHA-1 is 1.3.6.1.5.5.14 (see Section 10).
紧急停堆-SHA-1的GSS-API机构OID为1.3.6.1.5.5.14(见第10节)。
SCRAM security contexts always have the mutual_state flag (GSS_C_MUTUAL_FLAG) set to TRUE. SCRAM does not support credential delegation, therefore SCRAM security contexts alway have the deleg_state flag (GSS_C_DELEG_FLAG) set to FALSE.
紧急停堆安全上下文始终将“相互”状态标志(GSS\U C\U相互”标志)设置为TRUE。紧急停堆不支持凭证委派,因此紧急停堆安全上下文总是将deleg_状态标志(GSS_C_deleg_标志)设置为FALSE。
SCRAM does not explicitly name acceptor principals. However, the use of acceptor principal names to find or prompt for passwords is useful. Therefore, SCRAM supports standard generic name syntaxes for acceptors such as GSS_C_NT_HOSTBASED_SERVICE (see [RFC2743], Section 4.1). Implementations should use the target name passed to GSS_Init_sec_context(), if any, to help retrieve or prompt for SCRAM passwords.
紧急停堆不会显式命名接受器主体。但是,使用接受器主体名称查找或提示输入密码是有用的。因此,SCRAM支持诸如GSS_C_NT_HOSTBASED_服务等接受者的标准通用名称语法(请参见[RFC2743],第4.1节)。实现应使用传递给GSS_Init_sec_context()的目标名称(如果有),以帮助检索或提示紧急停堆密码。
SCRAM supports only a single name type for initiators: GSS_C_NT_USER_NAME. GSS_C_NT_USER_NAME is the default name type for SCRAM.
紧急停堆仅支持启动器的单一名称类型:GSS\U C\U NT\U用户名。GSS_C_NT_USER_NAME是紧急停堆的默认名称类型。
There is no name canonicalization procedure for SCRAM beyond applying SASLprep as described in Section 5.1.
除按照第5.1节所述应用SASLprep外,没有紧急停堆规范化程序的名称。
The query, display, and exported name syntaxes for SCRAM principal names are all the same. There are no SCRAM-specific name syntaxes (SCRAM initiator principal names are free-form); -- applications should use generic GSS-API name types such as GSS_C_NT_USER_NAME and
紧急停堆主体名称的查询、显示和导出名称语法都相同。没有特定于紧急停堆的名称语法(紧急停堆启动器主体名称为自由格式);--应用程序应使用通用GSS-API名称类型,如GSS\U C\U NT\U用户名和
GSS_C_NT_HOSTBASED_SERVICE (see [RFC2743], Section 4). The exported name token does, of course, conform to [RFC2743], Section 3.2, but the "NAME" part of the token is just a SCRAM user name.
GSS_C_NT_基于主机的_服务(参见[RFC2743]第4节)。当然,导出的名称令牌符合[RFC2743]第3.2节,但令牌的“名称”部分只是一个紧急停堆用户名。
The per-message tokens for SCRAM as a GSS-API mechanism SHALL be the same as those for the Kerberos V GSS-API mechanism [RFC4121] (see Section 4.2 and sub-sections), using the Kerberos V "aes128-cts-hmac-sha1-96" enctype [RFC3962].
作为GSS-API机制的紧急停堆的每消息令牌应与Kerberos V GSS-API机制[RFC4121]的令牌相同(参见第4.2节和小节),使用Kerberos V“aes128-cts-hmac-sha1-96”enctype[RFC3962]。
The replay_det_state (GSS_C_REPLAY_FLAG), sequence_state (GSS_C_SEQUENCE_FLAG), conf_avail (GSS_C_CONF_FLAG) and integ_avail (GSS_C_CONF_FLAG) security context flags are always set to TRUE.
replay_det_state(GSS_C_replay_标志)、sequence_state(GSS_C_sequence_标志)、conf_avail(GSS_C_conf_标志)和integ_avail(GSS_C_conf_标志)安全上下文标志始终设置为TRUE。
The 128-bit session "protocol key" SHALL be derived by using the least significant (right-most) 128 bits of HMAC(StoredKey, "GSS-API session key" || ClientKey || AuthMessage). "Specific keys" are then derived as usual as described in Section 2 of [RFC4121], [RFC3961], and [RFC3962].
128位会话“协议密钥”应通过使用HMAC(StoredKey,“GSS-API会话密钥”| | ClientKey | | | AuthMessage)的最低有效(最右边)128位来推导。然后,按照[RFC4121]、[RFC3961]和[RFC3962]第2节中的说明,照常导出“特定密钥”。
The terms "protocol key" and "specific key" are Kerberos V5 terms [RFC3961].
术语“协议密钥”和“特定密钥”是Kerberos V5术语[RFC3961]。
SCRAM does support PROT_READY, and is PROT_READY on the initiator side first upon receipt of the server's reply to the initial security context token.
紧急停堆确实支持PROT_就绪,并且在收到服务器对初始安全上下文令牌的回复后,在启动器端首先处于PROT_就绪状态。
The GSS_Pseudo_random() [RFC4401] for SCRAM SHALL be the same as for the Kerberos V GSS-API mechanism [RFC4402]. There is no acceptor-asserted sub-session key for SCRAM, thus GSS_C_PRF_KEY_FULL and GSS_C_PRF_KEY_PARTIAL are equivalent for SCRAM's GSS_Pseudo_random(). The protocol key to be used for the GSS_Pseudo_random() SHALL be the same as the key defined in Section 8.2.
紧急停堆的GSS_伪_random()[RFC4401]应与Kerberos V GSS-API机制[RFC4402]相同。对于紧急停堆,没有接受者断言的子会话密钥,因此GSS_C_PRF_key_FULL和GSS_C_PRF_key_PARTIAL对于紧急停堆的GSS_Pseudo_random()是等效的。GSS_Pseudo_random()使用的协议密钥应与第8.2节中定义的密钥相同。
If the authentication exchange is performed without a strong security layer (such as TLS with data confidentiality), then a passive eavesdropper can gain sufficient information to mount an offline dictionary or brute-force attack that can be used to recover the user's password. The amount of time necessary for this attack depends on the cryptographic hash function selected, the strength of the password, and the iteration count supplied by the server. An external security layer with strong encryption will prevent this attack.
如果在没有强安全层(例如具有数据机密性的TLS)的情况下执行身份验证交换,则被动窃听者可以获得足够的信息来装载离线字典或暴力攻击,这些攻击可用于恢复用户的密码。此攻击所需的时间取决于选择的加密哈希函数、密码强度和服务器提供的迭代计数。具有强加密的外部安全层将阻止此攻击。
If the external security layer used to protect the SCRAM exchange uses an anonymous key exchange, then the SCRAM channel binding mechanism can be used to detect a man-in-the-middle attack on the security layer and cause the authentication to fail as a result. However, the man-in-the-middle attacker will have gained sufficient information to mount an offline dictionary or brute-force attack. For this reason, SCRAM allows to increase the iteration count over time. (Note that a server that is only in possession of "StoredKey" and "ServerKey" can't automatically increase the iteration count upon successful authentication. Such an increase would require resetting the user's password.)
如果用于保护紧急停堆交换的外部安全层使用匿名密钥交换,则紧急停堆通道绑定机制可用于检测安全层上的中间人攻击,并导致身份验证失败。然而,中间人攻击者将获得足够的信息来装载脱机字典或暴力攻击。因此,紧急停堆允许随时间增加迭代次数。(请注意,仅拥有“StoredKey”和“ServerKey”的服务器在成功身份验证后无法自动增加迭代次数。这种增加需要重置用户密码。)
If the authentication information is stolen from the authentication database, then an offline dictionary or brute-force attack can be used to recover the user's password. The use of salt mitigates this attack somewhat by requiring a separate attack on each password. Authentication mechanisms that protect against this attack are available (e.g., the EKE class of mechanisms). RFC 2945 [RFC2945] is an example of such technology. The WG elected not to use EKE like mechanisms as a basis for SCRAM.
如果身份验证信息从身份验证数据库中被盗,则可以使用脱机字典或暴力攻击来恢复用户的密码。使用salt需要对每个密码进行单独的攻击,从而在一定程度上减轻了这种攻击。可以使用防止此攻击的身份验证机制(例如EKE类机制)。RFC 2945[RFC2945]就是这种技术的一个例子。工作组选择不使用类似EKE的机制作为紧急停堆的基础。
If an attacker obtains the authentication information from the authentication repository and either eavesdrops on one authentication exchange or impersonates a server, the attacker gains the ability to impersonate that user to all servers providing SCRAM access using the same hash function, password, iteration count, and salt. For this reason, it is important to use randomly generated salt values.
如果攻击者从身份验证存储库获取身份验证信息,并在一个身份验证交换上进行窃听或模拟服务器,则攻击者可以使用相同的哈希函数、密码、迭代计数和salt将该用户模拟到提供紧急停堆访问的所有服务器。因此,使用随机生成的盐值非常重要。
SCRAM does not negotiate a hash function to use. Hash function negotiation is left to the SASL mechanism negotiation. It is important that clients be able to sort a locally available list of mechanisms by preference so that the client may pick the appropriate mechanism to use from a server's advertised mechanism list. This preference order is not specified here as it is a local matter. The preference order should include objective and subjective notions of mechanism cryptographic strength (e.g., SCRAM with a successor to SHA-1 may be preferred over SCRAM with SHA-1).
紧急停堆不会协商要使用的哈希函数。哈希函数协商留给SASL机制协商。重要的是,客户机能够根据偏好对本地可用的机制列表进行排序,以便客户机可以从服务器公布的机制列表中选择适当的机制来使用。此处未指定此优先顺序,因为这是一个局部问题。优先顺序应包括机制加密强度的客观和主观概念(例如,与SHA-1的紧急停堆相比,与SHA-1的继任者进行紧急停堆更为可取)。
Note that to protect the SASL mechanism negotiation applications normally must list the server mechanisms twice: once before and once after authentication, the latter using security layers. Since SCRAM does not provide security layers, the only ways to protect the mechanism negotiation are a) use channel binding to an external channel, or b) use an external channel that authenticates a user-provided server name.
注意,为了保护SASL机制,协商应用程序通常必须两次列出服务器机制:一次在身份验证之前,一次在身份验证之后,后者使用安全层。由于紧急停堆不提供安全层,因此保护机制协商的唯一方法是a)使用与外部通道的通道绑定,或b)使用验证用户提供的服务器名称的外部通道。
SCRAM does not protect against downgrade attacks of channel binding types. The complexities of negotiating a channel binding type, and handling down-grade attacks in that negotiation, were intentionally left out of scope for this document.
紧急停堆不能防止通道绑定类型的降级攻击。协商通道绑定类型的复杂性以及在协商中处理降级攻击的复杂性被故意排除在本文档的范围之外。
A hostile server can perform a computational denial-of-service attack on clients by sending a big iteration count value.
恶意服务器可以通过发送较大的迭代计数值对客户端执行计算拒绝服务攻击。
See [RFC4086] for more information about generating randomness.
有关生成随机性的更多信息,请参见[RFC4086]。
IANA has added the following family of SASL mechanisms to the SASL Mechanism registry established by [RFC4422]:
IANA已将以下系列SASL机制添加到[RFC4422]建立的SASL机制注册表中:
To: iana@iana.org Subject: Registration of a new SASL family SCRAM
致:iana@iana.org主题:新SASL系列紧急停堆的登记
SASL mechanism name (or prefix for the family): SCRAM-* Security considerations: Section 7 of [RFC5802] Published specification (optional, recommended): [RFC5802] Person & email address to contact for further information: IETF SASL WG <sasl@ietf.org> Intended usage: COMMON Owner/Change controller: IESG <iesg@ietf.org> Note: Members of this family MUST be explicitly registered using the "IETF Review" [RFC5226] registration procedure. Reviews MUST be requested on the SASL mailing list <sasl@ietf.org> (or a successor designated by the responsible Security AD).
SASL机制名称(或系列前缀):紧急停堆-*安全注意事项:[RFC5802]发布规范第7节(可选,推荐):[RFC5802]联系人和电子邮件地址,以获取更多信息:IETF SASL WG<sasl@ietf.org>预期用途:通用所有者/变更控制者:IESG<iesg@ietf.org>注:该家族成员必须使用“IETF审查”[RFC5226]注册程序明确注册。必须在SASL邮件列表上请求审查<sasl@ietf.org>(或由负责的担保AD指定的继任者)。
Note to future SCRAM-mechanism designers: each new SCRAM-SASL mechanism MUST be explicitly registered with IANA and MUST comply with SCRAM-mechanism naming convention defined in Section 4 of this document.
未来紧急停堆机制设计者注意:每个新的紧急停堆-SASL机制必须向IANA明确注册,并且必须符合本文件第4节中定义的紧急停堆机制命名约定。
IANA has added the following entries to the SASL Mechanism registry established by [RFC4422]:
IANA已将以下条目添加到由[RFC4422]建立的SASL机制注册表中:
To: iana@iana.org Subject: Registration of a new SASL mechanism SCRAM-SHA-1
致:iana@iana.org主题:注册新SASL机制SCRAM-SHA-1
SASL mechanism name (or prefix for the family): SCRAM-SHA-1 Security considerations: Section 7 of [RFC5802] Published specification (optional, recommended): [RFC5802] Person & email address to contact for further information: IETF SASL WG <sasl@ietf.org> Intended usage: COMMON Owner/Change controller: IESG <iesg@ietf.org> Note:
SASL机制名称(或系列前缀):SCRAM-SHA-1安全注意事项:[RFC5802]发布规范第7节(可选,推荐):[RFC5802]联系人和电子邮件地址以获取更多信息:IETF SASL WG<sasl@ietf.org>预期用途:通用所有者/变更控制者:IESG<iesg@ietf.org>注:
To: iana@iana.org Subject: Registration of a new SASL mechanism SCRAM-SHA-1-PLUS
致:iana@iana.org主题:注册新SASL机制SCRAM-SHA-1-PLUS
SASL mechanism name (or prefix for the family): SCRAM-SHA-1-PLUS Security considerations: Section 7 of [RFC5802] Published specification (optional, recommended): [RFC5802] Person & email address to contact for further information: IETF SASL WG <sasl@ietf.org> Intended usage: COMMON Owner/Change controller: IESG <iesg@ietf.org> Note:
SASL机制名称(或该系列的前缀):SCRAM-SHA-1-PLUS安全注意事项:[RFC5802]已发布规范的第7节(可选,推荐):[RFC5802]联系人和电子邮件地址以获取更多信息:IETF SASL WG<sasl@ietf.org>预期用途:通用所有者/变更控制者:IESG<iesg@ietf.org>注:
Per this document, IANA has assigned a GSS-API mechanism OID for SCRAM-SHA-1 from the iso.org.dod.internet.security.mechanisms prefix (see "SMI Security for Mechanism Codes" registry).
根据本文件,IANA已从iso.org.dod.internet.security.mechanisms前缀中为SCRAM-SHA-1分配了GSS-API机制OID(请参阅“机制代码的SMI安全性”注册表)。
This document benefited from discussions on the SASL WG mailing list. The authors would like to specially thank Dave Cridland, Simon Josefsson, Jeffrey Hutzelman, Kurt Zeilenga, Pasi Eronen, Ben Campbell, Peter Saint-Andre, and Tobias Markmann for their contributions to this document. A special thank you to Simon Josefsson for shepherding this document and for doing one of the first implementations of this specification.
本文件得益于关于SASL工作组邮件列表的讨论。作者特别感谢Dave Cridland、Simon Josefsson、Jeffrey Hutzelman、Kurt Zeilenga、Pasi Eronen、Ben Campbell、Peter Saint Andre和Tobias Markmann对本文件的贡献。特别感谢Simon Josefsson指导本文档并完成本规范的首批实现之一。
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.
[RFC2104]Krawczyk,H.,Bellare,M.,和R.Canetti,“HMAC:用于消息认证的键控哈希”,RFC 2104,1997年2月。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 (SHA1)", RFC 3174, September 2001.
[RFC3174]Eastlake,D.和P.Jones,“美国安全哈希算法1(SHA1)”,RFC 3174,2001年9月。
[RFC3454] Hoffman, P. and M. Blanchet, "Preparation of Internationalized Strings ("stringprep")", RFC 3454, December 2002.
[RFC3454]Hoffman,P.和M.Blanchet,“国际化弦的准备(“stringprep”)”,RFC 3454,2002年12月。
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.
[RFC3629]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,2003年11月。
[RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User Names and Passwords", RFC 4013, February 2005.
[RFC4013]Zeilenga,K.,“SASLprep:用户名和密码的Stringprep配置文件”,RFC40113,2005年2月。
[RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and Security Layer (SASL)", RFC 4422, June 2006.
[RFC4422]Melnikov,A.和K.Zeilenga,“简单身份验证和安全层(SASL)”,RFC 4422,2006年6月。
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006.
[RFC4648]Josefsson,S.,“Base16、Base32和Base64数据编码”,RFC4648,2006年10月。
[RFC5056] Williams, N., "On the Use of Channel Bindings to Secure Channels", RFC 5056, November 2007.
[RFC5056]Williams,N.,“关于使用通道绑定保护通道”,RFC 5056,2007年11月。
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008.
[RFC5234]Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,2008年1月。
[RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings for TLS", RFC 5929, July 2010.
[RFC5929]Altman,J.,Williams,N.,和L.Zhu,“TLS的通道绑定”,RFC 59292010年7月。
[RFC2743] Linn, J., "Generic Security Service Application Program Interface Version 2, Update 1", RFC 2743, January 2000.
[RFC2743]Linn,J.,“通用安全服务应用程序接口版本2,更新1”,RFC 2743,2000年1月。
[RFC3961] Raeburn, K., "Encryption and Checksum Specifications for Kerberos 5", RFC 3961, February 2005.
[RFC3961]Raeburn,K.,“Kerberos 5的加密和校验和规范”,RFC 3961,2005年2月。
[RFC3962] Raeburn, K., "Advanced Encryption Standard (AES) Encryption for Kerberos 5", RFC 3962, February 2005.
[RFC3962]Raeburn,K.,“Kerberos 5的高级加密标准(AES)加密”,RFC 3962,2005年2月。
[RFC4121] Zhu, L., Jaganathan, K., and S. Hartman, "The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2", RFC 4121, July 2005.
[RFC4121]Zhu,L.,Jaganathan,K.,和S.Hartman,“Kerberos版本5通用安全服务应用程序接口(GSS-API)机制:版本2”,RFC 41212005年7月。
[RFC4401] Williams, N., "A Pseudo-Random Function (PRF) API Extension for the Generic Security Service Application Program Interface (GSS-API)", RFC 4401, February 2006.
[RFC4401]Williams,N.,“通用安全服务应用程序接口(GSS-API)的伪随机函数(PRF)API扩展”,RFC4401,2006年2月。
[RFC4402] Williams, N., "A Pseudo-Random Function (PRF) for the Kerberos V Generic Security Service Application Program Interface (GSS-API) Mechanism", RFC 4402, February 2006.
[RFC4402]Williams,N.,“Kerberos V通用安全服务应用程序接口(GSS-API)机制的伪随机函数(PRF)”,RFC4402,2006年2月。
[RFC5801] Josefsson, S. and N. Williams, "Using Generic Security Service Application Program Interface (GSS-API) Mechanisms in Simple Authentication and Security Layer (SASL): The GS2 Mechanism Family", RFC 5801, July 2010.
[RFC5801]Josefsson,S.和N.Williams,“在简单身份验证和安全层(SASL)中使用通用安全服务应用程序接口(GSS-API)机制:GS2机制系列”,RFC 58012010年7月。
[CRAMHISTORIC] Zeilenga, K., "CRAM-MD5 to Historic", Work in Progress, November 2008.
[CramHistorical]Zeilenga,K.,“CRAM-MD5到历史”,正在进行的工作,2008年11月。
[DIGESTHISTORIC] Melnikov, A., "Moving DIGEST-MD5 to Historic", Work in Progress, July 2008.
[DigestHistorical]Melnikov,A.,“将DIGEST-MD5移至历史”,正在进行的工作,2008年7月。
[RFC2865] Rigney, C., Willens, S., Rubens, A., and W. Simpson, "Remote Authentication Dial In User Service (RADIUS)", RFC 2865, June 2000.
[RFC2865]Rigney,C.,Willens,S.,Rubens,A.,和W.Simpson,“远程认证拨入用户服务(RADIUS)”,RFC 28652000年6月。
[RFC2898] Kaliski, B., "PKCS #5: Password-Based Cryptography Specification Version 2.0", RFC 2898, September 2000.
[RFC2898]Kaliski,B.,“PKCS#5:基于密码的加密规范版本2.0”,RFC 28982000年9月。
[RFC2945] Wu, T., "The SRP Authentication and Key Exchange System", RFC 2945, September 2000.
[RFC2945]Wu,T.,“SRP认证和密钥交换系统”,RFC 29452000年9月。
[RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, June 2005.
[RFC4086]Eastlake,D.,Schiller,J.,和S.Crocker,“安全的随机性要求”,BCP 106,RFC 4086,2005年6月。
[RFC4510] Zeilenga, K., "Lightweight Directory Access Protocol (LDAP): Technical Specification Road Map", RFC 4510, June 2006.
[RFC4510]Zeilenga,K.,“轻量级目录访问协议(LDAP):技术规范路线图”,RFC45102006年6月。
[RFC4616] Zeilenga, K., "The PLAIN Simple Authentication and Security Layer (SASL) Mechanism", RFC 4616, August 2006.
[RFC4616]Zeilenga,K.,“简单认证和安全层(SASL)机制”,RFC4616,2006年8月。
[RFC4949] Shirey, R., "Internet Security Glossary, Version 2", RFC 4949, August 2007.
[RFC4949]Shirey,R.,“互联网安全术语表,第2版”,RFC 49492007年8月。
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, May 2008.
[RFC5226]Narten,T.和H.Alvestrand,“在RFCs中编写IANA注意事项部分的指南”,BCP 26,RFC 5226,2008年5月。
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC5246]Dierks,T.和E.Rescorla,“传输层安全(TLS)协议版本1.2”,RFC 5246,2008年8月。
[RFC5803] Melnikov, A., "Lightweight Directory Access Protocol (LDAP) Schema for Storing Salted Challenge Response Authentication Mechanism (SCRAM) Secrets", RFC 5803, July 2010.
[RFC5803]Melnikov,A.,“用于存储salt质询响应认证机制(SCRAM)机密的轻型目录访问协议(LDAP)模式”,RFC 5803,2010年7月。
[tls-server-end-point] IANA, "Registration of TLS server end-point channel bindings", available from http://www.iana.org, June 2008.
[tls服务器端点]IANA,“tls服务器端点通道绑定的注册”,可从http://www.iana.org,2008年6月。
The DIGEST-MD5 [DIGESTHISTORIC] mechanism has proved to be too complex to implement and test, and thus has poor interoperability. The security layer is often not implemented, and almost never used; everyone uses TLS instead. For a more complete list of problems with DIGEST-MD5 that led to the creation of SCRAM, see [DIGESTHISTORIC].
事实证明,DIGEST-MD5[DigestHistorical]机制过于复杂,无法实现和测试,因此互操作性较差。安全层通常没有实现,而且几乎从未使用过;每个人都使用TLS。有关导致紧急停堆的DIGEST-MD5问题的更完整列表,请参阅[DIGEST]。
The CRAM-MD5 SASL mechanism, while widely deployed, also has some problems. In particular, it is missing some modern SASL features such as support for internationalized usernames and passwords, support for passing of authorization identity, and support for channel bindings. It also doesn't support server authentication. For a more complete list of problems with CRAM-MD5, see [CRAMHISTORIC].
CRAM-MD5 SASL机制在广泛部署的同时,也存在一些问题。特别是,它缺少一些现代SASL功能,如对国际化用户名和密码的支持、对授权标识传递的支持以及对通道绑定的支持。它也不支持服务器身份验证。有关CRAM-MD5问题的更完整列表,请参阅[CRAM]。
The PLAIN [RFC4616] SASL mechanism allows a malicious server or eavesdropper to impersonate the authenticating user to any other server for which the user has the same password. It also sends the password in the clear over the network, unless TLS is used. Server authentication is not supported.
普通的[RFC4616]SASL机制允许恶意服务器或窃听者将身份验证用户模拟到用户具有相同密码的任何其他服务器。它还通过网络以明文形式发送密码,除非使用TLS。不支持服务器身份验证。
The following design goals shaped this document. Note that some of the goals have changed since the initial version of the document.
以下设计目标形成了本文档。请注意,自文档的初始版本以来,一些目标已经更改。
o The SASL mechanism has all modern SASL features: support for internationalized usernames and passwords, support for passing of authorization identity, and support for channel bindings.
o SASL机制具有所有现代SASL功能:支持国际化用户名和密码,支持传递授权标识,以及支持通道绑定。
o The protocol supports mutual authentication.
o 该协议支持相互认证。
o The authentication information stored in the authentication database is not sufficient by itself to impersonate the client.
o 存储在身份验证数据库中的身份验证信息本身不足以模拟客户端。
o The server does not gain the ability to impersonate the client to other servers (with an exception for server-authorized proxies), unless such other servers allow SCRAM authentication and use the same salt and iteration count for the user.
o 服务器无法向其他服务器模拟客户端(服务器授权代理除外),除非此类其他服务器允许紧急停堆身份验证并对用户使用相同的salt和迭代计数。
o The mechanism is extensible, but (hopefully) not over-engineered in this respect.
o 该机制是可扩展的,但(希望)在这方面没有过度设计。
o The mechanism is easier to implement than DIGEST-MD5 in both clients and servers.
o 在客户端和服务器中,该机制比DIGEST-MD5更容易实现。
Authors' Addresses
作者地址
Chris Newman Oracle 800 Royal Oaks Monrovia, CA 91016 USA
克里斯纽曼甲骨文800皇家橡树蒙罗维亚,加利福尼亚91016美国
EMail: chris.newman@oracle.com
EMail: chris.newman@oracle.com
Abhijit Menon-Sen Oryx Mail Systems GmbH
Abhijit Menon Sen Oryx邮件系统有限公司
EMail: ams@toroid.org
EMail: ams@toroid.org
Alexey Melnikov Isode, Ltd.
阿列克谢·梅尔尼科夫·伊索德有限公司。
EMail: Alexey.Melnikov@isode.com
EMail: Alexey.Melnikov@isode.com
Nicolas Williams Oracle 5300 Riata Trace Ct Austin, TX 78727 USA
Nicolas Williams Oracle 5300 Riata Trace Ct德克萨斯州奥斯汀78727美国
EMail: Nicolas.Williams@oracle.com
EMail: Nicolas.Williams@oracle.com