RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 681611 - RFE: allow fine grained password policy duration attributes in days, hours, minutes, as well
Summary: RFE: allow fine grained password policy duration attributes in days, hours, m...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On: 681015 689889
Blocks: 639035 389_1.2.8 680575
TreeView+ depends on / blocked
 
Reported: 2011-03-02 18:07 UTC by Noriko Hosoi
Modified: 2015-01-04 23:46 UTC (History)
6 users (show)

Fixed In Version: 389-ds-base-1.2.8-0.6.rc1.el6
Doc Type: Enhancement
Doc Text:
Clone Of: 681015
Environment:
Last Closed: 2011-05-19 12:42:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0533 0 normal SHIPPED_LIVE new package: 389-ds-base 2011-05-18 17:57:44 UTC

Description Noriko Hosoi 2011-03-02 18:07:33 UTC
+++ This bug was initially created as a clone of Bug #681015 +++

Description of problem:
This bug fix allows global password policy duration attributes in the format of ##D|d, ##H|h, ##M|m, ##S|s.
Bug 627993 - RFE: allow global password policy duration attributes in days, hours, minutes, as well

On the other hand, the fine grained has no ability to handle such format.  Actually, there is no methods to check the invalid input to the fine grained password policy duration attributes.

$ ldapmodify ...
dn: cn=cn\3DnsPwPolicyEntry\2Cou\3DPeople\2Cdc\3Dexample\2Cdc\3Dcom,cn=nsPwPol
 icyContainer,ou=People,dc=example,dc=com
changetype: modify
replace: passwordMaxAge
passwordMaxAge: abcdefg
$ echo $?
0

--- Additional comment from nhosoi on 2011-02-28 17:22:47 EST ---

Created attachment 481460 [details]
git patch file (master)

Description: Adding an ability to handle ##D|d, ##H|h, ##M|m, ##S|s
format to the fine grained password policy duration attributes.

Note: when adding modifying password policy duration attributes, there is no way to verify the value.  If the value is invalid, it's found when the password is evaluated.  Without the attached patch, the password evaluation just fails without any error.  This patch logs the cause in the error log.

E.g.,

dn: cn=cn\3DnsPwPolicyEntry\2Cou\3DPeople\2Cdc\3Dexample\2Cdc\3Dcom,cn=nsPwPol
 icyContainer,ou=People,dc=example,dc=com
changetype: modify
replace: passwordMaxAge
passwordMaxAge: xyz
$ echo $?
0

$ ldapsearch -D 'uid=tuser0,ou=People,dc=example,dc=com' -w tuser0 -b "dc=example,dc=com" "(cn=*)"
ldapsearch: Password has expired.
ldap_simple_bind: Invalid credentials
ldap_simple_bind: additional info: password expired!

Error log (once the patch is applied):
[28/Feb/2011:14:15:08 -0800] - Password Policy Entrycn=cn\3DnsPwPolicyEntry\2Cou\3DPeople\2Cdc\3Dexample\2Cdc\3Dcom,cn=nsPwPolicyContainer,ou=People,dc=example,dc=com: Invalid passwordMaxAge: xyz

--- Additional comment from nhosoi on 2011-03-01 19:20:13 EST ---

Created attachment 481753 [details]
git patch file (master)

Description: Adding an ability to handle ##D|d, ##H|h, ##M|m, ##S|s
format to the fine grained password policy duration attributes:
  passwordMinAge, passwordMaxAge, passwordWarning,
  passwordLockoutDuration
Valid value for these duraton parameters are
  . duration in seconds with no extension
  . duration in days, hours, minutes, and seconds with extesion
    D|d, H|h, M|m, and S|s, respectively.
The value should be less than MAX_ALLOWED_TIME_IN_SECS - current_time.

--- Additional comment from rmeggins on 2011-03-02 10:02:38 EST ---

Comment on attachment 481753 [details]
git patch file (master)

https://bugzilla.redhat.com/attachment.cgi?id=481753&action=diff#a/ldap/servers/slapd/modify.c_sec1

this probably won't compile due to the extra comma at the end of the list

Other than that, looks good.

--- Additional comment from nhosoi on 2011-03-02 13:06:44 EST ---

Thanks for finding it out, Rich!  Amazingly, this compiler let me compile it!
  gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2)

But obviously, the comma should not be there.  I removed the comma.

Pushed to master
commit 53839a8b27e92fd04f36401a95b54a2bc1168b88

as well as to 389-ds-base-1.2.8:
commit 3e70b878da60d21c07176108cb96648546176646

Comment 3 Amita Sharma 2011-04-14 08:34:47 UTC
This bug is verified and automated in the password policy test suit.
Marking it as verified.
-Amita

Comment 4 errata-xmlrpc 2011-05-19 12:42:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0533.html


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