Issue 8349 - fix ppolicy issue
Summary: fix ppolicy issue
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.43
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-12 07:28 UTC by HAMANO Tsukasa
Modified: 2019-07-24 18:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description HAMANO Tsukasa 2016-01-12 07:28:42 UTC
Full_Name: HAMANO Tsukasa
Version: 2.4.43
OS: Linux
URL: https://www.osstech.co.jp/download/hamano/openldap/ppolicy_fix_pwdInHistory.patch
Submission from: (NULL) (240b:10:2640:bf0:290:4cff:fe0d:f43e)


We fixed several issue around ppolicy.

1) reduce pwdInHistory
If set pwdInHistory to 5 then reduce pwdInHistory to 3,
We expect to check password with three history, but ppolicy check
password with all pwdHistory attribute.

2) reduce pwdInHistory to zero
If set pwdInHistory to 5 then reduce pwdInHistory to 0,
We expect that ppolicy password checking will be disbale. but the
pwdHistory attribute are remains, so password checking is still
enabled.
We need to remove pwdHistory attribute.

Please apply the patch. Thank you.
Comment 1 Michael Ströder 2016-01-12 08:46:23 UTC
Frankly I don't understand your text.

hamano@osstech.co.jp wrote:
> We fixed several issue around ppolicy.
> 
> 1) reduce pwdInHistory
> If set pwdInHistory to 5 then reduce pwdInHistory to 3,

I try to rephrase:
If attribute 'pwdHistory' in the user entry has 5 values and attribute
'pwdInHistory' in the policy entry is 3 then ignore (and remove?) the 2 oldest
'pwdHistory' values.

Are values in 'pwdInHistory' sorted by timestamp in this part of the code?

> We expect to check password with three history, but ppolicy check
> password with all pwdHistory attribute.
> 
> 2) reduce pwdInHistory to zero
> If set pwdInHistory to 5 then reduce pwdInHistory to 0,

I try to rephrase:
If attribute 'pwdHistory' in the user entry is set and attribute 'pwdInHistory'
in the policy entry is 0 then ignore (and remove?) 'pwdHistory' completely.

> We expect that ppolicy password checking will be disbale. but the
> pwdHistory attribute are remains, so password checking is still
> enabled.
> We need to remove pwdHistory attribute.

I'm not sure whether removing 'pwdHistory' attribute (values) is the right thing
to do. If you want to increase 'pwdInHistory' later then the old values are lost.

Ciao, Michael.

Comment 2 HAMANO Tsukasa 2016-01-13 08:50:10 UTC
Hi,

On Tue, 12 Jan 2016 17:46:23 +0900,
Michael Ströder wrote:
> 
> > 1) reduce pwdInHistory
> > If set pwdInHistory to 5 then reduce pwdInHistory to 3,
> 
> I try to rephrase:
> If attribute 'pwdHistory' in the user entry has 5 values and attribute
> 'pwdInHistory' in the policy entry is 3 then ignore (and remove?) the 2 oldest
> 'pwdHistory' values.
> 
Exactly! Thanks for your rephrase.

> Are values in 'pwdInHistory' sorted by timestamp in this part of the code?
> 
Ya, parsed pwdInHistory(pw_hist *tl) are sorted by ascending time order.
So, In this case, we need ignore first 2 attributes then check 3 attributes.

> > We expect to check password with three history, but ppolicy check
> > password with all pwdHistory attribute.
> > 
> > 2) reduce pwdInHistory to zero
> > If set pwdInHistory to 5 then reduce pwdInHistory to 0,
> 
> I try to rephrase:
> If attribute 'pwdHistory' in the user entry is set and attribute 'pwdInHistory'
> in the policy entry is 0 then ignore (and remove?) 'pwdHistory' completely.
> 
> > We expect that ppolicy password checking will be disbale. but the
> > pwdHistory attribute are remains, so password checking is still
> > enabled.
> > We need to remove pwdHistory attribute.
> 
> I'm not sure whether removing 'pwdHistory' attribute (values) is the right thing
> to do. If you want to increase 'pwdInHistory' later then the old values are lost.
> 

Currently, pwdHistory attributes will truncate when to reduce
'pwdInHistory'.
But this process is simply skipping when pwdInHistory: 0. this
behavior is unnatural.
I know how you feel.
I'm sure root of issue is that 'pwdInHistory' attribute have both role
"number of record pwdHistory" and "number of check pwdHistory".
Thay are desirable to split same as 'pwdMaxFailure' and
'pwdMaxRecordedFailure'.

Thank you.

> Ciao, Michael.
> 

-- 
Open Source Solution Technology Corporation
HAMANO Tsukasa <hamano@osstech.co.jp>
fingerprint = 3747 AB70 7B98 7882 46F5  87E1 BF91 A2C1 7DC1 5E3D

Comment 3 Quanah Gibson-Mount 2017-04-14 19:52:04 UTC
changed notes
moved from Incoming to Software Bugs
Comment 4 Quanah Gibson-Mount 2017-09-06 23:50:39 UTC
changed notes
Comment 5 Quanah Gibson-Mount 2017-09-07 16:16:34 UTC
changed notes
Comment 6 Quanah Gibson-Mount 2017-09-07 16:21:42 UTC
--On Tuesday, January 12, 2016 7:28 AM +0000 hamano@osstech.co.jp wrote:

> Full_Name: HAMANO Tsukasa
> Version: 2.4.43
> OS: Linux
> URL:
> https://www.osstech.co.jp/download/hamano/openldap/ppolicy_fix_pwdInHisto
> ry.patch Submission from: (NULL) (240b:10:2640:bf0:290:4cff:fe0d:f43e)
>
>
> We fixed several issue around ppolicy.
>
> 1) reduce pwdInHistory
> If set pwdInHistory to 5 then reduce pwdInHistory to 3,
> We expect to check password with three history, but ppolicy check
> password with all pwdHistory attribute.
>
> 2) reduce pwdInHistory to zero
> If set pwdInHistory to 5 then reduce pwdInHistory to 0,
> We expect that ppolicy password checking will be disbale. but the
> pwdHistory attribute are remains, so password checking is still
> enabled.
> We need to remove pwdHistory attribute.

Hi,

I'm working on catching up on old ITS submissions.  This submission is 
missing an IPR and cannot be included until it is provided.  Please see 
<http://www.openldap.org/devel/contributing.html> for information on the 
IPR requirements.

Thanks,
Quanah


--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>


Comment 7 HAMANO Tsukasa 2019-05-07 03:27:44 UTC
Sorry for my late reply.

https://www.osstech.co.jp/download/hamano/openldap/ppolicy_fix_pwdInHistory.patch

The attached file is derived from OpenLDAP Software. All of the modifications to OpenLDAP Software represented in the following patch(es) were developed by Open Source Solution Technology Corporation. Open Source Solution Technology Corporation has not assigned rights and/or interest in this work to any party. I, HAMANO Tsukasa am authorized by Open Source Solution Technology Corporation, my employer, to release this work under the following terms.
Open Source Solution Technology Corporation hereby place the following modifications to OpenLDAP Software (and only these modifications) into the public domain. Hence, these modifications may be freely used and/or redistributed for any purpose with or without attribution and/or other notice.

On Fri, 08 Sep 2017 01:21:42 +0900,
Quanah Gibson-Mount wrote:
> 
> --On Tuesday, January 12, 2016 7:28 AM +0000 hamano@osstech.co.jp wrote:
> 
> > Full_Name: HAMANO Tsukasa
> > Version: 2.4.43
> > OS: Linux
> > URL:
> > https://www.osstech.co.jp/download/hamano/openldap/ppolicy_fix_pwdInHisto
> > ry.patch Submission from: (NULL) (240b:10:2640:bf0:290:4cff:fe0d:f43e)
> > 
> > 
> > We fixed several issue around ppolicy.
> > 
> > 1) reduce pwdInHistory
> > If set pwdInHistory to 5 then reduce pwdInHistory to 3,
> > We expect to check password with three history, but ppolicy check
> > password with all pwdHistory attribute.
> > 
> > 2) reduce pwdInHistory to zero
> > If set pwdInHistory to 5 then reduce pwdInHistory to 0,
> > We expect that ppolicy password checking will be disbale. but the
> > pwdHistory attribute are remains, so password checking is still
> > enabled.
> > We need to remove pwdHistory attribute.
> 
> Hi,
> 
> I'm working on catching up on old ITS submissions.  This submission is
> missing an IPR and cannot be included until it is provided.  Please
> see <http://www.openldap.org/devel/contributing.html> for information
> on the IPR requirements.
> 
> Thanks,
> Quanah
> 
> 
> --
> 
> Quanah Gibson-Mount
> Product Architect
> Symas Corporation
> Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
> <http://www.symas.com>
> 

-- 
Open Source Solution Technology Corporation
HAMANO Tsukasa <hamano@osstech.co.jp>

Comment 8 Quanah Gibson-Mount 2019-05-07 04:11:33 UTC
changed notes
Comment 9 Quanah Gibson-Mount 2019-06-17 16:08:11 UTC
changed notes
changed state Open to Test
Comment 10 Quanah Gibson-Mount 2019-06-17 16:17:03 UTC
changed notes
changed state Test to Release
Comment 11 OpenLDAP project 2019-07-24 18:59:33 UTC
Fixed in master
Fixed in RE24 (2.4.48)
Comment 12 Quanah Gibson-Mount 2019-07-24 18:59:33 UTC
changed notes
changed state Release to Closed