A Auditing Oracle Database Vault
You can audit activities in Oracle Database Vault, such as changes to policy configurations.
- About Auditing in Oracle Database Vault
All activities in Oracle Database Vault can be audited, including Database Vault administrator activities. - Protection of the Unified Audit Trail in an Oracle Database Vault Environment
By default,AUDSYS
schema, which contains the unified audit trail, is not protected by a realm. - Oracle Database Vault Specific Audit Events
Oracle Database Vault traditional (non-unified) audit events track activities such as whether an action attempted on a realm was successful. - Archiving and Purging the Oracle Database Vault Audit Trail
If you have not migrated to unified auditing, you should periodically archive and purge the Oracle Database Vault audit trail. - Oracle Database Audit Settings Created for Oracle Database Vault
When you install Oracle Database Vault, it creates severalAUDIT
settings in the database.
A.1 About Auditing in Oracle Database Vault
All activities in Oracle Database Vault can be audited, including Database Vault administrator activities.
There are two ways that you audit Oracle Database Vault: unified auditing or the Oracle Database Vault traditional, non-unified auditing tools.
Auditing Oracle Database Vault Using Unified Auditing
Unified auditing is the recommended way to audit Oracle Database Vault because in addition to the advantages that unified auditing provides, non-unified auditing is deprecated starting with Oracle Database release 21c.
Unified auditing enables you to create custom policies that capture more fine-tuned data than you can capture with traditional Oracle Database Vault auditing. For example, you can create unified auditing policies that capture Database Vault-specific events from Oracle products that are integrated with Database Vault, such as Oracle Data Pump or Oracle Label Security. In addition to this functionality, unified auditing provides the following two predefined policies that are designed for common Database Vault auditing needs:
ORA_DV_AUDPOL
audits Oracle Database VaultDVSYS
andLBACSYS
schema objects.ORA_DV_AUDPOL2
audits the Oracle Database Vault default realms and command rules.
When you migrate to unified auditing, then the auditing features in the Database Vault APIs (the audit_options
parameter) are no longer effective. You should archive and purge these audit records. From then on, you can manage Database Vault audit policies through the unified audit policy PL/SQL statements. Oracle recommends that you migrate to full unified auditing.
To learn how to create unified audit policies, see Oracle Database Security Guide.
Auditing Oracle Database Vault Using Traditional, Non-Unified Auditing
Traditional, non-unified auditing uses the Oracle Database Vault APIs to collect audit records and write these audit records to the Oracle Database Vault data dictionary views and reports. This type of auditing is deprecated starting with Oracle Database release 21c.
You can audit individual policies that you create for realms, rule sets, and factors. The audit indicates if the user's action succeeded (that is, the policy enabled the user to accomplish a task) or if the user's action failed (the policy was violated). These actions are written to audit logs, whose contents you can find either by querying the appropriate data dictionary views, or running the Oracle Database Vault reports.
All configuration changes made to Database Vault are mandatorily audited, including actions of unprivileged users who attempt to modify Database Vault policies.
When you install a new database and configure it to use Oracle Database Vault, then by default it uses a mixed-mode environment, that is, a mixture of unified auditing and pre-migrated auditing. If you have upgraded from previous release, then Database Vault uses the auditing that was available from that release.
Before you migrate to a full unified auditing environment, you can create audit policies as follows:
-
Using the Database Vault APIs: That is, you use the
DBMS_MACADM
PL/SQL package or the Database Vault pages in Enterprise Manager. In this case, the audit records are written to the Database Vault audit trail, which is stored in theDVSYS.AUDIT_TRAIL$
table. You can query theDVSYS.DV$CONFIGURATION_AUDIT
andDVSYS.DV$ENFORCEMENT_AUDIT
views for these audit records. -
Using the unified audit policy SQL statements: These statements are the
CREATE AUDIT POLICY
,ALTER AUDIT POLICY
,DROP AUDIT POLICY
,AUDIT
, andNO AUDIT
statements. They are written to the unified audit trail, which is captured by theUNIFIED_AUDIT_TRAIL
,AUDSYS.DV$CONFIGURATION_AUDIT
, andAUDSYS.DV$ENFORCEMENT_AUDIT
data dictionary views. Oracle Database provides a default unified auditing policy,ORA_DV_AUDPOL
, that audits all actions that are performed on the Oracle Database VaultDVSYS
andDVF
schema objects and the Oracle Label SecurityLBACSYS
schema objects.
Related Topics
Parent topic: Auditing Oracle Database Vault
A.2 Protection of the Unified Audit Trail in an Oracle Database Vault Environment
By default, AUDSYS
schema, which contains the unified audit trail, is not protected by a realm.
To better protect the unified audit trail, Oracle recommends that you do the following:
- Create a regular (not mandatory) realm around the
AUDSYS
schema so that only authorized users (that is, users who have been granted theAUDIT_ADMIN
andAUDIT_VIEWER
roles) can query the unified audit trail views and use theDBMS_AUDIT_MGMT
PL/SQL package to manage the audit trail. This realm will prevent highly privileged users, includingSYS
, from performing these actions until they are added to that realm's authorization list. - Create a command rule for the
CREATE AUDIT POLICY
,ALTER AUDIT POLICY
, andDROP AUDIT POLICY
SQL statements so that only authorized users can run these statements.
Related Topics
Parent topic: Auditing Oracle Database Vault
A.3 Oracle Database Vault Specific Audit Events
Oracle Database Vault traditional (non-unified) audit events track activities such as whether an action attempted on a realm was successful.
- Oracle Database Vault Policy Audit Events
Oracle Database Vault uses audit events to track configuration activities, using traditional, non-unified auditing. - Oracle Database Vault Audit Trail Record Format
If you do not use unified auditing, then Oracle Database Vault writes audit records to theDVSYS.AUDIT_TRAIL$
table.
Parent topic: Auditing Oracle Database Vault
A.3.1 Oracle Database Vault Policy Audit Events
Oracle Database Vault uses audit events to track configuration activities, using traditional, non-unified auditing.
These activities are as follows:
-
Realm Audit. You can audit both successful and failed actions, based on the auditing option that you set when you created the realm. The exception to this is actions performed by the schema owner.
-
Rule Set Audit. Audits the rule set processing results. You can audit both successful and failed processing. Realm authorizations can be managed using rule sets. You can audit the rule set processing results. Factor assignments and secure application roles audits can be managed using a rule set.
-
Factor Audit. You can audit both successful and failed factor processing. For failed factor processing, you can audit on all or any of the following events: Retrieval Error, Retrieval Null, Validation Error, Validation False, Trust Level Null, or Trust Level Less Than Zero.
-
Oracle Label Security Session Initialization Failed. Audits instances where the Oracle Label Security session fails to initialize.
-
Oracle Label Security Attempt to Upgrade Session Label Failed. Audits instances where the Oracle Label Security component prevents a session from setting a label that exceeds the maximum session label.
Parent topic: Oracle Database Vault Specific Audit Events
A.3.2 Oracle Database Vault Audit Trail Record Format
If you do not use unified auditing, then Oracle Database Vault writes audit records to the DVSYS.AUDIT_TRAIL$
table.
These audit records are not part of the Oracle Database audit trail, and how auditing is enabled in the database has no effect how Oracle Database Vault collects its audit data in the DVSYS.AUDIT_TRAIL$
table. In fact, even if auditing has been disabled in Oracle Database, then the Oracle Database Vault audit functionality continues to write to the DVSYS.AUDIT_TRAIL$
table.
Users who have been granted the DV_OWNER
, DV_ADMIN
, DV_SECANALYST
or DV_MONITOR
role can directly query the DVYS.AUDIT_TRAIL$
table.
Table A-1 describes the format of the audit trail, which you must understand if you plan to create custom reports that use the DVSYS.AUDIT_TRAIL$
table.
Table A-1 Oracle Database Vault Audit Trail Format
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Numeric identifier for the audit record |
|
|
|
Operating system login user name of the user whose actions were audited |
|
|
|
Name of the database user whose actions were audited |
|
|
|
Client computer name |
|
|
|
Identifier for the user's terminal |
|
|
|
Date and time of creation of the audit trail entry (in the local database session time zone) |
|
|
|
Creator of the object affected by the action, always |
|
|
|
Name of the object affected by the action. Expected values are:
|
|
|
|
Numeric action type code. The corresponding name of the action type is in the |
|
|
|
Name of the action type corresponding to the numeric code in the |
|
|
|
The unique identifier of the record in the table specified under |
|
|
|
The unique name or natural key of the record in the table specified under |
|
|
|
The SQL text of the command procedure that was run that resulted in the audit event being triggered |
|
|
|
The labels for all audit options specified in the record that resulted in the audit event being triggered. For example, a factor set operation that is supposed to audit on get failure and get |
|
|
|
The unique identifier of the rule set that was executing and caused the audit event to trigger |
|
|
|
The unique name of the rule set that was executing and caused the audit event to trigger |
|
|
|
Not used |
|
|
|
Not used |
|
|
|
An XML document that contains all of the factor identifiers for the current session at the point when the audit event was triggered |
|
|
|
Text comment on the audit trail entry, providing more information about the statement audited |
|
|
|
Numeric identifier for each Oracle session |
|
|
|
Same as the value in the |
|
|
|
Numeric identifier for the statement invoked that caused the audit event to be generated. This is empty for most Oracle Database Vault events. |
|
|
|
Oracle error code generated by the action. The error code for a statement or procedure invoked that caused the audit event to be generated. This is empty for most Oracle Database Vault events. |
|
|
|
Time stamp of creation of the audit trail entry (time stamp of user login for entries) in UTC (Coordinated Universal Time) time zone |
|
|
|
Proxy session serial number, if an enterprise user has logged in through the proxy mechanism |
|
|
|
Global user identifier for the user, if the user has logged in as an enterprise user |
|
|
|
Instance number as specified by the |
|
|
|
Operating system process identifier of the Oracle process |
|
|
|
Database login user name of the user whose actions were audited |
|
|
|
Date on which the action occurred, based on the |
|
|
|
Same as |
|
|
|
Same as |
Parent topic: Oracle Database Vault Specific Audit Events
A.4 Archiving and Purging the Oracle Database Vault Audit Trail
If you have not migrated to unified auditing, you should periodically archive and purge the Oracle Database Vault audit trail.
- About Archiving and Purging the Oracle Database Vault Audit Trail
In a traditional, non-unified auditing environment, you can archive the Oracle Database Vault audit trail by exporting theDVSYS.AUDIT_TRAIL$
table to a dump file. - Archiving the Oracle Database Vault Audit Trail
You can use SQL*Plus and Oracle Data Pump to archive the Oracle Database Vault audit trail from the root or a PDB. - Purging the Oracle Database Vault Audit Trail
You can purge the (traditional, non-unified auditing) Oracle Database Vault audit trail from the root or a PDB.
Parent topic: Auditing Oracle Database Vault
A.4.1 About Archiving and Purging the Oracle Database Vault Audit Trail
In a traditional, non-unified auditing environment, you can archive the Oracle Database Vault audit trail by exporting the DVSYS.AUDIT_TRAIL$
table to a dump file.
You should periodically archive and then purge the audit trail to prevent it from growing too large.
If you choose to migrate to unified auditing, then use this procedure to archive and purge the Database Vault audit trail records after you complete the migration. When unified auditing begins to collect records, then the new records will be available for viewing from the UNIFIED_AUDIT_TRAIL
, AUDSYS.DV$CONFIGURATION_AUDIT
, and AUDSYS.DV$ENFORCEMENT_AUDIT
data dictionary views.
A.4.2 Archiving the Oracle Database Vault Audit Trail
You can use SQL*Plus and Oracle Data Pump to archive the Oracle Database Vault audit trail from the root or a PDB.
A.5 Oracle Database Audit Settings Created for Oracle Database Vault
When you install Oracle Database Vault, it creates several AUDIT
settings in the database.
In a traditional, non-unified auditing environment, in order for these audit settings to take place, auditing must be enabled in this database. You can check if auditing is enabled by using the SHOW PARAMETER
command to find the value of the AUDIT_TRAIL
initialization parameter. By default, auditing is enabled in Oracle Database.
Table A-2 lists the AUDIT
settings that Oracle Database Vault adds to the database.
Table A-2 Audit Policy Settings Oracle Database Vault Adds to Oracle Database
Audit Setting Type | Audited Statements (BY ACCESS and on Success or Failure Unless Otherwise Noted) |
---|---|
User Audit Settings for User Audit Settings for |
|
Object Audit Settings for |
|
Object Audit Settings for Object Audit Settings for |
|
Related Topics
Parent topic: Auditing Oracle Database Vault