Skip to content

Commit

Permalink
Make max_log_file_action for auditd configurable (dev-sec#246)
Browse files Browse the repository at this point in the history
* Make max_log_file_action for auditd configurable

This commit allows to configure the max_log_file_action auf auditd to
avoid filling small /var/log partitions for systems that create many
audit log entries. Or run for a long period of time.

Signed-off-by: Jan Dittberner <jan.dittberner@t-systems.com>

* Add os_auditd_max_log_file_action to README

Signed-off-by: Jan Dittberner <jan.dittberner@t-systems.com>
  • Loading branch information
jandd authored and rndmh3ro committed Nov 7, 2019
1 parent a803ce2 commit f7bd36b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ If you're using Docker / Kubernetes+Docker you'll need to override the ipv4 ip f
| `ufw_default_output_policy` | ACCEPT | set default output policy of ufw to `ACCEPT` |
| `ufw_default_forward_policy` | DROP | set default forward policy of ufw to `DROP` |
| `os_auditd_enabled` | true | Set to false to disable installing and configuring auditd. |
| `os_auditd_max_log_file_action` | `keep_logs` | Defines the behaviour of auditd when its log file is filled up. Possible other values are described in the auditd.conf man page. The most common alternative to the default may be `rotate`. |

## Packages

Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ os_hardening_enabled: true

# Set to false to disable installing and configuring auditd.
os_auditd_enabled: true
os_auditd_max_log_file_action: keep_logs

# Set the SELinux state, can be either disabled, permissive, or enforcing.
os_selinux_state: enforcing
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/audit/auditd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dispatcher = /sbin/audispd
name_format = NONE
##name = mydomain
max_log_file = 6
max_log_file_action = keep_logs
max_log_file_action = {{ os_auditd_max_log_file_action }}
space_left = 75
space_left_action = SYSLOG
action_mail_acct = root
Expand Down

0 comments on commit f7bd36b

Please sign in to comment.