Home | History | Annotate | Line # | Download | only in rfc
      1 
      2 
      3 
      4 
      5 
      6 
      7 Network Working Group                                        K. Zeilenga
      8 Request for Comments: 3112                           OpenLDAP Foundation
      9 Category: Informational                                         May 2001
     10 
     11 
     12                   LDAP Authentication Password Schema
     13 
     14 Status of this Memo
     15 
     16    This memo provides information for the Internet community.  It does
     17    not specify an Internet standard of any kind.  Distribution of this
     18    memo is unlimited.
     19 
     20 Copyright Notice
     21 
     22    Copyright (C) The Internet Society (2001).  All Rights Reserved.
     23 
     24 Abstract
     25 
     26    This document describes schema in support of user/password
     27    authentication in a LDAP (Lightweight Directory Access Protocol)
     28    directory including the authPassword attribute type.  This attribute
     29    type holds values derived from the user's password(s) (commonly using
     30    cryptographic strength one-way hash).  authPassword is intended to
     31    used instead of userPassword.
     32 
     33 1. Background and Intended Use
     34 
     35    The userPassword attribute type [RFC2256] is intended to be used to
     36    support the LDAP [RFC2251] "simple" bind operation.  However, values
     37    of userPassword must be clear text passwords.  It is often desirable
     38    to store values derived from the user's password(s) instead of actual
     39    passwords.
     40 
     41    The authPassword attribute type is intended to be used to store
     42    information used to implement simple password based authentication.
     43    The attribute type may be used by LDAP servers to implement the LDAP
     44    Bind operation's "simple" authentication method.
     45 
     46    The attribute type supports multiple storage schemes.  A matching
     47    rule is provided for use with extensible search filters to allow
     48    clients to assert that a clear text password "matches" one of the
     49    attribute's values.
     50 
     51    Storage schemes often use cryptographic strength one-way hashing.
     52    Though the use of one-way hashing reduces the potential that exposed
     53    values will allow unauthorized access to the Directory (unless the
     54 
     55 
     56 
     57 
     58 Zeilenga                     Informational                      [Page 1]
     59 
     61 RFC 3112          LDAP Authentication Password Schema           May 2001
     62 
     63 
     64    hash algorithm/implementation is flawed), the hashing of passwords is
     65    intended to be as an additional layer of protection.  It is
     66    RECOMMENDED that hashed values be protected as if they were clear
     67    text passwords.
     68 
     69    This attribute may be used in conjunction with server side password
     70    generation mechanisms (such as the LDAP Password Modify [RFC3062]
     71    extended operation).
     72 
     73    Access to this attribute may governed by administrative controls such
     74    as those which implement password change policies.
     75 
     76    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
     77    "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this document are
     78    to be interpreted as described in RFC 2119 [RFC2119].
     79 
     80 2. Schema Definitions
     81 
     82    The following schema definitions are described in terms of LDAPv3
     83    Attribute Syntax Definitions [RFC2252] with specific syntax detailed
     84    using Augmented BNF [RFC2234].
     85 
     86 2.1. authPasswordSyntax
     87 
     88       ( 1.3.6.1.4.1.4203.1.1.2
     89         DESC 'authentication password syntax' )
     90 
     91    Values of this syntax are encoded according to:
     92 
     93       authPasswordValue = w scheme s authInfo s authValue w
     94       scheme = %x30-39 / %x41-5A / %x2D-2F / %x5F
     95             ; 0-9, A-Z, "-", ".", "/", or "_"
     96       authInfo = schemeSpecificValue
     97       authValue = schemeSpecificValue
     98               schemeSpecificValue = *( %x21-23 / %x25-7E )
     99             ; printable ASCII less "$" and " "
    100       s = w SEP w
    101       w = *SP
    102       SEP = %x24 ; "$"
    103       SP = %x20 ; " " (space)
    104 
    105    where scheme describes the mechanism and authInfo and authValue are a
    106    scheme specific.  The authInfo field is often a base64 encoded salt.
    107    The authValue field is often a base64 encoded value derived from a
    108    user's password(s).  Values of this attribute are case sensitive.
    109 
    110 
    111 
    112 
    113 
    114 
    115 Zeilenga                     Informational                      [Page 2]
    116 
    118 RFC 3112          LDAP Authentication Password Schema           May 2001
    119 
    120 
    121    Transfer of values of this syntax is strongly discouraged where the
    122    underlying transport service cannot guarantee confidentiality and may
    123    result in disclosure of the values to unauthorized parties.
    124 
    125    This document describes a number of schemes, as well as requirements
    126    for the scheme naming, in section 3.
    127 
    128 2.2. authPasswordExactMatch
    129 
    130       ( 1.3.6.1.4.1.4203.1.2.2
    131         NAME 'authPasswordExactMatch'
    132         DESC 'authentication password exact matching rule'
    133         SYNTAX 1.3.6.1.4.1.4203.1.1.2 )
    134 
    135    This matching rule allows a client to assert that an asserted
    136    authPasswordSyntax value matches authPasswordSyntax values.  It is
    137    meant to be used as the EQUALITY matching rule of attributes whose
    138    SYNTAX is authPasswordSyntax.
    139 
    140    The assertion is "TRUE" if there is an attribute value which has the
    141    same scheme, authInfo, and authValue components as the asserted
    142    value; "FALSE" if no attribute value has the same components as the
    143    asserted value; and "Undefined" otherwise.
    144 
    145 2.3. authPasswordMatch
    146 
    147        ( 1.3.6.1.4.1.4203.1.2.3
    148          NAME 'authPasswordMatch'
    149          DESC 'authentication password matching rule'
    150          SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{128} )
    151 
    152    This matching rule allows a client to assert that a password matches
    153    values of authPasswordSyntax using an extensibleMatch filter
    154    component.  Each value is matched per its scheme.  The assertion is
    155    "TRUE" if one or more attribute values matches the asserted value,
    156    "FALSE" if all values do not matches, and "Undefined" otherwise.
    157 
    158    Servers which support use of this matching rule SHOULD publish
    159    appropriate matchingRuleUse values per [RFC2252], 4.4.
    160 
    161    Transfer of authPasswordMatch assertion values is strongly
    162    discouraged where the underlying transport service cannot guarantee
    163    confidentiality and may result in disclosure of the values to
    164    unauthorized parties.
    165 
    166 
    167 
    168 
    169 
    170 
    171 
    172 Zeilenga                     Informational                      [Page 3]
    173 
    175 RFC 3112          LDAP Authentication Password Schema           May 2001
    176 
    177 
    178 2.4. supportedAuthPasswordSchemes
    179 
    180       ( 1.3.6.1.4.1.4203.1.3.3
    181         NAME 'supportedAuthPasswordSchemes'
    182         DESC 'supported password storage schemes'
    183         EQUALITY caseExactIA5Match
    184         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32}
    185         USAGE dSAOperation )
    186 
    187    The values of this attribute are names of supported authentication
    188    password schemes which the server supports.  The syntax of a scheme
    189    name is described in section 2.1.  This attribute may only be present
    190    in the root DSE.  If the server does not support any password
    191    schemes, this attribute will not be present.
    192 
    193 2.5. authPassword
    194 
    195       ( 1.3.6.1.4.1.4203.1.3.4 NAME 'authPassword'
    196         DESC 'password authentication information'
    197         EQUALITY 1.3.6.1.4.1.4203.1.2.2
    198         SYNTAX 1.3.6.1.4.1.4203.1.1.2 )
    199 
    200    The values of this attribute are representative of the user's
    201    password(s) and conform to the authPasswordSyntax described in 2.1.
    202    The values of this attribute may be used for authentication purposes.
    203 
    204    Transfer of authPassword values is strongly discouraged where the
    205    underlying transport service cannot guarantee confidentiality and may
    206    result in disclosure of the values to unauthorized parties.
    207 
    208 2.6. authPasswordObject
    209 
    210       ( 1.3.6.1.4.1.4203.1.4.7 NAME 'authPasswordObject'
    211         DESC 'authentication password mix in class'
    212         MAY 'authPassword'
    213         AUXILIARY )
    214 
    215    Entries of this object class may contain authPassword attribute
    216    types.
    217 
    218 3. Schemes
    219 
    220    This section describes the "MD5" and "SHA1" schemes.  Other schemes
    221    may be defined by other documents.  Schemes which are not described
    222    in an RFC SHOULD be named with a leading "X-" to indicate they are a
    223    private or implementation specific scheme, or may be named using the
    224    dotted-decimal representation [RFC2252] of an OID assigned to the
    225    scheme.
    226 
    227 
    228 
    229 Zeilenga                     Informational                      [Page 4]
    230 
    232 RFC 3112          LDAP Authentication Password Schema           May 2001
    233 
    234 
    235 3.1. MD5 scheme
    236 
    237    The MD5 [RFC1321] scheme name is "MD5".
    238 
    239    The authValue is the base64 encoding of an MD5 digest of the
    240    concatenation the user password and salt.  The base64 encoding of the
    241    salt is provided in the authInfo field.  The salt MUST be at least 64
    242    bits long.  Implementations of this scheme MUST support salts up to
    243    128 bits in length.
    244 
    245    Example:
    246       Given a user "joe" who's password is "mary" and a salt of "salt",
    247       the authInfo field would be the base64 encoding of "salt" and the
    248       authValue field would be the base64 encoding of the MD5 digest of
    249       "marysalt".
    250 
    251    A match against an asserted password and an attribute value of this
    252    scheme SHALL be true if and only if the MD5 digest of concatenation
    253    of the asserted value and the salt is equal to the MD5 digest
    254    contained in AuthValue.  The match SHALL be undefined if the server
    255    is unable to complete the equality test for any reason.  Otherwise
    256    the match SHALL be false.
    257 
    258    Values of this scheme SHOULD only be used to implement simple
    259    user/password authentication.
    260 
    261 3.2. SHA1 scheme
    262 
    263    The SHA1 [SHA1] scheme name is "SHA1".
    264 
    265    The authValue is the base64 encoding of a SHA1 digest of the
    266    concatenation the user password and the salt.  The base64 encoding of
    267    the salt is provided in the authInfo field.  The salt MUST be at
    268    least 64 bits long.  Implementations of this scheme MUST support
    269    salts up to 128 bits in length.
    270 
    271    Example:
    272       Given a user "joe" who's password is "mary" and a salt of "salt",
    273       the authInfo field would be the base64 encoding of "salt" and the
    274       authValue field would be the base64 encoding of the SHA1 digest of
    275       "marysalt".
    276 
    277    A match against an asserted password and an attribute value of this
    278    scheme SHALL be true if and only if the SHA1 digest of concatenation
    279    of the asserted value and the salt is equal to the SHA1 digest
    280    contained in AuthValue.  The match SHALL be undefined if the server
    281    is unable to complete the equality test for any reason.  Otherwise
    282    the match SHALL be false.
    283 
    284 
    285 
    286 Zeilenga                     Informational                      [Page 5]
    287 
    289 RFC 3112          LDAP Authentication Password Schema           May 2001
    290 
    291 
    292    Values of this scheme SHOULD only be used to implement simple
    293    user/password authentication.
    294 
    295 4. Implementation Issues
    296 
    297    For all implementations of this specification:
    298 
    299       Servers MAY restrict which schemes are used in conjunction with a
    300       particular authentication process but SHOULD use all values of
    301       selected schemes.  If the asserted password matches any of the
    302       stored values, the asserted password SHOULD be considered valid.
    303       Servers MAY use other authentication storage mechanisms, such as
    304       userPassword or an external password store, in conjunction with
    305       authPassword to support the authentication process.
    306 
    307       Servers that support simple bind MUST support the SHA1 scheme and
    308       SHOULD support the MD5 scheme.
    309 
    310       Servers SHOULD NOT publish values of authPassword nor allow
    311       operations which expose authPassword values or AuthPasswordMatch
    312       assertions to unless confidentiality protection is in place.
    313 
    314       Clients SHOULD NOT initiate operations which provide or request
    315       values of authPassword or make authPasswordMatch assertions unless
    316       confidentiality protection is in place.
    317 
    318       Clients SHOULD NOT assume that a successful AuthPasswordMatch,
    319       whether by compare or search, is sufficient to gain directory
    320       access.  The bind operation MUST be used to authenticate to the
    321       directory.
    322 
    323 5. Security Considerations
    324 
    325    This document describes how authentication information may be stored
    326    in a directory.  Authentication information MUST be adequately
    327    protected as unintended disclosure will allow attackers to gain
    328    immediate access to the directory as described by [RFC2829].
    329 
    330    As flaws may be discovered in the hashing algorithm or with a
    331    particular implementation of the algorithm or values could be subject
    332    to various attacks if exposed, values of AuthPassword SHOULD be
    333    protected as if they were clear text passwords.  When values are
    334    transferred, privacy protections, such as IPSEC or TLS, SHOULD be in
    335    place.
    336 
    337    Clients SHOULD use strong authentication mechanisms [RFC2829].
    338 
    339 
    340 
    341 
    342 
    343 Zeilenga                     Informational                      [Page 6]
    344 
    346 RFC 3112          LDAP Authentication Password Schema           May 2001
    347 
    348 
    349    AuthPasswordMatch matching rule allows applications to test the
    350    validity of a user password and, hence, may be used to mount an
    351    attack.  Servers SHOULD take appropriate measures to protect the
    352    directory from such attacks.
    353 
    354    Some password schemes may require CPU intensive operations.  Servers
    355    SHOULD take appropriate measures to protect against Denial of Service
    356    attacks.
    357 
    358    AuthPassword does not restrict an authentication identity to a single
    359    password.  An attacker who gains write access to this attribute may
    360    store additional values without disabling the user's true
    361    password(s).  Use of policy aware clients and servers is RECOMMENDED.
    362 
    363    The level of protection offered against various attacks differ from
    364    scheme to scheme.  It is RECOMMENDED that servers support scheme
    365    selection as a configuration item.  This allows for a scheme to be
    366    easily disabled if a significant security flaw is discovered.
    367 
    368 6. Acknowledgment
    369 
    370    This document borrows from a number of IETF documents and is based
    371    upon input from the IETF LDAPext working group.
    372 
    373 7. Bibliography
    374 
    375    [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
    376              April 1992
    377 
    378    [RFC2219] Bradner, S., "Key words for use in RFCs to Indicate
    379              Requirement Levels", BCP 14, RFC 2119, March 1997.
    380 
    381    [RFC2234] Crocker, D., Editor, P. Overell, "Augmented BNF for Syntax
    382              Specifications: ABNF", RFC 2234, November 1997.
    383 
    384    [RFC2251] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory
    385              Access Protocol (v3)", RFC 2251, December 1997.
    386 
    387    [RFC2252] Wahl, M., Coulbeck, A., Howes, T., and S. Kille,
    388              "Lightweight Directory Access Protocol (v3): Attribute
    389              Syntax Definitions", RFC 2252, December 1997.
    390 
    391    [RFC2256] Wahl, A., "A Summary of the X.500(96) User Schema for use
    392              with LDAPv3", RFC 2256, December 1997.
    393 
    394    [RFC2307] Howard, L., "An Approach for Using LDAP as a Network
    395              Information Service", RFC 2307, March 1998.
    396 
    397 
    398 
    399 
    400 Zeilenga                     Informational                      [Page 7]
    401 
    403 RFC 3112          LDAP Authentication Password Schema           May 2001
    404 
    405 
    406    [RFC2829] Wahl, M., Alvestrand, H., Hodges, J. and R. Morgan,
    407              "Authentication Methods for LDAP", RFC 2829, June 2000.
    408 
    409    [RFC3062] Zeilenga, K., "LDAP Password Modify Extended Operation",
    410              RFC 3062, February 2001.
    411 
    412    [SHA1]    NIST, FIPS PUB 180-1: Secure Hash Standard, April 1995.
    413 
    414 8. Author's Address
    415 
    416    Kurt D. Zeilenga
    417    OpenLDAP Foundation
    418 
    419    EMail: Kurt (a] OpenLDAP.org
    420 
    421 
    422 
    423 
    424 
    425 
    426 
    427 
    428 
    429 
    430 
    431 
    432 
    433 
    434 
    435 
    436 
    437 
    438 
    439 
    440 
    441 
    442 
    443 
    444 
    445 
    446 
    447 
    448 
    449 
    450 
    451 
    452 
    453 
    454 
    455 
    456 
    457 Zeilenga                     Informational                      [Page 8]
    458 
    460 RFC 3112          LDAP Authentication Password Schema           May 2001
    461 
    462 
    463 9.  Full Copyright Statement
    464 
    465    Copyright (C) The Internet Society (2001).  All Rights Reserved.
    466 
    467    This document and translations of it may be copied and furnished to
    468    others, and derivative works that comment on or otherwise explain it
    469    or assist in its implementation may be prepared, copied, published
    470    and distributed, in whole or in part, without restriction of any
    471    kind, provided that the above copyright notice and this paragraph are
    472    included on all such copies and derivative works.  However, this
    473    document itself may not be modified in any way, such as by removing
    474    the copyright notice or references to the Internet Society or other
    475    Internet organizations, except as needed for the purpose of
    476    developing Internet standards in which case the procedures for
    477    copyrights defined in the Internet Standards process must be
    478    followed, or as required to translate it into languages other than
    479    English.
    480 
    481    The limited permissions granted above are perpetual and will not be
    482    revoked by the Internet Society or its successors or assigns.
    483 
    484    This document and the information contained herein is provided on an
    485    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
    486    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
    487    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
    488    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
    489    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
    490 
    491 Acknowledgement
    492 
    493    Funding for the RFC Editor function is currently provided by the
    494    Internet Society.
    495 
    496 
    497 
    498 
    499 
    500 
    501 
    502 
    503 
    504 
    505 
    506 
    507 
    508 
    509 
    510 
    511 
    512 
    513 
    514 Zeilenga                     Informational                      [Page 9]
    515 
    517