gosp / lua-resty-ntlm

nginx ntlm module implemented by lua
MIT License
27 stars 13 forks source link

Intro

Windows authentication is always used inside company. IIS can enable Windows authentication easily. For Nginx users, some solutions aren't friendly: Nginx Pro provides ntlm module but it isn't free; reverse proxy must setup other server firstly.

The project is inspired by express-ntlm and PyAuthenNTLM2. IIS will trigger windows authentication scenario for each connection. Unlike IIS, the project only trigger ntlm for first requestion. After authentication done, http header Authorization:Bearer will be sent to browser, and browser should put it in each request package to avoid ntlm again. At the same time, http header: X-Ntlm-Username and X-Ntlm-Domain will be sent to upstream.

NOTICE: don't set-cookie during ntlm authentication. (#1175)

Usage