Skip to content

Instantly share code, notes, and snippets.

@JBlond
Last active July 20, 2022 12:43
Show Gist options
  • Save JBlond/9a6003cae60e73893ce3 to your computer and use it in GitHub Desktop.
Save JBlond/9a6003cae60e73893ce3 to your computer and use it in GitHub Desktop.
mod_authn_ntlm sample config
LoadModule auth_ntlm_module modules/mod_authn_ntlm.so
<Location /auth>
#AllowOverride None
AuthName "Private location"
AuthType SSPI
NTLMAuth On
NTLMAuthoritative On
<RequireAll>
<RequireAny>
Require valid-user
</RequireAny>
<RequireNone>
Require user "ANONYMOUS LOGON"
Require user "NT-AUTORITÄT\ANONYMOUS-ANMELDUNG"
</RequireNone>
</RequireAll>
# use this to add the authenticated username to you header
# so any backend system can fetch the current user
# rewrite_module needs to be loaded then
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule . - [E=RU:%1]
RequestHeader set X_ISRW_PROXY_AUTH_USER %{RU}e
</Location>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment