NTLM Authentication issue with camel-http against Windows IIS 8
Issue
Trying to access a http url that is secured using Windows Challenge/Response (NTLM) authentication fails with the camel-http component and returns a 401 HTTP response code.
2015-05-20 14:45:02,892 WARN TimerConsumer - Error processing exchange. Exchange[Message: [Body is null]].
Caused by: [org.apache.camel.component.http.HttpOperationFailedException -
HTTP operation failed invoking http://192.168.178.24/iisstart.htm with statusCode: 401]
org.apache.camel.component.http.HttpOperationFailedException:
HTTP operation failed invoking http://192.168.178.24/iisstart.htm with statusCode: 401
at org.apache.camel.component.http.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:228)
at org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:156)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:147)
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:69)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
The Camel route calls the http url similar to this example
from("timer:MyTimer?repeatCount=1")
.to("http://192.168.178.24:80/iisstart.htm?authMethod=NTLM&authMethodPriority=NTLM&authUsername=tmielke&authPassword=XXX&authDomain=myDomain&authHost=192.168.178.24")
.convertBodyTo(java.lang.String.class)
.to("log:MyLogger?showAll=true");
Environment
- Red Hat JBoss Fuse 6.1.0
- Red Hat JBoss Fuse 6.1.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.