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 1662461 - Log the actual base DN when the search fails with "invalid attribute request".
Summary: Log the actual base DN when the search fails with "invalid attribute request".
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.6
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: thierry bordaz
QA Contact: RHDS QE
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks: 1710435 1713200 1720331 1801704
TreeView+ depends on / blocked
 
Reported: 2018-12-28 17:30 UTC by Têko Mihinto
Modified: 2023-12-15 16:17 UTC (History)
15 users (show)

Fixed In Version: 389-ds-base-1.3.10.1-1.el7
Doc Type: Bug Fix
Doc Text:
.Directory Server now correctly logs the search base if the server rejects a search operation Previously, when Directory Server rejected a search operation because of a protocol error, the server logged `base="(null)"` instead of the actual search base. With this update, Directory Server passes the correct internal variable to the log operation. As a result, the server correctly logs the search base in the mentioned scenario.
Clone Of:
: 1720331 1801704 (view as bug list)
Environment:
Last Closed: 2020-03-31 19:46:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 3486 0 None closed Log the actual base DN when the search fails with "invalid attribute request". 2021-02-03 19:40:56 UTC
Red Hat Product Errata RHBA-2020:1064 0 None None None 2020-03-31 19:46:55 UTC

Description Têko Mihinto 2018-12-28 17:30:54 UTC
Description of problem:

When a search fails because it requests more than one empty attribute,
the search base DN is always logged as "(null)".
This can make it difficult to troubleshoot customer issues.


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

# rpm -qa | grep 389-ds-base-1
389-ds-base-1.3.8.4-18.el7_6.x86_64
#


How reproducible:

Always.


Steps to Reproduce:

# ldapsearch -xLLL -D "cn=Directory Manager" -W -b "dc=TekoSoft,dc=com" -sbase objectclass=* ""
Enter LDAP Password:
dn: dc=TekoSoft,dc=com

# ldapsearch -xLLL -D "cn=Directory Manager" -W -b "dc=TekoSoft,dc=com" -sbase objectclass=* "" "" ""
Enter LDAP Password:
Protocol error (2)
#


Actual results:

Access log excerpt:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[28/Dec/2018:17:42:10.152998700 +0100] conn=21 fd=64 slot=64 connection from ::1 to ::1
[28/Dec/2018:17:42:10.153155808 +0100] conn=21 op=0 BIND dn="cn=Directory Manager" method=128 version=3
[28/Dec/2018:17:42:10.153279838 +0100] conn=21 op=0 RESULT err=0 tag=97 nentries=0 etime=0.0000198830 dn="cn=directory manager"
[28/Dec/2018:17:42:10.153426653 +0100] conn=21 op=1 SRCH base="dc=TekoSoft,dc=com" scope=0 filter="(objectClass=*)" attrs=""
[28/Dec/2018:17:42:10.153551106 +0100] conn=21 op=1 RESULT err=0 tag=101 nentries=1 etime=0.0000204349
[28/Dec/2018:17:42:10.153710720 +0100] conn=21 op=2 UNBIND
[28/Dec/2018:17:42:10.153723276 +0100] conn=21 op=2 fd=64 closed - U1
[28/Dec/2018:17:42:19.466484844 +0100] conn=22 fd=64 slot=64 connection from ::1 to ::1
[28/Dec/2018:17:42:19.466712558 +0100] conn=22 op=0 BIND dn="cn=Directory Manager" method=128 version=3
[28/Dec/2018:17:42:19.466817359 +0100] conn=22 op=0 RESULT err=0 tag=97 nentries=0 etime=0.0000289684 dn="cn=directory manager"
[28/Dec/2018:17:42:19.466979068 +0100] conn=22 op=1 SRCH base="(null)" scope=0 filter="(objectClass=*)", invalid attribute request
[28/Dec/2018:17:42:19.466999527 +0100] conn=22 op=1 RESULT err=2 tag=101 nentries=0 etime=0.0000075801
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Expected results:

... SRCH base="dc=TekoSoft,dc=com"" scope=0 filter="(objectClass=*)", invalid attribute request


Additional info:

Related to the fix in bug https://bugzilla.redhat.com/show_bug.cgi?id=1624004

Comment 7 thierry bordaz 2019-06-07 09:25:24 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/50428

Comment 8 thierry bordaz 2019-06-07 12:34:02 UTC
Bug fix pushed upstream -> POST

Comment 12 sgouvern 2019-09-26 15:39:25 UTC
Verified on :
[root@ci-vm-10-0-136-194 upstream]# rpm -qa | grep 389
389-ds-base-1.3.10.1-2.el7.x86_64

automated test : s_logs_test.py::test_log_base_dn_when_invalid_attr_request output :

====================================================== warnings summary ======================================================
ds/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py:735
  /mnt/tests/rhds/tests/upstream/ds/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py:735: DeprecationWarning: invalid escape sequence \(
    """

/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.bz1273549 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.bz1358706 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.ds49029 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.ds49232 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.bz1732053 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.ds50510 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.bz1662461 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324
  /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.ds50428 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=============================================== 1 passed, 9 warnings in 10.71s ===============================================

Comment 17 errata-xmlrpc 2020-03-31 19:46:14 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-2020:1064


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