Alex Rudyy created QPID-8126:
--------------------------------

             Summary: [Broker-J][SimpleLDAP] NPE is reported into broker logs 
when serach user is specified but search password is not set 
                 Key: QPID-8126
                 URL: https://issues.apache.org/jira/browse/QPID-8126
             Project: Qpid
          Issue Type: Bug
          Components: Broker-J
    Affects Versions: qpid-java-broker-7.0.1, qpid-java-broker-7.0.0, 
qpid-java-broker-7.0.2
            Reporter: Alex Rudyy


Creation of authentication provider with search username and missing search 
password ends up in NPE reported into broker logs like the one below:
{noformat}
java.lang.NullPointerException: null
        at java.util.Hashtable.put(Hashtable.java:460)
        at 
org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl.setupSearchContext(SimpleLDAPAuthenticationManagerImpl.java:602)
        at 
org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl.validateInitialDirContext(SimpleLDAPAuthenticationManagerImpl.java:577)
        at 
org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerImpl.validateOnCreate(SimpleLDAPAuthenticationManagerImpl.java:159)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:879)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:866)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:637)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:630)
        at 
org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:248)
        at 
org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submitWrappedTask(TaskExecutorImpl.java:165)
        at 
org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submit(TaskExecutorImpl.java:153)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject.doOnConfigThread(AbstractConfiguredObject.java:629)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject.createAsync(AbstractConfiguredObject.java:865)
        at 
org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.createAsync(AbstractConfiguredObjectTypeFactory.java:75)
        at 
org.apache.qpid.server.model.ConfiguredObjectFactoryImpl.createAsync(ConfiguredObjectFactoryImpl.java:145)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject.addChildAsync(AbstractConfiguredObject.java:2111)
        at 
org.apache.qpid.server.model.BrokerImpl.addChildAsync(BrokerImpl.java:697)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2068)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2063)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:637)
        at 
org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:630)
        at 
org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:248)
        at 
org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:320)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at 
org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:313)
        at 
com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:111)
        at 
com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:58)
        at 
com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at 
org.apache.qpid.server.bytebuffer.QpidByteBufferFactory.lambda$null$0(QpidByteBufferFactory.java:464)
        at java.lang.Thread.run(Thread.java:748)
{noformat}

Though, it is unlikely that any LDAP server would be configured to allow 
specification of search username without a password, the creation of provider 
should not end-up in NPE. 



--
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

Reply via email to