1 2 3 4 5Network Working Group J. Sermersheim 6Internet-Draft Novell, Inc 7Expires: January 18, 2006 L. Poitou 8 Sun Microsystems 9 July 17, 2005 10 11 12 Password Policy for LDAP Directories 13 draft-behera-ldap-password-policy-09.txt 14 15Status of this Memo 16 17 By submitting this Internet-Draft, each author represents that any 18 applicable patent or other IPR claims of which he or she is aware 19 have been or will be disclosed, and any of which he or she becomes 20 aware will be disclosed, in accordance with Section 6 of BCP 79. 21 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that 24 other groups may also distribute working documents as Internet- 25 Drafts. 26 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 31 32 The list of current Internet-Drafts can be accessed at 33 http://www.ietf.org/ietf/1id-abstracts.txt. 34 35 The list of Internet-Draft Shadow Directories can be accessed at 36 http://www.ietf.org/shadow.html. 37 38 This Internet-Draft will expire on January 18, 2006. 39 40Copyright Notice 41 42 Copyright (C) The Internet Society (2005). 43 44Abstract 45 46 Password policy as described in this document is a set of rules that 47 controls how passwords are used and administered in Lightweight 48 Directory Access Protocol (LDAP) based directories. In order to 49 improve the security of LDAP directories and make it difficult for 50 password cracking programs to break into directories, it is desirable 51 to enforce a set of rules on password usage. These rules are made to 52 ensure that users change their passwords periodically, passwords meet 53 54 55 56Sermersheim & Poitou Expires January 18, 2006 [Page 1] 57 58Internet-Draft Password Policy for LDAP Directories July 2005 59 60 61 construction requirements, the re-use of old password is restricted, 62 and users are locked out after a certain number of failed attempts. 63 64Discussion Forum 65 66 Technical discussion of this document will take place on the IETF 67 LDAP Extensions mailing list <ldapext@ietf.org>. Please send 68 editorial comments directly to the authors. 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 112Sermersheim & Poitou Expires January 18, 2006 [Page 2] 113 114Internet-Draft Password Policy for LDAP Directories July 2005 115 116 117Table of Contents 118 119 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 120 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 5 121 3. Application of password policy . . . . . . . . . . . . . . . . 6 122 4. Articles of password policy . . . . . . . . . . . . . . . . . 7 123 4.1 Password Usage Policy . . . . . . . . . . . . . . . . . . . . 7 124 4.2 Password Modification Policy . . . . . . . . . . . . . . . . . 7 125 4.3 Restriction of the Password Policy . . . . . . . . . . . . . . 10 126 5. Schema used for Password Policy . . . . . . . . . . . . . . . 11 127 5.1 The pwdPolicy Object Class . . . . . . . . . . . . . . . . . . 11 128 5.2 Attribute Types used in the pwdPolicy ObjectClass . . . . . . 11 129 5.3 Attribute Types for Password Policy State Information . . . . 16 130 6. Controls used for Password Policy . . . . . . . . . . . . . . 21 131 6.1 Request Control . . . . . . . . . . . . . . . . . . . . . . . 21 132 6.2 Response Control . . . . . . . . . . . . . . . . . . . . . . . 21 133 7. Policy Decision Points . . . . . . . . . . . . . . . . . . . . 23 134 7.1 Locked Account Check . . . . . . . . . . . . . . . . . . . . . 23 135 7.2 Password Must be Changed Now Check . . . . . . . . . . . . . . 23 136 7.3 Password Expiration Check . . . . . . . . . . . . . . . . . . 23 137 7.4 Remaining Grace AuthN Check . . . . . . . . . . . . . . . . . 23 138 7.5 Time Before Expiration Check . . . . . . . . . . . . . . . . . 24 139 7.6 Intruder Detection Check . . . . . . . . . . . . . . . . . . . 24 140 7.7 Password Too Young Check . . . . . . . . . . . . . . . . . . . 24 141 8. Server Policy Enforcement Points . . . . . . . . . . . . . . . 25 142 8.1 Password-based Authentication . . . . . . . . . . . . . . . . 25 143 8.2 Password Update Operations . . . . . . . . . . . . . . . . . . 27 144 8.3 Other Operations . . . . . . . . . . . . . . . . . . . . . . . 30 145 9. Client Policy Enforcement Points . . . . . . . . . . . . . . . 31 146 9.1 Bind Operation . . . . . . . . . . . . . . . . . . . . . . . . 31 147 9.2 Modify Operations . . . . . . . . . . . . . . . . . . . . . . 32 148 9.3 Add Operation . . . . . . . . . . . . . . . . . . . . . . . . 33 149 9.4 Compare Operation . . . . . . . . . . . . . . . . . . . . . . 33 150 9.5 Other Operations . . . . . . . . . . . . . . . . . . . . . . . 34 151 10. Administration of the Password Policy . . . . . . . . . . . . 35 152 11. Password Policy and Replication . . . . . . . . . . . . . . . 36 153 12. Security Considerations . . . . . . . . . . . . . . . . . . . 37 154 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 38 155 14. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 39 156 15. Normative References . . . . . . . . . . . . . . . . . . . . . 39 157 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 40 158 Intellectual Property and Copyright Statements . . . . . . . . 41 159 160 161 162 163 164 165 166 167 168Sermersheim & Poitou Expires January 18, 2006 [Page 3] 169 170Internet-Draft Password Policy for LDAP Directories July 2005 171 172 1731. Overview 174 175 LDAP-based directory services are currently accepted by many 176 organizations as the access protocol for directories. The ability to 177 ensure the secure read and update access to directory information 178 throughout the network is essential to the successful deployment. 179 Most LDAP implementations support many authentication schemes - the 180 most basic and widely used is the simple authentication i.e., user DN 181 and password. In this case, many LDAP servers have implemented some 182 kind of policy related to the password used to authenticate. Among 183 other things, this policy includes: 184 185 o Whether and when passwords expire. 186 187 o Whether failed bind attempts cause the account to be locked. 188 189 o If and how users are able to change their passwords. 190 191 In order to achieve greater security protection and ensure 192 interoperability in a heterogeneous environment, LDAP needs to 193 standardize on a common password policy model. This is critical to 194 the successful deployment of LDAP directories. 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 224Sermersheim & Poitou Expires January 18, 2006 [Page 4] 225 226Internet-Draft Password Policy for LDAP Directories July 2005 227 228 2292. Conventions 230 231 Imperative keywords defined in [RFC2119] are used in this document, 232 and carry the meanings described there. 233 234 All Basic Encoding Rules (BER) [X690] encodings follow the 235 conventions found in Section 5.1 of [RFC2251]. 236 237 The term "password administrator" refers to a user that has 238 sufficient access control privileges to modify users' passwords. The 239 term "password policy administrator" refers to a user that has 240 sufficient access control privileges to modify the pwdPolicy object 241 defined in this document. The access control that is used to 242 determine whether an identity is a password administrator or password 243 policy administrator is beyond the scope of this document, but 244 typically implies that the password administrator has 'write' 245 privileges to the password attribute. 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 280Sermersheim & Poitou Expires January 18, 2006 [Page 5] 281 282Internet-Draft Password Policy for LDAP Directories July 2005 283 284 2853. Application of password policy 286 287 The password policy defined in this document can be applied to any 288 attribute holding a user's password used for an authenticated LDAP 289 bind operation. In this document, the term "user" represents any 290 LDAP client application that has an identity in the directory. 291 292 This policy is typically applied to the userPassword attribute in the 293 case of the LDAP simple authentication method [RFC2251] or the case 294 of password based SASL [RFC2222] authentication such as CRAM-MD5 295 [RFC2195] and DIGEST-MD5 [RFC2831]. 296 297 The policy described in this document assumes that the password 298 attribute holds a single value. No considerations are made for 299 directories or systems that allow a user to maintain multi-valued 300 password attributes. 301 302 Server implementations MAY institute internal policy whereby certain 303 identities (such as directory administrators) are not forced to 304 comply with any of password policy. In this case, the password for a 305 directory administrator never expires; the account is never locked, 306 etc. 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 336Sermersheim & Poitou Expires January 18, 2006 [Page 6] 337 338Internet-Draft Password Policy for LDAP Directories July 2005 339 340 3414. Articles of password policy 342 343 The following sections explain in general terms each aspect of the 344 password policy defined in this document as well as the need for 345 each. These policies are subdivided into the general groups of 346 password usage and password modification. Implementation details are 347 presented in Section 8 and Section 9. 348 3494.1 Password Usage Policy 350 351 This section describes policy enforced when a password is used to 352 authenticate. The general focus of this policy is to minimize the 353 threat of intruders once a password is in use. 354 3554.1.1 Password Guessing Limit 356 357 In order to prevent intruders from guessing a user's password, a 358 mechanism exists to track the number of consecutive failed 359 authentication attempts, and take action when a limit is reached. 360 This policy consists of five parts: 361 362 o A configurable limit on failed authentication attempts. 363 364 o A counter to track the number of failed authentication attempts. 365 366 o A timeframe in which the limit of consecutive failed 367 authentication attempts must happen before action is taken. 368 369 o The action to be taken when the limit is reached. The action will 370 either be nothing, or the account will be locked. 371 372 o An amount of time the account is locked (if it is to be locked). 373 This can be indefinite. 374 375 3764.2 Password Modification Policy 377 378 This section describes policy enforced while users are modifying 379 passwords. The general focus of this policy is to ensure that when 380 users add or change their passwords, the security and effectiveness 381 of their passwords is maximized. In this document, the term "modify 382 password operation" refers to any operation that is used to add or 383 modify a password attribute. Often this is done by updating the 384 password attribute during an add or modify operation, but MAY be done 385 by other means such as an extended operation. 386 387 388 389 390 391 392Sermersheim & Poitou Expires January 18, 2006 [Page 7] 393 394Internet-Draft Password Policy for LDAP Directories July 2005 395 396 3974.2.1 Password Expiration, Expiration Warning, and Grace 398 Authentications 399 400 One of the key properties of a password is the fact that it is not 401 well known. If a password is frequently changed, the chances of that 402 user's account being broken into are minimized. 403 404 Password policy administrators may deploy a password policy that 405 causes passwords to expire after a given amount of time - thus 406 forcing users to change their passwords periodically. 407 408 As a side effect, there needs to be a way in which users are made 409 aware of this need to change their password before actually being 410 locked out of their accounts. One or both of the following methods 411 handle this: 412 413 o A warning may be returned to the user sometime before his password 414 is due to expire. If the user fails to heed this warning before 415 the expiration time, his account will be locked. 416 417 o The user may bind to the directory a preset number of times after 418 her password has expired. If she fails to change her password 419 during one of her 'grace' authentications, her account will be 420 locked. 421 422 4234.2.2 Password History 424 425 When the Password Expiration policy is used, an additional mechanism 426 may be employed to prevent users from simply re-using a previous 427 password (as this would effectively circumvent the expiration 428 policy). 429 430 In order to do this; a history of used passwords is kept. The 431 password policy administrator sets the number of passwords to be 432 stored at any given time. Passwords are stored in this history 433 whenever the password is changed. Users aren't allowed to specify 434 any passwords that are in the history list while changing passwords. 435 4364.2.3 Password Minimum Age 437 438 Users may circumvent the Password History mechanism by quickly 439 performing a series of password changes. If they change their 440 password enough times, their 'favorite' password will be pushed out 441 of the history list. 442 443 This process may be made less attractive to users by employing a 444 minimum age for passwords. If users are forced to wait 24 hours 445 446 447 448Sermersheim & Poitou Expires January 18, 2006 [Page 8] 449 450Internet-Draft Password Policy for LDAP Directories July 2005 451 452 453 between password changes, they may be less likely to cycle through a 454 history of 10 passwords. 455 4564.2.4 Password Quality and Minimum length 457 458 In order to prevent users from creating or updating passwords that 459 are easy to guess, a password quality policy may be employed. This 460 policy consists of two general mechanisms - ensuring that passwords 461 conform to a defined quality criterion and ensuring that they are of 462 a minimum length. 463 464 Forcing a password to comply with the quality policy may imply a 465 variety of things including: 466 467 o Disallowing trivial or well-known words make up the password. 468 469 o Forcing a certain number of digits be used. 470 471 o Disallowing anagrams of the user's name. 472 473 The implementation of this policy meets with the following problems: 474 475 o If the password to be added or updated is encrypted by the client 476 before being sent, the server has no way of enforcing this policy. 477 Therefore, the onus of enforcing this policy falls upon client 478 implementations. 479 480 o There are no specific definitions of what 'quality checking' 481 means. This can lead to unexpected behavior in a heterogeneous 482 environment. 483 484 4854.2.5 User Defined Passwords 486 487 In some cases, it is desirable to disallow users from adding and 488 updating their own passwords. This policy makes this functionality 489 possible. 490 4914.2.6 Password Change after Reset 492 493 This policy forces the user to update her password after it has been 494 set for the first time, or has been reset by a password 495 administrator. 496 497 This is needed in scenarios where a password administrator has set or 498 reset the password to a well-known value. 499 500 501 502 503 504Sermersheim & Poitou Expires January 18, 2006 [Page 9] 505 506Internet-Draft Password Policy for LDAP Directories July 2005 507 508 5094.2.7 Safe Modification 510 511 As directories become more commonly used, it will not be unusual for 512 clients to connect to a directory and leave the connection open for 513 an extended period. This opens up the possibility for an intruder to 514 make modifications to a user's password while that user's computer is 515 connected but unattended. 516 517 This policy forces the user to prove his identity by specifying the 518 old password during a password modify operation. 519 520 {TODO: This allows a dictionary attack unless we specify that this is 521 also subject to intruder detection. One solution is to require users 522 to authN prior to changing password. Another solution is to perform 523 intruder detection checks when the password for a non-authenticated 524 identity is being updated} 525 5264.3 Restriction of the Password Policy 527 528 The password policy defined in this document can apply to any 529 attribute containing a password. Password policy state information 530 is held in the user's entry, and applies to a password attribute, not 531 a particular password attribute value. Thus the server SHOULD 532 enforce that the password attribute subject to password policy, 533 contains one and only one password value. 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560Sermersheim & Poitou Expires January 18, 2006 [Page 10] 561 562Internet-Draft Password Policy for LDAP Directories July 2005 563 564 5655. Schema used for Password Policy 566 567 The schema elements defined here fall into two general categories. A 568 password policy object class is defined which contains a set of 569 administrative password policy attributes, and a set of operational 570 attributes are defined that hold general password policy state 571 information for each user. 572 5735.1 The pwdPolicy Object Class 574 575 This object class contains the attributes defining a password policy 576 in effect for a set of users. Section 10 describes the 577 administration of this object, and the relationship between it and 578 particular objects. 579 580 ( 1.3.6.1.4.1.42.2.27.8.2.1 581 NAME 'pwdPolicy' 582 SUP top 583 AUXILIARY 584 MUST ( pwdAttribute ) 585 MAY ( pwdMinAge $ pwdMaxAge $ pwdInHistory $ pwdCheckQuality $ 586 pwdMinLength $ pwdExpireWarning $ pwdGraceAuthNLimit $ pwdLockout 587 $ pwdLockoutDuration $ pwdMaxFailure $ pwdFailureCountInterval $ 588 pwdMustChange $ pwdAllowUserChange $ pwdSafeModify ) ) 589 590 5915.2 Attribute Types used in the pwdPolicy ObjectClass 592 593 Following are the attribute types used by the pwdPolicy object class. 594 5955.2.1 pwdAttribute 596 597 This holds the name of the attribute to which the password policy is 598 applied. For example, the password policy may be applied to the 599 userPassword attribute. 600 601 ( 1.3.6.1.4.1.42.2.27.8.1.1 602 NAME 'pwdAttribute' 603 EQUALITY objectIdentifierMatch 604 SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 ) 605 606 6075.2.2 pwdMinAge 608 609 This attribute holds the number of seconds that must elapse between 610 modifications to the password. If this attribute is not present, 0 611 seconds is assumed. 612 613 614 615 616Sermersheim & Poitou Expires January 18, 2006 [Page 11] 617 618Internet-Draft Password Policy for LDAP Directories July 2005 619 620 621 ( 1.3.6.1.4.1.42.2.27.8.1.2 622 NAME 'pwdMinAge' 623 EQUALITY integerMatch 624 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 625 SINGLE-VALUE ) 626 627 6285.2.3 pwdMaxAge 629 630 This attribute holds the number of seconds after which a modified 631 password will expire. 632 633 If this attribute is not present, or if the value is 0 the password 634 does not expire. If not 0, the value must be greater than or equal 635 to the value of the pwdMinAge. 636 637 ( 1.3.6.1.4.1.42.2.27.8.1.3 638 NAME 'pwdMaxAge' 639 EQUALITY integerMatch 640 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 641 SINGLE-VALUE ) 642 643 6445.2.4 pwdInHistory 645 646 This attribute specifies the maximum number of used passwords stored 647 in the pwdHistory attribute. 648 649 If this attribute is not present, or if the value is 0, used 650 passwords are not stored in the pwdHistory attribute and thus may be 651 reused. 652 653 ( 1.3.6.1.4.1.42.2.27.8.1.4 654 NAME 'pwdInHistory' 655 EQUALITY integerMatch 656 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 657 SINGLE-VALUE ) 658 659 6605.2.5 pwdCheckQuality 661 662 {TODO: Consider changing the syntax to OID. Each OID will list a 663 quality rule (like min len, # of special characters, etc). These 664 rules can be specified outside this document.} 665 666 {TODO: Note that even though this is meant to be a check that happens 667 during password modification, it may also be allowed to happen during 668 authN. This is useful for situations where the password is encrypted 669 670 671 672Sermersheim & Poitou Expires January 18, 2006 [Page 12] 673 674Internet-Draft Password Policy for LDAP Directories July 2005 675 676 677 when modified, but decrypted when used to authN.} 678 679 This attribute indicates how the password quality will be verified 680 while being modified or added. If this attribute is not present, or 681 if the value is '0', quality checking will not be enforced. A value 682 of '1' indicates that the server will check the quality, and if the 683 server is unable to check it (due to a hashed password or other 684 reasons) it will be accepted. A value of '2' indicates that the 685 server will check the quality, and if the server is unable to verify 686 it, it will return an error refusing the password. 687 688 ( 1.3.6.1.4.1.42.2.27.8.1.5 689 NAME 'pwdCheckQuality' 690 EQUALITY integerMatch 691 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 692 SINGLE-VALUE ) 693 694 6955.2.6 pwdMinLength 696 697 When quality checking is enabled, this attribute holds the minimum 698 number of characters that must be used in a password. If this 699 attribute is not present, no minimum password length will be 700 enforced. If the server is unable to check the length (due to a 701 hashed password or otherwise), the server will, depending on the 702 value of the pwdCheckQuality attribute, either accept the password 703 without checking it ('0' or '1') or refuse it ('2'). 704 705 ( 1.3.6.1.4.1.42.2.27.8.1.6 706 NAME 'pwdMinLength' 707 EQUALITY integerMatch 708 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 709 SINGLE-VALUE ) 710 711 7125.2.7 pwdExpireWarning 713 714 This attribute specifies the maximum number of seconds before a 715 password is due to expire that expiration warning messages will be 716 returned to an authenticating user. 717 718 If this attribute is not present, or if the value is 0 no warnings 719 will be returned. If not 0, the value must be smaller than the value 720 of the pwdMaxAge attribute. 721 722 ( 1.3.6.1.4.1.42.2.27.8.1.7 723 NAME 'pwdExpireWarning' 724 EQUALITY integerMatch 725 726 727 728Sermersheim & Poitou Expires January 18, 2006 [Page 13] 729 730Internet-Draft Password Policy for LDAP Directories July 2005 731 732 733 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 734 SINGLE-VALUE ) 735 736 7375.2.8 pwdGraceAuthNLimit 738 739 This attribute specifies the number of times an expired password can 740 be used to authenticate. If this attribute is not present or if the 741 value is 0, authentication will fail. 742 743 ( 1.3.6.1.4.1.42.2.27.8.1.8 744 NAME 'pwdGraceAuthNLimit' 745 EQUALITY integerMatch 746 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 747 SINGLE-VALUE ) 748 749 7505.2.9 pwdLockout 751 752 This attribute indicates, when its value is "TRUE", that the password 753 may not be used to authenticate after a specified number of 754 consecutive failed bind attempts. The maximum number of consecutive 755 failed bind attempts is specified in pwdMaxFailure. 756 757 If this attribute is not present, or if the value is "FALSE", the 758 password may be used to authenticate when the number of failed bind 759 attempts has been reached. 760 761 ( 1.3.6.1.4.1.42.2.27.8.1.9 762 NAME 'pwdLockout' 763 EQUALITY booleanMatch 764 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 765 SINGLE-VALUE ) 766 767 7685.2.10 pwdLockoutDuration 769 770 This attribute holds the number of seconds that the password cannot 771 be used to authenticate due to too many failed bind attempts. If 772 this attribute is not present, or if the value is 0 the password 773 cannot be used to authenticate until reset by a password 774 administrator. 775 776 ( 1.3.6.1.4.1.42.2.27.8.1.10 777 NAME 'pwdLockoutDuration' 778 EQUALITY integerMatch 779 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 780 SINGLE-VALUE ) 781 782 783 784Sermersheim & Poitou Expires January 18, 2006 [Page 14] 785 786Internet-Draft Password Policy for LDAP Directories July 2005 787 788 7895.2.11 pwdMaxFailure 790 791 This attribute specifies the number of consecutive failed bind 792 attempts after which the password may not be used to authenticate. 793 If this attribute is not present, or if the value is 0, this policy 794 is not checked, and the value of pwdLockout will be ignored. 795 796 ( 1.3.6.1.4.1.42.2.27.8.1.11 797 NAME 'pwdMaxFailure' 798 EQUALITY integerMatch 799 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 800 SINGLE-VALUE ) 801 802 8035.2.12 pwdFailureCountInterval 804 805 This attribute holds the number of seconds after which the password 806 failures are purged from the failure counter, even though no 807 successful authentication occurred. 808 809 If this attribute is not present, or if its value is 0, the failure 810 counter is only reset by a successful authentication. 811 812 ( 1.3.6.1.4.1.42.2.27.8.1.12 813 NAME 'pwdFailureCountInterval' 814 EQUALITY integerMatch 815 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 816 SINGLE-VALUE ) 817 818 8195.2.13 pwdMustChange 820 821 This attribute specifies with a value of "TRUE" that users must 822 change their passwords when they first bind to the directory after a 823 password is set or reset by a password administrator. If this 824 attribute is not present, or if the value is "FALSE", users are not 825 required to change their password upon binding after the password 826 administrator sets or resets the password. This attribute is not set 827 due to any actions specified by this document, it is typically set by 828 a password administrator after resetting a user's password. 829 830 ( 1.3.6.1.4.1.42.2.27.8.1.13 831 NAME 'pwdMustChange' 832 EQUALITY booleanMatch 833 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 834 SINGLE-VALUE ) 835 836 837 838 839 840Sermersheim & Poitou Expires January 18, 2006 [Page 15] 841 842Internet-Draft Password Policy for LDAP Directories July 2005 843 844 8455.2.14 pwdAllowUserChange 846 847 This attribute indicates whether users can change their own 848 passwords, although the change operation is still subject to access 849 control. If this attribute is not present, a value of "TRUE" is 850 assumed. This attribute is intended to be used in the absense of an 851 access control mechanism. 852 853 ( 1.3.6.1.4.1.42.2.27.8.1.14 854 NAME 'pwdAllowUserChange' 855 EQUALITY booleanMatch 856 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 857 SINGLE-VALUE ) 858 859 8605.2.15 pwdSafeModify 861 862 This attribute specifies whether or not the existing password must be 863 sent along with the new password when being changed. If this 864 attribute is not present, a "FALSE" value is assumed. 865 866 ( 1.3.6.1.4.1.42.2.27.8.1.15 867 NAME 'pwdSafeModify' 868 EQUALITY booleanMatch 869 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 870 SINGLE-VALUE ) 871 872 8735.3 Attribute Types for Password Policy State Information 874 875 Password policy state information must be maintained for each user. 876 The information is located in each user entry as a set of operational 877 attributes. These operational attributes are: pwdChangedTime, 878 pwdAccountLockedTime, pwdFailureTime, pwdHistory, pwdGraceUseTime, 879 pwdReset, pwdPolicySubEntry. 880 8815.3.1 Password Policy State Attribute Option 882 883 Since the password policy could apply to several attributes used to 884 store passwords, each of the above operational attributes must have 885 an option to specify which pwdAttribute it applies to. The password 886 policy option is defined as the following: 887 888 pwd-<passwordAttribute> 889 890 where passwordAttribute a string following the OID syntax 891 (1.3.6.1.4.1.1466.115.121.1.38). The attribute type descriptor 892 (short name) MUST be used. 893 894 895 896Sermersheim & Poitou Expires January 18, 2006 [Page 16] 897 898Internet-Draft Password Policy for LDAP Directories July 2005 899 900 901 For example, if the pwdPolicy object has for pwdAttribute 902 "userPassword" then the pwdChangedTime operational attribute, in a 903 user entry, will be: 904 905 pwdChangedTime;pwd-userPassword: 20000103121520Z 906 907 This attribute option follows sub-typing semantics. If a client 908 requests a password policy state attribute to be returned in a search 909 operation, and does not specify an option, all subtypes of that 910 policy state attribute are returned. 911 9125.3.2 pwdChangedTime 913 914 This attribute specifies the last time the entry's password was 915 changed. This is used by the password expiration policy. If this 916 attribute does not exist, the password will never expire. 917 918 ( 1.3.6.1.4.1.42.2.27.8.1.16 919 NAME 'pwdChangedTime' 920 DESC 'The time the password was last changed' 921 EQUALITY generalizedTimeMatch 922 ORDERING generalizedTimeOrderingMatch 923 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 924 SINGLE-VALUE 925 NO-USER-MODIFICATION 926 USAGE directoryOperation ) 927 928 9295.3.3 pwdAccountLockedTime 930 931 This attribute holds the time that the user's account was locked. A 932 locked account means that the password may no longer be used to 933 authenticate. A 000001010000Z value means that the account has been 934 locked permanently, and that only a password administrator can unlock 935 the account. 936 937 ( 1.3.6.1.4.1.42.2.27.8.1.17 938 NAME 'pwdAccountLockedTime' 939 DESC 'The time an user account was locked' 940 EQUALITY generalizedTimeMatch 941 ORDERING generalizedTimeOrderingMatch 942 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 943 SINGLE-VALUE 944 NO-USER-MODIFICATION 945 USAGE directoryOperation ) 946 947 948 949 950 951 952Sermersheim & Poitou Expires January 18, 2006 [Page 17] 953 954Internet-Draft Password Policy for LDAP Directories July 2005 955 956 9575.3.4 pwdFailureTime 958 959 This attribute holds the timestamps of the consecutive authentication 960 failures. 961 962 ( 1.3.6.1.4.1.42.2.27.8.1.19 963 NAME 'pwdFailureTime' 964 DESC 'The timestamps of the last consecutive authentication 965 failures' 966 EQUALITY generalizedTimeMatch 967 ORDERING generalizedTimeOrderingMatch 968 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 969 NO-USER-MODIFICATION 970 USAGE directoryOperation ) 971 972 9735.3.5 pwdHistory 974 975 This attribute holds a history of previously used passwords. Values 976 of this attribute are transmitted in string format as given by the 977 following ABNF: 978 979 pwdHistory = time "#" syntaxOID "#" length "#" data 980 981 time = <generalizedTimeString as specified in 6.14 982 of [RFC2252]> 983 984 syntaxOID = numericoid ; the string representation of the 985 ; dotted-decimal OID that defines the 986 ; syntax used to store the password. 987 ; numericoid is described in 4.1 988 ; of [RFC2252]. 989 990 length = numericstring ; the number of octets in data. 991 ; numericstring is described in 4.1 992 ; of [RFC2252]. 993 994 data = <octets representing the password in the format 995 specified by syntaxOID>. 996 997 This format allows the server to store, and transmit a history of 998 passwords that have been used. In order for equality matching to 999 function properly, the time field needs to adhere to a consistent 1000 format. For this purpose, the time field MUST be in GMT format. 1001 1002 ( 1.3.6.1.4.1.42.2.27.8.1.20 1003 NAME 'pwdHistory' 1004 DESC 'The history of user s passwords' 1005 1006 1007 1008Sermersheim & Poitou Expires January 18, 2006 [Page 18] 1009 1010Internet-Draft Password Policy for LDAP Directories July 2005 1011 1012 1013 EQUALITY octetStringMatch 1014 SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 1015 NO-USER-MODIFICATION 1016 USAGE directoryOperation ) 1017 1018 10195.3.6 pwdGraceUseTime 1020 1021 This attribute holds the timestamps of grace authentications after a 1022 password has expired. 1023 1024 ( 1.3.6.1.4.1.42.2.27.8.1.21 1025 NAME 'pwdGraceUseTime' 1026 DESC 'The timestamps of the grace authentication after the 1027 password has expired' 1028 EQUALITY generalizedTimeMatch 1029 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 1030 NO-USER-MODIFICATION 1031 USAGE directoryOperation ) 1032 1033 10345.3.7 pwdReset 1035 1036 This attribute holds a flag to indicate (when TRUE) that the password 1037 has been updated by the password administrator and must be changed by 1038 the user. 1039 1040 ( 1.3.6.1.4.1.42.2.27.8.1.22 1041 NAME 'pwdReset' 1042 DESC 'The indication that the password has been reset' 1043 EQUALITY booleanMatch 1044 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 1045 SINGLE-VALUE 1046 USAGE directoryOperation ) 1047 1048 10495.3.8 pwdPolicySubentry 1050 1051 This attribute points to the pwdPolicy subentry in effect for this 1052 object. 1053 1054 ( 1.3.6.1.4.1.42.2.27.8.1.23 1055 NAME 'pwdPolicySubentry' 1056 DESC 'The pwdPolicy subentry in effect for this object' 1057 EQUALITY distinguishedNameMatch 1058 SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 1059 SINGLE-VALUE 1060 NO-USER-MODIFICATION 1061 1062 1063 1064Sermersheim & Poitou Expires January 18, 2006 [Page 19] 1065 1066Internet-Draft Password Policy for LDAP Directories July 2005 1067 1068 1069 USAGE directoryOperation ) 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120Sermersheim & Poitou Expires January 18, 2006 [Page 20] 1121 1122Internet-Draft Password Policy for LDAP Directories July 2005 1123 1124 11256. Controls used for Password Policy 1126 1127 This section details the controls used while enforcing password 1128 policy. A request control is defined that is sent by a client with a 1129 request operation in order to elicit a response control. The 1130 response control contains various warnings and errors associated with 1131 password policy. 1132 1133 {TODO: add a note about advertisement and discovery} 1134 11356.1 Request Control 1136 1137 This control MAY be sent with any LDAP request message in order to 1138 convey to the server that this client is aware of, and can process 1139 the response control described in this document. When a server 1140 receives this control, it will return the response control when 1141 appropriate and with the proper data. 1142 1143 The controlType is 1.3.6.1.4.1.42.2.27.8.5.1 and the criticality may 1144 be TRUE or FALSE. There is no controlValue. 1145 11466.2 Response Control 1147 1148 If the client has sent a passwordPolicyRequest control, the server 1149 (when solicited by the inclusion of the request control) sends this 1150 control with the following operation responses: bindResponse, 1151 modifyResponse, addResponse, compareResponse and possibly 1152 extendedResponse, to inform of various conditions, and MAY be sent 1153 with other operations (in the case of the changeAfterReset error). 1154 The controlType is 1.3.6.1.4.1.42.2.27.8.5.1 and the controlValue is 1155 the BER encoding of the following type: 1156 1157 PasswordPolicyResponseValue ::= SEQUENCE { 1158 warning [0] CHOICE { 1159 timeBeforeExpiration [0] INTEGER (0 .. maxInt), 1160 graceAuthNsRemaining [1] INTEGER (0 .. maxInt) } OPTIONAL, 1161 error [1] ENUMERATED { 1162 passwordExpired (0), 1163 accountLocked (1), 1164 changeAfterReset (2), 1165 passwordModNotAllowed (3), 1166 mustSupplyOldPassword (4), 1167 insufficientPasswordQuality (5), 1168 passwordTooShort (6), 1169 passwordTooYoung (7), 1170 passwordInHistory (8) } OPTIONAL } 1171 1172 The timeBeforeExpiration warning specifies the number of seconds 1173 1174 1175 1176Sermersheim & Poitou Expires January 18, 2006 [Page 21] 1177 1178Internet-Draft Password Policy for LDAP Directories July 2005 1179 1180 1181 before a password will expire. The graceAuthNsRemaining warning 1182 specifies the remaining number of times a user will be allowed to 1183 authenticate with an expired password. The passwordExpired error 1184 signifies that the password has expired and must be reset. The 1185 changeAfterReset error signifies that the password must be changed 1186 before the user will be allowed to perform any operation other than 1187 bind and modify. The passwordModNotAllowed error is set when a user 1188 is restricted from changing her password. The 1189 insufficientPasswordQuality error is set when a password doesn't pass 1190 quality checking. The passwordTooYoung error is set if the age of 1191 the password to be modified is not yet old enough. 1192 1193 Typically, only either a warning or an error will be encoded though 1194 there may be exceptions. For example, if the user is required to 1195 change a password after the password administrator set it, and the 1196 password will expire in a short amount of time, the control may 1197 include the timeBeforeExpiration warning and the changeAfterReset 1198 error. 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232Sermersheim & Poitou Expires January 18, 2006 [Page 22] 1233 1234Internet-Draft Password Policy for LDAP Directories July 2005 1235 1236 12377. Policy Decision Points 1238 1239 Following are a number of procedures used to make policy decisions. 1240 These procedures are typically performed by the server while 1241 processing an operation. 1242 1243 The following sections contain detailed instructions that refer to 1244 attributes of the pwdPolicy object class. When doing so, the 1245 attribute of the pwdPolicy object that governs the entry being 1246 discussed is implied. 1247 12487.1 Locked Account Check 1249 1250 A status of true is returned to indicate that the account is locked 1251 if any of these conditions are met: 1252 1253 o The value of the pwdAccountLockedTime attribute is 000001010000Z. 1254 1255 o The current time is less than the value of the 1256 pwdAccountLockedTime attribute added to the value of the 1257 pwdLockoutDuration. 1258 1259 Otherwise a status of false is returned. 1260 12617.2 Password Must be Changed Now Check 1262 1263 A status of true is returned to indicate that the account is locked 1264 if all of these conditions are met: 1265 1266 The pwdMustChange attribute is set to TRUE. 1267 1268 The pwdReset attribute is set to TRUE. 1269 1270 Otherwise a status of false is returned. 1271 12727.3 Password Expiration Check 1273 1274 A status of true is returned indicating that the password has expired 1275 if the current time minus the value of pwdChangedTime is greater than 1276 the value of the pwdMaxAge. 1277 1278 Otherwise, a status of false is returned. 1279 12807.4 Remaining Grace AuthN Check 1281 1282 If the pwdGraceUseTime attribute is present, the number of values in 1283 that attribute subtracted from the value of pwdGraceAuthNLimit is 1284 returned. Otherwise zero is returned. A positive result specifies 1285 1286 1287 1288Sermersheim & Poitou Expires January 18, 2006 [Page 23] 1289 1290Internet-Draft Password Policy for LDAP Directories July 2005 1291 1292 1293 the number of remaining grace authentications. 1294 12957.5 Time Before Expiration Check 1296 1297 If the pwdExpireWarning attribute is not present a zero status is 1298 returned. Otherwise the following steps are followed: 1299 1300 Subtract the time stored in pwdChangedTime from the current time to 1301 arrive at the password's age. If the password's age is greater than 1302 than the value of the pwdMaxAge attribute, a zero status is returned. 1303 Subtract the value of the pwdExpireWarning attribute from the value 1304 of the pwdMaxAge attribute to arrive at the warning age. If the 1305 password's age is equal to or greater than the warning age, the value 1306 of pwdMaxAge minus the password's age is returned. 1307 13087.6 Intruder Detection Check 1309 1310 A status of true indicating that an intruder has been detected is 1311 returned if the following conditions are met: 1312 1313 The pwdLockout attribute is TRUE. 1314 1315 The number of values in the pwdFailureTime attribute that are 1316 younger than pwdFailureCountInterval is greater or equal to the 1317 pwdMaxFailure attribute. 1318 1319 Otherwise a status of false is returned. 1320 1321 While performing this check, values of pwdFailureTime that are old by 1322 more than pwdFailureCountInterval are purged and not counted. 1323 13247.7 Password Too Young Check 1325 1326 A status of true indicating that not enough time has passed since the 1327 password was last updated is returned if: 1328 1329 The value of pwdMinAge is non-zero and pwdChangedTime is present. 1330 1331 The value of pwdMinAge is greater than the current time minus the 1332 value of pwdChangedTime. 1333 1334 Otherwise a false status is returned. 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344Sermersheim & Poitou Expires January 18, 2006 [Page 24] 1345 1346Internet-Draft Password Policy for LDAP Directories July 2005 1347 1348 13498. Server Policy Enforcement Points 1350 1351 The server SHOULD enforce that the password attribute subject to a 1352 password policy as defined in this document, contains one and only 1353 one password value. 1354 1355 The scenarios in the following operations assume that the client has 1356 attached a passwordPolicyRequest control to the request message of 1357 the operation. In the event that the passwordPolicyRequest control 1358 was not sent, no passwordPolicyResponse control is returned. All 1359 other instructions remain the same. 1360 1361 For successfuly completed operations, unless otherwise stated, no 1362 passwordPolicyResponse control is returned. 1363 13648.1 Password-based Authentication 1365 1366 This section contains the policy enforcement rules and policy data 1367 updates used while validating a password. Operations that validate 1368 passwords include, but are not limited to, the Bind operation where 1369 the simple choice specifies a password, and the compare operation 1370 where the attribute being compared holds a password. Note that while 1371 the compare operation does not authenticate a user to the LDAP 1372 server, it may be used by an external application for purposes of 1373 authentication. 1374 13758.1.1 Fail if the account is locked 1376 1377 If the account is locked as specified in Section 7.1, the server 1378 fails the operation with an appropriate resultCode (i.e. 1379 invalidCredentials (49) in the case of a bind operation, compareFalse 1380 (5) in the case of a compare operation, etc.). The server MAY set 1381 the error: accountLocked (1) in the passwordPolicyResponse in the 1382 controls field of the message. 1383 13848.1.2 Validated Password Procedures 1385 1386 If the validation operation indicates that the password validated, 1387 these procedures are followed in order: 1388 13898.1.2.1 Policy state updates 1390 1391 Delete the pwdFailureTime and pwdAccountLockedTime attributes. 1392 13938.1.2.2 Password must be changed now 1394 1395 If the decision in Section 7.2 returns true, the server sends to the 1396 client a response with an appropriate successful resultCode (i.e. 1397 1398 1399 1400Sermersheim & Poitou Expires January 18, 2006 [Page 25] 1401 1402Internet-Draft Password Policy for LDAP Directories July 2005 1403 1404 1405 success (0), compareTrue (6), etc.), and includes the 1406 passwordPolicyResponse in the controls field of the bindResponse 1407 message with the warning: changeAfterReset specified. 1408 1409 For bind, the server MUST then disallow all operations issued by this 1410 user except modify password, bind, unbind, abandon and StartTLS 1411 extended operation. 1412 14138.1.2.3 Expired password 1414 1415 If the password has expired as per Section 7.3, the server either 1416 returns a success or failure based on the state of grace 1417 authentications. 1418 14198.1.2.3.1 Remaining Grace Authentications 1420 1421 If there are remaining grace authentications as per Section 7.4, the 1422 server adds a new value with the current time in pwdGraceUseTime. 1423 Then it sends to the client a response with an appropriate successful 1424 resultCode (i.e. success (0), compareTrue (6), etc.), and includes 1425 the passwordPolicyResponse in the controls field of the response 1426 message with the warning: graceAuthNsRemaining choice set to the 1427 number of grace authentications left. 1428 1429 Implementor's note: The system time of the host machine may be more 1430 granular than is needed to ensure unique values of this attribute. 1431 It is recommended that a mechanism is used to ensure unique 1432 generalized time values. The fractional seconds field may be used 1433 for this purpose. 1434 14358.1.2.3.2 No Remaining Grace Authentications 1436 1437 If there are no remaining grace authentications, the server fails the 1438 operation with an appropriate resultCode (invalidCredentials (49), 1439 compareFalse (5), etc.), and includes the passwordPolicyResponse in 1440 the controls field of the bindResponse message with the error: 1441 passwordExpired (0) set. 1442 14438.1.2.4 Expiration Warning 1444 1445 If the result of Section 7.5 is a positive number, the server sends 1446 to the client a response with an appropriate successful resultCode 1447 (i.e. success (0), compareTrue (6), etc.), and includes the 1448 passwordPolicyResponse in the controls field of the bindResponse 1449 message with the warning: timeBeforeExiration set to the value as 1450 described above. Otherwise, the server sends a successful response, 1451 and omits the passwordPolicyResponse. 1452 1453 1454 1455 1456Sermersheim & Poitou Expires January 18, 2006 [Page 26] 1457 1458Internet-Draft Password Policy for LDAP Directories July 2005 1459 1460 14618.1.2.5 AuthN Failed Procedures 1462 1463 If the authentication process indicates that the password failed 1464 validation due to invalid credentials, these procedures are followed: 1465 14668.1.2.5.1 Policy state update 1467 1468 Add the current time as a value of the pwdFailureTime attribute. 1469 1470 Implementor's note: The system time of the host machine may be more 1471 granular than is needed to ensure unique values of this attribute. 1472 It is recommended that a mechanism is used to ensure unique 1473 generalized time values. The fractional seconds field may be used 1474 for this purpose. 1475 14768.1.2.5.2 Lock on intruder detection 1477 1478 If the check in Section 7.6 returns a true state, the server locks 1479 the account by setting the value of the pwdAccountLockedTime 1480 attribute to the current time. After locking the account, the server 1481 fails the operation with an appropriate resultCode 1482 (invalidCredentials (49), compareFalse (5), etc.), and includes the 1483 passwordPolicyResponse in the controls field of the message with the 1484 error: accountLocked (1). 1485 14868.2 Password Update Operations 1487 1488 Because the password is stored in an attribute, various operations 1489 (like add and modify) may be used to create or update a password. 1490 But some alternate mechanisms have been defined or may be defined, 1491 such as the LDAP Password Modify Extended Operation [RFC3062]. 1492 1493 While processing a password update, the server performs the following 1494 steps: 1495 14968.2.1 Safe Modification 1497 1498 If pwdSafeModify is set to TRUE and if there is an existing password 1499 value, the server ensures that the password update operation includes 1500 the user's existing password. 1501 1502 When the LDAP modify operation is used to modify a password, this is 1503 done by specifying both a delete action and an add or replace action, 1504 where the delete action specifies the existing password, and the add 1505 or replace action specifies the new password. Other password update 1506 operations SHOULD employ a similar mechanism. Otherwise this policy 1507 will fail. 1508 1509 1510 1511 1512Sermersheim & Poitou Expires January 18, 2006 [Page 27] 1513 1514Internet-Draft Password Policy for LDAP Directories July 2005 1515 1516 1517 If the existing password is not specified, the server does not 1518 process the operation and sends the appropriate response message to 1519 the client with the resultCode: insufficientAccessRights (50), and 1520 includes the passwordPolicyResponse in the controls field of the 1521 response message with the error: mustSupplyOldPassword (4). 1522 15238.2.2 Change After Reset 1524 1525 If the decision in Section 7.2 returns true, the server ensures that 1526 the password update operation contains no modifications other than 1527 the modification of the password attribute. If other modifications 1528 exist, the server sends a response message to the client with the 1529 resultCode: insufficientAccessRights (50), and includes the 1530 passwordPolicyResponse in the controls field of the response message 1531 with the error: changeAfterReset (2). 1532 15338.2.3 Rights Check 1534 1535 Check to see whether the bound identity has sufficient rights to 1536 update the password. If the bound identity is a user changing its 1537 own password, this MAY be done by checking the pwdAllowUserChange 1538 attribute or using an access control mechanism. The determination of 1539 this is implementation specific. If the user is not allowed to 1540 update her password, the server sends a response message to the 1541 client with the resultCode: insufficientAccessRights (50), and 1542 includes the passwordPolicyResponse in the controls field of the 1543 response message with the error: passwordModNotAllowed (3). 1544 15458.2.4 Too Early to Update 1546 1547 If the check in Section 7.7 results in a true status The server sends 1548 a response message to the client with the resultCode: 1549 constraintViolation (19), and includes the passwordPolicyResponse in 1550 the controls field of the response message with the error: 1551 passwordTooYoung (7). 1552 15538.2.5 Password Quality 1554 1555 Check the value of the pwdCheckQuality attribute. If the value is 1556 non-zero, the server: 1557 1558 o Ensure that the password meets the quality criteria enforced by 1559 the server. This enforcement is implementation specific. 1560 If the server is unable to check the quality (due to a hashed 1561 password or otherwise), the value of pwdCheckQuality is evaluated. 1562 If the value is 1, operation continues. If the value is 2, the 1563 server sends a response message to the client with the resultCode: 1564 constraintViolation (19), and includes the passwordPolicyResponse 1565 1566 1567 1568Sermersheim & Poitou Expires January 18, 2006 [Page 28] 1569 1570Internet-Draft Password Policy for LDAP Directories July 2005 1571 1572 1573 in the controls field of the response message with the error: 1574 insufficientPasswordQuality (5). 1575 If the server is able to check the password quality, and the check 1576 fails, the server sends a response message to the client with the 1577 resultCode: constraintViolation (19), and includes the 1578 passwordPolicyResponse in the controls field of the response 1579 message with the error: insufficientPasswordQuality (5). 1580 1581 o checks the value of the pwdMinLength attribute. If the value is 1582 non-zero, it ensures that the new password is of at least the 1583 minimum length. 1584 If the server is unable to check the length (due to a hashed 1585 password or otherwise), the value of pwdCheckQuality is evaluated. 1586 If the value is 1, operation continues. If the value is 2, the 1587 server sends a response message to the client with the resultCode: 1588 constraintViolation (19), and includes the passwordPolicyResponse 1589 in the controls field of the response message with the error: 1590 passwordTooShort (6). 1591 If the server is able to check the password length, and the check 1592 fails, the server sends a response message to the client with the 1593 resultCode: constraintViolation (19), and includes the 1594 passwordPolicyResponse in the controls field of the response 1595 message with the error: passwordTooShort (6). 1596 1597 15988.2.6 Invalid Reuse 1599 1600 If pwdInHistory is present and its value is non-zero, the server 1601 checks whether this password exists in the entry's pwdHistory 1602 attribute or in the current password attribute. If the password does 1603 exist in the pwdHistory attribute or in the current password 1604 attribute, the server sends a response message to the client with the 1605 resultCode: constraintViolation (19), and includes the 1606 passwordPolicyResponse in the controls field of the response message 1607 with the error: passwordInHistory (8). 1608 16098.2.7 Policy State Updates 1610 1611 If the steps have completed without causing an error condition, the 1612 server performs the following steps in order to update the necessary 1613 password policy state attributes: 1614 1615 If the value of either pwdMaxAge or pwdMinAge is non-zero, the server 1616 updates the pwdChangedTime attribute on the entry to the current 1617 time. 1618 1619 If the value of pwdInHistory is non-zero, the server adds the 1620 previous password (if one existed) to the pwdHistory attribute. If 1621 1622 1623 1624Sermersheim & Poitou Expires January 18, 2006 [Page 29] 1625 1626Internet-Draft Password Policy for LDAP Directories July 2005 1627 1628 1629 the number of attributes held in the pwdHistory attribute exceeds the 1630 value of pwdInHistory, the server removes the oldest excess 1631 passwords. 1632 1633 If the value the pwdMustChange is TRUE and the modification is 1634 performed by a password administrator, then the pwdReset attribute is 1635 set to TRUE. Otherwise, the pwdReset is removed from the user's 1636 entry if it exists. 1637 1638 The pwdFailureTime and pwdGraceUseTime attributes is removed from the 1639 user's entry if they exist. 1640 16418.3 Other Operations 1642 1643 For operations other than bind, password update, unbind, abandon or 1644 StartTLS, if the decision in Section 7.2 returns true, the server 1645 sends a response message to the client with the resultCode: 1646 insufficientAccessRights (50), and includes the 1647 passwordPolicyResponse in the controls field of the response message 1648 with the error: changeAfterReset (2). 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680Sermersheim & Poitou Expires January 18, 2006 [Page 30] 1681 1682Internet-Draft Password Policy for LDAP Directories July 2005 1683 1684 16859. Client Policy Enforcement Points 1686 1687 These sections illustrate possible scenarios for each LDAP operation 1688 and define the types of responses that identify those scenarios. 1689 1690 The scenarios in the following operations assume that the client 1691 attached a passwordPolicyRequest control to the request message of 1692 the operation, and thus may receive a passwordPolicyResponse control 1693 in the response message. In the event that the passwordPolicyRequest 1694 control was not sent, no passwordPolicyResponse control is returned. 1695 All other instructions remain the same. 1696 16979.1 Bind Operation 1698 1699 For every bind response received, the client checks the resultCode of 1700 the bindResponse and checks for a passwordPolicyResponse control to 1701 determine if any of the following conditions are true and MAY prompt 1702 the user accordingly. 1703 1704 o bindResponse.resultCode = insufficientAccessRights (50), 1705 passwordPolicyResponse.error = accountLocked (1): The password 1706 failure limit has been reached and the account is locked. The 1707 user needs to retry later or contact the password administrator to 1708 reset the password. 1709 1710 o bindResponse.resultCode = success (0), 1711 passwordPolicyResponse.error = changeAfterReset (2): The user is 1712 binding for the first time after the password administrator set 1713 the password. In this scenario, the client SHOULD prompt the user 1714 to change his password immediately. 1715 1716 o bindResponse.resultCode = success (0), 1717 passwordPolicyResponse.warning = graceAuthNsRemaining: The 1718 password has expired but there are remaining grace 1719 authentications. The user needs to change it. 1720 1721 o bindResponse.resultCode = invalidCredentials (49), 1722 passwordPolicyResponse.error = passwordExpired (0): The password 1723 has expired and there are no more grace authentications. The user 1724 contacts the password administrator in order to have its password 1725 reset. 1726 1727 o bindResponse.resultCode = success (0), 1728 passwordPolicyResponse.warning = timeBeforeExpiration: The user's 1729 password will expire in n number of seconds. 1730 1731 1732 1733 1734 1735 1736Sermersheim & Poitou Expires January 18, 2006 [Page 31] 1737 1738Internet-Draft Password Policy for LDAP Directories July 2005 1739 1740 17419.2 Modify Operations 1742 17439.2.1 Modify Request 1744 1745 If the application or client encrypts the password prior to sending 1746 it in a password modification operation (whether done through 1747 modifyRequest or another password modification mechanism), it SHOULD 1748 check the values of the pwdMinLength, and pwdCheckQuality attributes 1749 and SHOULD enforce these policies. 1750 17519.2.2 Modify Response 1752 1753 If the modifyRequest operation was used to change the password, or if 1754 another mechanism is used --such as an extendedRequest-- the 1755 modifyResponse or other appropriate response MAY contain information 1756 pertinent to password policy. The client checks the resultCode of 1757 the response and checks for a passwordPolicyResponse control to 1758 determine if any of the following conditions are true and optionally 1759 notify the user of the condition. 1760 1761 o <pwdModResponse>.resultCode = insufficientAccessRights (50), 1762 passwordPolicyResponse.error = mustSupplyOldPassword (4): The user 1763 attempted to change her password without specifying the old 1764 password but the password policy requires this. 1765 1766 o <pwdModResponse>.resultCode = insufficientAccessRights (50), 1767 passwordPolicyResponse.error = changeAfterReset (2): The user must 1768 change her password before submitting any other LDAP requests. 1769 1770 o <pwdModResponse>.resultCode = insufficientAccessRights (50), 1771 passwordPolicyResponse.error = passwordModNotAllowed (3): The user 1772 doesn't have sufficient rights to change his password. 1773 1774 o <pwdModResponse>.resultCode = constraintViolation (19), 1775 passwordPolicyResponse.error = passwordTooYoung (7): It is too 1776 soon after the last password modification to change the password. 1777 1778 o <pwdModResponse>.resultCode = constraintViolation (19), 1779 passwordPolicyResponse.error = insufficientPasswordQuality (5): 1780 The password failed quality checking. 1781 1782 o <pwdModResponse>.resultCode = constraintViolation (19), 1783 passwordPolicyResponse.error = passwordTooShort (6): The length of 1784 the password is too short. 1785 1786 o <pwdModResponse>.resultCode = constraintViolation (19), 1787 passwordPolicyResponse.error = passwordInHistory (8): The password 1788 has already been used; the user must choose a different one. 1789 1790 1791 1792Sermersheim & Poitou Expires January 18, 2006 [Page 32] 1793 1794Internet-Draft Password Policy for LDAP Directories July 2005 1795 1796 17979.3 Add Operation 1798 1799 If a password is specified in an addRequest, the client checks the 1800 resultCode of the addResponse and checks for a passwordPolicyResponse 1801 control to determine if any of the following conditions are true and 1802 may prompt the user accordingly. 1803 1804 o addResponse.resultCode = insufficientAccessRights (50), 1805 passwordPolicyResponse.error = passwordModNotAllowed (3): The user 1806 doesn't have sufficient rights to add this password. 1807 1808 o addResponse.resultCode = constraintViolation (19), 1809 passwordPolicyResponse.error = insufficientPasswordQuality (5): 1810 The password failed quality checking. 1811 1812 o addResponse.resultCode = constraintViolation (19), 1813 passwordPolicyResponse.error = passwordTooShort (6): The length of 1814 the password is too short. 1815 1816 18179.4 Compare Operation 1818 1819 When a compare operation is used to compare a password, the client 1820 checks the resultCode of the compareResponse and checks for a 1821 passwordPolicyResponse to determine if any of the following 1822 conditions are true and MAY prompt the user accordingly. These 1823 conditions assume that the result of the comparison was true. 1824 1825 o compareResponse.resultCode = compareFalse (5), 1826 passwordPolicyResponse.error = accountLocked (1): The password 1827 failure limit has been reached and the account is locked. The 1828 user needs to retry later or contact the password administrator to 1829 reset the password. 1830 1831 o compareResponse.resultCode = compareTrue (6), 1832 passwordPolicyResponse.warning = graceAuthNsRemaining: The 1833 password has expired but there are remaining grace 1834 authentications. The user needs to change it. 1835 1836 o compareResponse.resultCode = compareFalse (5), 1837 passwordPolicyResponse.error = passwordExpired (0): The password 1838 has expired and there are no more grace authentications. The user 1839 must contact the password administrator to reset the password. 1840 1841 o compareResponse.resultCode = compareTrue (6), 1842 passwordPolicyResponse.warning = timeBeforeExpiration: The user's 1843 password will expire in n number of seconds. 1844 1845 1846 1847 1848Sermersheim & Poitou Expires January 18, 2006 [Page 33] 1849 1850Internet-Draft Password Policy for LDAP Directories July 2005 1851 1852 18539.5 Other Operations 1854 1855 For operations other than bind, unbind, abandon or StartTLS, the 1856 client checks the following result code and control to determine if 1857 the user needs to change the password immediately. 1858 1859 o <Response>.resultCode = insufficientAccessRights (50), 1860 passwordPolicyResponse.error = : changeAfterReset (2) 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904Sermersheim & Poitou Expires January 18, 2006 [Page 34] 1905 1906Internet-Draft Password Policy for LDAP Directories July 2005 1907 1908 190910. Administration of the Password Policy 1910 1911 {TODO: Need to define an administrativeRole (need OID). Need to 1912 describe whether pwdPolicy admin areas can overlap} 1913 1914 A password policy is defined for a particular subtree of the DIT by 1915 adding to an LDAP subentry whose immediate superior is the root of 1916 the subtree, the pwdPolicy auxiliary object class. The scope of the 1917 password policy is defined by the SubtreeSpecification attribute of 1918 the LDAP subentry as specified in [RFC3672]. 1919 1920 It is possible to define password policies for different password 1921 attributes within the same pwdPolicy entry, by specifying multiple 1922 values of the pwdAttribute. But password policies could also be in 1923 separate sub entries as long as they are contained under the same 1924 LDAP subentry. 1925 1926 Modifying the password policy MUST NOT result in any change in users' 1927 entries to which the policy applies. 1928 1929 It SHOULD be possible to overwrite the password policy for one user 1930 by defining a new policy in a subentry of the user entry. 1931 1932 Each object that is controlled by password policy advertises the 1933 subentry that is being used to control its policy in its 1934 pwdPolicySubentry attribute. Clients wishing to examine or manage 1935 password policy for an object may interrogate the pwdPolicySubentry 1936 for that object in order to arrive at the proper pwdPolicy subentry. 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960Sermersheim & Poitou Expires January 18, 2006 [Page 35] 1961 1962Internet-Draft Password Policy for LDAP Directories July 2005 1963 1964 196511. Password Policy and Replication 1966 1967 {TODO: This section needs to be changed to highlight the pitfals of 1968 replication, sugest some implementation choices to overcome those 1969 pitfals, but remove prescriptive language relating to the update of 1970 state information} 1971 1972 The pwdPolicy object defines the password policy for a portion of the 1973 DIT and MUST be replicated on all the replicas of this subtree, as 1974 any subentry would be, in order to have a consistent policy among all 1975 replicated servers. 1976 1977 The elements of the password policy that are related to the users are 1978 stored in the entry themselves as operational attributes. As these 1979 attributes are subject to modifications even on a read-only replica, 1980 replicating them must be carefully considered. 1981 1982 The pwdChangedTime attribute MUST be replicated on all replicas, to 1983 allow expiration of the password. 1984 1985 The pwdReset attribute MUST be replicated on all replicas, to deny 1986 access to operations other than bind and modify password. 1987 1988 The pwdHistory attribute MUST be replicated to writable replicas. It 1989 doesn't have to be replicated to a read-only replica, since the 1990 password will never be directly modified on this server. 1991 1992 The pwdAccountLockedTime, pwdFailureTime and pwdGraceUseTime 1993 attributes MUST be replicated to writable replicas, making the 1994 password policy global for all servers. When the user entry is 1995 replicated to a read-only replica, these attributes SHOULD NOT be 1996 replicated. This means that the number of failures, of grace 1997 authentications and the locking will take place on each replicated 1998 server. For example, the effective number of failed attempts on a 1999 user password will be N x M (where N is the number of servers and M 2000 the value of pwdMaxFailure attribute). Replicating these attributes 2001 to a read-only replica MAY reduce the number of tries globally but 2002 MAY also introduce some inconstancies in the way the password policy 2003 is applied. 2004 2005 Servers participating in a loosely consistent multi-master 2006 replication agreement SHOULD employ a mechanism which ensures 2007 uniqueness of values when populating the attributes pwdFailureTime 2008 and pwdGraceUseTime. The method of achieving this is a local matter 2009 and may consist of using a single authoritative source for the 2010 generation of unique time values, or may consist of the use of the 2011 fractional seconds part to hold a replica identifier. 2012 2013 2014 2015 2016Sermersheim & Poitou Expires January 18, 2006 [Page 36] 2017 2018Internet-Draft Password Policy for LDAP Directories July 2005 2019 2020 202112. Security Considerations 2022 2023 This document defines a set of rules to implement in an LDAP server, 2024 in order to mitigate some of the security risks associated with the 2025 use of passwords and to make it difficult for password cracking 2026 programs to break into directories. 2027 2028 Authentication with a password MUST follow the recommendations made 2029 in [RFC2829]. 2030 2031 Modifications of passwords SHOULD only occur when the connection is 2032 protected with confidentiality and secure authentication. 2033 2034 Access controls SHOULD be used to restrict access to the password 2035 policy attributes. The attributes defined to maintain the password 2036 policy state information SHOULD only be modifiable by the password 2037 administrator or higher authority. The pwdHistory attribute MUST be 2038 subject to the same level of access control as the attrbute holding 2039 the password. 2040 2041 As it is possible to define a password policy for one specific user 2042 by adding a subentry immediately under the user's entry, Access 2043 Controls SHOULD be used to restrict the use of the pwdPolicy object 2044 class or the LDAP subentry object class. 2045 2046 When the intruder detection password policy is enforced, the LDAP 2047 directory is subject to a denial of service attack. A malicious user 2048 could deliberately lock out one specific user's account (or all of 2049 them) by sending bind requests with wrong passwords. There is no way 2050 to protect against this kind of attack. The LDAP directory server 2051 SHOULD log as much information as it can (such as client IP address) 2052 whenever an account is locked, in order to be able to identify the 2053 origin of the attack. Denying anonymous access to the LDAP directory 2054 is also a way to restrict this kind of attack. 2055 2056 Returning certain status codes (such as passwordPolicyResponse.error 2057 = accountLocked) allows a denial of service attacker to know that it 2058 has successfully denied service to an account. Servers SHOULD 2059 implement additional checks which return the same status when it is 2060 sensed that some number of failed authentication requests has occured 2061 on a single connection, or from a client address. Server 2062 implementors are encouraged to invent other checks similar to this in 2063 order to thwart this type of DoS attack. 2064 2065 2066 2067 2068 2069 2070 2071 2072Sermersheim & Poitou Expires January 18, 2006 [Page 37] 2073 2074Internet-Draft Password Policy for LDAP Directories July 2005 2075 2076 207713. IANA Considerations 2078 2079 <<<TBD>>> 2080 2081 2082 2083 2084 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 2128Sermersheim & Poitou Expires January 18, 2006 [Page 38] 2129 2130Internet-Draft Password Policy for LDAP Directories July 2005 2131 2132 213314. Acknowledgement 2134 2135 This document is based in part on prior work done by Valerie Chu from 2136 Netscape Communications Corp, published as 2137 draft-vchu-ldap-pwd-policy-00.txt (December 1998). Prasanta Behera 2138 participated in early revisions of this document. 2139 214015. Normative References 2141 2142 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2143 Requirement Levels", BCP 14, RFC 2119, March 1997. 2144 2145 [RFC2195] Klensin, J., Catoe, R., and P. Krumviede, "IMAP/POP 2146 AUTHorize Extension for Simple Challenge/Response", 2147 RFC 2195, September 1997. 2148 2149 [RFC2222] Myers, J., "Simple Authentication and Security Layer 2150 (SASL)", RFC 2222, October 1997. 2151 2152 [RFC2251] Wahl, M., Howes, T., and S. Kille, "Lightweight Directory 2153 Access Protocol (v3)", RFC 2251, December 1997. 2154 2155 [RFC2252] Wahl, M., Coulbeck, A., Howes, T., and S. Kille, 2156 "Lightweight Directory Access Protocol (v3): Attribute 2157 Syntax Definitions", RFC 2252, December 1997. 2158 2159 [RFC2829] Wahl, M., Alvestrand, H., Hodges, J., and R. Morgan, 2160 "Authentication Methods for LDAP", RFC 2829, May 2000. 2161 2162 [RFC2831] Leach, P. and C. Newman, "Using Digest Authentication as a 2163 SASL Mechanism", RFC 2831, May 2000. 2164 2165 [RFC3062] Zeilenga, K., "LDAP Password Modify Extended Operation", 2166 RFC 3062, February 2001. 2167 2168 [RFC3383] Zeilenga, K., "Internet Assigned Numbers Authority (IANA) 2169 Considerations for the Lightweight Directory Access 2170 Protocol (LDAP)", BCP 64, RFC 3383, September 2002. 2171 2172 [RFC3672] Zeilenga, K., "Subentries in the Lightweight Directory 2173 Access Protocol (LDAP)", RFC 3672, December 2003. 2174 2175 [X680] International Telecommunications Union, "Abstract Syntax 2176 Notation One (ASN.1): Specification of basic notation", 2177 ITU-T Recommendation X.680, July 2002. 2178 2179 [X690] International Telecommunications Union, "Information 2180 Technology - ASN.1 encoding rules: Specification of Basic 2181 2182 2183 2184Sermersheim & Poitou Expires January 18, 2006 [Page 39] 2185 2186Internet-Draft Password Policy for LDAP Directories July 2005 2187 2188 2189 Encoding Rules (BER), Canonical Encoding Rules (CER) and 2190 Distinguished Encoding Rules (DER)", ITU-T Recommendation 2191 X.690, July 2002. 2192 2193 2194Authors' Addresses 2195 2196 Jim Sermersheim 2197 Novell, Inc 2198 1800 South Novell Place 2199 Provo, Utah 84606 2200 USA 2201 2202 Phone: +1 801 861-3088 2203 Email: jimse@novell.com 2204 2205 2206 Ludovic Poitou 2207 Sun Microsystems 2208 180, Avenue de l'Europe 2209 Zirst de Montbonnot, 38334 Saint Ismier cedex 2210 France 2211 2212 Phone: +33 476 188 212 2213 Email: ludovic.poitou@sun.com 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240Sermersheim & Poitou Expires January 18, 2006 [Page 40] 2241 2242Internet-Draft Password Policy for LDAP Directories July 2005 2243 2244 2245Intellectual Property Statement 2246 2247 The IETF takes no position regarding the validity or scope of any 2248 Intellectual Property Rights or other rights that might be claimed to 2249 pertain to the implementation or use of the technology described in 2250 this document or the extent to which any license under such rights 2251 might or might not be available; nor does it represent that it has 2252 made any independent effort to identify any such rights. Information 2253 on the procedures with respect to rights in RFC documents can be 2254 found in BCP 78 and BCP 79. 2255 2256 Copies of IPR disclosures made to the IETF Secretariat and any 2257 assurances of licenses to be made available, or the result of an 2258 attempt made to obtain a general license or permission for the use of 2259 such proprietary rights by implementers or users of this 2260 specification can be obtained from the IETF on-line IPR repository at 2261 http://www.ietf.org/ipr. 2262 2263 The IETF invites any interested party to bring to its attention any 2264 copyrights, patents or patent applications, or other proprietary 2265 rights that may cover technology that may be required to implement 2266 this standard. Please address the information to the IETF at 2267 ietf-ipr@ietf.org. 2268 2269 2270Disclaimer of Validity 2271 2272 This document and the information contained herein are provided on an 2273 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 2274 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 2275 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 2276 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 2277 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 2278 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 2279 2280 2281Copyright Statement 2282 2283 Copyright (C) The Internet Society (2005). This document is subject 2284 to the rights, licenses and restrictions contained in BCP 78, and 2285 except as set forth therein, the authors retain all their rights. 2286 2287 2288Acknowledgment 2289 2290 Funding for the RFC Editor function is currently provided by the 2291 Internet Society. 2292 2293 2294 2295 2296Sermersheim & Poitou Expires January 18, 2006 [Page 41] 2297 2298 2299