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

2018-06-12 Thread Alex Rudyy (JIRA)


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

Alex Rudyy commented on QPID-8208:
--

I reverted the changes with a work around for the issue which looks to me like 
JVM defect. I am going to de-scope this JIRA from 7.0.5 release. The  Oracle 
JVM defect should be raised and its number should be referred in a work-around

> [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
>
> Attachments: 0001-QPID-8208-Broker-J-Improve-exception-handling.patch
>
>
> 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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



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

2018-06-12 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on QPID-8208:
---

Commit ad99c10efdec912845107af228610c3e323ef68e in qpid-broker-j's branch 
refs/heads/master from [~alex.rufous]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=ad99c10 ]

Revert "QPID-8208: [Broker-J] Strengthen handling of exception thrown on 
establishing of LDAP connections"

This reverts commit 93a288fdc6d44c0a39ad217beb4b58e768753128.


> [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
>
> Attachments: 0001-QPID-8208-Broker-J-Improve-exception-handling.patch
>
>
> 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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



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

2018-06-12 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on QPID-8208:
---

Commit 6acc91299ccf6440268592d901ae45f7f3800224 in qpid-broker-j's branch 
refs/heads/7.0.x from [~alex.rufous]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=6acc912 ]

Revert "QPID-8208: [Broker-J] Strengthen handling of exception thrown on 
establishing of LDAP connections"

This reverts commit 06c01aa94dd4e71be8280c1fd218f909fddf3f15.


> [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
>
> Attachments: 0001-QPID-8208-Broker-J-Improve-exception-handling.patch
>
>
> 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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



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

2018-06-11 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on QPID-8208:
---

Commit 06c01aa94dd4e71be8280c1fd218f909fddf3f15 in qpid-broker-j's branch 
refs/heads/7.0.x from [~alex.rufous]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=06c01aa ]

QPID-8208: [Broker-J] Strengthen handling of exception thrown on establishing 
of LDAP connections

(cherry picked from commit 93a288fdc6d44c0a39ad217beb4b58e768753128)


> [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
>
> Attachments: 0001-QPID-8208-Broker-J-Improve-exception-handling.patch
>
>
> 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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



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

2018-06-11 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on QPID-8208:
---

Commit 93a288fdc6d44c0a39ad217beb4b58e768753128 in qpid-broker-j's branch 
refs/heads/master from [~alex.rufous]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=93a288f ]

QPID-8208: [Broker-J] Strengthen handling of exception thrown on establishing 
of LDAP connections


> [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
>
> Attachments: 0001-QPID-8208-Broker-J-Improve-exception-handling.patch
>
>
> 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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



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

2018-06-11 Thread Keith Wall (JIRA)


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

Keith Wall commented on QPID-8208:
--

Alex

That looks to me to be a Java platform defect rather than a Broker-J issue. 
{{InitialDirContext}} is defined by its API as throwing a {{NamingException}} 
only.  It cannot legitimately throw a {{NullPointerException}}.

You haven't stated the version of the JVM that produced this defect,  but I 
notice looking at the sources for LdapClient 1.8.0_171, there is appears to be 
race condition in the implementation.  If an "Notice of Disconnection" 
(1.3.6.1.4.1.1466.20036) arrives from the LDAP peer this causes the 
{{com.sun.jndi.ldap.LdapClient#conn}} ref to be nulled (look at 
{{processUnsolicited()}} invokes {{forcedClosed()}} - which doesn't take the 
mutex).   If this occurs whilst a thread is executing 
{{LdapClient.authenticate}}, then the NPE will occur.

I think this defect should be closed as not a defect.







> [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
>
> Attachments: 0001-QPID-8208-Broker-J-Improve-exception-handling.patch
>
>
> 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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



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

2018-06-11 Thread Alex Rudyy (JIRA)


[ 
https://issues.apache.org/jira/browse/QPID-8208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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.(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.(InitialContext.java:216)
at 
javax.naming.directory.InitialDirContext.(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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org