Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-5375

Editing Directory Connector tab shows error when 2 LDAP URL are listed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 3.4.4
    • 3.4.0, 3.3.4, 3.4.1, 3.4.3
    • Directory - LDAP
    • None

      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://1.1.1.1:389 ldap://10.125.88.239:389</crowd.Directory-1.Attributes.ldap.url>
        
      • On 3.2.0
        1. Access Directories, find one which would connect via LDAP
        2. Edit it and fill the URL field with the two address, for example:
          ldap://1.1.1.1:389 ldap://10.125.88.239:389
          
        1. Save will work fine
      • On 3.3.4
        1. Access Directories, find one which would connect via LDAP
        2. URL field is not available anymore
        3. 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://1.1.1.1:389 ldap://10.125.88.239:389
          Stack trace:
          java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in authority at index 7: ldap://1.1.1.1:389 ldap://10.125.88.239:389
          	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://1.1.1.1:389 ldap://10.125.88.239:389'
        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.

            [CWD-5375] Editing Directory Connector tab shows error when 2 LDAP URL are listed

            Adrian Castillo made changes -
            Remote Link Original: This issue links to "KRAK-1948 (Bulldog)" [ 421431 ] New: This issue links to "KRAK-1948 (JIRA Server (Bulldog))" [ 421431 ]
            Matt Shelton made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 417375 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Simplified Crowd Development Workflow v2 - restricted [ 3119431 ] New: JAC Bug Workflow v3 [ 3365693 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            I can confirm that 3.4.4 resolves this issue - thanks Crowd team!

            Craig Castle-Mead added a comment - I can confirm that 3.4.4 resolves this issue - thanks Crowd team!
            Patryk made changes -
            Fix Version/s New: 3.4.4 [ 86194 ]
            Fix Version/s Original: 3.4.5 [ 86494 ]
            Pawel Gruszczynski (Inactive) made changes -
            Affects Version/s New: 3.4.3 [ 86292 ]
            Affects Version/s New: 3.4.0 [ 82291 ]
            Affects Version/s New: 3.4.1 [ 85997 ]
            Pawel Gruszczynski (Inactive) made changes -
            Fix Version/s New: 3.4.5 [ 86494 ]
            Fix Version/s Original: 3.4.4 [ 86194 ]
            Marcin Kempa made changes -
            Remote Link New: This issue links to "KRAK-1948 (Bulldog)" [ 421431 ]
            Marcin Kempa made changes -
            Assignee New: Pawel Gruszczynski [ pgruszczynski ]
            Marcin Kempa made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

              pgruszczynski Pawel Gruszczynski (Inactive)
              eviana Edson (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: