You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auditd: add possibility to override config template (#685)
* make template overrideable
by referencing the auditd.conf.j2 template, a custom template can be provided to the role.
Signed-off-by: Dennis Lerch <[email protected]>
* extend auditd config
make freq and log_file configurable
implement write_logs with it's default value in order to be able to disable log writing
Signed-off-by: Dennis Lerch <[email protected]>
* Extend README.md documentation by new variables
reorder `os_auditd_log_format` to keep sequence from defaults
Signed-off-by: Dennis Lerch <[email protected]>
---------
Signed-off-by: Dennis Lerch <[email protected]>
Copy file name to clipboardExpand all lines: roles/os_hardening/README.md
+15-3
Original file line number
Diff line number
Diff line change
@@ -219,6 +219,9 @@ We know that this is the case on Raspberry Pi.
219
219
-`os_auditd_enabled`
220
220
- Default: `true`
221
221
- Description: Set to false to disable installing and configuring auditd.
222
+
-`os_auditd_template`
223
+
- Default: `etc/audit/auditd.conf.j2`
224
+
- Description: Template file to use for auditd.conf. By overwriting this value, a custom auditd.conf template can be provided. Put a `templates` directory next to your playbook with a custom template in it (e.q. `myauditd.conf.j2`) and set this variable to your template.
222
225
-`os_auditd_max_log_file_action`
223
226
- Default: `keep_logs`
224
227
- Description: 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`.
@@ -321,12 +324,24 @@ We know that this is the case on Raspberry Pi.
321
324
-`os_auditd_flush`
322
325
- Default: `INCREMENTAL`
323
326
- Description: Valid values are none, incremental, incremental_async, data, and sync.
327
+
-`os_auditd_freq`
328
+
- Default: `20`
329
+
- Description: Specify number of records to write before issuing an explicit flush to disk command. This value is only valid when the flush keyword is set to incremental or incremental_async.
324
330
-`os_auditd_max_log_file`
325
331
- Default: 6
326
332
- Description: This keyword specifies the maximum file size in megabytes. When this limit is reached, it will trigger a configurable action.
327
333
-`os_auditd_max_log_file_action`
328
334
- Default: `keep_logs`
329
335
- Description: This parameter tells the system what action to take when the system has detected that the max file size limit has been reached. Valid values are ignore, syslog, suspend, rotate and keep_logs.
336
+
-`os_auditd_write_logs`
337
+
- Default: `true`
338
+
- Description: Set to false in order to disable writing logs to disk.
339
+
-`os_auditd_log_file`
340
+
- Default: `/var/log/audit/audit.log`
341
+
- Description: Specify the full path name to the log file where audit records will be stored. It must be a regular file.
342
+
-`os_auditd_log_format`
343
+
- Default: `RAW`
344
+
- Description: The log format describes how the information should be stored on disk. There are 2 options: raw and enriched. If set to `RAW`, the audit records will be stored in a format exactly as the kernel sends it. The `ENRICHED` option will resolve all uid, gid, syscall, architecture, and socket address information before writing the event to disk. This aids in making sense of events created on one system but reported/analyzed on another system.
330
345
-`os_auditd_admin_space_left`
331
346
- Default: 50
332
347
- Description: This is a numeric value in megabytes that tells the audit daemon when to perform a configurable action because the system is running low on disk space.
@@ -339,9 +354,6 @@ We know that this is the case on Raspberry Pi.
339
354
-`os_auditd_action_mail_acct`
340
355
- Default: root
341
356
- Description: If `space_left_action` or `admin_space_left_action` are set to `email`, uses the address or alias to send the email using `/usr/lib/sendmail`. If the address or alias is not local, requires email properly configured on the machine and network.
342
-
-`os_auditd_log_format`
343
-
- Default: `RAW`
344
-
- Description: The log format describes how the information should be stored on disk. There are 2 options: raw and enriched. If set to `RAW`, the audit records will be stored in a format exactly as the kernel sends it. The `ENRICHED` option will resolve all uid, gid, syscall, architecture, and socket address information before writing the event to disk. This aids in making sense of events created on one system but reported/analyzed on another system.
0 commit comments