Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17234

camel-ldap - LDAP bad parsing of '=' in base parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 3.12.0, 3.13.0
    • 3.14.0
    • camel-ldap
    • None
    • Unknown

    Description

      Simple route for ldap search:

      // main route
      .wireTap(securityEndpoint)
      
      from(securityEndpoint)
         .to(ldap("gateLdapDirContext").base(gateProperties.getLdap().getBaseDn()));

      application.yaml encoded in UTF-8

      gate:
        ldap:
          base-dn: dc=cpost,dc=cz

      Exception

      Message History (complete message history is disabled)
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
      [gateMainRoute     ] [gateMainRoute     ] [from[direct://gateRouteEntryEndpoint]                                         ] [         5]
          ...
      [route1            ] [to4               ] [ldap://gateLdapDirContext?base=dc%3Dcpost%2Cdc%3Dcz                           ] [         0]Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      javax.naming.directory.InvalidSearchFilterException: Missing 'equals'
          at java.naming/com.sun.jndi.ldap.Filter.encodeSimpleFilter(Filter.java:312) ~[na:na]
          at java.naming/com.sun.jndi.ldap.Filter.encodeFilter(Filter.java:171) ~[na:na]
          at java.naming/com.sun.jndi.ldap.Filter.encodeFilterString(Filter.java:74) ~[na:na]
          at java.naming/com.sun.jndi.ldap.LdapClient.search(LdapClient.java:547) ~[na:na]
          at java.naming/com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:2014) ~[na:na]
          at java.naming/com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1873) ~[na:na]
          at java.naming/com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1798) ~[na:na]
          at java.naming/com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:392) ~[na:na]
          at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:358) ~[na:na]
          at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:341) ~[na:na]
          at java.naming/javax.naming.directory.InitialDirContext.search(InitialDirContext.java:296) ~[na:na]
          at org.apache.camel.component.ldap.LdapProducer.simpleSearch(LdapProducer.java:125) ~[camel-ldap-3.12.0.jar:3.12.0]
          at org.apache.camel.component.ldap.LdapProducer.process(LdapProducer.java:79) ~[camel-ldap-3.12.0.jar:3.12.0]
          at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66) ~[camel-support-3.12.0.jar:3.12.0]
          at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:172) ~[camel-core-processor-3.12.0.jar:3.12.0]
          at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:469) ~[camel-core-processor-3.12.0.jar:3.12.0]
          at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:179) ~[camel-base-engine-3.12.0.jar:3.12.0]
          at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:64) ~[camel-base-engine-3.12.0.jar:3.12.0]
          at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:216) ~[camel-core-processor-3.12.0.jar:3.12.0]
          at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:399) ~[camel-base-engine-3.12.0.jar:3.12.0]
          at org.apache.camel.processor.WireTapProcessor$WireTapTask.run(WireTapProcessor.java:126) ~[camel-core-processor-3.12.0.jar:3.12.0]
          at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
          at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
          at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na] 

      Attachments

        Activity

          People

            Unassigned Unassigned
            drezir Adam Ostrožlík
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: