Bug 578485 - LDAP: Screen to assign rhq role to ldap group on active directory returns a java exception.
Summary: LDAP: Screen to assign rhq role to ldap group on active directory returns a j...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Configuration
Version: 3.0.0
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Simeon Pinder
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: jon24-ldap
TreeView+ depends on / blocked
 
Reported: 2010-03-31 13:19 UTC by Sunil Kondkar
Modified: 2010-08-12 16:58 UTC (History)
0 users

Fixed In Version: 2.4
Clone Of:
Environment:
Last Closed: 2010-08-12 16:58:13 UTC
Embargoed:


Attachments (Terms of Use)
Screenshot for error (85.51 KB, image/png)
2010-03-31 13:57 UTC, Sunil Kondkar
no flags Details
screenshot of LDAP Configuration Properties set (117.12 KB, image/png)
2010-03-31 13:58 UTC, Sunil Kondkar
no flags Details
Stack trace for error (39.64 KB, application/octet-stream)
2010-03-31 13:58 UTC, Sunil Kondkar
no flags Details
Updated screenshot of error (296.83 KB, image/png)
2010-04-16 14:08 UTC, Simeon Pinder
no flags Details
Full error from browser. (9.72 KB, text/plain)
2010-04-16 14:09 UTC, Simeon Pinder
no flags Details

Description Sunil Kondkar 2010-03-31 13:19:24 UTC
Description of problem:

After configuring rhq for active directory server in 'LDAP Configuration Properties' section on screen 'Administration->System Configuration->Settings', if user tries to assign a role to ldap group, the screen returns a java exception.

Please refer the attached screenshots and stack trace.

Active directory is setup and is running and some groups and users are added.

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

3.0.0-SNAPSHOT

How reproducible:


Steps to Reproduce:

1. Login to rhq. (Jon Server URL: suniltest.usersys.redhat.com:7080)
2. Navigate to 'Administration->System Configuration->Settings' screen.
3. In 'LDAP Configuration Properties' section, enter and save the configuration properties as below:

Active directory URL: ldap://10.65.201.130:389 (ldap://win2k3red.test.pnq.com)
Search base: dc=test,dc=pnq,dc=com
Username: cn=Administrator,cn=users,dc=test,dc=pnq,dc=com
Login property=cn
Group search filter: objectclass=group
Group member filter: member

4. Navigate to 'Administration->Security->Roles screen.
5. Click on the link 'All Resources Role'.
6. Click on the button 'ADD TO LIST' in 'Assigned Ldap Groups' section.
7. It returns below error:
java.lang.RuntimeException: javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: test.pnq.com:389 [Root exception is java.net.ConnectException: Connection timed out]] The page requested cannot be displayed due to some error.


Actual results:
It returns a java exception.

Expected results:
It should display the list of related LDAP groups available on active directory server.

Additional info:

Comment 1 Sunil Kondkar 2010-03-31 13:57:15 UTC
Created attachment 403749 [details]
Screenshot for error

Comment 2 Sunil Kondkar 2010-03-31 13:58:11 UTC
Created attachment 403750 [details]
screenshot of LDAP Configuration Properties set

Comment 3 Sunil Kondkar 2010-03-31 13:58:51 UTC
Created attachment 403751 [details]
Stack trace for error

Comment 4 Charles Crouch 2010-04-05 16:13:07 UTC
Ok, we'll take this one and see if we can reproduce.

> Active directory URL: ldap://10.65.201.130:389 (ldap://win2k3red.test.pnq.com)
>  javax.naming.CommunicationException: test.pnq.com:389

the different hostnames looks very suspicious. Could be a DNS problem

Comment 5 Simeon Pinder 2010-04-09 23:09:19 UTC
I am not able to reproduce this bug.  When I click on the 'All Resources' Role and attempt to add ldap groups, the gui proceeds to display the available groups without error. 

The host names and ports from configuration image do not match up with the error messages listed in the attached server log.  This looks like a misconfiguration problem on the QA side.

Please attempt to re-produce this issue again with a working and configured directory server.

Comment 6 Simeon Pinder 2010-04-13 15:17:29 UTC
We sorted through the dns and configuration issues and confirmed that this is still a problem.  Please update this case with the specific 'Active Directory' version and OS details for the ldap host that you are using to connect to.

Comment 7 Sunil Kondkar 2010-04-13 15:50:26 UTC
Below are the details:

OS: Windows Server 2003
Active Directory version: Windows Server 2003 active directory
Hostname: win2k3red.test.pnq.com

Note: The ldap user authorization and ldap group mapping to rhq roles is working in redhat active directory server.
For windows active directory server, the ldap user authorization with rhq is working fine. (users existing on windows AD server are able to login to rhq).

However, windows AD server group mapping to rhq roles is not working.

For more details, below is the ldapsearch command:

/usr/lib64/mozldap/ldapsearch -x -h win2k3red.test.pnq.com -p 389 -D "cn=Administrator,cn=users,dc=test,dc=pnq,dc=com" -w RedHat123 -b "dc=test,dc=pnq,dc=com" -s sub "objectclass=computer" dn dnshostname operatingsystem

version: 1
dn: CN=WIN2K3RED,OU=Domain Controllers,DC=test,DC=pnq,DC=com
operatingSystem: Windows Server 2003
dNSHostName: win2k3red.test.pnq.com

Comment 8 Simeon Pinder 2010-04-16 14:08:33 UTC
Created attachment 407109 [details]
Updated screenshot of error

cleaned up after filtered out incorrect configuration details.

Comment 9 Simeon Pinder 2010-04-16 14:09:42 UTC
Created attachment 407110 [details]
Full error from browser.

Comment 10 Simeon Pinder 2010-04-16 14:21:41 UTC
This issue has the same cause as 580127 but manifests on a different set of screens. This issue has been fixed as of master build >= 218.

Details:
A number of problems detected: i)group data objects used by the UI could be affected by ldap communication. ii) problems in ldap communication were thrown as runtime exceptions to the browser iii)configuration changes could easily cause ldap communication problems.

Solution: 
Fixed group data object instantiation mechanism for UI and modified the UI to detect ldap failures logging on server side while displaying ui messages on client.

Commit hash:
07b28294ef1811d7877153de9516dfa6252fd2e3

Comment 11 Simeon Pinder 2010-04-16 14:22:58 UTC
A final note that the 'group filter' value shown in the credentials/setup screenshot is invalid as must be in form key=value.

Comment 12 Sunil Kondkar 2010-04-19 15:31:34 UTC
Verified on Jon build#103 (Revision: 10609).

User is able to map the rhq role to ldap group on active directory.
The screen to assign rhq role displays the ldap group.

Comment 13 Corey Welton 2010-08-12 16:58:13 UTC
Mass-closure of verified bugs against JON.


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