When you create your own audit class, you can place into it just those audit events that you want to audit for your site. This strategy can reduce the number of records that are collected and reduce noise in your audit trail.
When you add the class on one system, copy the change to all systems that are being audited. Best practice is to create audit classes before the first users log in.
For information about the effects of modifying an audit configuration file, see Audit Configuration Files and Packaging.
Before You Begin
The root role can perform every task in this procedure.
If administrative rights are distributed in your organization, note the following:
An administrator who is assigned the solaris.admin.edit/etc/security/audit_class authorization can modify the file.
An administrator with the Audit Configuration rights profile can run the auditconfig command.
An administrator with the Service Configuration rights profile can run the svcadm command.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.
$ cp /etc/security/audit_class /etc/security/audit_class.orig
Each entry has the following format:
For a description of the fields, see the audit_class(5) man page. For the list of existing classes, read the /etc/security/audit_class file.
$ pfbash ; svcadm refresh svc:/system/auditset:default $ auditconfig -conf
The first command refreshes the audit service. The second command changes the runtime class mappings to match those in the audit event to class database file.
This example creates a class to hold administrative commands that are executed in a role. The added entry to the audit_class file is as follows:
The entry creates the new pf audit class. Example 12, Mapping Existing Audit Events to a New Class shows how to populate the new audit class.
If you have customized the audit_class file, make sure that any audit flags that are assigned directly to users or rights profiles are consistent with the new audit classes. Errors occur when an audit_flags value is not a subset of the audit_class file.