You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alex Rudyy (JIRA)" <ji...@apache.org> on 2018/06/11 14:05:00 UTC

[jira] [Commented] (QPID-8208) [Broker-J] Improve unexpected exception handling for LDAP connections in SimpleLDAPAuthenticationProvider

    [ https://issues.apache.org/jira/browse/QPID-8208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16508098#comment-16508098 ] 

Alex Rudyy commented on QPID-8208:
----------------------------------

An example of unexpected exception:
{noformat}
Caused by: java.lang.NullPointerException: null
        at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:300)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2791)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:319)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:192)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:210)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:153)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:83)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
        at javax.naming.InitialContext.init(InitialContext.java:244)
        at javax.naming.InitialContext.<init>(InitialContext.java:216)
        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
        at org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl.createInitialDirContext(SimpleLDAPAuthenticationManagerImpl.java:511)
        at org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl.createSearchInitialDirContext(SimpleLDAPAuthenticationManagerImpl.java:655)
        at org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl.getNameFromId(SimpleLDAPAuthenticationManagerImpl.java:614)
        at org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl.doLDAPNameAuthentication(SimpleLDAPAuthenticationManagerImpl.java:313)
        at org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl.access$000(SimpleLDAPAuthenticationManagerImpl.java:77)
        at org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl$1.call(SimpleLDAPAuthenticationManagerImpl.java:380)
        at org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl$1.call(SimpleLDAPAuthenticationManagerImpl.java:376)
        at org.apache.qpid.server.security.auth.manager.AuthenticationResultCacher$1.call(AuthenticationResultCacher.java:86)
        at org.apache.qpid.server.security.auth.manager.AuthenticationResultCacher$1.call(AuthenticationResultCacher.java:82)
{noformat}

> [Broker-J] Improve unexpected exception handling for LDAP connections in SimpleLDAPAuthenticationProvider
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-8208
>                 URL: https://issues.apache.org/jira/browse/QPID-8208
>             Project: Qpid
>          Issue Type: Bug
>          Components: Broker-J
>    Affects Versions: qpid-java-6.1.6, qpid-java-broker-7.0.3, qpid-java-broker-7.0.2, 0.32, qpid-java-6.0, qpid-java-6.0.1, qpid-java-6.0.2, qpid-java-6.0.3, qpid-java-6.0.4, qpid-java-6.0.5, qpid-java-6.1, qpid-java-6.0.6, qpid-java-6.1.1, qpid-java-6.1.2, qpid-java-6.0.7, qpid-java-6.1.3, qpid-java-6.0.8, qpid-java-6.1.4, qpid-java-broker-7.0.0, qpid-java-6.1.5, qpid-java-broker-7.0.1, qpid-java-broker-7.0.4
>            Reporter: Alex Rudyy
>            Priority: Critical
>             Fix For: qpid-java-broker-7.0.5
>
>
> The establishment of connection with LDAP using  default {{com.sun.jndi.ldap.LdapCtxFactory}} can end-up in unexpected exception thrown from {{com.sun.jndi.ldap.LdapClient}}. Thought, it looks like a defect in {{LdapClient}}, the unexpected exceptions should be handled appropriately. The exception should be logged and the authentication failure error should be returned back to the client.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org