Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
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
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
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
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
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
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
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
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
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
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
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
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
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
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
D. Calculates whether the time before expiration warning should
be sent.
Behera, et. al. Expires August 15, 2004 Page 18
INTERNET DRAFT LDAP Password Policy 15 February 2004
If the pwdExpireWarning attribute is present and contains a
value, the server MUST perform the following steps.
If the pwdExpirationWarned attribute is present and has a
time value, the warning time is the value of the
pwdExpirationWarned attribute plus the value of the
pwdExpireWarning attribute minus the current time.
If the pwdExpirationWarned attribute is not present, the
server MUST subtract the current time from the time stored
in pwdChangedTime to arrive at the password's age. If the
age is greater than the value of the pwdMaxAge attribute
minus the value of the pwdExpireWarning attribute, the
server MUST set the current time as the value of the
pwdExpirationWarned attribute, and the warning time is the
value of pwdMaxAge minus the password's age.
If the warning time is a positive number, the server MUST
send a bindResponse with the resultCode: success (0), and
MUST include the passwordPolicyResponse in the controls
field of the bindResponse message with the warning:
timeBeforeExiration set to the value as described above.
If the warning time is zero, or wasn't calculated, the
server MUST send a bindResponse with the resultCode:
success (0), and MUST include the passwordPolicyResponse
with nothing in the SEQUENCE.
If the pwdExpireWarning attribute is not present, the server
MUST send a bindResponse with the resultCode: success (0),
and MUST include the passwordPolicyResponse with nothing in
the SEQUENCE.
If the bind operation fails authentication due to invalid
credentials, the server MUST do the following:
A. Add the current time as a value of the pwdFailureTime
attribute.
B. If the pwdLockout attribute is TRUE, the server MUST also do
the following:
Count the number of values in the pwdFailureTime attribute
that are younger than pwdFailureCountInterval.
If the number of these failures is greater or equal to the
pwdMaxFailure attribute, the server MUST lock the account
by setting the value of the pwdAccountLockedTime attribute
to the current time. After locking the account, the server
Behera, et. al. Expires August 15, 2004 Page 19
INTERNET DRAFT LDAP Password Policy 15 February 2004
MUST send a bindResponse to the client with the
resultCode: unwillingToPerform (53), and MUST include the
passwordPolicyResponse in the controls field of the
bindResponse message with the error: accountLocked (1).
If the number of failures is less than the pwdMaxFailure
attribute, operation proceeds.
C. Failure times that are old by more than
pwdFailureCountInterval are purged from the pwdFailureTime
attribute.
6.2. Modify Password Operation
Because the password is stored in an attribute, the modify operation
may be used to create or update a password. But some alternate
mechanisms have been defined or may be defined, such as the LDAP
Password Modify Extended Operation [RFC-3062].
While processing a password modification, the server MUST perform
the following steps:
1. Check the pwdSafeModify attribute. If set to TRUE, the server
MUST ensure that the modify password operation included the
user's existing password. When the LDAP modify operation is used
to modify a password, this is done by specifying both a delete
action and an add or replace action, where the delete action is
first, and specifies the existing password, and the add or
replace action specifies the new password. Other password modify
operations SHOULD employ a similar mechanism. Otherwise this
policy will fail.
If the existing password is not specified, the server MUST NOT
process the operation and MUST send the appropriate response
message to the client with the resultCode: unwillingToPerform
(53), and MUST include the passwordPolicyResponse in the controls
field of the response message with the error:
mustSupplyOldPassword (4).
2. Check the value of the pwdMustChange attribute. If TRUE, the
server MUST check the pwdReset attribute in the user's entry, to
see if a directory administrator has reset the password. If so,
it MUST ensure that the modify password operation contains no
Behera, et. al. Expires August 15, 2004 Page 20
INTERNET DRAFT LDAP Password Policy 15 February 2004
modifications other than the modification of the password
attribute. If other modifications exist, the server MUST send a
response message to the client with the resultCode:
unwillingToPerform (53), and MUST include the
passwordPolicyResponse in the controls field of the response
message with the error: changeAfterReset (2).
3. Check to see whether the bound identity has sufficient rights to
modify the password. If the bound identity is a user changing its
own password, this MAY be done by checking the pwdAllowUserChange
attribute or using an access control mechanism. The determination
of this is implementation specific. If the user is not allowed to
change her password, the server MUST send a response message to
the client with the resultCode: unwillingToPerform (53), and MUST
include the passwordPolicyResponse in the controls field of the
response message with the error: passwordModNotAllowed (3).
4. Check the value of the pwdMinAge attribute. If it is set to a
non-zero value, the server MUST subtract the current time from
the value of the pwdChangedTime attribute to arrive at the
password's age. If the password's age is less than the value of
the pwdMinAge attribute, the password is too young to modify. In
this case, the server MUST send a response message to the client
with the resultCode: constraintViolation (19), and MUST include
the passwordPolicyResponse in the controls field of the response
message with the error: passwordTooYoung (7).
5. Check the value of the pwdCheckQuality attribute.
If the value is non-zero, The server:
A. MUST ensure that the password meets the quality criteria
enforced by the server. This enforcement is implementation
specific.
If the server is unable to check the quality (due to a hashed
password or otherwise), the value of pwdCheckQuality is
evaluated. If the value is 1, operation MUST continue. If the
value is 2, the server MUST send a response message to the
client with the resultCode: constraintViolation (19), and MUST
include the passwordPolicyResponse in the controls field of
the response message with the error:
insufficientPasswordQuality (5).
If the server is able to check the password quality, and the
check fails, the server MUST send a response message to the
client with the resultCode: constraintViolation (19), and MUST
include the passwordPolicyResponse in the controls field of
Behera, et. al. Expires August 15, 2004 Page 21
INTERNET DRAFT LDAP Password Policy 15 February 2004
the response message with the error:
insufficientPasswordQuality (5).
B. MUST check the value of the pwdMinLength attribute. If the
value is non-zero, it MUST ensure that the new password is of
at least the minimum length.
If the server is unable to check the length (due to a hashed
password or otherwise), the value of pwdCheckQuality is
evaluated. If the value is 1, operation MUST continue. If the
value is 2, the server MUST send a response message to the
client with the resultCode: constraintViolation (19), and MUST
include the passwordPolicyResponse in the controls field of
the response message with the error: passwordTooShort (6).
If the server is able to check the password length, and the
check fails, the server MUST send a response message to the
client with the resultCode: constraintViolation (19), and MUST
include the passwordPolicyResponse in the controls field of
the response message with the error: passwordTooShort (6).
6. Check the value of the pwdInHistory attribute. If the value is
non-zero, the server MUST check whether this password exists in
the entry's pwdHistory attribute or in the current password
attribute. If the password does exist in the pwdHistory attribute
or in the current password attribute, the server MUST send a
response message to the client with the resultCode:
constraintViolation (19), and MUST include the
passwordPolicyResponse in the controls field of the response
message with the error: passwordInHistory (8).
If the steps have completed without causing an error condition, the
server MUST follow the following steps in order to update the
necessary password policy state attributes:
7. Check the value of the pwdMaxAge attribute. If the value is non-
zero, or if the value of the pwdMinAge attribute is non-zero, the
server MUST update the pwdChangedTime attribute on the entry to
the current time.
8. If the value of the pwdInHistory attribute is non-zero, the
server MUST add the previous password to the pwdHistory
attribute. If the number of attributes held in the pwdHistory
attribute exceeds the value of pwdInHistory, the server MUST
remove the oldest excess passwords.
9. Remove the pwdFailureTime, pwdReset, pwdGraceUseTime and
pwdExpirationWarned attributes from the user's entry if they
Behera, et. al. Expires August 15, 2004 Page 22
INTERNET DRAFT LDAP Password Policy 15 February 2004
exist.
The server MUST then apply the modify password operation.
6.3. Add Operation
The password MAY be set during an Add operation. If it is, the
server MUST perform the following steps while processing the add
operation. Note that these are essentially duplicates of steps 3, 5
and 7 from Section 6.2 with the exception that pwdAllowUserChange is
not checked.
1. Check to see whether the bound identity has sufficient rights to
modify the password. This MAY be done by the use of an access
control mechanism. If the user is not allowed to add this
password, the server MUST send an addResponse to the client with
the resultCode: unwillingToPerform (53), and MUST include the
passwordPolicyResponse in the controls field of the addResponse
message with the error: passwordModNotAllowed (3).
2. Check the value of the pwdCheckQuality attribute.
If the value is non-zero, The server:
A. MUST ensure that the password meets the quality criteria
enforced by the server. This enforcement is implementation
specific.
If the server is unable to check the quality (due to a hashed
password or otherwise), the value of pwdCheckQuality MUST be
evaluated. If the value is 1, operation MUST continue. If the
value is 2, the server MUST send an addResponse to the client
with the resultCode: constraintViolation (19), and MUST
include the passwordPolicyResponse in the controls field of
the addResponse message with the error:
insufficientPasswordQuality (5).
If the server is able to check the password quality, and the
check fails, the server MUST send an addResponse to the client
with the resultCode: constraintViolation (19), and MUST
include the passwordPolicyResponse in the controls field of
the addResponse message with the error:
insufficientPasswordQuality (5).
B. MUST check the value of the pwdMinLength attribute. If the
value is non-zero, it MUST ensure that the new password is of
at least the minimum length.
Behera, et. al. Expires August 15, 2004 Page 23
INTERNET DRAFT LDAP Password Policy 15 February 2004
If the server is unable to check the length (due to a hashed
password or otherwise), the value of pwdCheckQuality MUST be
evaluated. If the value is 1, operation MUST continue. If the
value is 2, the server MUST send an addResponse to the client
with the resultCode: constraintViolation (19), and MUST
include the passwordPolicyResponse in the controls field of
the addResponse message with the error: passwordTooShort (6).
If the server is able to check the password length, and the
check fails, the server MUST send an addResponse to the client
with the resultCode: constraintViolation (19), and MUST
include the passwordPolicyResponse in the controls field of
the addResponse message with the error: passwordTooShort (6).
If the steps above have completed without causing an error
condition, the server MUST follow the steps below in order to update
the necessary password policy state attributes.
3. Check the value of the pwdMaxAge attribute. If the value is non-
zero, or if the value of the pwdMinAge attribute is non-zero, the
server MUST update the pwdChangedTime attribute on the entry to
the current time.
6.4. Compare Operation
The compare operation MAY be used to compare a password. This might
be performed when a client wishes to verify that user's supplied
password is correct. An example of this is an LDAP HTTP
authentication redirector. It may be desirable to use this rather
than performing a bind operation in order to reduce possible
overhead involved in performing a bind. Access Controls SHOULD be
used to restrict this comparison from being made.
If a server supports this behavior, it MUST comply with the
following. Otherwise the password policy described in this document
may be circumvented.
While comparing password attributes, the server MUST perform the
following steps:
1. Check for a locked account:
If the value of the pwdAccountLockedTime attribute is 0, or if
the current time is less than the value of the
pwdAccountLockedTime attribute added to the value of the
pwdLockoutDuration, the account is locked.
If the account is locked, the server MUST send a compareResponse
to the client with the resultCode: compareFalse (5), and MUST
Behera, et. al. Expires August 15, 2004 Page 24
INTERNET DRAFT LDAP Password Policy 15 February 2004
include the passwordPolicyResponse in the controls field of the
compareResponse message with the error: accountLocked (1).
If the account is not locked, the server MUST proceed with the
compare operation.
2. If Access Controls permit, the server MUST proceed with compare
operation and MUST check the result.
If the result of the compare operation is true, the server MUST
do the following:
A. Delete the pwdFailureTime attribute.
B. Check for password expiration
The password has expired when either of the following
conditions is met:
- If the value of the pwdExpireWarning attribute is 0, the
server MUST subtract the current time from the time stored
in pwdChangedTime to arrive at the password's age. If the
age is greater than the value in the pwdMaxAge attribute,
the password has expired.
- If the value of the pwdExpireWarning attribute is non-
zero, and the pwdExpirationWarned attribute is present and
has a time value, the server MUST subtract the current
time from the time stored in the pwdExpirationWarned to
arrive at the first warning age. If the age is greater
than the value in the pwdExpireWarning attribute, the
password has expired.
If the password has expired, the server MUST check for
remaining grace logins.
If the pwdGraceUseTime attribute is present, the server
MUST count the number of values in that attribute and MUST
subtract it from the pwdGraceLoginLimit. A positive result
specifies the number of remaining grace logins.
If there are remaining grace logins, the server MUST add a
new value with the current time in pwdGraceUseTime. Then
it MUST send a compareResponse with the resultCode:
compareTrue (6), and MUST include the
passwordPolicyResponse in the controls field of the
compareResponse message with the warning:
graceLoginsRemaining choice set to the number of grace
logins left.
Behera, et. al. Expires August 15, 2004 Page 25
INTERNET DRAFT LDAP Password Policy 15 February 2004
If there are no remaining grace logins, the server MUST
send a compareResponse with the resultCode: compareFalse
(5), and MUST include the passwordPolicyResponse in the
controls field of the compareResponse message with the
error: passwordExpired (0) set.
If the password has not expired, execution MUST continue.
C. Calculate whether the time before expiration warning should be
sent.
If the pwdExpireWarning attribute is present and contains a
value, the server MUST perform the following steps.
If the pwdExpirationWarned attribute is present and has a
time value, the warning time is the value of the
pwdExpirationWarned attribute plus the value of the
pwdExpireWarning attribute minus the current time.
If the pwdExpirationWarned attribute is not present, the
server MUST subtract the current time from the time stored
in pwdChangedTime to arrive at the password's age. If the
age is greater than the value of the pwdMaxAge attribute
minus the value of the pwdExpireWarning attribute, the
server MUST set the current time as the value of the
pwdExpirationWarned attribute, and the warning time is the
value of pwdMaxAge minus the password's age.
If the warning time is a positive number, the server MUST
send a compareResponse with the resultCode: compareTrue
(6), and MUST include the passwordPolicyResponse in the
controls field of the compareResponse message with the
warning: timeBeforeExiration set to the value as described
above.
If the warning time is zero, or wasn't calculated, the
server MUST send a compareResponse with the resultCode:
compareTrue (6), and MUST include the
passwordPolicyResponse with nothing in the SEQUENCE.
If the pwdExpireWarning attribute is not present, the server
MUST send a compareResponse with the resultCode: compareTrue
(6), and MUST include the passwordPolicyResponse with nothing
in the SEQUENCE.
If the result of the compare operation is false, the server MUST
do the following:
Behera, et. al. Expires August 15, 2004 Page 26
INTERNET DRAFT LDAP Password Policy 15 February 2004
A. Add the current time as a value of the pwdFailureTime
attribute.
B. If the pwdLockout attribute is TRUE, the server MUST do
the following:
Count the number of values in the pwdFailureTime
attribute that are younger than
pwdFailureCountInterval.
If the number of these failures is greater or equal to
the pwdMaxFailure attribute, the server MUST lock the
account by setting the value of the
pwdAccountLockedTime attribute to the current time.
After locking the account, the server MUST send a
compareResponse to the client with the resultCode:
compareFalse (5), and MUST include the
passwordPolicyResponse in the controls field of the
compareResponse message with the error: accountLocked
(1).
If the number of failures is less than the
pwdMaxFailure attribute, operation MUST proceed.
If the pwdLockout attribute is FALSE, operation MUST
continue.
C. Failure times that are old by more than
pwdFailureCountInterval, MUST be purged from the
pwdFailureTime attribute.
D. If no errors were returned, the server MUST send a
compareResponse with the resultCode: compareTrue (6), and
MUST include the passwordPolicyResponse with nothing in
the SEQUENCE.
7. Client Implementation by LDAP operation
These sections illustrate possible scenarios for each LDAP operation
and define the types of responses that identify those scenarios.
The scenarios in the following operations assume that the client
attached a passwordPolicyRequest control to the request message of
the operation, and thus MAY receive a passwordPolicyResponse control
in the response message. In the event that the passwordPolicyRequest
control was not sent, no passwordPolicyRequest control is returned.
All other instructions remain the same.
7.1. Bind Operation
Behera, et. al. Expires August 15, 2004 Page 27
INTERNET DRAFT LDAP Password Policy 15 February 2004
For every bind response received, the client MUST check the
resultCode of the bindResponse and MUST check for a
passwordPolicyResponse to determine if any of the following
conditions are true and MAY prompt the user accordingly.
1. The password failure limit has been reached and the account is
locked. The user needs to retry later or contact the directory
administrator to reset the password.
resultCode: unwillingToPerform (53)
passwordPolicyResponse: error: accountLocked (1)
2. The user is binding for the first time after the directory
administrator set the password. In this scenario, the client
SHOULD prompt the user to change his password immediately.
resultCode: success (0)
passwordPolicyResponse: error: changeAfterReset (2)
3. The password has expired but there are remaining grace logins.
The user needs to change it.
resultCode: success (0)
passwordPolicyResponse: warning: graceLoginsRemaining
4. The password has expired and there are no more grace logins. The
user MUST contact the directory administrator in order to have
its password reset.
resultCode: invalidCredentials (49)
passwordPolicyResponse: error: passwordExpired (0)
5. The user's password will expire in n number of seconds.
resultCode: success (0)
passwordPolicyResponse: warning: timeBeforeExpiration
7.2. Modify Operations
7.2.1. Modify Request
If the application or client encrypts the password prior to sending
it in a password modification operation (whether done through
modifyRequest or another password modification mechanism), it SHOULD
check the values of the pwdMinLength, and pwdCheckQuality attributes
and SHOULD enforce these policies.
7.2.2. Modify Response
Behera, et. al. Expires August 15, 2004 Page 28
INTERNET DRAFT LDAP Password Policy 15 February 2004
If the modifyRequest operation was used to change the password, or
if another mechanism is used --such as an extendedRequest-- the
modifyResponse or other appropriate response MAY contain information
pertinent to password policy. The client MUST check the resultCode
of the response and MUST check for a passwordPolicyResponse to
determine if any of the following conditions are true and optionally
notify the user of the condition.
1. The user attempted to change her password without specifying the
old password but the password policy requires this.
resultCode: unwillingToPerform (53)
passwordPolicyResponse: error: mustSupplyOldPassword (4)
2. The user MUST change her password before submitting any other
LDAP requests.
resultCode: unwillingToPerform (53)
passwordPolicyResponse: error: changeAfterReset (2)
3. The user doesn't have sufficient rights to change his password.
resultCode: unwillingToPerform (53)
passwordPolicyResponse: error: passwordModNotAllowed (3)
4. It is too soon after the last password modification to change the
password.
resultCode: constraintViolation (19)
passwordPolicyResponse: error: passwordTooYoung (7)
5. The password failed quality checking.
resultCode: constraintViolation (19)
passwordPolicyResponse: error:
insufficientPasswordQuality (5)
6. The length of the password is too short.
resultCode: constraintViolation (19)
passwordPolicyResponse: error: passwordTooShort (6)
7. The password has already been used; the user MUST choose a
different one.
resultCode: constraintViolation (19)
passwordPolicyResponse: error: passwordInHistory (8)
Behera, et. al. Expires August 15, 2004 Page 29
INTERNET DRAFT LDAP Password Policy 15 February 2004
7.3. Add Operation
If a password is specified in an addRequest, the client MUST check
the resultCode of the addResponse and MUST check for a
passwordPolicyResponse to determine if any of the following
conditions are true and may prompt the user accordingly.
1. The user doesn't have sufficient rights to add this password.
resultCode: unwillingToPerform (53)
passwordPolicyResponse: error: passwordModNotAllowed (3)
2. The password failed quality checking.
resultCode: constraintViolation (19)
passwordPolicyResponse: error:
insufficientPasswordQuality (5)
3. The length of the password is too short.
resultCode: constraintViolation (19)
passwordPolicyResponse: error: passwordTooShort (6)
7.4. Compare Operation
When a compare operation is used to compare a password, the client
MUST check the resultCode of the compareResponse and MUST check for
a passwordPolicyResponse to determine if any of the following
conditions are true and MAY prompt the user accordingly. These
conditions assume that the result of the comparison was true.
1. The password failure limit has been reached and the account is
locked. The user needs to retry later or contact the directory
administrator to reset the password.
resultCode: compareFalse (5)
passwordPolicyResponse: error: accountLocked (1)
2. The password has expired but there are remaining grace logins.
The user needs to change it.
resultCode: compareTrue (6)
passwordPolicyResponse: warning: graceLoginsRemaining
3. The password has expired and there are no more grace logins. The
user MUST contact the directory administrator to reset the
password.
Behera, et. al. Expires August 15, 2004 Page 30
INTERNET DRAFT LDAP Password Policy 15 February 2004
resultCode: compareFalse (5)
passwordPolicyResponse: error: passwordExpired (0)
4. The user's password will expire in n number of seconds.
resultCode: compareTrue (6)
passwordPolicyResponse: warning: timeBeforeExpiration
7.5. Other Operations
For operations other than bind, unbind, abandon, search or StartTLS,
the client MUST check the following result code and control to
determine if the user needs to change the password immediately.
1. The user needs to change password. The user SHOULD be prompted to
change the password immediately.
resultCode: unwillingToPerform (53)
passwordPolicyResponse: error: changeAfterReset (2)
8. Administration of a Password Policy
A password policy MUST be defined for a particular subtree of the
DIT by adding to an LDAP subentry whose immediate superior is the
root of the subtree, the pwdPolicy auxiliary object class.
The scope of the password policy is defined by the
SubtreeSpecification attribute of the LDAP subentry as specified in
RFC 3672 [RFC-3672].
It is possible to define password policies for different password
attributes within the same pwdPolicy entry, by specifying multiple
values of the pwdAttribute. But password policies could also be in
separate sub entries as long as they are contained under the same
LDAP subentry.
Modifying the password policy MUST not result in any change in
users' entries to which the policy applies.
It SHOULD be possible to overwrite the password policy for one user
by defining a new policy in a subentry of the user entry.
Each object that is controlled by password policy SHALL advertise
the subentry that is being used to control its policy in its
pwdPolicySubentry attribute. Clients wishing to examine or manage
password policy for an object, MUST interrogate the
Behera, et. al. Expires August 15, 2004 Page 31
INTERNET DRAFT LDAP Password Policy 15 February 2004
pwdPolicySubentry for that object in order to arrive at the proper
pwdPolicy subentry.
9. Password Policy and Replication
The pwdPolicy object defines the password policy for a portion of
the DIT and MUST be replicated on all the replicas of this subtree,
as any subentry would be, in order to have a consistent policy among
all replicated servers.
The elements of the password policy that are related to the users
are stored in the entry themselves as operational attributes.
As these attributes are subject to modifications even on a read-only
replica, replicating them must be carefully considered.
The pwdChangedTime attribute MUST be replicated on all replicas, to
allow expiration of the password.
The pwdReset attribute MUST be replicated on all replicas, to deny
access to operations other than bind and modify password.
The pwdHistory attribute MUST be replicated to writable replicas. It
doesn't have to be replicated to a read-only replica, since the
password will never be directly modified on this server.
The pwdAccountLockedTime, pwdExpirationWarned, pwdFailureTime and
pwdGraceUseTime attributes MUST be replicated to writable replicas,
making the password policy global for all servers.
When the user entry is replicated to a read-only replica, these
attributes SHOULD NOT be replicated. This means that the number of
failures, of grace logins and the locking will take place on each
replicated server. For example, the effective number of failed
attempts on a user password will be N x M (where N is the number of
servers and M the value of pwdMaxFailure attribute).
Replicating these attributes to a read-only replica MAY reduce the
number of tries globally but MAY also introduce some inconstancies
in the way the password policy is applied.
10. Security Considerations
This document defines a set of rules to implement in an LDAP server,
in order to mitigate some of the security risks associated with the
use of passwords and to make it difficult for password cracking
programs to break into directories.
Authentication with a password MUST follow the recommendations made
in RFC 2829 [RFC-2829].
Behera, et. al. Expires August 15, 2004 Page 32
INTERNET DRAFT LDAP Password Policy 15 February 2004
Modifications of passwords SHOULD only occur when the connection is
protected with confidentiality and secure authentication.
Access controls SHOULD be used to restrict access to the password
policy attributes. Especially all the attributes defined to maintain
the Password Policy state information SHOULD not be modifiable by
anyone but the Administrator of the directory server.
As it is possible to define a password policy for one specific user
by adding a subentry immediately under the user's entry, Access
Controls SHOULD be used to restrict the use of the pwdPolicy object
class or the LDAP subentry object class.
When a password policy is put in place, the LDAP directory is
subject to a denial of service attack. A malicious user could
deliberately lock out one specific user's account (or all of them)
by sending bind requests with wrong passwords. There is no way to
protect against this kind of attack. The LDAP directory server
SHOULD log as much information as it can (such as client IP address)
whenever an account is locked, in order to be able to identify the
origin of the attack. Denying anonymous access to the LDAP directory
is also a way to restrict this kind of attacks.
11. Acknowledgement
This document is based in part on prior work done by Valerie Chu
from Netscape Communications Corp, published as draft-vchu-ldap-pwd-
policy-00.txt (December 1998).
12. Normative References
[RFC-2119] S. Bradner, "Key Words for use in RFCs to Indicate
Requirement Levels", RFC 2119, March 1997.
[RFC-2195] J. Klensin, R. Catoe, P. Krumviede, "IMAP/POP AUTHorize
Extension for Simple Challenge/Response", RFC 2195, September 1997.
[RFC-2222] J. Myers, "Simple Authentication and Security Layer
(SASL)", RFC 2222, October 1997.
[RFC-2251] Wahl, M., Howes, T., Kille, S., "Lightweight Directory
Access Protocol (v3)", RFC 2251, August 1997.
[RFC-2252] Wahl, M., Coulbeck, A., Howes, T., Kille, S.,
"Lightweight Directory Access Protocol (v3): Attribute Syntax
Definitions", RFC 2252, December 1997.
Behera, et. al. Expires August 15, 2004 Page 33
INTERNET DRAFT LDAP Password Policy 15 February 2004
[RFC-Digest] Paul J. Leach, Chris Newman, "Using Digest
Authentication as a SASL Mechanism", RFC 2831, May 2000.
[RFC-3062] K. Zeilenga, "LDAP Password Modify Extended Operation",
RFC 3062, February 2001.
[RFC-3672] K. Zeilenga, S. Legg, "Subentries in the Lightweight
Directory Access Protocol (LDAP)", RFC 3672, December.
13. Authors' Addresses
Prasanta Behera
18366 Chelmsford Dr.
Cupertino, CA 95014
USA
prasantabehera@yahoo.com
Ludovic Poitou
Sun Microsystems Inc.
180, Avenue de l'Europe
Zirst de Montbonnot
38334 Saint Ismier cedex
France
+33 476 188 212
ludovic.poitou@sun.com
Jim Sermersheim
Novell, Inc.
1800 South Novell Place
Provo, Utah 84606, USA
+1 801 861-3088
jimse@novell.com
14. Copyright Notice
Copyright (C) The Internet Society (2004). All Rights
Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph
are included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
Behera, et. al. Expires August 15, 2004 Page 34
INTERNET DRAFT LDAP Password Policy 15 February 2004
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."
Behera, et. al. Expires August 15, 2004 Page 35