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

Include underlying exception from LDAP directory in authentication failures

      The error sent to SOAP clients only includes the message of the exception, not the cause. Since around 2.1, when exceptions are wrapped in SpringLDAPConnector the message is just the username.

      The wrapped exceptions should include the underlying message as part of the text so it's visible to SOAP clients.

            [CWD-2827] Include underlying exception from LDAP directory in authentication failures

            I see the fix version is identified as 2.5. Can you tell me when this version is slated for release? Thanks.

            jim boeschen added a comment - I see the fix version is identified as 2.5. Can you tell me when this version is slated for release? Thanks.

            joe added a comment -

            Due to changes in the client libraries, the message with the LDAP error code will be the cause of the InvalidAuthenticationException thrown by the client:

            Exception in thread "main" com.atlassian.crowd.exception.InvalidAuthenticationException: user2
            	at com.atlassian.crowd.util.SoapExceptionTranslator.throwEquivalentCheckedException(SoapExceptionTranslator.java:189)
            	at com.atlassian.crowd.service.soap.client.SecurityServerClientImpl.authenticatePrincipal(SecurityServerClientImpl.java:280)
            	at SoapClientSample.main(SoapClientSample.java:44)
            Caused by: org.codehaus.xfire.fault.XFireFault: Account with name <user2> failed to authenticate: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
            	at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
            	at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
            ...
            

            joe added a comment - Due to changes in the client libraries, the message with the LDAP error code will be the cause of the InvalidAuthenticationException thrown by the client: Exception in thread "main" com.atlassian.crowd.exception.InvalidAuthenticationException: user2 at com.atlassian.crowd.util.SoapExceptionTranslator.throwEquivalentCheckedException(SoapExceptionTranslator.java:189) at com.atlassian.crowd.service.soap.client.SecurityServerClientImpl.authenticatePrincipal(SecurityServerClientImpl.java:280) at SoapClientSample.main(SoapClientSample.java:44) Caused by: org.codehaus.xfire.fault.XFireFault: Account with name <user2> failed to authenticate: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials] at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31) at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28) ...

              jwalton joe
              jwalton joe
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: