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 2189954 - RFE Improve reponse time to filters containing 'nsrole'
Summary: RFE Improve reponse time to filters containing 'nsrole'
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2023-07-31
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: 389-ds-base
Version: 9.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 9.3
Assignee: thierry bordaz
QA Contact: LDAP QA Team
Evgenia Martynyuk
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-26 14:54 UTC by thierry bordaz
Modified: 2023-12-14 10:12 UTC (History)
6 users (show)

Fixed In Version: 389-ds-base-2.3.4-3.el9
Doc Type: Enhancement
Doc Text:
.Directory Server now replaces the virtual attribute `nsRole` with an indexed attribute for managed and filtered roles Previously, LDAP searches that contained the virtual attribute `nsRole` in the filter were time consuming because that attribute cannot be indexed. With this update, when you perform the `ldapsearch` with virtual attribute `nsRole` in the filter, Directory Server replaces the `nsRole` attribute the following way: * For managed roles, the `nsRole` attribute is replaced with the `nsRoleDN` attribute. * For filtered roles, the `nsRole` attribute is replaced with the `nsRoleFilter` attribute. As a result, response time for search with the `nsRole` attribute improves because the search becomes indexed. Note that this update does not apply to nested roles.
Clone Of:
Environment:
Last Closed: 2023-11-07 08:25:18 UTC
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 5722 0 None open RFE When a filter contains 'nsrole', improve response time by rewriting the filter. 2023-04-26 16:04:49 UTC
Red Hat Issue Tracker IDMDS-2980 0 None None None 2023-04-26 16:05:27 UTC
Red Hat Issue Tracker IDMDS-3477 0 None None None 2023-07-26 12:57:30 UTC
Red Hat Issue Tracker RHELPLAN-155860 0 None None None 2023-04-26 14:55:51 UTC
Red Hat Product Errata RHBA-2023:6350 0 None None None 2023-11-07 08:25:43 UTC

Description thierry bordaz 2023-04-26 14:54:44 UTC
Description of problem:

'nsrole' is a virtual attribute and is not indexed. With a poorly selective filter like below the search may be not indexed
     "(&(nsrole=cn=managed_role,cn=suffix)(objectclass=posixAccount)))"
    
The RFE is to rewrite the filter component containing 'nsrole' attribute type and assertion that are managed roles and filter roles

Comment 3 bsmejkal 2023-07-25 14:53:48 UTC
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.9.17, pytest-7.4.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.9.17', 'Platform': 'Linux-5.14.0-339.el9.x86_64-x86_64-with-glibc2.34', 'Packages': {'pytest': '7.4.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '3.0.0', 'html': '3.2.0', 'libfaketime': '0.1.2', 'flaky': '3.7.0'}}
389-ds-base: 2.3.4-3.el9
nss: 3.90.0-2.el9_2
nspr: 4.35.0-2.el9_2
openldap: 2.6.3-1.el9
cyrus-sasl: 2.1.27-21.el9
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests
configfile: pytest.ini
plugins: metadata-3.0.0, html-3.2.0, libfaketime-0.1.2, flaky-3.7.0
collected 8 items / 6 deselected / 2 selected                                                                                                                                                                                                

dirsrvtests/tests/suites/roles/basic_test.py::test_managed_and_filtered_role_rewrite PASSED                                                                                                                                            [ 50%]
dirsrvtests/tests/suites/roles/basic_test.py::test_not_such_entry_role_rewrite PASSED                                                                                                                                                  [100%]

========================================================================================== 2 passed, 6 deselected, 18 warnings in 127.66s (0:02:07) ==========================================================================================

Tests pass, however, we might need to adjust the wait time for import task in bdb . On slower machines it causes failure as the import task is still not done in the time limit.
It failed in gating but passes in 1mt.

Comment 6 bsmejkal 2023-07-26 09:46:38 UTC
As per comment #c3 marking as VERIFIED.

Comment 9 errata-xmlrpc 2023-11-07 08:25:18 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 (389-ds-base bug fix and enhancement update), 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-2023:6350


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