You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gerald Kallas <ca...@mailbox.org> on 2020/04/23 22:54:25 UTC

HTTP producer NTLM auth behavior seems to depend on consumer

Hi all,

I've a route that calls an endpoint with NTLM auth. It works pretty when calling the route on a HTTP consumer.

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">

	<camelContext id="WEBISP001" xmlns="http://camel.apache.org/schema/blueprint">

		<route id="WEBISP001">
			<from uri="jetty:http://0.0.0.0:8182/NTLM" />
			<setHeader name="CamelHttpMethod"><constant>GET</constant></setHeader>
			<to uri="http://host?bridgeEndpoint=true&amp;authMethod=NTLM&amp;authDomain=&amp;authUsername=xxx&amp;authPassword=xxx&amp;throwExceptionOnFailure=false" />
		</route>

	</camelContext>

</blueprint>

When I'm going to change the consumer from HTTP consumer to Timer consumer like

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">

	<camelContext id="WEBISP001" xmlns="http://camel.apache.org/schema/blueprint">

		<route id="WEBISP001">
			<from uri="timer:default?period=0&amp;repeatCount=1" />
			<setHeader name="CamelHttpMethod"><constant>GET</constant></setHeader>
			<to uri="http://host?bridgeEndpoint=true&amp;authMethod=NTLM&amp;authDomain=&amp;authUsername=xxx&amp;authPassword=xxx&amp;throwExceptionOnFailure=false" />
		</route>

	</camelContext>

</blueprint>

than I'm getting an error

2020-04-23T22:36:31,980 | WARN  | qtp711860658-153 | HttpAuthenticator                | 164 - org.apache.httpcomponents.httpclient - 4.5.10 | NEGOTIATE authentication error: Invalid name provided (Mechanism level: KrbException: Cannot locate default realm)

It's a bit weird. Same also when I'm changing to a File consumer. Any ideas about this?

Thanks in advance
- Gerald