]> git.sur5r.net Git - openldap/blob - doc/drafts/draft-behera-ldap-password-policy-xx.txt
Merge remote-tracking branch 'origin/mdb.master'
[openldap] / doc / drafts / draft-behera-ldap-password-policy-xx.txt
1
2
3
4 Network Working Group                                     J. Sermersheim
5 Internet-Draft                                               Novell, Inc
6 Intended status: Standards Track                               L. Poitou
7 Expires: January 19, 2015                               Sun Microsystems
8                                                              H. Chu, Ed.
9                                                              Symas Corp.
10                                                            July 18, 2014
11
12
13                   Password Policy for LDAP Directories
14                   draft-behera-ldap-password-policy-11
15
16 Abstract
17
18    Password policy as described in this document is a set of rules that
19    controls how passwords are used and administered in Lightweight
20    Directory Access Protocol (LDAP) based directories.  In order to
21    improve the security of LDAP directories and make it difficult for
22    password cracking programs to break into directories, it is desirable
23    to enforce a set of rules on password usage.  These rules are made to
24    ensure that users change their passwords periodically, passwords meet
25    construction requirements, the re-use of old password is restricted,
26    and to deter password guessing attacks.
27
28 Status of this Memo
29
30    This Internet-Draft is submitted in full conformance with the
31    provisions of BCP 78 and BCP 79.
32
33    Internet-Drafts are working documents of the Internet Engineering
34    Task Force (IETF).  Note that other groups may also distribute
35    working documents as Internet-Drafts.  The list of current Internet-
36    Drafts is at http://datatracker.ietf.org/drafts/current/.
37
38    Internet-Drafts are draft documents valid for a maximum of six months
39    and may be updated, replaced, or obsoleted by other documents at any
40    time.  It is inappropriate to use Internet-Drafts as reference
41    material or to cite them other than as "work in progress."
42
43    This Internet-Draft will expire on January 19, 2015.
44
45 Copyright Notice
46
47    Copyright (c) 2014 IETF Trust and the persons identified as the
48    document authors.  All rights reserved.
49
50    This document is subject to BCP 78 and the IETF Trust's Legal
51    Provisions Relating to IETF Documents
52
53
54
55 Sermersheim, et al.     Expires January 19, 2015                [Page 1]
56 \f
57 Internet-Draft    Password Policy for LDAP Directories         July 2014
58
59
60    (http://trustee.ietf.org/license-info) in effect on the date of
61    publication of this document.  Please review these documents
62    carefully, as they describe your rights and restrictions with respect
63    to this document.  Code Components extracted from this document must
64    include Simplified BSD License text as described in Section 4.e of
65    the Trust Legal Provisions and are provided without warranty as
66    described in the Simplified BSD License.
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111 Sermersheim, et al.     Expires January 19, 2015                [Page 2]
112 \f
113 Internet-Draft    Password Policy for LDAP Directories         July 2014
114
115
116 Table of Contents
117
118    1.    Overview . . . . . . . . . . . . . . . . . . . . . . . . . .  4
119    2.    Conventions  . . . . . . . . . . . . . . . . . . . . . . . .  5
120    3.    Application of Password Policy . . . . . . . . . . . . . . .  6
121    4.    Articles of Password Policy  . . . . . . . . . . . . . . . .  7
122    4.1.  Password Usage Policy  . . . . . . . . . . . . . . . . . . .  7
123    4.2.  Password Modification Policy . . . . . . . . . . . . . . . .  8
124    4.3.  Restriction of the Password Policy . . . . . . . . . . . . . 10
125    5.    Schema used for Password Policy  . . . . . . . . . . . . . . 12
126    5.1.  The pwdPolicy Object Class . . . . . . . . . . . . . . . . . 12
127    5.2.  Attribute Types used in the pwdPolicy ObjectClass  . . . . . 12
128    5.3.  Attribute Types for Password Policy State Information  . . . 19
129    6.    Controls used for Password Policy  . . . . . . . . . . . . . 24
130    6.1.  Request Control  . . . . . . . . . . . . . . . . . . . . . . 24
131    6.2.  Response Control . . . . . . . . . . . . . . . . . . . . . . 24
132    7.    Policy Decision Points . . . . . . . . . . . . . . . . . . . 26
133    7.1.  Locked Account Check . . . . . . . . . . . . . . . . . . . . 26
134    7.2.  Password Must be Changed Now Check . . . . . . . . . . . . . 26
135    7.3.  Password Expiration Check  . . . . . . . . . . . . . . . . . 27
136    7.4.  Remaining Grace AuthN Check  . . . . . . . . . . . . . . . . 27
137    7.5.  Time Before Expiration Check . . . . . . . . . . . . . . . . 27
138    7.6.  Intruder Lockout Check . . . . . . . . . . . . . . . . . . . 27
139    7.7.  Intruder Delay Check . . . . . . . . . . . . . . . . . . . . 28
140    7.8.  Password Too Young Check . . . . . . . . . . . . . . . . . . 28
141    8.    Server Policy Enforcement Points . . . . . . . . . . . . . . 29
142    8.1.  Password-based Authentication  . . . . . . . . . . . . . . . 29
143    8.2.  Password Update Operations . . . . . . . . . . . . . . . . . 31
144    8.3.  Other Operations . . . . . . . . . . . . . . . . . . . . . . 34
145    9.    Client Policy Enforcement Points . . . . . . . . . . . . . . 35
146    9.1.  Bind Operation . . . . . . . . . . . . . . . . . . . . . . . 35
147    9.2.  Modify Operations  . . . . . . . . . . . . . . . . . . . . . 36
148    9.3.  Add Operation  . . . . . . . . . . . . . . . . . . . . . . . 37
149    9.4.  Compare Operation  . . . . . . . . . . . . . . . . . . . . . 37
150    9.5.  Other Operations . . . . . . . . . . . . . . . . . . . . . . 38
151    10.   Administration of the Password Policy  . . . . . . . . . . . 39
152    11.   Password Policy and Replication  . . . . . . . . . . . . . . 40
153    12.   Security Considerations  . . . . . . . . . . . . . . . . . . 42
154    13.   IANA Considerations  . . . . . . . . . . . . . . . . . . . . 43
155    13.1. Object Identifiers . . . . . . . . . . . . . . . . . . . . . 43
156    13.2. LDAP Protocol Mechanisms . . . . . . . . . . . . . . . . . . 43
157    13.3. LDAP Descriptors . . . . . . . . . . . . . . . . . . . . . . 43
158    13.4. LDAP AttributeDescription Options  . . . . . . . . . . . . . 45
159    14.   Acknowledgement  . . . . . . . . . . . . . . . . . . . . . . 46
160    15.   Normative References . . . . . . . . . . . . . . . . . . . . 47
161          Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 48
162
163
164
165
166
167 Sermersheim, et al.     Expires January 19, 2015                [Page 3]
168 \f
169 Internet-Draft    Password Policy for LDAP Directories         July 2014
170
171
172 1.  Overview
173
174    LDAP-based directory services are currently accepted by many
175    organizations as the access protocol for directories.  The ability to
176    ensure the secure read and update access to directory information
177    throughout the network is essential to the successful deployment.
178    Most LDAP implementations support many authentication schemes - the
179    most basic and widely used is the simple authentication i.e., user DN
180    and password.  In this case, many LDAP servers have implemented some
181    kind of policy related to the password used to authenticate.  Among
182    other things, this policy includes:
183
184    o  Whether and when passwords expire.
185
186    o  Whether failed bind attempts cause the account to be locked.
187
188    o  If and how users are able to change their passwords.
189
190    In order to achieve greater security protection and ensure
191    interoperability in a heterogeneous environment, LDAP needs to
192    standardize on a common password policy model.  This is critical to
193    the successful deployment of LDAP directories.
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223 Sermersheim, et al.     Expires January 19, 2015                [Page 4]
224 \f
225 Internet-Draft    Password Policy for LDAP Directories         July 2014
226
227
228 2.  Conventions
229
230    Imperative keywords defined in [RFC2119] are used in this document,
231    and carry the meanings described there.
232
233    All ASN.1 [X.680] Basic Encoding Rules (BER) [X.690] encodings follow
234    the conventions found in Section 5.1 of [RFC4511].
235
236    The term "password administrator" refers to a user that has
237    sufficient access control privileges to modify users' passwords.  The
238    term "password policy administrator" refers to a user that has
239    sufficient access control privileges to modify the pwdPolicy object
240    defined in this document.  The access control that is used to
241    determine whether an identity is a password administrator or password
242    policy administrator is beyond the scope of this document, but
243    typically implies that the password administrator has 'write'
244    privileges to the password attribute.
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279 Sermersheim, et al.     Expires January 19, 2015                [Page 5]
280 \f
281 Internet-Draft    Password Policy for LDAP Directories         July 2014
282
283
284 3.  Application of Password Policy
285
286    The password policy defined in this document can be applied to any
287    attribute holding a user's password used for an authenticated LDAP
288    bind operation.  In this document, the term "user" represents any
289    LDAP client application that has an identity in the directory.
290
291    This policy is typically applied to the userPassword attribute in the
292    case of the LDAP simple authentication method [RFC4511] or the case
293    of password based SASL [RFC4422] authentication such as CRAM-MD5
294    [RFC2195] and DIGEST-MD5 [RFC2831].
295
296    The policy described in this document assumes that the password
297    attribute holds a single value.  No considerations are made for
298    directories or systems that allow a user to maintain multi-valued
299    password attributes.
300
301    Server implementations MAY institute internal policy whereby certain
302    identities (such as directory administrators) are not forced to
303    comply with any of password policy.  In this case, the password for a
304    directory administrator never expires; the account is never locked,
305    etc.
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335 Sermersheim, et al.     Expires January 19, 2015                [Page 6]
336 \f
337 Internet-Draft    Password Policy for LDAP Directories         July 2014
338
339
340 4.  Articles of Password Policy
341
342    The following sections explain in general terms each aspect of the
343    password policy defined in this document as well as the need for
344    each.  These policies are subdivided into the general groups of
345    password usage and password modification.  Implementation details are
346    presented in Section 8 and Section 9.
347
348 4.1.  Password Usage Policy
349
350    This section describes policy enforced when a password is used to
351    authenticate.  The general focus of this policy is to minimize the
352    threat of intruders once a password is in use.
353
354 4.1.1.  Password Validity Policy
355
356    These mechanisms allow account usage to be controlled independent of
357    any password expiration policies.  The policy defines the absolute
358    period of time for which an account may be used.  This allows an
359    administrator to define an absolute starting time after which a
360    password becomes valid, and an absolute ending time after which the
361    password is disabled.
362
363    A mechanism is also provided to define the period of time for which
364    an account may remain unused before being disabled.
365
366 4.1.2.  Password Guessing Limit
367
368    In order to prevent intruders from guessing a user's password, a
369    mechanism exists to track the number of consecutive failed
370    authentication attempts, and take action when a limit is reached.
371    This policy consists of several parts:
372
373    o  A counter to track the number of failed authentication attempts.
374
375    o  The amount of time to delay on the first authentication failure.
376
377    o  The maximum amount of time to delay on subsequent failures.
378
379    o  A timeframe in which the limit of consecutive failed
380       authentication attempts must happen before action is taken.
381
382    o  A configurable limit on failed authentication attempts.
383
384    o  The action to be taken when the limit is reached.  The action will
385       either be nothing, or the account will be locked.
386
387
388
389
390
391 Sermersheim, et al.     Expires January 19, 2015                [Page 7]
392 \f
393 Internet-Draft    Password Policy for LDAP Directories         July 2014
394
395
396    o  An amount of time the account is locked (if it is to be locked).
397       This can be indefinite.
398
399    Note that using the account lock feature provides an easy avenue for
400    Denial-of-Service (DoS) attacks on user accounts.  While some sites'
401    policies require accounts to be locked, this feature is discouraged
402    in favor of delaying each failed login attempt.
403
404    The delay time will be doubled on each subsequent failure, until it
405    reaches the maximum time configured.
406
407    [TBD: we could also provide a syntax for configuring a backoff
408    algorithm.  E.g. "+<int>" for linearly incrementing delay, "x<int>"
409    for constant multiplier, "^<int> for geometric.  But it's probably
410    overkill to add a calculator language to the server.]
411
412 4.2.  Password Modification Policy
413
414    This section describes policy enforced while users are modifying
415    passwords.  The general focus of this policy is to ensure that when
416    users add or change their passwords, the security and effectiveness
417    of their passwords is maximized.  In this document, the term "modify
418    password operation" refers to any operation that is used to add or
419    modify a password attribute.  Often this is done by updating the
420    password attribute during an add or modify operation, but MAY be done
421    by other means such as an extended operation.
422
423 4.2.1.  Password Expiration, Expiration Warning, and Grace
424         Authentications
425
426    One of the key properties of a password is the fact that it is not
427    well known.  If a password is frequently changed, the chances of that
428    user's account being broken into are minimized.
429
430    Password policy administrators may deploy a password policy that
431    causes passwords to expire after a given amount of time - thus
432    forcing users to change their passwords periodically.
433
434    As a side effect, there needs to be a way in which users are made
435    aware of this need to change their password before actually being
436    locked out of their accounts.  One or both of the following methods
437    handle this:
438
439    o  A warning may be returned to the user sometime before his password
440       is due to expire.  If the user fails to heed this warning before
441       the expiration time, his account will be locked.
442
443
444
445
446
447 Sermersheim, et al.     Expires January 19, 2015                [Page 8]
448 \f
449 Internet-Draft    Password Policy for LDAP Directories         July 2014
450
451
452    o  The user may bind to the directory a preset number of times after
453       her password has expired.  If she fails to change her password
454       during one of her 'grace' authentications, her account will be
455       locked.
456
457 4.2.2.  Password History
458
459    When the Password Expiration policy is used, an additional mechanism
460    may be employed to prevent users from simply re-using a previous
461    password (as this would effectively circumvent the expiration
462    policy).
463
464    In order to do this; a history of used passwords is kept.  The
465    password policy administrator sets the number of passwords to be
466    stored at any given time.  Passwords are stored in this history
467    whenever the password is changed.  Users aren't allowed to specify
468    any passwords that are in the history list while changing passwords.
469
470 4.2.3.  Password Minimum Age
471
472    Users may circumvent the Password History mechanism by quickly
473    performing a series of password changes.  If they change their
474    password enough times, their 'favorite' password will be pushed out
475    of the history list.
476
477    This process may be made less attractive to users by employing a
478    minimum age for passwords.  If users are forced to wait 24 hours
479    between password changes, they may be less likely to cycle through a
480    history of 10 passwords.
481
482 4.2.4.  Password Quality and Minimum length
483
484    In order to prevent users from creating or updating passwords that
485    are easy to guess, a password quality policy may be employed.  This
486    policy consists of two general mechanisms - ensuring that passwords
487    conform to a defined quality criterion and ensuring that they are of
488    a minimum length.
489
490    Forcing a password to comply with the quality policy may imply a
491    variety of things including:
492
493    o  Disallowing trivial or well-known words make up the password.
494
495    o  Forcing a certain number of digits be used.
496
497    o  Disallowing anagrams of the user's name.
498
499    The implementation of this policy meets with the following problems:
500
501
502
503 Sermersheim, et al.     Expires January 19, 2015                [Page 9]
504 \f
505 Internet-Draft    Password Policy for LDAP Directories         July 2014
506
507
508    o  If the password to be added or updated is encrypted by the client
509       before being sent, the server has no way of enforcing this policy.
510       Therefore, the onus of enforcing this policy falls upon client
511       implementations.
512
513    o  There are no specific definitions of what 'quality checking'
514       means.  This can lead to unexpected behavior in a heterogeneous
515       environment.
516
517 4.2.5.  User Defined Passwords
518
519    In some cases, it is desirable to disallow users from adding and
520    updating their own passwords.  This policy makes this functionality
521    possible.
522
523 4.2.6.  Password Change after Reset
524
525    This policy forces the user to update her password after it has been
526    set for the first time, or has been reset by a password
527    administrator.
528
529    This is needed in scenarios where a password administrator has set or
530    reset the password to a well-known value.
531
532 4.2.7.  Safe Modification
533
534    As directories become more commonly used, it will not be unusual for
535    clients to connect to a directory and leave the connection open for
536    an extended period.  This opens up the possibility for an intruder to
537    make modifications to a user's password while that user's computer is
538    connected but unattended.
539
540    This policy forces the user to prove his identity by specifying the
541    old password during a password modify operation.
542
543    {TODO: This allows a dictionary attack unless we specify that this is
544    also subject to intruder detection.  One solution is to require users
545    to authN prior to changing password.  Another solution is to perform
546    intruder detection checks when the password for a non-authenticated
547    identity is being updated}
548
549 4.3.  Restriction of the Password Policy
550
551    The password policy defined in this document can apply to any
552    attribute containing a password.  Password policy state information
553    is held in the user's entry, and applies to a password attribute, not
554    a particular password attribute value.  Thus the server SHOULD
555    enforce that the password attribute subject to password policy,
556
557
558
559 Sermersheim, et al.     Expires January 19, 2015               [Page 10]
560 \f
561 Internet-Draft    Password Policy for LDAP Directories         July 2014
562
563
564    contains one and only one password value.
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615 Sermersheim, et al.     Expires January 19, 2015               [Page 11]
616 \f
617 Internet-Draft    Password Policy for LDAP Directories         July 2014
618
619
620 5.  Schema used for Password Policy
621
622    The schema elements defined here fall into two general categories.  A
623    password policy object class is defined which contains a set of
624    administrative password policy attributes, and a set of operational
625    attributes are defined that hold general password policy state
626    information for each user.
627
628 5.1.  The pwdPolicy Object Class
629
630    This object class contains the attributes defining a password policy
631    in effect for a set of users.  Section 10 describes the
632    administration of this object, and the relationship between it and
633    particular objects.
634
635          ( 1.3.6.1.4.1.42.2.27.8.2.1
636          NAME 'pwdPolicy'
637          SUP top
638          AUXILIARY
639          MUST ( pwdAttribute )
640          MAY ( pwdMinAge $ pwdMaxAge $ pwdInHistory $ pwdCheckQuality $
641          pwdMinLength $ pwdMaxLength $ pwdExpireWarning $
642          pwdGraceAuthNLimit $ pwdGraceExpiry $ pwdLockout $
643          pwdLockoutDuration $ pwdMaxFailure $ pwdFailureCountInterval $
644          pwdMustChange $ pwdAllowUserChange $ pwdSafeModify $
645          pwdMinDelay $ pwdMaxDelay $ pwdMaxIdle ) )
646
647 5.2.  Attribute Types used in the pwdPolicy ObjectClass
648
649    Following are the attribute types used by the pwdPolicy object class.
650
651 5.2.1.  pwdAttribute
652
653    This holds the name of the attribute to which the password policy is
654    applied.  For example, the password policy may be applied to the
655    userPassword attribute.
656
657          ( 1.3.6.1.4.1.42.2.27.8.1.1
658          NAME 'pwdAttribute'
659          EQUALITY objectIdentifierMatch
660          SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )
661
662 5.2.2.  pwdMinAge
663
664    This attribute holds the number of seconds that must elapse between
665    modifications to the password.  If this attribute is not present, 0
666    seconds is assumed.
667
668
669
670
671 Sermersheim, et al.     Expires January 19, 2015               [Page 12]
672 \f
673 Internet-Draft    Password Policy for LDAP Directories         July 2014
674
675
676          ( 1.3.6.1.4.1.42.2.27.8.1.2
677          NAME 'pwdMinAge'
678          EQUALITY integerMatch
679          ORDERING integerOrderingMatch
680          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
681          SINGLE-VALUE )
682
683 5.2.3.  pwdMaxAge
684
685    This attribute holds the number of seconds after which a modified
686    password will expire.
687
688    If this attribute is not present, or if the value is 0 the password
689    does not expire.  If not 0, the value must be greater than or equal
690    to the value of the pwdMinAge.
691
692          ( 1.3.6.1.4.1.42.2.27.8.1.3
693          NAME 'pwdMaxAge'
694          EQUALITY integerMatch
695          ORDERING integerOrderingMatch
696          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
697          SINGLE-VALUE )
698
699 5.2.4.  pwdInHistory
700
701    This attribute specifies the maximum number of used passwords stored
702    in the pwdHistory attribute.
703
704    If this attribute is not present, or if the value is 0, used
705    passwords are not stored in the pwdHistory attribute and thus may be
706    reused.
707
708          ( 1.3.6.1.4.1.42.2.27.8.1.4
709          NAME 'pwdInHistory'
710          EQUALITY integerMatch
711          ORDERING integerOrderingMatch
712          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
713          SINGLE-VALUE )
714
715 5.2.5.  pwdCheckQuality
716
717    {TODO: Consider changing the syntax to OID.  Each OID will list a
718    quality rule (like min len, # of special characters, etc).  These
719    rules can be specified outside this document.}
720
721    {TODO: Note that even though this is meant to be a check that happens
722    during password modification, it may also be allowed to happen during
723    authN.  This is useful for situations where the password is encrypted
724
725
726
727 Sermersheim, et al.     Expires January 19, 2015               [Page 13]
728 \f
729 Internet-Draft    Password Policy for LDAP Directories         July 2014
730
731
732    when modified, but decrypted when used to authN.}
733
734    This attribute indicates how the password quality will be verified
735    while being modified or added.  If this attribute is not present, or
736    if the value is '0', quality checking will not be enforced.  A value
737    of '1' indicates that the server will check the quality, and if the
738    server is unable to check it (due to a hashed password or other
739    reasons) it will be accepted.  A value of '2' indicates that the
740    server will check the quality, and if the server is unable to verify
741    it, it will return an error refusing the password.
742
743          ( 1.3.6.1.4.1.42.2.27.8.1.5
744          NAME 'pwdCheckQuality'
745          EQUALITY integerMatch
746          ORDERING integerOrderingMatch
747          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
748          SINGLE-VALUE )
749
750 5.2.6.  pwdMinLength
751
752    When quality checking is enabled, this attribute holds the minimum
753    number of characters that must be used in a password.  If this
754    attribute is not present, no minimum password length will be
755    enforced.  If the server is unable to check the length (due to a
756    hashed password or otherwise), the server will, depending on the
757    value of the pwdCheckQuality attribute, either accept the password
758    without checking it ('0' or '1') or refuse it ('2').
759
760          ( 1.3.6.1.4.1.42.2.27.8.1.6
761          NAME 'pwdMinLength'
762          EQUALITY integerMatch
763          ORDERING integerOrderingMatch
764          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
765          SINGLE-VALUE )
766
767 5.2.7.  pwdMaxLength
768
769    When quality checking is enabled, this attribute holds the maximum
770    number of characters that may be used in a password.  If this
771    attribute is not present, no maximum password length will be
772    enforced.  If the server is unable to check the length (due to a
773    hashed password or otherwise), the server will, depending on the
774    value of the pwdCheckQuality attribute, either accept the password
775    without checking it ('0' or '1') or refuse it ('2').
776
777
778
779
780
781
782
783 Sermersheim, et al.     Expires January 19, 2015               [Page 14]
784 \f
785 Internet-Draft    Password Policy for LDAP Directories         July 2014
786
787
788          ( 1.3.6.1.4.1.42.2.27.8.1.31
789          NAME 'pwdMaxLength'
790          EQUALITY integerMatch
791          ORDERING integerOrderingMatch
792          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
793          SINGLE-VALUE )
794
795 5.2.8.  pwdExpireWarning
796
797    This attribute specifies the maximum number of seconds before a
798    password is due to expire that expiration warning messages will be
799    returned to an authenticating user.
800
801    If this attribute is not present, or if the value is 0 no warnings
802    will be returned.  If not 0, the value must be smaller than the value
803    of the pwdMaxAge attribute.
804
805          ( 1.3.6.1.4.1.42.2.27.8.1.7
806          NAME 'pwdExpireWarning'
807          EQUALITY integerMatch
808          ORDERING integerOrderingMatch
809          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
810          SINGLE-VALUE )
811
812 5.2.9.  pwdGraceAuthNLimit
813
814    This attribute specifies the number of times an expired password can
815    be used to authenticate.  If this attribute is not present or if the
816    value is 0, authentication will fail.
817
818          ( 1.3.6.1.4.1.42.2.27.8.1.8
819          NAME 'pwdGraceAuthNLimit'
820          EQUALITY integerMatch
821          ORDERING integerOrderingMatch
822          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
823          SINGLE-VALUE )
824
825 5.2.10.  pwdGraceExpiry
826
827    This attribute specifies the number of seconds the grace
828    authentications are valid.  If this attribute is not present or if
829    the value is 0, there is no time limit on the grace authentications.
830
831          ( 1.3.6.1.4.1.42.2.27.8.1.30
832          NAME 'pwdGraceExpire'
833          EQUALITY integerMatch
834          ORDERING integerOrderingMatch
835          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
836
837
838
839 Sermersheim, et al.     Expires January 19, 2015               [Page 15]
840 \f
841 Internet-Draft    Password Policy for LDAP Directories         July 2014
842
843
844          SINGLE-VALUE )
845
846 5.2.11.  pwdLockout
847
848    This attribute indicates, when its value is "TRUE", that the password
849    may not be used to authenticate after a specified number of
850    consecutive failed bind attempts.  The maximum number of consecutive
851    failed bind attempts is specified in pwdMaxFailure.
852
853    If this attribute is not present, or if the value is "FALSE", the
854    password may be used to authenticate when the number of failed bind
855    attempts has been reached.
856
857          ( 1.3.6.1.4.1.42.2.27.8.1.9
858          NAME 'pwdLockout'
859          EQUALITY booleanMatch
860          SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
861          SINGLE-VALUE )
862
863 5.2.12.  pwdLockoutDuration
864
865    This attribute holds the number of seconds that the password cannot
866    be used to authenticate due to too many failed bind attempts.  If
867    this attribute is not present, or if the value is 0 the password
868    cannot be used to authenticate until reset by a password
869    administrator.
870
871          ( 1.3.6.1.4.1.42.2.27.8.1.10
872          NAME 'pwdLockoutDuration'
873          EQUALITY integerMatch
874          ORDERING integerOrderingMatch
875          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
876          SINGLE-VALUE )
877
878 5.2.13.  pwdMaxFailure
879
880    This attribute specifies the number of consecutive failed bind
881    attempts after which the password may not be used to authenticate.
882    If this attribute is not present, or if the value is 0, this policy
883    is not checked, and the value of pwdLockout will be ignored.
884
885          ( 1.3.6.1.4.1.42.2.27.8.1.11
886          NAME 'pwdMaxFailure'
887          EQUALITY integerMatch
888          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
889          ORDERING integerOrderingMatch
890          SINGLE-VALUE )
891
892
893
894
895 Sermersheim, et al.     Expires January 19, 2015               [Page 16]
896 \f
897 Internet-Draft    Password Policy for LDAP Directories         July 2014
898
899
900 5.2.14.  pwdFailureCountInterval
901
902    This attribute holds the number of seconds after which the password
903    failures are purged from the failure counter, even though no
904    successful authentication occurred.
905
906    If this attribute is not present, or if its value is 0, the failure
907    counter is only reset by a successful authentication.
908
909          ( 1.3.6.1.4.1.42.2.27.8.1.12
910          NAME 'pwdFailureCountInterval'
911          EQUALITY integerMatch
912          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
913          ORDERING integerOrderingMatch
914          SINGLE-VALUE )
915
916 5.2.15.  pwdMustChange
917
918    This attribute specifies with a value of "TRUE" that users must
919    change their passwords when they first bind to the directory after a
920    password is set or reset by a password administrator.  If this
921    attribute is not present, or if the value is "FALSE", users are not
922    required to change their password upon binding after the password
923    administrator sets or resets the password.  This attribute is not set
924    due to any actions specified by this document, it is typically set by
925    a password administrator after resetting a user's password.
926
927          ( 1.3.6.1.4.1.42.2.27.8.1.13
928          NAME 'pwdMustChange'
929          EQUALITY booleanMatch
930          SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
931          SINGLE-VALUE )
932
933 5.2.16.  pwdAllowUserChange
934
935    This attribute indicates whether users can change their own
936    passwords, although the change operation is still subject to access
937    control.  If this attribute is not present, a value of "TRUE" is
938    assumed.  This attribute is intended to be used in the absence of an
939    access control mechanism.
940
941          ( 1.3.6.1.4.1.42.2.27.8.1.14
942          NAME 'pwdAllowUserChange'
943          EQUALITY booleanMatch
944          SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
945          SINGLE-VALUE )
946
947
948
949
950
951 Sermersheim, et al.     Expires January 19, 2015               [Page 17]
952 \f
953 Internet-Draft    Password Policy for LDAP Directories         July 2014
954
955
956 5.2.17.  pwdSafeModify
957
958    This attribute specifies whether or not the existing password must be
959    sent along with the new password when being changed.  If this
960    attribute is not present, a "FALSE" value is assumed.
961
962          ( 1.3.6.1.4.1.42.2.27.8.1.15
963          NAME 'pwdSafeModify'
964          EQUALITY booleanMatch
965          SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
966          SINGLE-VALUE )
967
968 5.2.18.  pwdMinDelay
969
970    This attribute specifies the number of seconds to delay responding to
971    the first failed authentication attempt.  If this attribute is not
972    set or is 0, no delays will be used. pwdMaxDelay must also be
973    specified if pwdMinDelay is set.
974
975          ( 1.3.6.1.4.1.42.2.27.8.1.24
976          NAME 'pwdMinDelay'
977          EQUALITY integerMatch
978          ORDERING integerOrderingMatch
979          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
980          SINGLE-VALUE )
981
982 5.2.19.  pwdMaxDelay
983
984    This attribute specifies the maximum number of seconds to delay when
985    responding to a failed authentication attempt.  The time specified in
986    pwdMinDelay is used as the starting time and is then doubled on each
987    failure until the delay time is greater than or equal to pwdMaxDelay
988    (or a successful authentication occurs, which resets the failure
989    counter). pwdMinDelay must be specified if pwdMaxDelay is set.
990
991          ( 1.3.6.1.4.1.42.2.27.8.1.25
992          NAME 'pwdMaxDelay'
993          EQUALITY integerMatch
994          ORDERING integerOrderingMatch
995          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
996          SINGLE-VALUE )
997
998 5.2.20.  pwdMaxIdle
999
1000    This attribute specifies the number of seconds an account may remain
1001    unused before it becomes locked.  If this attribute is not set or is
1002    0, no check is performed.
1003
1004
1005
1006
1007 Sermersheim, et al.     Expires January 19, 2015               [Page 18]
1008 \f
1009 Internet-Draft    Password Policy for LDAP Directories         July 2014
1010
1011
1012          ( 1.3.6.1.4.1.42.2.27.8.1.26
1013          NAME 'pwdMaxIdle'
1014          EQUALITY integerMatch
1015          ORDERING integerOrderingMatch
1016          SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
1017          SINGLE-VALUE )
1018
1019 5.3.  Attribute Types for Password Policy State Information
1020
1021    Password policy state information must be maintained for each user.
1022    The information is located in each user entry as a set of operational
1023    attributes.  These operational attributes are: pwdChangedTime,
1024    pwdAccountLockedTime, pwdFailureTime, pwdHistory, pwdGraceUseTime,
1025    pwdReset, pwdPolicySubEntry, pwdStartTime, pwdEndTime,
1026    pwdLastSuccess.
1027
1028 5.3.1.  Password Policy State Attribute Option
1029
1030    Since the password policy could apply to several attributes used to
1031    store passwords, each of the above operational attributes must have
1032    an option to specify which pwdAttribute it applies to.  The password
1033    policy option is defined as the following:
1034
1035    pwd-<passwordAttribute>
1036
1037    where passwordAttribute is a string following the OID syntax
1038    (1.3.6.1.4.1.1466.115.121.1.38).  The attribute type descriptor
1039    (short name) MUST be used.
1040
1041    For example, if the pwdPolicy object has for pwdAttribute
1042    "userPassword" then the pwdChangedTime operational attribute, in a
1043    user entry, will be:
1044
1045    pwdChangedTime;pwd-userPassword: 20000103121520Z
1046
1047    This attribute option follows sub-typing semantics.  If a client
1048    requests a password policy state attribute to be returned in a search
1049    operation, and does not specify an option, all subtypes of that
1050    policy state attribute are returned.
1051
1052 5.3.2.  pwdChangedTime
1053
1054    This attribute specifies the last time the entry's password was
1055    changed.  This is used by the password expiration policy.  If this
1056    attribute does not exist, the password will never expire.
1057
1058
1059
1060
1061
1062
1063 Sermersheim, et al.     Expires January 19, 2015               [Page 19]
1064 \f
1065 Internet-Draft    Password Policy for LDAP Directories         July 2014
1066
1067
1068          ( 1.3.6.1.4.1.42.2.27.8.1.16
1069          NAME 'pwdChangedTime'
1070          DESC 'The time the password was last changed'
1071          EQUALITY generalizedTimeMatch
1072          ORDERING generalizedTimeOrderingMatch
1073          SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
1074          SINGLE-VALUE
1075          NO-USER-MODIFICATION
1076          USAGE directoryOperation )
1077
1078 5.3.3.  pwdAccountLockedTime
1079
1080    This attribute holds the time that the user's account was locked.  A
1081    locked account means that the password may no longer be used to
1082    authenticate.  A 000001010000Z value means that the account has been
1083    locked permanently, and that only a password administrator can unlock
1084    the account.
1085
1086          ( 1.3.6.1.4.1.42.2.27.8.1.17
1087          NAME 'pwdAccountLockedTime'
1088          DESC 'The time an user account was locked'
1089          EQUALITY generalizedTimeMatch
1090          ORDERING generalizedTimeOrderingMatch
1091          SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
1092          SINGLE-VALUE
1093          NO-USER-MODIFICATION
1094          USAGE directoryOperation )
1095
1096 5.3.4.  pwdFailureTime
1097
1098    This attribute holds the timestamps of the consecutive authentication
1099    failures.
1100
1101          ( 1.3.6.1.4.1.42.2.27.8.1.19
1102          NAME 'pwdFailureTime'
1103          DESC 'The timestamps of the last consecutive authentication
1104          failures'
1105          EQUALITY generalizedTimeMatch
1106          ORDERING generalizedTimeOrderingMatch
1107          SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
1108          NO-USER-MODIFICATION
1109          USAGE directoryOperation )
1110
1111 5.3.5.  pwdHistory
1112
1113    This attribute holds a history of previously used passwords.  Values
1114    of this attribute are transmitted in string format as given by the
1115    following ABNF:
1116
1117
1118
1119 Sermersheim, et al.     Expires January 19, 2015               [Page 20]
1120 \f
1121 Internet-Draft    Password Policy for LDAP Directories         July 2014
1122
1123
1124       pwdHistory = time "#" syntaxOID "#" length "#" data
1125
1126       time       = GeneralizedTime
1127
1128       syntaxOID  = numericoid    ; the string representation of the
1129                                  ; dotted-decimal OID that defines the
1130                                  ; syntax used to store the password.
1131
1132       length     = number        ; the number of octets in data.
1133
1134       data       = <octets representing the password in the format
1135                     specified by syntaxOID>.
1136
1137    GeneralizedTime is specified in 3.3.13 of [RFC4517]. numericoid and
1138    number are specified in 1.4 of [RFC4512].
1139
1140    This format allows the server to store, and transmit a history of
1141    passwords that have been used.  In order for equality matching to
1142    function properly, the time field needs to adhere to a consistent
1143    format.  For this purpose, the time field MUST be in GMT format.
1144
1145          ( 1.3.6.1.4.1.42.2.27.8.1.20
1146          NAME 'pwdHistory'
1147          DESC 'The history of user s passwords'
1148          EQUALITY octetStringMatch
1149          SYNTAX 1.3.6.1.4.1.1466.115.121.1.40
1150          NO-USER-MODIFICATION
1151          USAGE directoryOperation )
1152
1153 5.3.6.  pwdGraceUseTime
1154
1155    This attribute holds the timestamps of grace authentications after a
1156    password has expired.
1157
1158          ( 1.3.6.1.4.1.42.2.27.8.1.21
1159          NAME 'pwdGraceUseTime'
1160          DESC 'The timestamps of the grace authentication after the
1161          password has expired'
1162          EQUALITY generalizedTimeMatch
1163          SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
1164          NO-USER-MODIFICATION
1165          USAGE directoryOperation )
1166
1167 5.3.7.  pwdReset
1168
1169    This attribute holds a flag to indicate (when TRUE) that the password
1170    has been updated by the password administrator and must be changed by
1171    the user.
1172
1173
1174
1175 Sermersheim, et al.     Expires January 19, 2015               [Page 21]
1176 \f
1177 Internet-Draft    Password Policy for LDAP Directories         July 2014
1178
1179
1180          ( 1.3.6.1.4.1.42.2.27.8.1.22
1181          NAME 'pwdReset'
1182          DESC 'The indication that the password has been reset'
1183          EQUALITY booleanMatch
1184          SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
1185          SINGLE-VALUE
1186          USAGE directoryOperation )
1187
1188 5.3.8.  pwdPolicySubentry
1189
1190    This attribute points to the pwdPolicy subentry in effect for this
1191    object.
1192
1193          ( 1.3.6.1.4.1.42.2.27.8.1.23
1194          NAME 'pwdPolicySubentry'
1195          DESC 'The pwdPolicy subentry in effect for this object'
1196          EQUALITY distinguishedNameMatch
1197          SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
1198          SINGLE-VALUE
1199          NO-USER-MODIFICATION
1200          USAGE directoryOperation )
1201
1202 5.3.9.  pwdStartTime
1203
1204    This attribute specifies the time the entry's password becomes valid
1205    for authentication.  Authentication attempts made before this time
1206    will fail.  If this attribute does not exist, then no restriction
1207    applies.
1208
1209          ( 1.3.6.1.4.1.42.2.27.8.1.27
1210          NAME 'pwdStartTime'
1211          DESC 'The time the password becomes enabled'
1212          EQUALITY generalizedTimeMatch
1213          ORDERING generalizedTimeOrderingMatch
1214          SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
1215          SINGLE-VALUE
1216          NO-USER-MODIFICATION
1217          USAGE directoryOperation )
1218
1219 5.3.10.  pwdEndTime
1220
1221    This attribute specifies the time the entry's password becomes
1222    invalid for authentication.  Authentication attempts made after this
1223    time will fail, regardless of expiration or grace settings.  If this
1224    attribute does not exist, then this restriction does not apply.
1225
1226
1227
1228
1229
1230
1231 Sermersheim, et al.     Expires January 19, 2015               [Page 22]
1232 \f
1233 Internet-Draft    Password Policy for LDAP Directories         July 2014
1234
1235
1236          ( 1.3.6.1.4.1.42.2.27.8.1.28
1237          NAME 'pwdEndTime'
1238          DESC 'The time the password becomes disabled'
1239          EQUALITY generalizedTimeMatch
1240          ORDERING generalizedTimeOrderingMatch
1241          SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
1242          SINGLE-VALUE
1243          NO-USER-MODIFICATION
1244          USAGE directoryOperation )
1245
1246    Note that pwdStartTime may be set to a time greater than or equal to
1247    pwdEndTime; this simply disables the account.
1248
1249 5.3.11.  pwdLastSuccess
1250
1251    This attribute holds the timestamp of the last successful
1252    authentication.
1253
1254          ( 1.3.6.1.4.1.42.2.27.8.1.29
1255          NAME 'pwdLastSuccess'
1256          DESC 'The timestamp of the last successful authentication'
1257          EQUALITY generalizedTimeMatch
1258          ORDERING generalizedTimeOrderingMatch
1259          SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
1260          SINGLE-VALUE
1261          NO-USER-MODIFICATION
1262          USAGE directoryOperation )
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287 Sermersheim, et al.     Expires January 19, 2015               [Page 23]
1288 \f
1289 Internet-Draft    Password Policy for LDAP Directories         July 2014
1290
1291
1292 6.  Controls used for Password Policy
1293
1294    This section details the controls used while enforcing password
1295    policy.  A request control is defined that is sent by a client with a
1296    request operation in order to elicit a response control.  The
1297    response control contains various warnings and errors associated with
1298    password policy.
1299
1300    {TODO: add a note about advertisement and discovery}
1301
1302 6.1.  Request Control
1303
1304    This control MAY be sent with any LDAP request message in order to
1305    convey to the server that this client is aware of, and can process
1306    the response control described in this document.  When a server
1307    receives this control, it will return the response control when
1308    appropriate and with the proper data.
1309
1310    The controlType is 1.3.6.1.4.1.42.2.27.8.5.1 and the criticality may
1311    be TRUE or FALSE.  There is no controlValue.
1312
1313 6.2.  Response Control
1314
1315    If the client has sent a passwordPolicyRequest control, the server
1316    (when solicited by the inclusion of the request control) sends this
1317    control with the following operation responses: bindResponse,
1318    modifyResponse, addResponse, compareResponse and possibly
1319    extendedResponse, to inform of various conditions, and MAY be sent
1320    with other operations (in the case of the changeAfterReset error).
1321    The controlType is 1.3.6.1.4.1.42.2.27.8.5.1 and the controlValue is
1322    the BER encoding of the following type:
1323
1324       PasswordPolicyResponseValue ::= SEQUENCE {
1325          warning [0] CHOICE {
1326             timeBeforeExpiration [0] INTEGER (0 .. maxInt),
1327             graceAuthNsRemaining [1] INTEGER (0 .. maxInt) } OPTIONAL,
1328          error   [1] ENUMERATED {
1329             passwordExpired             (0),
1330             accountLocked               (1),
1331             changeAfterReset            (2),
1332             passwordModNotAllowed       (3),
1333             mustSupplyOldPassword       (4),
1334             insufficientPasswordQuality (5),
1335             passwordTooShort            (6),
1336             passwordTooYoung            (7),
1337             passwordInHistory           (8) } OPTIONAL }
1338
1339    The timeBeforeExpiration warning specifies the number of seconds
1340
1341
1342
1343 Sermersheim, et al.     Expires January 19, 2015               [Page 24]
1344 \f
1345 Internet-Draft    Password Policy for LDAP Directories         July 2014
1346
1347
1348    before a password will expire.  The graceAuthNsRemaining warning
1349    specifies the remaining number of times a user will be allowed to
1350    authenticate with an expired password.  The passwordExpired error
1351    signifies that the password has expired and must be reset.  The
1352    changeAfterReset error signifies that the password must be changed
1353    before the user will be allowed to perform any operation other than
1354    bind and modify.  The passwordModNotAllowed error is set when a user
1355    is restricted from changing her password.  The
1356    insufficientPasswordQuality error is set when a password doesn't pass
1357    quality checking.  The passwordTooYoung error is set if the age of
1358    the password to be modified is not yet old enough.
1359
1360    Typically, only either a warning or an error will be encoded though
1361    there may be exceptions.  For example, if the user is required to
1362    change a password after the password administrator set it, and the
1363    password will expire in a short amount of time, the control may
1364    include the timeBeforeExpiration warning and the changeAfterReset
1365    error.
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399 Sermersheim, et al.     Expires January 19, 2015               [Page 25]
1400 \f
1401 Internet-Draft    Password Policy for LDAP Directories         July 2014
1402
1403
1404 7.  Policy Decision Points
1405
1406    Following are a number of procedures used to make policy decisions.
1407    These procedures are typically performed by the server while
1408    processing an operation.
1409
1410    The following sections contain detailed instructions that refer to
1411    attributes of the pwdPolicy object class.  When doing so, the
1412    attribute of the pwdPolicy object that governs the entry being
1413    discussed is implied.
1414
1415 7.1.  Locked Account Check
1416
1417    A status of true is returned to indicate that the account is locked
1418    if any of these conditions are met:
1419
1420    o  The value of the pwdAccountLockedTime attribute is 000001010000Z.
1421
1422    o  The current time is less than the value of the pwdStartTime
1423       attribute.
1424
1425    o  The current time is greater than or equal to the value of the
1426       pwdEndTime attribute.
1427
1428    o  The current time is greater than or equal to the value of the
1429       pwdLastSuccess attribute added to the value of the pwdMaxIdle
1430       attribute.
1431
1432    o  The current time is less than the value of the
1433       pwdAccountLockedTime attribute added to the value of the
1434       pwdLockoutDuration.
1435
1436    Otherwise a status of false is returned.
1437
1438 7.2.  Password Must be Changed Now Check
1439
1440    A status of true is returned to indicate that the password must be
1441    changed if all of these conditions are met:
1442
1443    o  The pwdMustChange attribute is set to TRUE.
1444
1445    o  The pwdReset attribute is set to TRUE.
1446
1447    Otherwise a status of false is returned.
1448
1449
1450
1451
1452
1453
1454
1455 Sermersheim, et al.     Expires January 19, 2015               [Page 26]
1456 \f
1457 Internet-Draft    Password Policy for LDAP Directories         July 2014
1458
1459
1460 7.3.  Password Expiration Check
1461
1462    A status of true is returned indicating that the password has expired
1463    if the current time minus the value of pwdChangedTime is greater than
1464    the value of the pwdMaxAge.
1465
1466    Otherwise, a status of false is returned.
1467
1468 7.4.  Remaining Grace AuthN Check
1469
1470    If the pwdGraceExpiry attribute is present, and the current time is
1471    greater than the password expiration time plus the pwdGraceExpiry
1472    value, zero is returned.
1473
1474    If the pwdGraceUseTime attribute is present, the number of values in
1475    that attribute subtracted from the value of pwdGraceAuthNLimit is
1476    returned.  Otherwise zero is returned.  A positive result specifies
1477    the number of remaining grace authentications.
1478
1479 7.5.  Time Before Expiration Check
1480
1481    If the pwdExpireWarning attribute is not present a zero status is
1482    returned.  Otherwise the following steps are followed:
1483
1484    Subtract the time stored in pwdChangedTime from the current time to
1485    arrive at the password's age.  If the password's age is greater than
1486    than the value of the pwdMaxAge attribute, a zero status is returned.
1487    Subtract the value of the pwdExpireWarning attribute from the value
1488    of the pwdMaxAge attribute to arrive at the warning age.  If the
1489    password's age is equal to or greater than the warning age, the value
1490    of pwdMaxAge minus the password's age is returned.
1491
1492 7.6.  Intruder Lockout Check
1493
1494    A status of true indicating that an intruder has been detected is
1495    returned if the following conditions are met:
1496
1497    o  The pwdLockout attribute is TRUE.
1498
1499    o  The number of values in the pwdFailureTime attribute that are
1500       younger than pwdFailureCountInterval is greater or equal to the
1501       pwdMaxFailure attribute.
1502
1503    Otherwise a status of false is returned.
1504
1505    While performing this check, values of pwdFailureTime that are old by
1506    more than pwdFailureCountInterval are purged and not counted.
1507
1508
1509
1510
1511 Sermersheim, et al.     Expires January 19, 2015               [Page 27]
1512 \f
1513 Internet-Draft    Password Policy for LDAP Directories         July 2014
1514
1515
1516 7.7.  Intruder Delay Check
1517
1518    If the pwdMinDelay attribute is 0 or not set, zero is returned.
1519
1520    Otherwise, a delay time is computed based on the number of values in
1521    the pwdFailureTime attribute.  If the computed value is greater than
1522    the pwdMaxDelay attribute, the pwdMaxDelay value is returned.
1523
1524    While performing this check, values of pwdFailureTime that are old by
1525    more than pwdFailureCountInterval are purged and not counted.
1526
1527 7.8.  Password Too Young Check
1528
1529    If the Section 7.2 check returned true then this check will return
1530    false, to allow the password to be changed.
1531
1532    A status of true indicating that not enough time has passed since the
1533    password was last updated is returned if:
1534
1535    o  The value of pwdMinAge is non-zero and pwdChangedTime is present.
1536
1537    o  The value of pwdMinAge is greater than the current time minus the
1538       value of pwdChangedTime.
1539
1540    Otherwise a false status is returned.
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567 Sermersheim, et al.     Expires January 19, 2015               [Page 28]
1568 \f
1569 Internet-Draft    Password Policy for LDAP Directories         July 2014
1570
1571
1572 8.  Server Policy Enforcement Points
1573
1574    The server SHOULD enforce that the password attribute subject to a
1575    password policy as defined in this document, contains one and only
1576    one password value.
1577
1578    Note: The case where a single password value is stored in multiple
1579    formats simultaneously is still considered to be only one password
1580    value.
1581
1582    The scenarios in the following operations assume that the client has
1583    attached a passwordPolicyRequest control to the request message of
1584    the operation.  In the event that the passwordPolicyRequest control
1585    was not sent, no passwordPolicyResponse control is returned.  All
1586    other instructions remain the same.
1587
1588    For successfully completed operations, unless otherwise stated, no
1589    passwordPolicyResponse control is returned.
1590
1591 8.1.  Password-based Authentication
1592
1593    This section contains the policy enforcement rules and policy data
1594    updates used while validating a password.  Operations that validate
1595    passwords include, but are not limited to, the Bind operation where
1596    the simple choice specifies a password, and the Compare operation
1597    where the attribute being compared holds a password.  Note that while
1598    the Compare operation does not authenticate a user to the LDAP
1599    server, it may be used by an external application for purposes of
1600    authentication.
1601
1602 8.1.1.  Fail if the account is locked
1603
1604    If the account is locked as specified in Section 7.1, the server
1605    fails the operation with an appropriate resultCode (i.e.
1606    invalidCredentials (49) in the case of a bind operation, compareFalse
1607    (5) in the case of a compare operation, etc.).  The server MAY set
1608    the error: accountLocked (1) in the passwordPolicyResponse in the
1609    controls field of the message.
1610
1611 8.1.2.  Validated Password Procedures
1612
1613    If the validation operation indicates that the password validated,
1614    these procedures are followed in order:
1615
1616 8.1.2.1.  Policy state updates
1617
1618    Delete the pwdFailureTime and pwdAccountLockedTime attributes.
1619
1620
1621
1622
1623 Sermersheim, et al.     Expires January 19, 2015               [Page 29]
1624 \f
1625 Internet-Draft    Password Policy for LDAP Directories         July 2014
1626
1627
1628    Set the value of the pwdLastSuccess attribute to the current time.
1629
1630    Note: setting pwdLastSuccess is optional, but it is required if the
1631    policy has pwdMaxIdle defined.
1632
1633 8.1.2.2.  Password must be changed now
1634
1635    If the decision in Section 7.2 returns true, the server sends to the
1636    client a response with an appropriate successful resultCode (i.e.
1637    success (0), compareTrue (6), etc.), and includes the
1638    passwordPolicyResponse in the controls field of the bindResponse
1639    message with the warning: changeAfterReset specified.
1640
1641    For bind, the server MUST then disallow all operations issued by this
1642    user except modify password, bind, unbind, abandon and StartTLS
1643    extended operation.
1644
1645 8.1.2.3.  Expired password
1646
1647    If the password has expired as per Section 7.3, the server either
1648    returns a success or failure based on the state of grace
1649    authentications.
1650
1651 8.1.2.3.1.  Remaining Grace Authentications
1652
1653    If there are remaining grace authentications as per Section 7.4, the
1654    server adds a new value with the current time in pwdGraceUseTime.
1655    Then it sends to the client a response with an appropriate successful
1656    resultCode (i.e. success (0), compareTrue (6), etc.), and includes
1657    the passwordPolicyResponse in the controls field of the response
1658    message with the warning: graceAuthNsRemaining choice set to the
1659    number of grace authentications left.
1660
1661    Implementor's note: The system time of the host machine may be more
1662    granular than is needed to ensure unique values of this attribute.
1663    It is recommended that a mechanism is used to ensure unique
1664    generalized time values.  The fractional seconds field may be used
1665    for this purpose.
1666
1667 8.1.2.3.2.  No Remaining Grace Authentications
1668
1669    If there are no remaining grace authentications, the server fails the
1670    operation with an appropriate resultCode (invalidCredentials (49),
1671    compareFalse (5), etc.), and includes the passwordPolicyResponse in
1672    the controls field of the bindResponse message with the error:
1673    passwordExpired (0) set.
1674
1675
1676
1677
1678
1679 Sermersheim, et al.     Expires January 19, 2015               [Page 30]
1680 \f
1681 Internet-Draft    Password Policy for LDAP Directories         July 2014
1682
1683
1684 8.1.2.4.  Expiration Warning
1685
1686    If the result of Section 7.5 is a positive number, the server sends
1687    to the client a response with an appropriate successful resultCode
1688    (i.e. success (0), compareTrue (6), etc.), and includes the
1689    passwordPolicyResponse in the controls field of the bindResponse
1690    message with the warning: timeBeforeExiration set to the value as
1691    described above.  Otherwise, the server sends a successful response,
1692    and omits the passwordPolicyResponse.
1693
1694 8.1.3.  AuthN Failed Procedures
1695
1696    If the authentication process indicates that the password failed
1697    validation due to invalid credentials, these procedures are followed:
1698
1699 8.1.3.1.  Policy state update
1700
1701    Add the current time as a value of the pwdFailureTime attribute.
1702
1703    Implementor's note: The system time of the host machine may be more
1704    granular than is needed to ensure unique values of this attribute.
1705    It is recommended that a mechanism is used to ensure unique
1706    generalized time values.  The fractional seconds field may be used
1707    for this purpose.
1708
1709 8.1.3.2.  Handle Intruder Detection
1710
1711    If the check in Section 7.6 returns a true state, the server locks
1712    the account by setting the value of the pwdAccountLockedTime
1713    attribute to the current time.  After locking the account, the server
1714    fails the operation with an appropriate resultCode
1715    (invalidCredentials (49), compareFalse (5), etc.), and includes the
1716    passwordPolicyResponse in the controls field of the message with the
1717    error: accountLocked (1).
1718
1719    If the check in Section 7.7 returns a non-zero value, the server
1720    waits that number of seconds before sending the authentication
1721    response back to the client.
1722
1723 8.2.  Password Update Operations
1724
1725    Because the password is stored in an attribute, various operations
1726    (like add and modify) may be used to create or update a password.
1727    But some alternate mechanisms have been defined or may be defined,
1728    such as the LDAP Password Modify Extended Operation [RFC3062].
1729
1730    While processing a password update, the server performs the following
1731    steps:
1732
1733
1734
1735 Sermersheim, et al.     Expires January 19, 2015               [Page 31]
1736 \f
1737 Internet-Draft    Password Policy for LDAP Directories         July 2014
1738
1739
1740 8.2.1.  Safe Modification
1741
1742    If pwdSafeModify is set to TRUE and if there is an existing password
1743    value, the server ensures that the password update operation includes
1744    the user's existing password.
1745
1746    When the LDAP modify operation is used to modify a password, this is
1747    done by specifying both a delete action and an add or replace action,
1748    where the delete action specifies the existing password, and the add
1749    or replace action specifies the new password.  Other password update
1750    operations SHOULD employ a similar mechanism.  Otherwise this policy
1751    will fail.
1752
1753    If the existing password is not specified, the server does not
1754    process the operation and sends the appropriate response message to
1755    the client with the resultCode: insufficientAccessRights (50), and
1756    includes the passwordPolicyResponse in the controls field of the
1757    response message with the error: mustSupplyOldPassword (4).
1758
1759 8.2.2.  Change After Reset
1760
1761    If the decision in Section 7.2 returns true, the server ensures that
1762    the password update operation contains no modifications other than
1763    the modification of the password attribute.  If other modifications
1764    exist, the server sends a response message to the client with the
1765    resultCode: insufficientAccessRights (50), and includes the
1766    passwordPolicyResponse in the controls field of the response message
1767    with the error: changeAfterReset (2).
1768
1769 8.2.3.  Rights Check
1770
1771    Check to see whether the bound identity has sufficient rights to
1772    update the password.  If the bound identity is a user changing its
1773    own password, this MAY be done by checking the pwdAllowUserChange
1774    attribute or using an access control mechanism.  The determination of
1775    this is implementation specific.  If the user is not allowed to
1776    update her password, the server sends a response message to the
1777    client with the resultCode: insufficientAccessRights (50), and
1778    includes the passwordPolicyResponse in the controls field of the
1779    response message with the error: passwordModNotAllowed (3).
1780
1781 8.2.4.  Too Early to Update
1782
1783    If the check in Section 7.8 results in a true status The server sends
1784    a response message to the client with the resultCode:
1785    constraintViolation (19), and includes the passwordPolicyResponse in
1786    the controls field of the response message with the error:
1787    passwordTooYoung (7).
1788
1789
1790
1791 Sermersheim, et al.     Expires January 19, 2015               [Page 32]
1792 \f
1793 Internet-Draft    Password Policy for LDAP Directories         July 2014
1794
1795
1796 8.2.5.  Password Quality
1797
1798    Check the value of the pwdCheckQuality attribute.  If the value is
1799    non-zero, the server:
1800
1801    o  Ensure that the password meets the quality criteria enforced by
1802       the server.  This enforcement is implementation specific.  If the
1803       server is unable to check the quality (due to a hashed password or
1804       otherwise), the value of pwdCheckQuality is evaluated.  If the
1805       value is 1, operation continues.  If the value is 2, the server
1806       sends a response message to the client with the resultCode:
1807       constraintViolation (19), and includes the passwordPolicyResponse
1808       in the controls field of the response message with the error:
1809       insufficientPasswordQuality (5).
1810
1811       If the server is able to check the password quality, and the check
1812       fails, the server sends a response message to the client with the
1813       resultCode: constraintViolation (19), and includes the
1814       passwordPolicyResponse in the controls field of the response
1815       message with the error: insufficientPasswordQuality (5).
1816
1817    o  checks the value of the pwdMinLength attribute.  If the value is
1818       non-zero, it ensures that the new password is of at least the
1819       minimum length.
1820
1821       If the server is unable to check the length (due to a hashed
1822       password or otherwise), the value of pwdCheckQuality is evaluated.
1823       If the value is 1, operation continues.  If the value is 2, the
1824       server sends a response message to the client with the resultCode:
1825       constraintViolation (19), and includes the passwordPolicyResponse
1826       in the controls field of the response message with the error:
1827       passwordTooShort (6).
1828
1829       If the server is able to check the password length, and the check
1830       fails, the server sends a response message to the client with the
1831       resultCode: constraintViolation (19), and includes the
1832       passwordPolicyResponse in the controls field of the response
1833       message with the error: passwordTooShort (6).
1834
1835 8.2.6.  Invalid Reuse
1836
1837    If pwdInHistory is present and its value is non-zero, the server
1838    checks whether this password exists in the entry's pwdHistory
1839    attribute or in the current password attribute.  If the password does
1840    exist in the pwdHistory attribute or in the current password
1841    attribute, the server sends a response message to the client with the
1842    resultCode: constraintViolation (19), and includes the
1843    passwordPolicyResponse in the controls field of the response message
1844
1845
1846
1847 Sermersheim, et al.     Expires January 19, 2015               [Page 33]
1848 \f
1849 Internet-Draft    Password Policy for LDAP Directories         July 2014
1850
1851
1852    with the error: passwordInHistory (8).
1853
1854 8.2.7.  Policy State Updates
1855
1856    If the steps have completed without causing an error condition, the
1857    server performs the following steps in order to update the necessary
1858    password policy state attributes:
1859
1860    If the value of either pwdMaxAge or pwdMinAge is non-zero, the server
1861    updates the pwdChangedTime attribute on the entry to the current
1862    time.
1863
1864    If the value of pwdInHistory is non-zero, the server adds the
1865    previous password (if one existed) to the pwdHistory attribute.  If
1866    the number of attributes held in the pwdHistory attribute exceeds the
1867    value of pwdInHistory, the server removes the oldest excess
1868    passwords.
1869
1870    If the value the pwdMustChange is TRUE and the modification is
1871    performed by a password administrator, then the pwdReset attribute is
1872    set to TRUE.  Otherwise, the pwdReset is removed from the user's
1873    entry if it exists.
1874
1875    The pwdFailureTime and pwdGraceUseTime attributes is removed from the
1876    user's entry if they exist.
1877
1878 8.3.  Other Operations
1879
1880    For operations other than bind, password update, unbind, abandon or
1881    StartTLS, if the decision in Section 7.2 returns true, the server
1882    sends a response message to the client with the resultCode:
1883    insufficientAccessRights (50), and includes the
1884    passwordPolicyResponse in the controls field of the response message
1885    with the error: changeAfterReset (2).
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903 Sermersheim, et al.     Expires January 19, 2015               [Page 34]
1904 \f
1905 Internet-Draft    Password Policy for LDAP Directories         July 2014
1906
1907
1908 9.  Client Policy Enforcement Points
1909
1910    These sections illustrate possible scenarios for each LDAP operation
1911    and define the types of responses that identify those scenarios.
1912
1913    The scenarios in the following operations assume that the client
1914    attached a passwordPolicyRequest control to the request message of
1915    the operation, and thus may receive a passwordPolicyResponse control
1916    in the response message.  In the event that the passwordPolicyRequest
1917    control was not sent, no passwordPolicyResponse control is returned.
1918    All other instructions remain the same.
1919
1920 9.1.  Bind Operation
1921
1922    For every bind response received, the client checks the resultCode of
1923    the bindResponse and checks for a passwordPolicyResponse control to
1924    determine if any of the following conditions are true and MAY prompt
1925    the user accordingly.
1926
1927    o  bindResponse.resultCode = insufficientAccessRights (50),
1928       passwordPolicyResponse.error = accountLocked (1): The password
1929       failure limit has been reached and the account is locked.  The
1930       user needs to retry later or contact the password administrator to
1931       reset the password.
1932
1933    o  bindResponse.resultCode = success (0),
1934       passwordPolicyResponse.error = changeAfterReset (2): The user is
1935       binding for the first time after the password administrator set
1936       the password.  In this scenario, the client SHOULD prompt the user
1937       to change his password immediately.
1938
1939    o  bindResponse.resultCode = success (0),
1940       passwordPolicyResponse.warning = graceAuthNsRemaining: The
1941       password has expired but there are remaining grace
1942       authentications.  The user needs to change it.
1943
1944    o  bindResponse.resultCode = invalidCredentials (49),
1945       passwordPolicyResponse.error = passwordExpired (0): The password
1946       has expired and there are no more grace authentications.  The user
1947       contacts the password administrator in order to have its password
1948       reset.
1949
1950    o  bindResponse.resultCode = success (0),
1951       passwordPolicyResponse.warning = timeBeforeExpiration: The user's
1952       password will expire in n number of seconds.
1953
1954
1955
1956
1957
1958
1959 Sermersheim, et al.     Expires January 19, 2015               [Page 35]
1960 \f
1961 Internet-Draft    Password Policy for LDAP Directories         July 2014
1962
1963
1964 9.2.  Modify Operations
1965
1966 9.2.1.  Modify Request
1967
1968    If the application or client encrypts the password prior to sending
1969    it in a password modification operation (whether done through
1970    modifyRequest or another password modification mechanism), it SHOULD
1971    check the values of the pwdMinLength, and pwdCheckQuality attributes
1972    and SHOULD enforce these policies.
1973
1974 9.2.2.  Modify Response
1975
1976    If the modifyRequest operation was used to change the password, or if
1977    another mechanism is used --such as an extendedRequest-- the
1978    modifyResponse or other appropriate response MAY contain information
1979    pertinent to password policy.  The client checks the resultCode of
1980    the response and checks for a passwordPolicyResponse control to
1981    determine if any of the following conditions are true and optionally
1982    notify the user of the condition.
1983
1984    o  pwdModResponse.resultCode = insufficientAccessRights (50),
1985       passwordPolicyResponse.error = mustSupplyOldPassword (4): The user
1986       attempted to change her password without specifying the old
1987       password but the password policy requires this.
1988
1989    o  pwdModResponse.resultCode = insufficientAccessRights (50),
1990       passwordPolicyResponse.error = changeAfterReset (2): The user must
1991       change her password before submitting any other LDAP requests.
1992
1993    o  pwdModResponse.resultCode = insufficientAccessRights (50),
1994       passwordPolicyResponse.error = passwordModNotAllowed (3): The user
1995       doesn't have sufficient rights to change his password.
1996
1997    o  pwdModResponse.resultCode = constraintViolation (19),
1998       passwordPolicyResponse.error = passwordTooYoung (7): It is too
1999       soon after the last password modification to change the password.
2000
2001    o  pwdModResponse.resultCode = constraintViolation (19),
2002       passwordPolicyResponse.error = insufficientPasswordQuality (5):
2003       The password failed quality checking.
2004
2005    o  pwdModResponse.resultCode = constraintViolation (19),
2006       passwordPolicyResponse.error = passwordTooShort (6): The length of
2007       the password is too short.
2008
2009    o  pwdModResponse.resultCode = constraintViolation (19),
2010       passwordPolicyResponse.error = passwordInHistory (8): The password
2011       has already been used; the user must choose a different one.
2012
2013
2014
2015 Sermersheim, et al.     Expires January 19, 2015               [Page 36]
2016 \f
2017 Internet-Draft    Password Policy for LDAP Directories         July 2014
2018
2019
2020 9.3.  Add Operation
2021
2022    If a password is specified in an addRequest, the client checks the
2023    resultCode of the addResponse and checks for a passwordPolicyResponse
2024    control to determine if any of the following conditions are true and
2025    may prompt the user accordingly.
2026
2027    o  addResponse.resultCode = insufficientAccessRights (50),
2028       passwordPolicyResponse.error = passwordModNotAllowed (3): The user
2029       doesn't have sufficient rights to add this password.
2030
2031    o  addResponse.resultCode = constraintViolation (19),
2032       passwordPolicyResponse.error = insufficientPasswordQuality (5):
2033       The password failed quality checking.
2034
2035    o  addResponse.resultCode = constraintViolation (19),
2036       passwordPolicyResponse.error = passwordTooShort (6): The length of
2037       the password is too short.
2038
2039 9.4.  Compare Operation
2040
2041    When a compare operation is used to compare a password, the client
2042    checks the resultCode of the compareResponse and checks for a
2043    passwordPolicyResponse to determine if any of the following
2044    conditions are true and MAY prompt the user accordingly.  These
2045    conditions assume that the result of the comparison was true.
2046
2047    o  compareResponse.resultCode = compareFalse (5),
2048       passwordPolicyResponse.error = accountLocked (1): The password
2049       failure limit has been reached and the account is locked.  The
2050       user needs to retry later or contact the password administrator to
2051       reset the password.
2052
2053    o  compareResponse.resultCode = compareTrue (6),
2054       passwordPolicyResponse.warning = graceAuthNsRemaining: The
2055       password has expired but there are remaining grace
2056       authentications.  The user needs to change it.
2057
2058    o  compareResponse.resultCode = compareFalse (5),
2059       passwordPolicyResponse.error = passwordExpired (0): The password
2060       has expired and there are no more grace authentications.  The user
2061       must contact the password administrator to reset the password.
2062
2063    o  compareResponse.resultCode = compareTrue (6),
2064       passwordPolicyResponse.warning = timeBeforeExpiration: The user's
2065       password will expire in n number of seconds.
2066
2067
2068
2069
2070
2071 Sermersheim, et al.     Expires January 19, 2015               [Page 37]
2072 \f
2073 Internet-Draft    Password Policy for LDAP Directories         July 2014
2074
2075
2076 9.5.  Other Operations
2077
2078    For operations other than bind, unbind, abandon or StartTLS, the
2079    client checks the result code and control to determine if the user
2080    needs to change the password immediately.
2081
2082    o  <Response>.resultCode = insufficientAccessRights (50),
2083       passwordPolicyResponse.error = changeAfterReset (2) : The user
2084       needs to change the password immediately.
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127 Sermersheim, et al.     Expires January 19, 2015               [Page 38]
2128 \f
2129 Internet-Draft    Password Policy for LDAP Directories         July 2014
2130
2131
2132 10.  Administration of the Password Policy
2133
2134    {TODO: Need to define an administrativeRole (need OID).  Need to
2135    describe whether pwdPolicy admin areas can overlap}
2136
2137    A password policy is defined for a particular subtree of the DIT by
2138    adding to an LDAP subentry whose immediate superior is the root of
2139    the subtree, the pwdPolicy auxiliary object class.  The scope of the
2140    password policy is defined by the SubtreeSpecification attribute of
2141    the LDAP subentry as specified in [RFC3672].
2142
2143    It is possible to define password policies for different password
2144    attributes within the same pwdPolicy entry, by specifying multiple
2145    values of the pwdAttribute.  But password policies could also be in
2146    separate sub entries as long as they are contained under the same
2147    LDAP subentry.
2148
2149    Only one policy may be in effect for a given password attribute in
2150    any entry.  If multiple policies exist which overlap in the range of
2151    entries affected, the resulting behavior is undefined.
2152
2153    Modifying the password policy MUST NOT result in any change in users'
2154    entries to which the policy applies.
2155
2156    It SHOULD be possible to overwrite the password policy for one user
2157    by defining a new policy in a subentry of the user entry.
2158
2159    Each object that is controlled by password policy advertises the
2160    subentry that is being used to control its policy in its
2161    pwdPolicySubentry attribute.  Clients wishing to examine or manage
2162    password policy for an object may interrogate the pwdPolicySubentry
2163    for that object in order to arrive at the proper pwdPolicy subentry.
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183 Sermersheim, et al.     Expires January 19, 2015               [Page 39]
2184 \f
2185 Internet-Draft    Password Policy for LDAP Directories         July 2014
2186
2187
2188 11.  Password Policy and Replication
2189
2190    {TODO: This section needs to be changed to highlight the pitfalls of
2191    replication, suggest some implementation choices to overcome those
2192    pitfalls, but remove prescriptive language relating to the update of
2193    state information}
2194
2195    The pwdPolicy object defines the password policy for a portion of the
2196    DIT and MUST be replicated on all the replicas of this subtree, as
2197    any subentry would be, in order to have a consistent policy among all
2198    replicated servers.
2199
2200    The elements of the password policy that are related to the users are
2201    stored in the entry themselves as operational attributes.  As these
2202    attributes are subject to modifications even on a read-only replica,
2203    replicating them must be carefully considered.
2204
2205    The pwdChangedTime attribute MUST be replicated on all replicas, to
2206    allow expiration of the password.
2207
2208    The pwdReset attribute MUST be replicated on all replicas, to deny
2209    access to operations other than bind and modify password.
2210
2211    The pwdHistory attribute MUST be replicated to writable replicas.  It
2212    doesn't have to be replicated to a read-only replica, since the
2213    password will never be directly modified on this server.
2214
2215    The pwdAccountLockedTime, pwdFailureTime and pwdGraceUseTime
2216    attributes SHOULD be replicated to writable replicas, making the
2217    password policy global for all servers.  When the user entry is
2218    replicated to a read-only replica, these attributes SHOULD NOT be
2219    replicated.  This means that the number of failures, of grace
2220    authentications and the locking will take place on each replicated
2221    server.  For example, the effective number of failed attempts on a
2222    user password will be N x M (where N is the number of servers and M
2223    the value of pwdMaxFailure attribute).  Replicating these attributes
2224    to a read-only replica MAY reduce the number of tries globally but
2225    MAY also introduce some inconstancies in the way the password policy
2226    is applied.
2227
2228    Note: there are some situations where global replication of these
2229    state attributes may not be desired.  For example, if two clusters of
2230    replicas are geographically remote and joined by a slow network link,
2231    and their users only login from one of the two locations, it may be
2232    unnecessary to propagate all of the state changes from one cluster to
2233    the other.  Servers SHOULD allow administrators to control which
2234    attributes are replicated on a case-by-case basis.
2235
2236
2237
2238
2239 Sermersheim, et al.     Expires January 19, 2015               [Page 40]
2240 \f
2241 Internet-Draft    Password Policy for LDAP Directories         July 2014
2242
2243
2244    Servers participating in a loosely consistent multi-master
2245    replication agreement SHOULD employ a mechanism which ensures
2246    uniqueness of values when populating the attributes pwdFailureTime
2247    and pwdGraceUseTime.  The method of achieving this is a local matter
2248    and may consist of using a single authoritative source for the
2249    generation of unique time values, or may consist of the use of the
2250    fractional seconds part to hold a replica identifier.
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295 Sermersheim, et al.     Expires January 19, 2015               [Page 41]
2296 \f
2297 Internet-Draft    Password Policy for LDAP Directories         July 2014
2298
2299
2300 12.  Security Considerations
2301
2302    This document defines a set of rules to implement in an LDAP server,
2303    in order to mitigate some of the security risks associated with the
2304    use of passwords and to make it difficult for password cracking
2305    programs to break into directories.
2306
2307    Authentication with a password MUST follow the recommendations made
2308    in [RFC4513].
2309
2310    Modifications of passwords SHOULD only occur when the connection is
2311    protected with confidentiality and secure authentication.
2312
2313    Access controls SHOULD be used to restrict access to the password
2314    policy attributes.  The attributes defined to maintain the password
2315    policy state information SHOULD only be modifiable by the password
2316    administrator or higher authority.  The pwdHistory attribute MUST be
2317    subject to the same level of access control as the attrbute holding
2318    the password.
2319
2320    As it is possible to define a password policy for one specific user
2321    by adding a subentry immediately under the user's entry, Access
2322    Controls SHOULD be used to restrict the use of the pwdPolicy object
2323    class or the LDAP subentry object class.
2324
2325    When the intruder detection password policy is enforced, the LDAP
2326    directory is subject to a denial of service attack.  A malicious user
2327    could deliberately lock out one specific user's account (or all of
2328    them) by sending bind requests with wrong passwords.  There is no way
2329    to protect against this kind of attack.  The LDAP directory server
2330    SHOULD log as much information as it can (such as client IP address)
2331    whenever an account is locked, in order to be able to identify the
2332    origin of the attack.  Denying anonymous access to the LDAP directory
2333    is also a way to restrict this kind of attack.  Using the login delay
2334    instead of the lockout mechanism will also help avoid this denial of
2335    service.
2336
2337    Returning certain status codes (such as passwordPolicyResponse.error
2338    = accountLocked) allows a denial of service attacker to know that it
2339    has successfully denied service to an account.  Servers SHOULD
2340    implement additional checks which return the same status when it is
2341    sensed that some number of failed authentication requests has occured
2342    on a single connection, or from a client address.  Server
2343    implementors are encouraged to invent other checks similar to this in
2344    order to thwart this type of DoS attack.
2345
2346
2347
2348
2349
2350
2351 Sermersheim, et al.     Expires January 19, 2015               [Page 42]
2352 \f
2353 Internet-Draft    Password Policy for LDAP Directories         July 2014
2354
2355
2356 13.  IANA Considerations
2357
2358    In accordance with [RFC4520] the following registrations are
2359    requested.
2360
2361 13.1.  Object Identifiers
2362
2363    The OIDs used in this specification are derived from iso(1)
2364    identified-organization(3) dod(6) internet(1) private(4)
2365    enterprise(1) Sun(42) products(2) LDAP(27) ppolicy(8).  These OIDs
2366    have been in use since at least July 2001 when version 04 of this
2367    draft was published.  No additional OID assignment is being
2368    requested.
2369
2370 13.2.  LDAP Protocol Mechanisms
2371
2372    Registration of the protocol mechanisms specified in this document is
2373    requested.
2374
2375       Subject: Request for LDAP Protocol Mechanism Registration
2376
2377       Object Identifier: 1.3.6.1.4.1.42.2.27.8.5.1
2378
2379       Description: Password Policy Request and Response Control
2380
2381       Person & email address to contact for further information:
2382
2383          Howard Chu <hyc@symas.com>
2384
2385       Usage: Control
2386
2387       Specification: (I-D) draft-behera-ldap-password-policy
2388
2389       Author/Change Controller: IESG
2390
2391       Comments:
2392
2393 13.3.  LDAP Descriptors
2394
2395    Registration of the descriptors specified in this document is
2396    requested.
2397
2398       Subject: Request for LDAP Descriptor Registration
2399
2400       Descriptor (short name): see table
2401
2402       Object Identifier: see table
2403
2404
2405
2406
2407 Sermersheim, et al.     Expires January 19, 2015               [Page 43]
2408 \f
2409 Internet-Draft    Password Policy for LDAP Directories         July 2014
2410
2411
2412       Description: see table
2413
2414       Person & email address to contact for further information:
2415
2416          Howard Chu <hyc@symas.com>
2417
2418       Specification: (I-D) draft-behera-ldap-password-policy
2419
2420       Author/Change Controller: IESG
2421
2422       Comments:
2423
2424       Name                    Type  OID
2425       ----------------------- ----  ------------------------------
2426       pwdPolicy               O     1.3.6.1.4.1.42.2.27.8.2.1
2427       pwdAttribute            A     1.3.6.1.4.1.42.2.27.8.1.1
2428       pwdMinAge               A     1.3.6.1.4.1.42.2.27.8.1.2
2429       pwdMaxAge               A     1.3.6.1.4.1.42.2.27.8.1.3
2430       pwdInHistory            A     1.3.6.1.4.1.42.2.27.8.1.4
2431       pwdCheckQuality         A     1.3.6.1.4.1.42.2.27.8.1.5
2432       pwdMinLength            A     1.3.6.1.4.1.42.2.27.8.1.6
2433       pwdMaxLength            A     1.3.6.1.4.1.42.2.27.8.1.31
2434       pwdExpireWarning        A     1.3.6.1.4.1.42.2.27.8.1.7
2435       pwdGraceAuthNLimit      A     1.3.6.1.4.1.42.2.27.8.1.8
2436       pwdGraceExpiry          A     1.3.6.1.4.1.42.2.27.8.1.30
2437       pwdLockout              A     1.3.6.1.4.1.42.2.27.8.1.9
2438       pwdLockoutDuration      A     1.3.6.1.4.1.42.2.27.8.1.10
2439       pwdMaxFailure           A     1.3.6.1.4.1.42.2.27.8.1.11
2440       pwdFailureCountInterval A     1.3.6.1.4.1.42.2.27.8.1.12
2441       pwdMustChange           A     1.3.6.1.4.1.42.2.27.8.1.13
2442       pwdAllowUserChange      A     1.3.6.1.4.1.42.2.27.8.1.14
2443       pwdSafeModify           A     1.3.6.1.4.1.42.2.27.8.1.15
2444       pwdMinDelay             A     1.3.6.1.4.1.42.2.27.8.1.24
2445       pwdMaxDelay             A     1.3.6.1.4.1.42.2.27.8.1.25
2446       pwdMaxIdle              A     1.3.6.1.4.1.42.2.27.8.1.26
2447       pwdChangedTime          A     1.3.6.1.4.1.42.2.27.8.1.16
2448       pwdAccountLockedTime    A     1.3.6.1.4.1.42.2.27.8.1.17
2449       pwdFailureTime          A     1.3.6.1.4.1.42.2.27.8.1.19
2450       pwdHistory              A     1.3.6.1.4.1.42.2.27.8.1.20
2451       pwdGraceUseTime         A     1.3.6.1.4.1.42.2.27.8.1.21
2452       pwdReset                A     1.3.6.1.4.1.42.2.27.8.1.22
2453       pwdPolicySubEntry       A     1.3.6.1.4.1.42.2.27.8.1.23
2454       pwdStartTime            A     1.3.6.1.4.1.42.2.27.8.1.27
2455       pwdEndTime              A     1.3.6.1.4.1.42.2.27.8.1.28
2456       pwdLastSuccess          A     1.3.6.1.4.1.42.2.27.8.1.29
2457
2458
2459
2460
2461
2462
2463 Sermersheim, et al.     Expires January 19, 2015               [Page 44]
2464 \f
2465 Internet-Draft    Password Policy for LDAP Directories         July 2014
2466
2467
2468       Legend
2469       --------------------
2470       A => Attribute Type
2471       O => Object Class
2472
2473 13.4.  LDAP AttributeDescription Options
2474
2475    Registration of the AttributeDescription option specified in this
2476    document is requested.
2477
2478       Subject: Request for LDAP Attribute Description Option
2479       Registration
2480
2481       Option Name: pwd-
2482
2483       Family of Options: YES
2484
2485       Person & email address to contact for further information:
2486
2487          Howard Chu <hyc@symas.com>
2488
2489       Specification: (I-D) draft-behera-ldap-password-policy
2490
2491       Author/Change Controller: IESG
2492
2493       Comments:
2494
2495          Used with policy state attributes to specify to which password
2496          attribute the state belongs.
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519 Sermersheim, et al.     Expires January 19, 2015               [Page 45]
2520 \f
2521 Internet-Draft    Password Policy for LDAP Directories         July 2014
2522
2523
2524 14.  Acknowledgement
2525
2526    This document is based in part on prior work done by Valerie Chu from
2527    Netscape Communications Corp, published as
2528    draft-vchu-ldap-pwd-policy-00.txt (December 1998).  Prasanta Behera
2529    participated in early revisions of this document.
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575 Sermersheim, et al.     Expires January 19, 2015               [Page 46]
2576 \f
2577 Internet-Draft    Password Policy for LDAP Directories         July 2014
2578
2579
2580 15.  Normative References
2581
2582    [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
2583               Requirement Levels", BCP 14, RFC 2119, March 1997.
2584
2585    [RFC2195]  Klensin, J., Catoe, R., and P. Krumviede, "IMAP/POP
2586               AUTHorize Extension for Simple Challenge/Response",
2587               RFC 2195, September 1997.
2588
2589    [RFC2831]  Leach, P. and C. Newman, "Using Digest Authentication as a
2590               SASL Mechanism", RFC 2831, May 2000.
2591
2592    [RFC3062]  Zeilenga, K., "LDAP Password Modify Extended Operation",
2593               RFC 3062, February 2001.
2594
2595    [RFC3672]  Zeilenga, K., "Subentries in the Lightweight Directory
2596               Access Protocol (LDAP)", RFC 3672, December 2003.
2597
2598    [RFC4422]  Melnikov, A. and K. Zeilenga, "Simple Authentication and
2599               Security Layer (SASL)", RFC 4422, June 2006.
2600
2601    [RFC4511]  Sermersheim, J., "Lightweight Directory Access Protocol
2602               (LDAP): The Protocol", RFC 4511, June 2006.
2603
2604    [RFC4512]  Zeilenga, K., "Lightweight Directory Access Protocol
2605               (LDAP): Directory Information Models", RFC 4512,
2606               June 2006.
2607
2608    [RFC4513]  Harrison, R., "Lightweight Directory Access Protocol
2609               (LDAP): Authentication Methods and Security Mechanisms",
2610               RFC 4513, June 2006.
2611
2612    [RFC4517]  Legg, S., "Lightweight Directory Access Protocol (LDAP):
2613               Syntaxes and Matching Rules", RFC 4517, June 2006.
2614
2615    [RFC4520]  Zeilenga, K., "Internet Assigned Numbers Authority (IANA)
2616               Considerations for the Lightweight Directory Access
2617               Protocol (LDAP)", BCP 64, RFC 4520, June 2006.
2618
2619    [X.680]    International Telecommunications Union, "Abstract Syntax
2620               Notation One (ASN.1): Specification of basic notation",
2621               ITU-T Recommendation X.680, July 2002.
2622
2623    [X.690]    International Telecommunications Union, "Information
2624               Technology - ASN.1 encoding rules: Specification of Basic
2625               Encoding Rules (BER),  Canonical Encoding Rules (CER) and
2626               Distinguished Encoding Rules (DER)", ITU-T
2627               Recommendation X.690, July 2002.
2628
2629
2630
2631 Sermersheim, et al.     Expires January 19, 2015               [Page 47]
2632 \f
2633 Internet-Draft    Password Policy for LDAP Directories         July 2014
2634
2635
2636 Authors' Addresses
2637
2638    Jim Sermersheim
2639    Novell, Inc
2640    1800 South Novell Place
2641    Provo, Utah  84606
2642    US
2643
2644    Phone: +1 801 861-3088
2645    Email: jimse@novell.com
2646
2647
2648    Ludovic Poitou
2649    Sun Microsystems
2650    180, Avenue de l'Europe
2651    Zirst de Montbonnot, Saint Ismier cedex  38334
2652    FR
2653
2654    Phone: +33 476 188 212
2655    Email: ludovic.poitou@sun.com
2656
2657
2658    Howard Chu (editor)
2659    Symas Corp.
2660    18740 Oxnard Street, Suite 313A
2661    Tarzana, California  91356
2662    US
2663
2664    Phone: +1 818 757-7087
2665    Email: hyc@symas.com
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687 Sermersheim, et al.     Expires January 19, 2015               [Page 48]
2688 \f