[ 
https://issues.apache.org/jira/browse/CAMEL-14971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerald Kallas updated CAMEL-14971:
----------------------------------
    Description: 
See below a route that calls an endpoint with NTLM auth. 
{code:java}
<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 xmlns="http://camel.apache.org/schema/blueprint";>

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

   </camelContext>

</blueprint>
{code}
 
When starting the route than I'm getting an error (Camel WARN)
  
{code:java}
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){code}

  was:
See below a route that calls an endpoint with NTLM auth. It works pretty when 
calling the route on a HTTP consumer endpoint. 
  
{code:java}
<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 xmlns="http://camel.apache.org/schema/blueprint";>

      <route>
         <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>{code}
  
 When the consumer changed from HTTP consumer to Timer consumer like
  
{code:java}
<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 xmlns="http://camel.apache.org/schema/blueprint";>

      <route>
         <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>
{code}
 
 than I'm getting an error
  
{code:java}
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){code}


> HTTP producer NTLM auth shows an "Cannot locate default realm" WARN
> -------------------------------------------------------------------
>
>                 Key: CAMEL-14971
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14971
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http
>    Affects Versions: 3.0.1
>            Reporter: Gerald Kallas
>            Priority: Minor
>
> See below a route that calls an endpoint with NTLM auth. 
> {code:java}
> <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 xmlns="http://camel.apache.org/schema/blueprint";>
>       <route>
>          <from uri="timer:default?period=0&amp;repeatCount=1" />
>          <setHeader name="CamelHttpMethod">
>             <constant>GET</constant>
>          </setHeader>
>          <to 
> uri="http://host?authMethod=NTLM&amp;authDomain=xxx&amp;authHost=xxx&amp;authUsername=xxx&amp;authPassword=xxx&amp;throwExceptionOnFailure=false";
>  />
>       </route>
>    </camelContext>
> </blueprint>
> {code}
>  
> When starting the route than I'm getting an error (Camel WARN)
>   
> {code:java}
> 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){code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to