Puppet Class: security_baseline::rules::common::sec_ldap
- Defined in:
- manifests/rules/common/sec_ldap.pp
Summary
Ensure LDAP server is not enabled (Scored)Overview
The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.
Rationale: If the system will not need to act as an LDAP server, it is recommended that the software be disabled to reduce the potential attack surface.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'manifests/rules/common/sec_ldap.pp', line 28
class security_baseline::rules::common::sec_ldap (
Boolean $enforce = true,
String $message = '',
String $log_level = ''
) {
if($enforce) {
ensure_resource('service', ['slapd'], {
ensure => 'stopped',
enable => false
})
} else {
if($facts['security_baseline']['services_enabled']['srv_slapd'] == 'enabled') {
echo { 'ldap':
message => $message,
loglevel => $log_level,
withpath => false,
}
}
}
}
|