develooper Front page | perl.libwww | Postings from May 2014

NTLM Proxy Authentication

From:
Tim Hoke
Date:
May 21, 2014 21:19
Subject:
NTLM Proxy Authentication
Message ID:
CA+cYX3bmMehFxJsScbFgGHBB-We0Gt=iihKcJ5qCBb8HokD40w@mail.gmail.com
Hello Everyone,

I'm trying to take v6.06 of LWP (and the corresponding v6.06 of
LWP::Protocol::https) and connect to an https endpoint through an NTLM
Authenticated http proxy.  I've managed to make the CONNECT method work for
basic authentication via pull request 56 (
https://github.com/libwww-perl/libwww-perl/pull/56), but I'm not able to
get NTLM authentication working.

I've tried bringing in benningm's proxy auth pull request (
https://github.com/libwww-perl/libwww-perl/pull/49) and I can make it NTLM
authentication work if I've got an http endpoint, just not to an https
endpoint.  I suspect it's because of the CONNECT method required for
proxying https connections via http.

FWIW, I've also made a modification to LWP::UserAgent:
$ diff -u UserAgent.pm-orig UserAgent.pm
--- UserAgent.pm-orig 2014-04-29 12:15:20.000000000 -0500
+++ UserAgent.pm 2014-05-20 14:51:48.595255000 -0500
@@ -618,7 +618,7 @@
 sub get_basic_credentials
 {
     my($self, $realm, $uri, $proxy) = @_;
-    return if $proxy;
+    return $self->credentials($uri->host_port) if $proxy;
     return $self->credentials($uri->host_port, $realm);
 }


Does anyone have any pointers on how I might resolve this?

Thanks
-Tim
thoke@northpeak.org



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About