Bug 830892 - LDAP - Group filter if wrapped in () causes trouble
Summary: LDAP - Group filter if wrapped in () causes trouble
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: JON 3.1.1
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 784164
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-11 15:12 UTC by Charles Crouch
Modified: 2015-02-01 23:28 UTC (History)
3 users (show)

Fixed In Version:
Clone Of: 784164
Environment:
Last Closed: 2012-08-01 16:05:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Charles Crouch 2012-06-11 15:12:34 UTC
+++ This bug was initially created as a clone of Bug #784164 +++

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.

--- Additional comment from mfoley on 2012-01-30 11:22:05 EST ---

12/30/2012 BZ triage meeting mfoley, ccrouch, loleary, asantos

--- Additional comment from hrupp on 2012-06-06 04:12:41 EDT ---

RFC 2254 defines the syntax http://tools.ietf.org/html/rfc2254

Section 4 gives the grammar and this supports your analysis

--- Additional comment from hrupp on 2012-06-06 07:54:40 EDT ---

master f68af16fc6299


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