Puppet Class: security_baseline::rules::redhat::sec_httpd
- Defined in:
- manifests/rules/redhat/sec_httpd.pp
Summary
Ensure HTTP server is not enabled (Scored)Overview
HTTP or web servers provide the ability to host web site content.
Rationale: Unless there is a need to run the system as a web server, it is recommended that the service be disabled to reduce the potential attack surface.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'manifests/rules/redhat/sec_httpd.pp', line 27
class security_baseline::rules::redhat::sec_httpd (
Boolean $enforce = true,
String $message = '',
String $log_level = ''
) {
if($enforce) {
ensure_resource('service', ['httpd'], {
ensure => 'stopped',
enable => false
})
} else {
if($facts['security_baseline']['services_enabled']['srv_httpd'] == 'enabled') {
echo { 'httpd':
message => $message,
loglevel => $log_level,
withpath => false,
}
}
}
}
|