Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametrize more auditd.conf options #535

Merged
merged 7 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions roles/os_hardening/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,16 @@ os_hardening_enabled: true

# Set to false to disable installing and configuring auditd.
os_auditd_enabled: true
os_auditd_flush: INCREMENTAL
os_auditd_max_log_file: 6
os_auditd_max_log_file_action: keep_logs
os_auditd_log_format: RAW
os_auditd_admin_space_left: 50
os_auditd_space_left: 75
os_auditd_space_left_action: SYSLOG
os_auditd_admin_space_left_action: SUSPEND
os_auditd_disk_full_action: SUSPEND
os_auditd_disk_error_action: SUSPEND

# Set the SELinux state, which can be either disabled, permissive, or enforcing.
os_selinux_state: enforcing
Expand Down
20 changes: 8 additions & 12 deletions roles/os_hardening/templates/etc/audit/auditd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,26 @@
# Generated by Ansible role {{ ansible_role_name }}

log_file = /var/log/audit/audit.log
log_format = RAW
log_format = {{ os_auditd_log_format }}
log_group = root
kravietz marked this conversation as resolved.
Show resolved Hide resolved
priority_boost = 4
flush = INCREMENTAL
flush = {{ os_auditd_flush }}
freq = 20
num_logs = 5
disp_qos = lossy
dispatcher = /sbin/audispd
name_format = NONE
##name = mydomain
max_log_file = {{ os_auditd_max_log_file }}
max_log_file_action = {{ os_auditd_max_log_file_action }}
space_left = 75
space_left_action = SYSLOG
space_left = {{ os_auditd_space_left }}
space_left_action = {{ os_auditd_space_left_action }}
action_mail_acct = root
admin_space_left = 50
admin_space_left_action = SUSPEND
disk_full_action = SUSPEND
disk_error_action = SUSPEND
##tcp_listen_port =
admin_space_left = {{ os_auditd_admin_space_left }}
admin_space_left_action = {{ os_auditd_admin_space_left_action }}
disk_full_action = {{ os_auditd_disk_full_action }}
disk_error_action = {{ os_auditd_disk_error_action }}
tcp_listen_queue = 5
tcp_max_per_addr = 1
##tcp_client_ports = 1024-65535
tcp_client_max_idle = 0
enable_krb5 = no
krb5_principal = auditd
##krb5_key_file = /etc/audit/audit.key