Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nginx Ldap Auth
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Nginx Ldap Auth
Commits
b60024a9
Unverified
Commit
b60024a9
authored
Apr 11, 2022
by
Liam Crilly
Committed by
GitHub
Apr 11, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Security improvements
parent
ef8d3130
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
nginx-ldap-auth.conf
+19
-19
19 additions, 19 deletions
nginx-ldap-auth.conf
with
19 additions
and
19 deletions
nginx-ldap-auth.conf
+
19
−
19
View file @
b60024a9
...
...
@@ -78,10 +78,10 @@ http {
proxy_set_header
X
-
Ldap
-
URL
"ldap://example.com"
;
# (Optional) Establish a TLS-enabled LDAP session after binding to the
# LDAP server.
# LDAP server.
Set the value to "true: to enable.
# This is the 'proper' way to establish encrypted TLS connections, see
# http://www.openldap.org/faq/data/cache/185.html
#
proxy_set_header X-Ldap-Starttls "
true";
proxy_set_header
X
-
Ldap
-
Starttls
"
"
;
# Optional, do not comment
# (Required) Set the Base DN, by replacing the value enclosed in
# double quotes.
...
...
@@ -96,30 +96,30 @@ http {
# (Required) The following directives set the cookie name and pass
# it, respectively. They are required for cookie-based
# authentication.
Comment them out
if using HTTP basic
# authentication.
# authentication.
Set to empty value
if using HTTP basic
# authentication
(do not comment)
.
proxy_set_header
X
-
CookieName
"nginxauth"
;
proxy_set_header
Cookie
nginxauth
=$
cookie_nginxauth
;
# (Required if using Microsoft Active Directory as the LDAP server)
# Set the LDAP template
by uncommenting the following directive.
#
proxy_set_header X-Ldap-Template "
(sAMAccountName=%(username)s)";
# Set the LDAP template
with "(sAMAccountName=%(username)s)"
proxy_set_header
X
-
Ldap
-
Template
"
"
;
# Optional, do not comment
# (
May be required
if using Microsoft Active Directory and
# (
Set to "true"
if using Microsoft Active Directory and
# getting "In order to perform this operation a successful bind
# must be completed on the connection." errror)
#
proxy_set_header X-Ldap-DisableReferrals "
true";
# (Optional
if using OpenLDAP as the LDAP server) Set the LDAP
#
template by uncommenting the following directive and replacing
#
'(cn=%(username)s)' which is the default set in
#
nginx-ldap-auth-daemon.py.
#
proxy_set_
he
a
de
r X-Ldap-Template "(cn=%(username)s)";
# (Optional) Set the realm name, by uncommenting the following
#
directive and replacing '
Restric
t
ed
'
which is the
default set
# in nginx-ldap-auth-daemon.py.
#
proxy_set_header X-Ldap-Realm
"Restricted";
proxy_set_header
X
-
Ldap
-
DisableReferrals
"
"
;
# Optional, do not comment
# (Optional
)
#
Set to "(sAMAccountName=%(username)s)" if using Microsoft Active
#
Directory as the LDAP server.
#
Set to "(cn=%(username)s)" if using OpenLDAP as the LDAP server,
#
which is t
he
de
fault set in nginx-ldap-auth-daemon.py.
proxy_set_header
X
-
Ldap
-
Template
""
;
# Optional, do not comment
#
(Optional) Set the realm name, e.g. "
Restric
r
ed
",
which is the
#
default set
in nginx-ldap-auth-daemon.py.
proxy_set_header
X
-
Ldap
-
Realm
""
;
# Optional, do not comment
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment