Puppet Class: auditd::config::audisp::syslog
- Defined in:
- manifests/config/audisp/syslog.pp
Summary
Utilizes rsyslog to send all audit records to syslog.Overview
This capability is most useful for forwarding audit records to remote servers as syslog messages, since these records are already persisted locally in audit logs. For most sites, however, using this capability for all audit records can quickly overwhelm host and/or network resources, especially if the messages are forwarded to multiple remote syslog servers or (inadvertently) persisted locally. Site-specific, rsyslog actions to implement filtering will likely be required to reduce this message traffic.
If you are using simp_rsyslog, it, by default, sets up a rsyslog rule to drop the audispd messages from being written locally to prevent duplication of logging audit events on the local system. See simp_rsyslog::local for more information.
It is also recommend you ensure any forwarded, audit messages are encrypted using the stunnel module, due to the nature of the information carried by these messages.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'manifests/config/audisp/syslog.pp', line 67
class auditd::config::audisp::syslog (
Boolean $enable = true,
Boolean $drop_audit_logs = true, #deprecated see @param
Auditd::LogPriority $priority = 'LOG_INFO',
Auditd::LogFacility $facility = 'LOG_LOCAL5',
Optional[String] $pkg_name = undef,
String $syslog_path, # data in module
String $type, # data in module
Boolean $rsyslog = simplib::lookup('simp_options::syslog', { 'default_value' => false }), #deprecated see @param
String $package_ensure = simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' }),
) {
if versioncmp($facts['auditd_version'], '3.0') >= 0 and $enable {
package { $pkg_name :
ensure => $package_ensure,
}
}
file { "${auditd::plugin_dir}/syslog.conf":
mode => $auditd::config::config_file_mode,
owner => 'root',
content => epp("${module_name}/plugins/syslog_conf", {
enable => $enable,
path => $syslog_path,
type => $type,
args => "${priority} ${facility}"
}),
}
#
# The below section is here for backwards compatability. It will be removed
# in the next major release of this module.
# To disable logging audit events to syslog you should set
# auditd::syslog to true (to enable management of the syslog plugin).
# auditd::config::audisp::syslog::enable to false (to make sure the plugin is not
# active.)
# auditd::config::audisp::syslog::rsyslog to false ( so it does not install
# unnecessary rsyslog rules.)
#
if $rsyslog {
simplib::assert_optional_dependency($module_name, 'simp/rsyslog')
include 'rsyslog'
if $drop_audit_logs {
# This will prevent audit records from being forwarded to remote
# servers and/or written to local syslog files, but you still have
# access to the records in the local audit log files.
rsyslog::rule::drop { 'audispd':
rule => '$programname == \'audispd\'',
}
}
}
# End of deprecated section.
}
|