axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giampiero Cardillo (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-2182) Proxy credentials provided through MessageContext does not works with Proxy ISA
Date Fri, 19 Aug 2005 13:39:55 GMT
Proxy credentials provided through MessageContext does not works with Proxy ISA
-------------------------------------------------------------------------------

         Key: AXIS-2182
         URL: http://issues.apache.org/jira/browse/AXIS-2182
     Project: Apache Axis
        Type: Bug
  Components: Basic Architecture  
    Versions: current (nightly)    
 Environment: Microsoft LAN with proxy ISA Server
    Reporter: Giampiero Cardillo


In class org.apache.axis.transport.http.CommonsHTTPSender the method

private void addContextInfo(HttpMethodBase method, 
                                HttpClient httpClient, 
                                MessageContext msgContext, 
                                URL tmpURL)

has a bug while setting proxy credentials for NTLM authentication.

The code below reports the error and his correction.
if (userID != null) {
            Credentials proxyCred =
                new UsernamePasswordCredentials(userID,
                                                passwd);
            // if the username is in the form "user\domain"
            // then use NTCredentials instead.
            int domainIndex = userID.indexOf("\\");
            if (domainIndex > 0) {
                String domain = userID.substring(0, domainIndex);
                if (userID.length() > domainIndex + 1) {
                    String user = userID.substring(domainIndex + 1);
                    proxyCred = new NTCredentials(user,
                                    passwd,
                                    NetworkUtils.getLocalHostname(), domain);
                }
            }
            // BUG: the method setCredentials doesn't relate to proxy authentication
            httpClient.getState().setCredentials(AuthScope.ANY, proxyCred);
           // CORRECTION: httpClient.getState().setProxyCredentials(AuthScope.ANY, proxyCred);
        }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message