You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Daniele Elia (JIRA)" <ji...@apache.org> on 2011/04/15 14:27:05 UTC

[jira] [Created] (HTTPCLIENT-1080) NTFS Authentication proxy error 407

NTFS Authentication proxy error 407
-----------------------------------

                 Key: HTTPCLIENT-1080
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1080
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpAuth
    Affects Versions: 4.1.1, 4.1 Final
         Environment: Windows XP
            Reporter: Daniele Elia


I'm using httpClient 4.1.1 (I've tried 4.1 also) but I can't pass my proxy authentication; I'm getting 407 Proxy Error.
On suggestion of Oleg I've tried to use JCIFS library as a NTLM engine and it works; I've used not last jcifs library but 1.2.25 version because parameter in the "new Type3Messages" doesn't match... the last version of jcifs 1.3.15 needs another parameter called "flag".

This is my not working code:
        String pc = System.getenv("COMPUTERNAME");
        DefaultHttpClient client = new DefaultHttpClient();
        NTCredentials creds = new NTCredentials("user","password", pc, "domain");
        client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY), creds);

This is my working code with jcifs:
        String pc = System.getenv("COMPUTERNAME");
        DefaultHttpClient client = new DefaultHttpClient();
            client.getAuthSchemes().register("ntlm", new NTLMSchemeFactory());
            client.getCredentialsProvider().setCredentials(
                AuthScope.ANY,
               new NTCredentials("user","password", pc, "domain"));

with:
 class NTLMSchemeFactory implements AuthSchemeFactory {
    public AuthScheme newInstance(final HttpParams params) {
        return new NTLMScheme(new JCIFSEngine());
    }

}

and JCIFSEngine like specified on http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.0.x/src/site/apt/ntlm.apt


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Resolved] (HTTPCLIENT-1080) NTFS Authentication proxy error 407

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1080.
-------------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Future)
                   4.3 Alpha1

Closing this one as fixed under assumption that HTTPCLIENT-1266 improvements also addressed this issue.

Daniele, if you are able to re-test your code against the latest snapshot of HttpClient from SVN trunk, please do so and re-open the issue if the problem still persists.

Oleg
                
> NTFS Authentication proxy error 407
> -----------------------------------
>
>                 Key: HTTPCLIENT-1080
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1080
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpAuth
>    Affects Versions: 4.1 Final, 4.1.1
>         Environment: Windows XP
>            Reporter: Daniele Elia
>             Fix For: 4.3 Alpha1
>
>
> I'm using httpClient 4.1.1 (I've tried 4.1 also) but I can't pass my proxy authentication; I'm getting 407 Proxy Error.
> On suggestion of Oleg I've tried to use JCIFS library as a NTLM engine and it works; I've used not last jcifs library but 1.2.25 version because parameter in the "new Type3Messages" doesn't match... the last version of jcifs 1.3.15 needs another parameter called "flag".
> This is my not working code:
>         String pc = System.getenv("COMPUTERNAME");
>         DefaultHttpClient client = new DefaultHttpClient();
>         NTCredentials creds = new NTCredentials("user","password", pc, "domain");
>         client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY), creds);
> This is my working code with jcifs:
>         String pc = System.getenv("COMPUTERNAME");
>         DefaultHttpClient client = new DefaultHttpClient();
>             client.getAuthSchemes().register("ntlm", new NTLMSchemeFactory());
>             client.getCredentialsProvider().setCredentials(
>                 AuthScope.ANY,
>                new NTCredentials("user","password", pc, "domain"));
> with:
>  class NTLMSchemeFactory implements AuthSchemeFactory {
>     public AuthScheme newInstance(final HttpParams params) {
>         return new NTLMScheme(new JCIFSEngine());
>     }
> }
> and JCIFSEngine like specified on http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.0.x/src/site/apt/ntlm.apt

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1080) NTFS Authentication proxy error 407

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510364#comment-13510364 ] 

Karl Wright commented on HTTPCLIENT-1080:
-----------------------------------------

The jcifs Type3Message flags parameter is a mask, so you can control which flags your client responds with to the server.  If it was working for you before, all you need to pass into this parameter is 0xffffffff.

                
> NTFS Authentication proxy error 407
> -----------------------------------
>
>                 Key: HTTPCLIENT-1080
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1080
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpAuth
>    Affects Versions: 4.1 Final, 4.1.1
>         Environment: Windows XP
>            Reporter: Daniele Elia
>             Fix For: Future
>
>
> I'm using httpClient 4.1.1 (I've tried 4.1 also) but I can't pass my proxy authentication; I'm getting 407 Proxy Error.
> On suggestion of Oleg I've tried to use JCIFS library as a NTLM engine and it works; I've used not last jcifs library but 1.2.25 version because parameter in the "new Type3Messages" doesn't match... the last version of jcifs 1.3.15 needs another parameter called "flag".
> This is my not working code:
>         String pc = System.getenv("COMPUTERNAME");
>         DefaultHttpClient client = new DefaultHttpClient();
>         NTCredentials creds = new NTCredentials("user","password", pc, "domain");
>         client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY), creds);
> This is my working code with jcifs:
>         String pc = System.getenv("COMPUTERNAME");
>         DefaultHttpClient client = new DefaultHttpClient();
>             client.getAuthSchemes().register("ntlm", new NTLMSchemeFactory());
>             client.getCredentialsProvider().setCredentials(
>                 AuthScope.ANY,
>                new NTCredentials("user","password", pc, "domain"));
> with:
>  class NTLMSchemeFactory implements AuthSchemeFactory {
>     public AuthScheme newInstance(final HttpParams params) {
>         return new NTLMScheme(new JCIFSEngine());
>     }
> }
> and JCIFSEngine like specified on http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.0.x/src/site/apt/ntlm.apt

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1080) NTFS Authentication proxy error 407

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCLIENT-1080:
------------------------------------------

    Fix Version/s: Future

I do not think there is anyone on the project with the sufficient knowledge of NTLM to look into the issue.

> NTFS Authentication proxy error 407
> -----------------------------------
>
>                 Key: HTTPCLIENT-1080
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1080
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpAuth
>    Affects Versions: 4.1 Final, 4.1.1
>         Environment: Windows XP
>            Reporter: Daniele Elia
>             Fix For: Future
>
>
> I'm using httpClient 4.1.1 (I've tried 4.1 also) but I can't pass my proxy authentication; I'm getting 407 Proxy Error.
> On suggestion of Oleg I've tried to use JCIFS library as a NTLM engine and it works; I've used not last jcifs library but 1.2.25 version because parameter in the "new Type3Messages" doesn't match... the last version of jcifs 1.3.15 needs another parameter called "flag".
> This is my not working code:
>         String pc = System.getenv("COMPUTERNAME");
>         DefaultHttpClient client = new DefaultHttpClient();
>         NTCredentials creds = new NTCredentials("user","password", pc, "domain");
>         client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY), creds);
> This is my working code with jcifs:
>         String pc = System.getenv("COMPUTERNAME");
>         DefaultHttpClient client = new DefaultHttpClient();
>             client.getAuthSchemes().register("ntlm", new NTLMSchemeFactory());
>             client.getCredentialsProvider().setCredentials(
>                 AuthScope.ANY,
>                new NTCredentials("user","password", pc, "domain"));
> with:
>  class NTLMSchemeFactory implements AuthSchemeFactory {
>     public AuthScheme newInstance(final HttpParams params) {
>         return new NTLMScheme(new JCIFSEngine());
>     }
> }
> and JCIFSEngine like specified on http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.0.x/src/site/apt/ntlm.apt

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org