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 1453155 - unable to retrieve specific cosAttribute when subtree password policy is configured.
Summary: unable to retrieve specific cosAttribute when subtree password policy is conf...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: Viktor Ashirov
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks: 1298243 1420851 1498958
TreeView+ depends on / blocked
 
Reported: 2017-05-22 09:38 UTC by Hiroko Miura
Modified: 2020-12-14 08:43 UTC (History)
7 users (show)

Fixed In Version: 389-ds-base-1.3.7.5-5.el7
Doc Type: Bug Fix
Doc Text:
Directory Server now correctly sets whether virtual attributes are operational The "pwdpolicysubentry" subtree password policy attribute in Directory Server is flagged as operational. However, in the previous version of Directory Server, this flag was incorrectly applied to following virtual attributes that were processed. As a consequence, the search results were not visible to the client. With this update, the server now resets the attribute before processing the next virtual attribute and Class of Service (CoS). As a result, the expected virtual attributes and CoS are now returned to the client.
Clone Of:
: 1498958 (view as bug list)
Environment:
Last Closed: 2018-04-10 14:16:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
custom schema and sample LDIF (1.67 KB, application/zip)
2017-05-22 09:38 UTC, Hiroko Miura
no flags Details
custom schema and sample LDIF (1.68 KB, application/zip)
2017-05-23 01:55 UTC, Hiroko Miura
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2448 0 None None None 2020-09-13 22:03:03 UTC
Red Hat Product Errata RHBA-2018:0811 0 None None None 2018-04-10 14:17:45 UTC

Description Hiroko Miura 2017-05-22 09:38:04 UTC
Created attachment 1280972 [details]
custom schema and sample LDIF

Description of problem:

Indirect Cos is defined with custom attributes like the following.
---
dn: cn=cosDefinition,dc=test,dc=com
objectClass: top
objectClass: ldapsubentry
objectClass: cossuperdefinition
objectClass: cosIndirectDefinition
cosAttribute: ou merge-schemes
cosAttribute: x-department merge-schemes
cosAttribute: x-en-ou merge-schemes
cn: cosDefinition
cosIndirectSpecifier: seeAlso
---

This worked without problem.
But specific cosAttribute(custom attribute) 'x-department' is not returned in search with no attribute specified after Subtree password policy is configured.

Version-Release number of selected component (if applicable):

389-ds-base-1.3.4.0-29.el7_2.x86_64

How reproducible:

This can be reproduced with attached custom schema and sample LDIF.


Steps to Reproduce:

1. configure custom schema
 
  # ldapmodify -D "cn=directory manager -W -f modSchema.ldif

2. create suffix dc=test,dc=com and import test.ldif

   => please note that 2 CoS are defined at dc=test,dc=com.
         nsPwPolicy_CoS - CoS for sub-tree password policy
         cosDefinition - problematic CoS above

3. do search user1 which looks like below in test.ldif
---
dn: uid=user1,ou=sub1,dc=test,dc=com
uid: user1
seeAlso: uid=GManager,ou=Org,dc=test,dc=com
givenName: user1
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: xperson
sn: user1
cn: user1
---
   
$ ldapsearch -D "cn=directory manager" -w dirmanager -b dc=test,dc=com uid=user1
dn: uid=user1,ou=sub1,dc=test,dc=com
uid: user1
seeAlso: uid=GManager,ou=Org,dc=test,dc=com
givenName: user1
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: xperson
sn: user1
cn: user1
ou: OU_CoS
x-en-ou: OU-en_CoS

$
   => 'x-department' is not returned even though the other cosAttribute 'ou' and 'x-en-ou' are returned.

 But if problematic cosAttribute 'x-department' is specified explicitly, it can be retrieved.

$ ldapsearch -D "cn=directory manager" -w dirmanager -b dc=test,dc=com uid=user1 x-department
dn: uid=user1,ou=sub1,dc=test,dc=com
x-department: x-department_CoS

$

Actual results:

cosAttribute(custom attribute) 'x-department' is not returned.

Expected results:

cosAttribute(custom attribute) 'x-department' is returned even in search without specifying it.

Additional info:

Comment 2 Hiroko Miura 2017-05-23 01:55:34 UTC
Created attachment 1281302 [details]
custom schema and sample LDIF

Comment 5 mreynolds 2017-10-03 18:01:24 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/49389

Comment 6 mreynolds 2017-10-03 21:05:57 UTC
I was able to reproduce the problem.  

The issue is that when a subtree password policy attribute was encountered during the virtual attribute processing it set a flag that said the attribute was operational (which is correct for the password policy attr: pwdpolicysubentry). 

However, this flag was accidentally carried over to the following virtual attributes that were being processed.  In this case "x-department" was accidentally still seen as operational which is why it was no longer being returned to the client.

Fix is in progress...

Comment 10 mreynolds 2017-10-04 13:20:04 UTC
Fixed upstream.

I will ask my manager to add a 7.4-z flag (as I can not do that).

But, this fix would not go into an official RHEL build for many months (batch update 3), but support can generate a hotfix for the customer now that the fix is upstream.

Comment 16 ashiveka 2017-11-27 05:08:19 UTC
    ============================================================================ test session starts ============================================================================
    platform linux2 -- Python 2.7.5, pytest-3.2.5, py-1.5.2, pluggy-0.4.0 -- /usr/bin/python
    cachedir: .cache
    metadata: {'Python': '2.7.5', 'Platform': 'Linux-3.10.0-768.el7.x86_64-x86_64-with-redhat-7.5-Maipo', 'Packages': {'py': '1.5.2', 'pytest': '3.2.5', 'pluggy': '0.4.0'}, 'Plugins': {'html': '1.16.0', 'metadata': '1.5.0'}}
    389-ds-base: 1.3.7.5-9.el7
    nss: 3.34.0-0.1.beta1.el7
    nspr: 4.17.0-1.el7
    openldap: 2.4.44-9.el7
    svrcore: 4.1.3-2.el7
     
    rootdir: /export/tests, inifile:
    plugins: metadata-1.5.0, html-1.16.0
    collected 1 item                                                                                                                                                            
     
    suites/cos/indirect_cos_test.py::test_indirect_cos PASSED
     
    ------------------------------------------------------- generated xml file: /mnt/tests/rhds/tests/upstream/report.xml -------------------------------------------------------
    ------------------------------------------------------ generated html file: /mnt/tests/rhds/tests/upstream/report.html ------------------------------------------------------
    ========================================================================= 1 passed in 12.54 seconds =========================================================================

Comment 21 errata-xmlrpc 2018-04-10 14:16:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0811


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