Once the audit features
are enabled, records are added to the SAS_AUDIT and SAS_AUDIT_ENTRY
tables. The records can be archived to the SAS_AUDIT_ARCHIVE and SAS_AUDIT_ENTRY_ARCHIVE
tables. An archive job is used to control which records to archive.
The archive job reads the archive rules in the SAS_AUDIT_ARCHIVE_RULE
table. The archive job always starts when SAS Web Infrastructure Platform
Services starts. In addition, the default archive job is scheduled
to start every Monday at the start of day, but the archive job schedule
can be configured.
The following table
describes the columns in table SAS_AUDIT_ARCHIVE_RULE. Rows must be
added to this table to identify the objects, actions, and age for
the archive job to process.
SAS_AUDIT_ARCHIVE_RULE Column Description
|
|
|
Object type. Each object
type is assigned an ID in table SAS_TYPE_OBJECT.
|
|
Type of change. Each
action type is assigned an ID in table SAS_TYPE_ACTION.
|
|
A numeric value in milliseconds.
Records that meet the criteria for OBJECT_TYPE_ID and ACTION_TYPE_ID,
and are also older than this value, are archived.
|
To control the archive
job schedule, you can add a JVM option to the Web application server.
The
-Dsas.audit.archive.cron
JVM option can
be used to specify the schedule. The schedule is set with a syntax
that is similar to cron:
-Dsas.audit.archive.cron="second minute hour day_of_month month day_of_week"
The following example
schedules the archive job to run each day at midnight:
-Dsas.audit.archive.cron="0 0 0 * * *"
You can confirm the
archive job runs and reads the archive rules by adding a logging context
to com.sas.svcs.audit at the INFO level.
The following table
identifies the common object types and actions that you might want
to include in the SAS_AUDIT_ARCHIVE_RULE table:
Common Audit Object Types and Actions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|