Red Hat Bugzilla – Bug 576303
No response control for a grace login
Last modified: 2016-06-16 11:19:38 EDT
In developing a Java application using 389 directory as a back-end mainly for authentication, I've hit a problem which I feel is a bug. Starting with a user logging in and their password is no where near expiring, when they login there are no response controls sent back. Next when a user logins and their password is in the warning period, the server returns 2.16.840.1.1137126.96.36.199 in the response after successful login which is great. I can warn people that their password is expiring soon.
Separately if a password is reset using ldappasspwd for example, on login, the server responds both 2.16.840.1.1137188.8.131.52 and 2.16.840.1.1137184.108.40.206 meaning the password is expiring and expired which is also good.
Now going back to the first part when the password finally expires and they haven't changed their password yet, and we have grace logins on (allowing up to 3 logins after password expires for example), on login the server does not return 2.16.840.1.1137220.127.116.11 or 2.16.840.1.113718.104.22.168. Therefore it seems like their password is not expiring soon or expired.
I would think the server would return both similar to the password reset example or at least 2.16.840.1.113722.214.171.124 noting the password is expired. Instead the only way I can tell the password is expiring during this period is to check the passwordExpiredTime attribute myself versus the server constraints.
Testing with ldapmodify, the number of grace logins is returned, as well as the password being marked as expired. Note the "-e ppolicy" which requests the password response control. It must be requested or it is not returned:
ldapsearch -D "uid=mark,dc=example,dc=com" -w password -b "dc=example,dc=com" -xLLL -e ppolicy uid=mark +
ldap_bind: Success (0) (Password expired, 1 grace logins remain)
Closing as works for me.