We put this here as a reference as the Internet Draft is expired even though there is still growing LDAP Server Implementations that support for the implementation.[1]
There have been some slight formatting has been added for the Wiki and to provide more understanding, but this is nearly the same as the last Draft-behera-ldap-password-policy.
Network Working Group | J. Sermersheim Novell, Inc |
Internet-Draft | L. Poitou, Sun Microsystems |
Intended status: Standards Track | |
Expires: February 10, 2010 | H. Chu, Ed. Symas Corp. |
August 9, 2009 |
This Internet Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79.
Internet Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that their groups may also distribute working documents as Internet Drafts.
Internet Draft are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet Drafts as reference material or to cite them other than as "work in progress."
The list of current Internet Draft can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html.
This Internet Draft will expire on February 10, 2010.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents in effect on the date ofpublication of this document http://trustee.ietf.org/license-info.
Please review these documents carefully, as they describe your rights and restrictions with respect to this document.
Most LDAP implementations support many authentication schemes - the most basic and widely used is the Simple Authentication i.e., user DN and password. In this case, many LDAP servers have implemented some kind of policy related to the password used to authenticate. Among other things, this policy includes:
In order to achieve greater security protection and ensure interoperability in a heterogeneous environment, LDAP needs to standardize on a common Password Policy model. This is critical to the successful deployment of LDAP directories.
All ASN.1 X.680 Basic Encoding Rules (BER) X.690
encodings follow the conventions found in Section 5.1 of RFC 4511
The term "Password Administrator" refers to a user that has sufficient access control privileges to modify users' passwords. The term "Password Policy Administrator" refers to a user that has sufficient access control privileges to modify the pwdPolicy object defined in this document. The Access Control that is used to determine whether an identity is a password administrator or password policy administrator is beyond the scope of this document, but typically implies that the password administrator has 'write' privileges to the password attribute.
This policy is typically applied to the userPassword attribute in the case of the LDAP simple authentication method RFC 4511 or the case of password based SASL RFC 4422 authentication such as CRAM-MD5 RFC 2195 and DIGEST-MD5 RFC 2831.
The policy described in this document assumes that the password attribute holds a SINGLE-VALUE. No considerations are made for directories or systems that allow a user to maintain multi-valued password attributes.
Server implementations MAY institute internal policy whereby certain identities (such as directory administrators) are not forced to comply with any of Password Policy. In this case, the password for a directory administrator never expires; the account is never locked, etc.
A mechanism is also provided to define the period of time for which an account may remain unused before being disabled.
This policy consists of several parts:
Note that using the account lock feature provides an easy avenue for Denial-of-Service (DoS) attacks on user accounts. While some sites' policies require accounts to be locked, this feature is discouraged in favor of delaying each failed login attempt.
The delay time will be doubled on each subsequent failure, until it reaches the maximum time configured.
TBD: we could also provide a syntax for configuring a backoff algorithm. E.g. "+<int>" for linearly incrementing delay, "x<int>" for constant multiplier, "^<int> for geometric. But it's probably overkill to add a calculator language to the server.
Password Policy Administrators MAY deploy a Password Policy that causes passwords to expire after a given amount of time - thus forcing users to change their passwords periodically.
As a side effect, there needs to be a way in which users are made aware of this need to change their password before actually being locked out of their accounts.
One or both of the following methods handle this:
In order to do this; a history of used passwords is kept. The Password Policy Administrator sets the number of passwords to be stored at any given time. Passwords are stored in this Password History whenever the password is changed. Users aren't allowed to specify any passwords that are in the history list while changing passwords.
This process may be made less attractive to users by employing a minimum age for passwords. If users are forced to wait 24 hours between password changes, they may be less likely to cycle through a history of 10 passwords.
Forcing a password to comply with the quality policy may imply a variety of things including:
The implementation of this policy meets with the following problems:
This is needed in scenarios where a password administrator has set or reset the password to a well-known value.
This policy forces the user to prove his identity by specifying the old password during a password modify operation.
{TODO: This allows a dictionary attack unless we specify that this is also subject to intruder detection. One solution is to require users to authN prior to changing password. Another solution is to perform intruder detection checks when the password for a non-authenticated identity is being updated}
The Password Policy defined in this document can apply to any attribute containing a password. Password policy state information is held in the user's entry, and applies to a password attribute, not a particular password attribute value. Thus the server SHOULD enforce that the password attribute subject to Password Policy, contains one and only one password value.
If this attribute is not present, or if the value is 0 the password does not expire. If not 0, the value must be greater than or equal to the value of the pwdMinAge.
If this attribute is not present, or if the value is 0, used passwords are not stored in the pwdHistory attribute and thus may be reused.
TODO: Note that even though this is meant to be a check that happens during password modification, it may also be allowed to happen during authN. This is useful for situations where the password is encrypted when modified, but decrypted when used to authN.
This attribute indicates how the password quality will be verified while being modified or added. If this attribute is not present, or if the value is '0', quality checking will not be enforced. A value of '1' indicates that the server will check the quality, and if the server is unable to check it (due to a hashed password or other reasons) it will be accepted. A value of '2' indicates that the server will check the quality, and if the server is unable to verify it, it will return an error refusing the password.
If this attribute is not present, or if the value is 0 no warnings will be returned. If not 0, the value must be smaller than the value of the pwdMaxAge attribute.
If this attribute is not present, or if the value is "FALSE", the password may be used to authenticate when the number of failed bind attempts has been reached.
If this attribute is not present, or if its value is 0, the failure counter is only reset by a successful authentication.
These operational attributes are:
Note: that pwdStartTime may be set to a time greater than or equal to pwdEndTime; this simply disables the password.
{TODO: add a note about advertisement and discovery Mechanism}
The following sections contain detailed instructions that refer to attributes of the pwdPolicy object class. When doing so, the attribute of the pwdPolicy object that governs the entry being discussed is implied.
Otherwise, a status of false is returned.
A positive result specifies the number of remaining grace authentications.
Subtract the time stored in pwdChangedTime from the current time to arrive at the password's age. If the password's age is greater than than the value of the pwdMaxAge attribute, a zero status is returned.
Subtract the value of the pwdExpireWarning attribute from the value of the pwdMaxAge attribute to arrive at the warning age. If the password's age is equal to or greater than the warning age, the value of pwdMaxAge minus the password's age is returned.
While performing this check, values of pwdFailureTime that are old by more than pwdFailureCountInterval are purged and not counted.
Otherwise, a delay time is computed based on the number of values in the pwdFailureTime attribute. If the computed value is greater than the pwdMaxDelay attribute, the pwdMaxDelay value is returned.
While performing this check, values of pwdFailureTime that are old by more than pwdFailureCountInterval are purged and not counted.
A status of true indicating that not enough time has passed since the password was last updated is returned if:
Note: The case where a single password value is stored in multiple formats simultaneously is still considered to be only one password value.
The scenarios in the following operations assume that the client has attached a passwordPolicyRequest control to the request message of the operation. In the event that the passwordPolicyRequest control was not sent, no passwordPolicyResponse control is returned. All other instructions remain the same.
For successfully completed operations, unless otherwise stated, no passwordPolicyResponse control is returned.
Note that while the Compare operation does not authenticate a user to the LDAP server, it may be used by an external application for purposes of authentication.
8.1.2.1. Policy state updates Delete the pwdFailureTime and pwdAccountLockedTime attributes.
Set the value of the pwdLastSuccess attribute to the current time.
Note: setting pwdLastSuccess is optional, but it is required if the policy has pwdMaxIdle defined.
8.1.2.2. Password must be changed now If the decision in Section 7.2 returns true, the server sends to the client a response with an appropriate successful resultCode (i.e. success (0), compareTrue (6), etc.), and includes the passwordPolicyResponse in the controls field of the bindResponse message with the warning: changeAfterReset specified.
For bind, the server MUST then disallow all operations issued by this user except modify password, bind, unbind, abandon and StartTLS extended operation.
8.1.2.3. Expired password If the password has expired as per Section 7.3, the server either returns a success or failure based on the state of grace authentications.
8.1.2.3.1. Remaining Grace Authentications If there are remaining grace authentications as per Section 7.4, the server adds a new value with the current time in pwdGraceUseTime.
Then it sends to the client a response with an appropriate successful resultCode (i.e. success (0), compareTrue (6), etc.), and includes the passwordPolicyResponse in the controls field of the response message with the warning: graceAuthNsRemaining choice set to the number of grace authentications left.
Implementor's note: The system time of the host machine may be more granular than is needed to ensure unique values of this attribute.
It is recommended that a mechanism is used to ensure unique generalized time values. The fractional seconds field may be used for this purpose.
8.1.2.3.2. No Remaining Grace Authentications If there are no remaining grace authentications, the server fails the operation with an appropriate resultCode (invalidCredentials (49), compareFalse (5), etc.), and includes the passwordPolicyResponse in the controls field of the bindResponse message with the error: passwordExpired (0) set.
8.1.2.4. Expiration Warning If the result of Section 7.5 is a positive number, the server sends to the client a response with an appropriate successful resultCode (i.e. success (0), compareTrue (6), etc.), and includes the passwordPolicyResponse in the controls field of the bindResponse message with the warning: timeBeforeExiration set to the value as described above. Otherwise, the server sends a successful response, and omits the passwordPolicyResponse.
8.1.3.1. Policy state update
Add the current time as a value of the pwdFailureTime attribute.
Implementation's note: The system time of the host machine may be more granular than is needed to ensure unique values of this attribute. It is recommended that a mechanism is used to ensure unique generalized time values. The fractional seconds field may be used for this purpose.
8.1.3.2. Handle Intruder Detection
If the check in Section 7.6 returns a true state, the server locks the account by setting the value of the pwdAccountLockedTime attribute to the current time.
After locking the account, the server fails the operation with an appropriate LDAP Result Code(LDAP_INVALID_CREDENTIALS (49), LDAP_COMPARE_FALSE (5), etc.), and includes the passwordPolicyResponse in the controls field of the message with the error: accountLocked (1).
If the check in Section 7.7 returns a non-zero value, the server waits that number of seconds before sending the authentication response back to the client.
But some alternate mechanisms have been defined or may be defined, such as the LDAP Password Modify Extended Operation (RFC 3062).
While processing a password update, the server performs the following steps:
When the LDAP modify operation is used to modify a password, this is done by specifying both a delete action and an add or replace action, where the delete action specifies the existing password, and the add or replace action specifies the new password. Other password update operations SHOULD employ a similar mechanism. Otherwise this policy will fail.
If the existing password is not specified, the server does not process the operation and sends the appropriate response message to the client with the resultCode: LDAP_INSUFFICIENT_ACCESS (50), and includes the passwordPolicyResponse in the controls field of the response message with the error: mustSupplyOldPassword (4).
If other modifications exist, the server sends a response message to the client with the resultCode: LDAP_INSUFFICIENT_ACCESS(50), and includes the passwordPolicyResponse in the controls field of the response message with the error: changeAfterReset (2).
Ensure that the password meets the quality criteria enforced by the server. This enforcement is implementation specific. If the server is unable to check the quality (due to a hashed password or otherwise), the value of pwdCheckQuality is evaluated.
If the value is 1, operation continues.
If the value is 2, the server sends a response message to the client with the resultCode: constraintViolation (19), and includes the passwordPolicyResponse in the controls field of the response message with the error: insufficientPasswordQuality (5).
If the server is able to check the password quality, and the check fails, the server sends a response message to the client with the resultCode: constraintViolation (19), and includes the passwordPolicyResponse in the controls field of the response message with the error: insufficientPasswordQuality (5).
Checks the value of the pwdMinLength attribute. If the value is non-zero, it ensures that the new password is of at least the minimum length. If the server is unable to check the length (due to a hashed password or otherwise), the value of pwdCheckQuality is evaluated.
If the value is 1, operation continues.
If the value is 2, the server sends a response message to the client with the resultCode: constraintViolation (19), and includes the passwordPolicyResponse in the controls field of the response message with the error: passwordTooShort (6).
If the server is able to check the password length, and the check fails, the server sends a response message to the client with the resultCode: constraintViolation (19), and includes the passwordPolicyResponse in the controls field of the response message with the error: passwordTooShort (6).
If the password does exist in the pwdHistory attribute or in the current password attribute, the server sends a response message to the client with the resultCode: constraintViolation (19), and includes the passwordPolicyResponse in the controls field of the response message with the error: passwordInHistory (8).
The pwdFailureTime and pwdGraceUseTime attributes is removed from the user's entry if they exist.
The scenarios in the following operations assume that the client attached a passwordPolicyRequest control to the request message of the operation, and thus may receive a passwordPolicyResponse control in the response message.
In the event that the passwordPolicyRequest control was not sent, no passwordPolicyResponse control is returned. All other instructions remain the same.
A password policy is defined for a particular subtree of the DIT by adding to an LDAP subentry whose immediate superior is the root of the subtree, the pwdPolicy auxiliary object class. The scope of the password policy is defined by the SubtreeSpecification attribute of the LDAP subentry as specified in RFC 3672.
It is possible to define password policies for different password attributes within the same pwdPolicy entry, by specifying multiple values of the pwdAttribute. But password policies could also be in separate sub entries as long as they are contained under the same LDAP subentry.
Only one policy may be in effect for a given password attribute in any entry. If multiple policies exist which overlap in the range of entries affected, the resulting behavior is undefined.
Modifying the password policy MUST NOT result in any change in users' entries to which the policy applies.
It SHOULD be possible to overwrite the password policy for one user by defining a new policy in a subentry of the user entry.
Each object that is controlled by Password Policy advertises the subentry that is being used to control its policy in its pwdPolicySubEntry attribute. Clients wishing to examine or manage Password Policy for an object may interrogate the pwdPolicySubEntry for that object in order to arrive at the proper pwdPolicySubEntry.
The pwdPolicy object defines the password policy for a portion of the DIT and MUST be replicated on all the replicas of this subtree, as any subentry would be, in order to have a consistent policy among all replicated servers.
The elements of the password policy that are related to the users are stored in the entry themselves as operational attributes. As these attributes are subject to modifications even on a read-only replica, replicating them must be carefully considered.
The pwdChangedTime attribute MUST be replicated on all replicas, to allow expiration of the password.
The pwdReset attribute MUST be replicated on all replicas, to deny access to operations other than bind and modify password.
The pwdHistory attribute MUST be replicated to writable replicas. It doesn't have to be replicated to a read-only replica, since the password will never be directly modified on this server.
The pwdAccountLockedTime, pwdFailureTime and pwdGraceUseTime attributes SHOULD be replicated to writable replicas, making the password policy global for all servers. When the user entry is replicated to a read-only replica, these attributes SHOULD NOT be replicated. This means that the number of failures, of grace authentications and the locking will take place on each replicated server. For example, the effective number of failed attempts on a user password will be N x M (where N is the number of servers and M the value of pwdMaxFailure attribute). Replicating these attributes to a read-only replica MAY reduce the number of tries globally but MAY also introduce some inconstancies in the way the password policy is applied.
Note: there are some situations where global replication of these state attributes may not be desired. For example, if two clusters of replicas are geographically remote and joined by a slow network link, and their users only login from one of the two locations, it may be unnecessary to propagate all of the state changes from one cluster to the other. Servers SHOULD allow administrators to control which attributes are replicated on a case-by-case basis.
Servers participating in a loosely consistent multi-master replication agreement SHOULD employ a mechanism which ensures uniqueness of values when populating the attributes pwdFailureTime and pwdGraceUseTime. The method of achieving this is a local matter and may consist of using a single authoritative source for the generation of unique time values, or may consist of the use of the fractional seconds part to hold a replica identifier.
Authentication with a password MUST follow the recommendations made in RFC 4513.
Modifications of passwords SHOULD only occur when the connection is protected with confidentiality and secure authentication.
Access Controls SHOULD be used to restrict access to the Password Policy attributes. The attributes defined to maintain the Password Policy state information SHOULD only be modifiable by the Password Administrator or higher authority. The pwdHistory attribute MUST be subject to the same level of Access Control as the attribute holding the password.
As it is possible to define a Password Policy for one specific user by adding a LDAP Subentry immediately under the user's entry, Access Controls SHOULD be used to restrict the use of the pwdPolicy object class or the LDAP Subentry subentry object class.
When the Intruder Detection password policy is enforced, the LDAP directory is subject to a Denial-of-Service attack. A malicious user could deliberately lock out one specific user's account (or all of them) by sending bind Requests with wrong passwords. There is no way to protect against this kind of attack. The LDAP directory server SHOULD log as much information as it can (such as client IP address) whenever an account is locked, in order to be able to identify the origin of the attack. Denying anonymous access to the LDAP directory is also a way to restrict this kind of attack. Using the login delay instead of the lockout mechanism will also help avoid this Denial-of-Service.
Returning certain status codes (such as passwordPolicyResponse.error = accountLocked) allows a denial of service attacker to know that it has successfully denied service to an account. Servers SHOULD implement additional checks which return the same status when it is sensed that some number of failed authentication requests has occurred on a single connection, or from a client address. Server implementors are encouraged to invent other checks similar to this in order to thwart this type of DoS attack.
15. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2195] Klensin, J., Catoe, R., and P. Krumviede, "IMAP/POP AUTHorize Extension for Simple Challenge/Response", RFC 2195, September 1997. [RFC2831] Leach, P. and C. Newman, "Using Digest Authentication as a SASL Mechanism", RFC 2831, May 2000. [RFC3062] Zeilenga, K., "LDAP Password Modify Extended Operation", RFC 3062, February 2001. [RFC3383] Zeilenga, K., "Internet Assigned Numbers Authority (IANA) Considerations for the Lightweight Directory Access Protocol (LDAP)", RFC 3383, September 2002. [RFC3672] Zeilenga, K., "Subentries in the Lightweight Directory Access Protocol (LDAP)", RFC 3672, December 2003. [RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and Security Layer (SASL)", RFC 4422, June 2006. [RFC4511] Sermersheim, J., "Lightweight Directory Access Protocol (LDAP): The Protocol", RFC 4511, June 2006. [RFC4512] Zeilenga, K., "Lightweight Directory Access Protocol (LDAP): Directory Information Models", RFC 4512, June 2006. [RFC4513] Harrison, R., "Lightweight Directory Access Protocol (LDAP): Authentication Methods and Security Mechanisms", RFC 4513, June 2006. [RFC4517] Legg, S., "Lightweight Directory Access Protocol (LDAP): Syntaxes and Matching Rules", RFC 4517, June 2006. [X.680] International Telecommunications Union, "Abstract Syntax Notation One (ASN.1): Specification of basic notation", ITU-T Recommendation X.680, July 2002. [X.690] International Telecommunications Union, "Information Technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)", ITU-T Recommendation X.690, July 2002.