Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx-ntlm-module module support #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jens-maus
Copy link

@jens-maus jens-maus commented Aug 9, 2024

This PR adds https://github.com/gabihodoroaga/nginx-ntlm-module to the openresty build to address the following long-standing issues by implementing basic support for NTLM based single-sign-on proxying using nginx proxy manager:

NginxProxyManager/nginx-proxy-manager#1117
NginxProxyManager/nginx-proxy-manager#1138
NginxProxyManager/nginx-proxy-manager#2037
NginxProxyManager/nginx-proxy-manager#3181
NginxProxyManager/nginx-proxy-manager#3797

In practice, the following steps are then required to get NTLM authentication successful running with NPM:

  1. add the following section to the /data/nginx/custom/root_top.conf file to load the module:
load_module /usr/lib/nginx/modules/ngx_http_upstream_ntlm_module.so;
  1. add the following to the /data/nginx/custom/http.conf file to define the NTLM aware upstream target:
upstream target {
  server 192.168.1.1:443;
  ntlm;
}
  1. add the following to the proxy configuration in the Advanced tab:
location /  {
  proxy_http_version 1.1;
  proxy_set_header Connection "";
  proxy_pass https://target;
}

Then, the NTLM authentication should proceed and work nicely.

P.S.:
As a side note for users which cannot wait until a new nginx proxy manager version with this integrated NTLM module is out, one can also simply compile it using the docker-nginx-full repository and the local-build.sh script, then extract the ngx_http_upstream_ntlm_module.so file and put it into e.g. the /data/nginx/modules path and simply use the following load_module call in step 1 instead:

load_module /data/nginx/modules/ngx_http_upstream_ntlm_module.so;

@DragonSMART
Copy link

DragonSMART commented Sep 10, 2024

compile in ubuntu 24.04
ngx_http_upstream_ntlm_module.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants