Bug 576303 - No response control for a grace login
No response control for a grace login
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
7.0
All Linux
low Severity low
: rc
: 7.3
Assigned To: Noriko Hosoi
Viktor Ashirov
:
Depends On:
Blocks: 389_1.3.0 512820 690319
  Show dependency treegraph
 
Reported: 2010-03-23 14:58 EDT by Aaron Hagopian
Modified: 2016-06-16 11:19 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-16 11:19:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Aaron Hagopian 2010-03-23 14:58:14 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.113730.3.4.5 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.113730.3.4.5 and 2.16.840.1.113730.3.4.4 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.113730.3.4.5 or 2.16.840.1.113730.3.4.4.  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.113730.3.4.4 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.
Comment 2 Martin Kosek 2012-01-04 08:32:02 EST
Upstream ticket:
https://fedorahosted.org/389/ticket/89
Comment 5 mreynolds 2016-06-16 11:19:38 EDT
 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)
dn: uid=mark,dc=example,dc=com
passwordExpirationTime: 20150616175346Z
passwordExpWarned: 1
passwordGraceUserTime: 4
entrydn: uid=mark,dc=example,dc=com

Closing as works for me.

Note You need to log in before you can comment on or make changes to this bug.