Bug 784164 - LDAP - Group filter if wrapped in () causes trouble
Summary: LDAP - Group filter if wrapped in () causes trouble
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: RHQ 4.5.0
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 830892
TreeView+ depends on / blocked
 
Reported: 2012-01-24 03:59 UTC by Elias Ross
Modified: 2013-09-01 10:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
: 830892 (view as bug list)
Environment:
Last Closed: 2013-09-01 10:12:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Elias Ross 2012-01-24 03:59:03 UTC
Description of problem:

Splunk supports an LDAP configuration key like this:

groupBaseFilter = (|(cn=some-org-all)(cn=SplunkAdmin)(cn=some-ops)(cn=OurNOC))

This attribute cuts down on what's displayed on the role mapping screen on Splunk. RHQ seems to fail with this, but does support something similar to:

groupBaseFilter = |(cn=some-org-all)(cn=SplunkAdmin)(cn=some-ops)(cn=OurNOC)

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

The LDAP test program shows something like:
**Verbose:debug ---- stack trace reference:javax.naming.directory.InvalidSearchFilterException: invalid attribute description; remaining name 'dc=xxx,dc=com'

The problem code:

modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java

        if ((groupFilter != null) && (!groupFilter.trim().isEmpty())) {
            String filter = String.format("(%s)", groupFilter);
^^^
            return buildGroup(systemConfig, filter);
        }

() should not be added if there is () already.

Note: I also don't see anything logged in rhq-server-log4j.log when this fails. Is this something bizarre about the logging configuration? Mine is out-of-the-box.

Comment 1 Mike Foley 2012-01-30 16:22:05 UTC
12/30/2012 BZ triage meeting mfoley, ccrouch, loleary, asantos

Comment 2 Heiko W. Rupp 2012-06-06 08:12:41 UTC
RFC 2254 defines the syntax http://tools.ietf.org/html/rfc2254

Section 4 gives the grammar and this supports your analysis

Comment 3 Heiko W. Rupp 2012-06-06 11:54:40 UTC
master f68af16fc6299

Comment 4 Heiko W. Rupp 2013-09-01 10:12:47 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.


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