Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8126

[Broker-J][SimpleLDAP] NPE is reported into broker logs when search user is specified but search password is not set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • qpid-java-broker-7.0.2, qpid-java-broker-7.0.0, qpid-java-broker-7.0.1
    • qpid-java-broker-7.1.5
    • Broker-J
    • None

    Description

      Creation of authentication provider with search username and missing search password ends up in NPE reported into broker logs like the one below:

      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)
      

      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.

      Attachments

        Activity

          People

            orudyy Alex Rudyy
            orudyy Alex Rudyy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: