Giter Club home page Giter Club logo

ntlm-proxy-auth's Introduction

NTLM-proxy-auth

Patches for NTLM proxy auth in Perl

This is a collection of patches to enable NTLM proxy authentication, which is typically used in an enterprise with Active Directory, in Perl.

There are four files, excluding this README, in the repository:

  1. googleGeoCode_sample.pl

This is a sample Perl script to talk to an external web service (Google Geocoding API in this case) via a proxy with NTLM authentication. Replace the below symbols in the script appropriately for your own environment: WORKSTATION (by your workstation ID, usually could be any string), DOMAIN\USER (by your Active Direcory domain and user), PASSWORD (by your password for the AD user), PROXY.SERVER.FQDN:PORT (by your NTLM proxy FQDN / IP address and port number), APPID (for Google Geocoding API)

  1. Authen_NTLM.pm.diff

A patch for Authen::NTLM in order to support NTLM v2 Authentication. Refer to MS-NLMP for detals regarding the protocol.

  1. LWP_Authen_Ntlm.pm.diff

A patch for LWP::Authen::Ntlm in order to pass the control to Authen::NTLM during the use of a proxy. The original code works with a web server requesting NTLM authentication and has been extended for the use of an NTLM proxy. Except corrections in timing for invoking ntlm() and ntlm_reset(), this is largely a copy of work contributed by the GitHub user, benningm: https://github.com/libwww-perl/libwww-perl/pull/49/commits/5d831eea4049926b4483d2a06b2c3f83b290829c

  1. LWP_Protocol_http.pm.diff

A patch for LWP::Protocol in order to comform with the Keep Alive requirement to a client in NTLM authentication between Type 2 and Type 3 message, during the use of CONNECT proxy method. Without this patch, a client recreate a socket for Type 3 message; and therefore, the proxy might refuse the authentication sequence to proceed.

ntlm-proxy-auth's People

Contributors

wataniguchi avatar

ntlm-proxy-auth's Issues

Authentication working only the first time due to missing global variable reinitialization in ntlm_reset sub of Authen::NTLM

Hi Wataru,

At first thank you very much for your work on that which really helped me as the latest libwww-perl still does not include your fix, a corresponding bug remaining opened since years : libwww-perl/libwww-perl#198

However I faced an issue with your fix as it was sending malformed NTLMSSP_AUTH when authentications were achieved in a row without relaoding the module between the authentications.
After extensive troubleshooting I figured out that it was due to a missing global variable reinitialization in ntlm_reset sub of Authen::NTLM.

To fix it you just have to add the code below :
# Missing reinit
$msg3_hlen = 12 + ($hdr_len*6) + 4;

Thank you,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.