Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
su_ldap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
suitpuppet
su_ldap
Commits
cc579e02
Commit
cc579e02
authored
5 years ago
by
Adam Lewenberg
Committed by
Linda J Laubenheimer
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
more work on
ldap:///
and
ldaps:///
parent
add8ac07
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
manifests/config.pp
+4
-0
4 additions, 0 deletions
manifests/config.pp
manifests/init.pp
+17
-1
17 additions, 1 deletion
manifests/init.pp
templates/etc/default/slapd.erb
+40
-1
40 additions, 1 deletion
templates/etc/default/slapd.erb
with
61 additions
and
2 deletions
manifests/config.pp
+
4
−
0
View file @
cc579e02
...
...
@@ -15,6 +15,10 @@ class su_ldap::config (
$basedir
=
'/var/lib/ldap'
,
$keytab_path
=
'/etc/krb5.keytab'
,
$krb5ccname
=
'/var/run/ldap_syncreplica.tkt'
,
Boolean
$auth_gssapi
=
true
,
Boolean
$auth_simple
=
true
,
Boolean
$ldap_over_tcp
=
true
,
Boolean
$ldap_over_tls
=
true
,
)
{
# Set up some directories including the ones where the databases
...
...
This diff is collapsed.
Click to expand it.
manifests/init.pp
+
17
−
1
View file @
cc579e02
...
...
@@ -29,7 +29,15 @@
# $repository: If the package is found in a non-standard location,
# you can indicate the repository here. See the file apt_setup for
# more information and examples.
#
# We default to enabling both connection methods (ldap:/// and ldaps:///)
# for all servers regardless of which authentication method(s)
# enabled. HOWEVER, ldap:/// is not safe for simple bind servers, so if
# both ldap:/// and simple bind authentication are enabled it is
# IMPERATIVE that you put firewall restrictions on port 389 so that only
# monitoring or special-purpose servers get access to that port. This must
# be done in the calling class.
class
su_ldap
(
$hosting_model
=
'traditional'
,
#
...
...
@@ -38,6 +46,9 @@ class su_ldap (
$auth_gssapi
=
true
,
$auth_simple
=
true
,
#
$ldap_over_tcp
=
true
,
# enable ldap:///
$ldap_over_tls
=
true
,
# enable ldaps:///
#
$ldap_debian_distribution
=
'stretch'
,
$ldap_debian_archive
=
'debian-stanford'
,
$ldap_debian_repository
=
undef
,
...
...
@@ -76,6 +87,7 @@ class su_ldap (
## Basic configuration: /etc/ldap/ldap.conf, /etc/default/slapd, et al.
## This is all managed in the su_ldap::config class.
# Make sure /etc/ldap exists and is a directory.
file
{
'/etc/ldap'
:
...
...
@@ -88,6 +100,10 @@ class su_ldap (
class
{
'su_ldap::config'
:
hosting_model
=>
$hosting_model
,
keytab_path
=>
$keytab_path
,
auth_gssapi
=>
$auth_gssapi
,
auth_simple
=>
$auth_simple
,
ldap_over_tcp
=>
$ldap_over_tcp
,
ldap_over_tls
=>
$ldap_over_tls
,
}
## We don't install the sync scripts in this class. If they are needed,
...
...
This diff is collapsed.
Click to expand it.
templates/etc/default/slapd.erb
+
40
−
1
View file @
cc579e02
...
...
@@ -39,5 +39,44 @@ ulimit -n 16384
# Point at the new configuration directory
SLAPD_CONF=/etc/ldap/slapd.d/
# Listen on ports 389 and 636.
<%-
$simple_over_389_warning
=
"WARNING!!! Allowing simple bind authentication when ldap:/// is enabled "
+
"is inherently unsafe UNLESS you have put firewall restrictions on port "
+
"389 to only allow trusted servers (e.g., monitoring servers) to access "
+
"port 389."
if
(
@ldap_over_tcp
and
@ldap_over_tls
)
then
-%>
# Accept connections via both of these:
# * LDAP over TCP (ldap:///)
# * LDAP over TLS (ldaps:///)
SLAPD_SERVICES="ldap:/// ldaps:///"
<%-
if
(
@auth_simple
)
then
-%>
<%=
$simple_over_389_warning
%>
<%-
end
elsif
(
@ldap_over_tcp
and
(
not
@ldap_over_tls
))
then
-%>
# Accept connections via LDAP over TCP (ldap:///) ONLY
SLAPD_SERVICES="ldap:///"
<%-
if
(
@auth_simple
)
then
-%>
<%=
$simple_over_389_warning
%>
<%-
end
elsif
((
not
@ldap_over_tcp
)
and
@ldap_over_tls
)
then
-%>
# Accept connections via LDAP over TLS (ldaps:///) ONLY
SLAPD_SERVICES="ldaps:///"
<%-
else
-%>
# PROBLEM!! No protocols have been specified!?!
<%-
end
-%>
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