[ 
https://issues.apache.org/jira/browse/CAMEL-22073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17953662#comment-17953662
 ] 

Bruno Gonçalves commented on CAMEL-22073:
-----------------------------------------

I got the same *401 Unauthorized* error back.

I used the same http-ntlm-reproducer, with the following changes:
 * replaced camel-http 4.10.4 dependency to camel-http-4.10.5-SNAPSHOT.jar
 * added org.apache.httpcomponents.core5:httpcore5:5.3.4 dependency
 * added org.apache.httpcomponents.client5:httpclient5:5.4.4 dependency
 * added org.slf4j:slf4j-simple:1.7.36 dependency
 * added authenticationPreemptive param with true on it's value

> camel-http - NTLM authentication doesn't work over http
> -------------------------------------------------------
>
>                 Key: CAMEL-22073
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22073
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http
>    Affects Versions: 4.10.4
>            Reporter: Bruno Gonçalves
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.10.5, 4.12.0
>
>         Attachments: camel-http-4.10.5-SNAPSHOT.jar, 
> http-ntlm-reproducer.tar, wireshark_http_ntlm_camel4.png, 
> wireshark_http_ntlm_curl.png
>
>
> It appears that NTLM authentication is not functioning correctly in Apache 
> Camel 4 (version 4.10.4) when using the {{http}} component.
> Using the exact same credentials and request details, the call succeeds when 
> made via the {{curl}} command with the {{--ntlm}} flag, but fails when 
> executed through Camel.
> As shown in the attached Wireshark capture, the {{curl}} request correctly 
> initiates the NTLM handshake, including the {{Authorization: NTLM ...}} 
> header, whereas the Apache Camel request does not send the Authorization 
> header and fails to trigger a challenge-response flow.
> *Apache Camel 4 (4.10.4) (x)*
> {code:java}
> <to 
> uri="http://exacttest.myserver.local:8020/Services/Exact.Entity.REST.EG/?authMethod=NTLM&amp;authUsername=RAW(usr_exact1)&amp;authPassword=RAW(blabla)&amp;authDomain=RAW(myserver.local)&amp;maxTotalConnections=20&amp;connectionsPerRoute=2&amp;connectTimeout=180000&amp;soTimeout=180000"/>{code}
> *Curl (8.7.1) (/)*
> {code:java}
> curl --ntlm --user myserver.local\\usr_exact1:blabla 
> "http://exacttest.myserver.local:8020/services/Exact.Entity.REST.EG/"{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to