axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Thomas Jahr (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1689) Broken NTLM support in CommonsHTTPSender
Date Thu, 02 Dec 2004 14:02:22 GMT
     [ http://nagoya.apache.org/jira/browse/AXIS-1689?page=comments#action_56102 ]
     
Per Thomas Jahr commented on AXIS-1689:
---------------------------------------

Seems fine to me and it runs correctly. Thanks!

--
Per Thomas


> Broken NTLM support in CommonsHTTPSender
> ----------------------------------------
>
>          Key: AXIS-1689
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1689
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: current (nightly)
>     Reporter: Per Thomas Jahr

>
> The current implementation of CommonsHTTPSender will not work with proxies using NTLM
authentication (ISA Server 2004). According to the documentation for HttpClient one needs
to use NTCredentials instead of UsernamePasswordCredentials when setting up credentials. 
> The following code will fix the problem (starting at line 287 inside the method getHostConfiguration
in org.apache.axis.transport.http.CommonsHTTPSender):
> if (tcp.getProxyUser().length() != 0) {
>   // begin fix for NTLM
>   Credentials proxyCred = new UsernamePasswordCredentials(tcp.getProxyUser(),
>   tcp.getProxyPassword());
>   // if the username is in the form "user\domain" use NTCredentials instead.
>   if (tcp.getProxyUser().indexOf("\\") > 0) {
>      int domainIndex = tcp.getProxyUser().indexOf("\\");
>      String domain = tcp.getProxyUser().substring(0, domainIndex);
>      if (tcp.getProxyUser().length() > domainIndex + 1) {
>         String user = tcp.getProxyUser().substring(domainIndex + 1);
>         proxyCred = new NTCredentials(user, tcp.getProxyPassword(), tcp.getProxyHost(),
domain);
>      }
>    }
>    // end fix for NTLM
>    client.getState().setProxyCredentials(null, null, proxyCred);
> }             
> There should certainly be another way of deciding if one should use NTCredentials or
UsernamePasswordCredentials than parsing the username for a "\". But this works for me.
> If anyone is interested in testing Axis against ISA Server 2004 I can do that from now
and until February 2005.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message