Issue Summary
After 3.3.0 customer is not able to configure LDAP failover on Crowd anymore.
The introduction of CWD-2768 has removed the ability Crowd had to configure LDAP failover on native Java method.
Customer understands this is a bug, as he lost funcionality with that fix.
Environment
Customer upgrading Crowd from 3.2.0 to latest versions and found that he cannot use native support for LDAP node failover.
Steps to Reproduce
- application.xml would contain a line like this:
<crowd.Directory-1.Attributes.ldap.url>ldap:
- On 3.2.0
- Access Directories, find one which would connect via LDAP
- Edit it and fill the URL field with the two address, for example:
-
- Save will work fine
- On 3.3.4
- Access Directories, find one which would connect via LDAP
- URL field is not available anymore
- Trying to add two hostnames brings this error message:
Uncategorized exception occured during LDAP processing; nested exception is javax.naming.NamingException: Cannot parse url: abc:389 [Root exception is java.net.MalformedURLException: Not an LDAP URL: abc:389]
4. Tring to edit a Directory, on Connector tab, for one which has >1 URLs, list the following error:
Cause:
java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in authority at index 7: ldap:Stack trace:
java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in authority at index 7: ldap: at com.atlassian.crowd.directory.ldap.LdapUrlData.fromURLAndMode(LdapUrlData.java:62)
at com.atlassian.crowd.console.action.directory.UpdateConnectorConnection.execute(UpdateConnectorConnection.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:899)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1544)
at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:98)
at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:90)
at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1620)
at ognl.ASTMethod.getValueBody(ASTMethod.java:91)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.Ognl.getValue(Ognl.java:470)
at ognl.Ognl.getValue(Ognl.java:434)
- UI error screenshot:
Expected Results
Customer expected to be able to edit the Connector fields to keep that functionality.
Actual Results
Not able to access Connector tab while Editing Directory due to error (mentioned above).
Workaround
- The failover still works, what is impacted is the editing of the Directory via UI
Customer can:
- Update the database directly to add 2 hosts:
UPDATE cwd_directory_attribute
set attribute_value = 'ldap:
WHERE attribute_name = 'ldap.url' AND directory_id=<ID>;
- Update the database to list only one directory in order to edit the parameters via UI, and then update back to revert to 2 directories.
I can confirm that 3.4.4 resolves this issue - thanks Crowd team!