Network Working Group                                        K. Zeilenga
Request for Comments: 3112                           OpenLDAP Foundation
Category: Informational                                         May 2001
        
Network Working Group                                        K. Zeilenga
Request for Comments: 3112                           OpenLDAP Foundation
Category: Informational                                         May 2001
        

LDAP Authentication Password Schema

LDAP身份验证密码模式

Status of this Memo

本备忘录的状况

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2001). All Rights Reserved.

版权所有(C)互联网协会(2001年)。版权所有。

Abstract

摘要

This document describes schema in support of user/password authentication in a LDAP (Lightweight Directory Access Protocol) directory including the authPassword attribute type. This attribute type holds values derived from the user's password(s) (commonly using cryptographic strength one-way hash). authPassword is intended to used instead of userPassword.

本文档描述了在LDAP(轻量级目录访问协议)目录中支持用户/密码身份验证的模式,包括authPassword属性类型。此属性类型保存从用户密码派生的值(通常使用加密强度单向散列)。authPassword用于代替userPassword。

1. Background and Intended Use
1. 背景和预期用途

The userPassword attribute type [RFC2256] is intended to be used to support the LDAP [RFC2251] "simple" bind operation. However, values of userPassword must be clear text passwords. It is often desirable to store values derived from the user's password(s) instead of actual passwords.

userPassword属性类型[RFC2256]用于支持LDAP[RFC2251]“简单”绑定操作。但是,userPassword的值必须是明文密码。通常需要存储从用户密码而不是实际密码派生的值。

The authPassword attribute type is intended to be used to store information used to implement simple password based authentication. The attribute type may be used by LDAP servers to implement the LDAP Bind operation's "simple" authentication method.

authPassword属性类型用于存储用于实现简单的基于密码的身份验证的信息。LDAP服务器可以使用该属性类型来实现LDAP绑定操作的“简单”身份验证方法。

The attribute type supports multiple storage schemes. A matching rule is provided for use with extensible search filters to allow clients to assert that a clear text password "matches" one of the attribute's values.

属性类型支持多个存储方案。提供了一个匹配规则,用于可扩展的搜索过滤器,以允许客户端断言明文密码“匹配”属性值之一。

Storage schemes often use cryptographic strength one-way hashing. Though the use of one-way hashing reduces the potential that exposed values will allow unauthorized access to the Directory (unless the

存储方案通常使用加密强度单向散列。尽管单向散列的使用降低了公开值允许未经授权访问目录的可能性(除非

hash algorithm/implementation is flawed), the hashing of passwords is intended to be as an additional layer of protection. It is RECOMMENDED that hashed values be protected as if they were clear text passwords.

散列算法/实现有缺陷),密码散列旨在作为额外的保护层。建议将哈希值作为明文密码进行保护。

This attribute may be used in conjunction with server side password generation mechanisms (such as the LDAP Password Modify [RFC3062] extended operation).

此属性可与服务器端密码生成机制(如LDAP密码修改[RFC3062]扩展操作)结合使用。

Access to this attribute may governed by administrative controls such as those which implement password change policies.

对该属性的访问可能由管理控制(如实施密码更改策略的控制)控制。

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

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不得”、“应”、“不应”、“建议”和“可”应按照RFC 2119[RFC2119]中的说明进行解释。

2. Schema Definitions
2. 模式定义

The following schema definitions are described in terms of LDAPv3 Attribute Syntax Definitions [RFC2252] with specific syntax detailed using Augmented BNF [RFC2234].

以下模式定义根据LDAPv3属性语法定义[RFC2252]进行描述,具体语法使用增广BNF[RFC2234]进行详细说明。

2.1. authPasswordSyntax
2.1. authPasswordSyntax

( 1.3.6.1.4.1.4203.1.1.2 DESC 'authentication password syntax' )

(1.3.6.1.4.1.4203.1.1.2说明“验证密码语法”)

Values of this syntax are encoded according to:

此语法的值根据以下内容进行编码:

      authPasswordValue = w scheme s authInfo s authValue w
      scheme = %x30-39 / %x41-5A / %x2D-2F / %x5F
            ; 0-9, A-Z, "-", ".", "/", or "_"
      authInfo = schemeSpecificValue
      authValue = schemeSpecificValue
              schemeSpecificValue = *( %x21-23 / %x25-7E )
            ; printable ASCII less "$" and " "
      s = w SEP w
      w = *SP
      SEP = %x24 ; "$"
      SP = %x20 ; " " (space)
        
      authPasswordValue = w scheme s authInfo s authValue w
      scheme = %x30-39 / %x41-5A / %x2D-2F / %x5F
            ; 0-9, A-Z, "-", ".", "/", or "_"
      authInfo = schemeSpecificValue
      authValue = schemeSpecificValue
              schemeSpecificValue = *( %x21-23 / %x25-7E )
            ; printable ASCII less "$" and " "
      s = w SEP w
      w = *SP
      SEP = %x24 ; "$"
      SP = %x20 ; " " (space)
        

where scheme describes the mechanism and authInfo and authValue are a scheme specific. The authInfo field is often a base64 encoded salt. The authValue field is often a base64 encoded value derived from a user's password(s). Values of this attribute are case sensitive.

其中scheme描述了机制,authInfo和authValue是特定于方案的。authInfo字段通常是base64编码的salt。authValue字段通常是从用户密码派生的base64编码值。此属性的值区分大小写。

Transfer of values of this syntax is strongly discouraged where the underlying transport service cannot guarantee confidentiality and may result in disclosure of the values to unauthorized parties.

如果基础传输服务不能保证机密性,并且可能导致向未经授权的方披露这些值,则强烈反对传输此语法的值。

This document describes a number of schemes, as well as requirements for the scheme naming, in section 3.

This document describes a number of schemes, as well as requirements for the scheme naming, in section 3.translate error, please retry

2.2. authPasswordExactMatch
2.2. authPasswordExactMatch

( 1.3.6.1.4.1.4203.1.2.2 NAME 'authPasswordExactMatch' DESC 'authentication password exact matching rule' SYNTAX 1.3.6.1.4.1.4203.1.1.2 )

(1.3.6.1.4.1.4203.1.2.2名称“authPasswordExactMatch”描述“身份验证密码精确匹配规则”语法1.3.6.1.4.1.4203.1.1.2)

This matching rule allows a client to assert that an asserted authPasswordSyntax value matches authPasswordSyntax values. It is meant to be used as the EQUALITY matching rule of attributes whose SYNTAX is authPasswordSyntax.

此匹配规则允许客户端断言断言的authPasswordSyntax值与authPasswordSyntax值匹配。它将用作语法为authPasswordSyntax的属性的相等匹配规则。

The assertion is "TRUE" if there is an attribute value which has the same scheme, authInfo, and authValue components as the asserted value; "FALSE" if no attribute value has the same components as the asserted value; and "Undefined" otherwise.

如果属性值与断言值具有相同的scheme、authInfo和authValue组件,则断言为“TRUE”;如果没有属性值具有与断言值相同的组件,则为“FALSE”;否则“未定义”。

2.3. authPasswordMatch
2.3. authPasswordMatch

( 1.3.6.1.4.1.4203.1.2.3 NAME 'authPasswordMatch' DESC 'authentication password matching rule' SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{128} )

(1.3.6.1.4.1.4203.1.2.3名称'authPasswordMatch'描述'authentication PasswordMatch rule'语法1.3.6.1.4.1.1466.115.121.1.40{128})

This matching rule allows a client to assert that a password matches values of authPasswordSyntax using an extensibleMatch filter component. Each value is matched per its scheme. The assertion is "TRUE" if one or more attribute values matches the asserted value, "FALSE" if all values do not matches, and "Undefined" otherwise.

此匹配规则允许客户端使用ExtensionMatch筛选器组件断言密码与authPasswordSyntax的值匹配。每个值根据其方案进行匹配。如果一个或多个属性值与断言值匹配,则断言为“TRUE”;如果所有值都不匹配,则断言为“FALSE”;否则断言为“未定义”。

Servers which support use of this matching rule SHOULD publish appropriate matchingRuleUse values per [RFC2252], 4.4.

支持使用此匹配规则的服务器应根据[RFC2252],4.4发布适当的匹配规则使用值。

Transfer of authPasswordMatch assertion values is strongly discouraged where the underlying transport service cannot guarantee confidentiality and may result in disclosure of the values to unauthorized parties.

如果基础传输服务无法保证机密性,并且可能导致向未经授权的方披露这些值,则强烈反对传输authPasswordMatch断言值。

2.4. supportedAuthPasswordSchemes
2.4. supportedAuthPasswordSchemes

( 1.3.6.1.4.1.4203.1.3.3 NAME 'supportedAuthPasswordSchemes' DESC 'supported password storage schemes' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} USAGE dSAOperation )

(1.3.6.1.4.1.4203.1.3.3 NAME“supportedAuthPasswordSchemes”DESC“supported PasswordStorage schemes”相等caseExactIA5Match语法1.3.6.1.4.1.1466.115.121.1.26{32}用法DSAO操作)

The values of this attribute are names of supported authentication password schemes which the server supports. The syntax of a scheme name is described in section 2.1. This attribute may only be present in the root DSE. If the server does not support any password schemes, this attribute will not be present.

此属性的值是服务器支持的受支持身份验证密码方案的名称。第2.1节描述了方案名称的语法。此属性只能出现在根DSE中。如果服务器不支持任何密码方案,则此属性将不存在。

2.5. authPassword
2.5. 授权密码

( 1.3.6.1.4.1.4203.1.3.4 NAME 'authPassword' DESC 'password authentication information' EQUALITY 1.3.6.1.4.1.4203.1.2.2 SYNTAX 1.3.6.1.4.1.4203.1.1.2 )

(1.3.6.1.4.1.4203.1.3.4名称'authPassword'DESC'密码验证信息'EQUALITY 1.3.6.1.4.1.4203.1.2.2语法1.3.6.1.4.1.4203.1.1.2)

The values of this attribute are representative of the user's password(s) and conform to the authPasswordSyntax described in 2.1. The values of this attribute may be used for authentication purposes.

此属性的值代表用户的密码,并符合2.1中描述的authPasswordSyntax。此属性的值可用于身份验证目的。

Transfer of authPassword values is strongly discouraged where the underlying transport service cannot guarantee confidentiality and may result in disclosure of the values to unauthorized parties.

如果基础传输服务无法保证机密性,并且可能导致向未经授权的方披露authPassword值,则强烈反对传输authPassword值。

2.6. authPasswordObject
2.6. authPasswordObject

( 1.3.6.1.4.1.4203.1.4.7 NAME 'authPasswordObject' DESC 'authentication password mix in class' MAY 'authPassword' AUXILIARY )

(1.3.6.1.4.1.4203.1.4.7名称'authPasswordObject'DESC'类中的身份验证密码混合'MAY'authPassword'辅助)

Entries of this object class may contain authPassword attribute types.

此对象类的条目可能包含authPassword属性类型。

3. Schemes
3. 计划

This section describes the "MD5" and "SHA1" schemes. Other schemes may be defined by other documents. Schemes which are not described in an RFC SHOULD be named with a leading "X-" to indicate they are a private or implementation specific scheme, or may be named using the dotted-decimal representation [RFC2252] of an OID assigned to the scheme.

本节介绍“MD5”和“SHA1”方案。其他方案可由其他文件定义。RFC中未描述的方案应以前导“X-”命名,以表明它们是私有或特定于实现的方案,或者可以使用分配给方案的OID的点十进制表示[RFC2252]命名。

3.1. MD5 scheme
3.1. MD5 schemetranslate error, please retry

The MD5 [RFC1321] scheme name is "MD5".

MD5[RFC1321]方案名称为“MD5”。

The authValue is the base64 encoding of an MD5 digest of the concatenation the user password and salt. The base64 encoding of the salt is provided in the authInfo field. The salt MUST be at least 64 bits long. Implementations of this scheme MUST support salts up to 128 bits in length.

authValue是连接用户密码和salt的MD5摘要的base64编码。salt的base64编码在authInfo字段中提供。salt的长度必须至少为64位。此方案的实现必须支持长度高达128位的SALT。

Example: Given a user "joe" who's password is "mary" and a salt of "salt", the authInfo field would be the base64 encoding of "salt" and the authValue field would be the base64 encoding of the MD5 digest of "marysalt".

示例:假设用户“joe”的密码是“mary”和“salt”中的salt,authInfo字段将是“salt”的base64编码,authValue字段将是“marysalt”MD5摘要的base64编码。

A match against an asserted password and an attribute value of this scheme SHALL be true if and only if the MD5 digest of concatenation of the asserted value and the salt is equal to the MD5 digest contained in AuthValue. The match SHALL be undefined if the server is unable to complete the equality test for any reason. Otherwise the match SHALL be false.

当且仅当断言值和salt的串联MD5摘要等于AuthValue中包含的MD5摘要时,与断言密码和该方案的属性值的匹配才应为真。如果服务器因任何原因无法完成平等性测试,则匹配应为未定义。否则,比赛将是假的。

Values of this scheme SHOULD only be used to implement simple user/password authentication.

此方案的值只能用于实现简单的用户/密码身份验证。

3.2. SHA1 scheme
3.2. SHA1方案

The SHA1 [SHA1] scheme name is "SHA1".

SHA1[SHA1]方案名称为“SHA1”。

The authValue is the base64 encoding of a SHA1 digest of the concatenation the user password and the salt. The base64 encoding of the salt is provided in the authInfo field. The salt MUST be at least 64 bits long. Implementations of this scheme MUST support salts up to 128 bits in length.

authValue是连接用户密码和salt的SHA1摘要的base64编码。salt的base64编码在authInfo字段中提供。salt的长度必须至少为64位。此方案的实现必须支持长度高达128位的SALT。

Example: Given a user "joe" who's password is "mary" and a salt of "salt", the authInfo field would be the base64 encoding of "salt" and the authValue field would be the base64 encoding of the SHA1 digest of "marysalt".

示例:如果用户“joe”的密码是“mary”和“salt”中的salt,则authInfo字段将是“salt”的base64编码,authValue字段将是“marysalt”的SHA1摘要的base64编码。

A match against an asserted password and an attribute value of this scheme SHALL be true if and only if the SHA1 digest of concatenation of the asserted value and the salt is equal to the SHA1 digest contained in AuthValue. The match SHALL be undefined if the server is unable to complete the equality test for any reason. Otherwise the match SHALL be false.

当且仅当断言值和salt的串联的SHA1摘要等于AuthValue中包含的SHA1摘要时,与断言密码和该方案的属性值的匹配应为真。如果服务器因任何原因无法完成平等性测试,则匹配应为未定义。否则,比赛将是假的。

Values of this scheme SHOULD only be used to implement simple user/password authentication.

此方案的值只能用于实现简单的用户/密码身份验证。

4. Implementation Issues
4. 执行问题

For all implementations of this specification:

对于本规范的所有实现:

Servers MAY restrict which schemes are used in conjunction with a particular authentication process but SHOULD use all values of selected schemes. If the asserted password matches any of the stored values, the asserted password SHOULD be considered valid. Servers MAY use other authentication storage mechanisms, such as userPassword or an external password store, in conjunction with authPassword to support the authentication process.

服务器可以限制与特定身份验证过程结合使用的方案,但应使用所选方案的所有值。如果断言的密码与任何存储值匹配,则应认为断言的密码有效。服务器可以使用其他身份验证存储机制,如userPassword或外部密码存储,与authPassword一起支持身份验证过程。

Servers that support simple bind MUST support the SHA1 scheme and SHOULD support the MD5 scheme.

支持简单绑定的服务器必须支持SHA1方案,并且应该支持MD5方案。

Servers SHOULD NOT publish values of authPassword nor allow operations which expose authPassword values or AuthPasswordMatch assertions to unless confidentiality protection is in place.

服务器不应发布authPassword值,也不应允许将authPassword值或AuthPasswordMatch断言公开给的操作,除非有保密保护。

Clients SHOULD NOT initiate operations which provide or request values of authPassword or make authPasswordMatch assertions unless confidentiality protection is in place.

除非有保密保护,否则客户端不应启动提供或请求authPassword值或进行authPasswordMatch断言的操作。

Clients SHOULD NOT assume that a successful AuthPasswordMatch, whether by compare or search, is sufficient to gain directory access. The bind operation MUST be used to authenticate to the directory.

客户端不应假定成功的AuthPasswordMatch(无论是通过比较还是搜索)足以获得目录访问权限。必须使用绑定操作对目录进行身份验证。

5. Security Considerations
5. 安全考虑

This document describes how authentication information may be stored in a directory. Authentication information MUST be adequately protected as unintended disclosure will allow attackers to gain immediate access to the directory as described by [RFC2829].

本文档描述如何将身份验证信息存储在目录中。身份验证信息必须得到充分保护,因为非故意泄露将允许攻击者立即访问[RFC2829]所述的目录。

As flaws may be discovered in the hashing algorithm or with a particular implementation of the algorithm or values could be subject to various attacks if exposed, values of AuthPassword SHOULD be protected as if they were clear text passwords. When values are transferred, privacy protections, such as IPSEC or TLS, SHOULD be in place.

由于可能会在哈希算法或算法的特定实现中发现缺陷,或者如果暴露,值可能会受到各种攻击,因此AuthPassword的值应该像明文密码一样受到保护。传输值时,应提供隐私保护,如IPSEC或TLS。

Clients SHOULD use strong authentication mechanisms [RFC2829].

客户端应使用强身份验证机制[RFC2829]。

AuthPasswordMatch matching rule allows applications to test the validity of a user password and, hence, may be used to mount an attack. Servers SHOULD take appropriate measures to protect the directory from such attacks.

AuthPasswordMatch匹配规则允许应用程序测试用户密码的有效性,因此可能被用于发起攻击。服务器应采取适当措施保护目录免受此类攻击。

Some password schemes may require CPU intensive operations. Servers SHOULD take appropriate measures to protect against Denial of Service attacks.

某些密码方案可能需要CPU密集型操作。服务器应采取适当措施防止拒绝服务攻击。

AuthPassword does not restrict an authentication identity to a single password. An attacker who gains write access to this attribute may store additional values without disabling the user's true password(s). Use of policy aware clients and servers is RECOMMENDED.

AuthPassword不会将身份验证标识限制为单个密码。获得此属性的写入权限的攻击者可以存储其他值,而无需禁用用户的真实密码。建议使用具有策略意识的客户端和服务器。

The level of protection offered against various attacks differ from scheme to scheme. It is RECOMMENDED that servers support scheme selection as a configuration item. This allows for a scheme to be easily disabled if a significant security flaw is discovered.

针对各种攻击提供的保护级别因方案而异。建议服务器支持将方案选择作为配置项。这允许在发现重大安全漏洞时轻松禁用方案。

6. Acknowledgment
6. 致谢

This document borrows from a number of IETF documents and is based upon input from the IETF LDAPext working group.

本文件借鉴了许多IETF文件,并基于IETF LDAPext工作组的输入。

7. Bibliography
7. 参考文献

[RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992

[RFC1321]Rivest,R.,“MD5消息摘要算法”,RFC13211992年4月

[RFC2219] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2219]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC2234] Crocker, D., Editor, P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.

[RFC2234]Crocker,D.,编辑,P.Overell,“语法规范的扩充BNF:ABNF”,RFC 22342997年11月。

[RFC2251] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory Access Protocol (v3)", RFC 2251, December 1997.

[RFC2251]Wahl,M.,Howes,T.和S.Kille,“轻量级目录访问协议(v3)”,RFC 2251,1997年12月。

[RFC2252] Wahl, M., Coulbeck, A., Howes, T., and S. Kille, "Lightweight Directory Access Protocol (v3): Attribute Syntax Definitions", RFC 2252, December 1997.

[RFC2252]Wahl,M.,Coulbeck,A.,Howes,T.,和S.Kille,“轻量级目录访问协议(v3):属性语法定义”,RFC2252,1997年12月。

[RFC2256] Wahl, A., "A Summary of the X.500(96) User Schema for use with LDAPv3", RFC 2256, December 1997.

[RFC2256]Wahl,A.,“用于LDAPv3的X.500(96)用户模式摘要”,RFC 2256,1997年12月。

[RFC2307] Howard, L., "An Approach for Using LDAP as a Network Information Service", RFC 2307, March 1998.

[RFC2307]Howard,L.,“将LDAP用作网络信息服务的方法”,RFC 2307,1998年3月。

[RFC2829] Wahl, M., Alvestrand, H., Hodges, J. and R. Morgan, "Authentication Methods for LDAP", RFC 2829, June 2000.

[RFC2829]Wahl,M.,Alvestrand,H.,Hodges,J.和R.Morgan,“LDAP的身份验证方法”,RFC 28292000年6月。

[RFC3062] Zeilenga, K., "LDAP Password Modify Extended Operation", RFC 3062, February 2001.

[RFC3062]Zeilenga,K.,“LDAP密码修改扩展操作”,RFC 3062,2001年2月。

[SHA1] NIST, FIPS PUB 180-1: Secure Hash Standard, April 1995.

[SHA1]NIST,FIPS PUB 180-1:安全哈希标准,1995年4月。

8. Author's Address
8. 作者地址

Kurt D. Zeilenga OpenLDAP Foundation

库尔特D.Zeeliga OpenLDAP基金会

   EMail: Kurt@OpenLDAP.org
        
   EMail: Kurt@OpenLDAP.org
        
9. Full Copyright Statement
9. 完整版权声明

Copyright (C) The Internet Society (2001). All Rights Reserved.

版权所有(C)互联网协会(2001年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。