Information
The macOS audit capability contains important information to investigate security or operational issues. This resource is only completely useful if it is retained long enough to allow technical staff to find the root cause of anomalies in the records.
Retention can be set to respect both size and longevity. To retain as much as the recommendation is to use the following:
expire-after:30d
This recommendation is based on minimum amount of days retained for review and investigation. When a third party tool is in use to allow remote logging or the store and forwarding of logs, this is a supplemental source of data.
Note: If you organization has storage constraint issues, you can add a storage value limit to expire-after: in addition to days retained. For example: expire-after:30d OR 5G or expire-after:30d OR 10000M . In addition, your organization may also look at the what audit flags are enabled and make a risk decision on which are mission critical.
The audit records need to be retained long enough to be reviewed as necessary.
Solution
Terminal Method:
Perform the following to set the audit retention length:
Edit the /etc/security/audit_control file so that expire-after: is at least 30d
Impact:
The recommendation is that at least 30 days of audit logs are retained. Systems that have very little remaining disk space may have issues retaining sufficient data and should look into adding a storage limit or accessing which flags are enabled as discussed in the description.