6 Creating Audit Policies for Oracle Databases
You can retrieve and provision audit configurations for an Oracle Database.
6.1 About Audit Policies
Using the Audit Vault Server console, you can retrieve audit policies from Oracle Database targets.
You can then modify the policies or create new ones, and then provision them to the Oracle Databases. You can retrieve and modify the following types of Oracle Database audit policies.
- Unified audit policies
- SQL statements
- Schema objects
- Privileges
- Fine-grained auditing
6.2 General Steps for Creating Audit Policies for Oracle Databases
To create audit policies for Oracle databases, you retrieve the target Oracle Database audit policy settings, modify them, and provision the policy.
- Retrieve the current audit policy settings from the target Oracle database, and specify which of the current settings are needed.
- If necessary, define more audit settings to add to the needed settings.
- For unified auditing, select the necessary unified audit policy.
- Provision the audit policy to the target database. The policy settings you specified as needed, and the new ones you created, then become the policies in use in the database.
6.3 Retrieving and Modifying Audit Policies from an Oracle Database
You can retrieve audit policies from Oracle database.
6.3.1 Understanding the Columns on the Audit Policies Tab
When you retrieve audit policies from a target Oracle Database, you see the state of the database audit policies at that point in time.
Click the Policies tab in the Audit Vault Server console. The Audit Policies tab in the left navigation menu is displayed by default. This page contains a list of Oracle Database targets. It also lists the time at which the audit policies were last provisioned and retrieved.
Table 6-1 describes the columns shown in the Audit Policies page.
Table 6-1 Fields under Audit Policies tab
Column | Description |
---|---|
Target |
Name of the target. |
Last Retrieved |
The time that the audit information for the selected database was last retrieved. |
Last Provisioned |
The time that the audit settings were last provisioned to the database from Oracle Audit Vault and Database Firewall. |
6.3.2 Retrieving Audit Policies from Multiple Oracle Databases
You can retrieve audit policies from several Oracle Database targets at once. You can schedule audit setting retrievals for individual targets.
- Rerun the Oracle privileges script for successful audit policy retrieval for container database targets. For more information see Oracle Database Setup Scripts.
- Retrieve audit policies before provisioning or viewing audit policies. For more information see Retrieving and Modifying Audit Policies from an Oracle Database
- Ensure the target user has sufficient privileges granted for audit policy management. An administrator can grant these using the Oracle Database Setup Scripts.
6.3.3 Scheduling the Retrieval of Audit Settings for an Oracle Database
To retrieve audit policy settings for an Oracle Database, schedule an audit policy retrieval job for the target.
- Rerun the Oracle privileges script for successful audit policy retrieval for container database targets. For more information see Oracle Database Setup Scripts.
- Retrieve audit policies before provisioning or viewing audit policies. For more information see Retrieving and Modifying Audit Policies from an Oracle Database
- Log in to the Audit Vault Server console as an auditor.
- Click the Targets tab.
- Click the Schedule Retrieval Jobs icon for the target.
-
On the Schedule Retrieval Jobs page, select one of the following options under Audit Policy:
- To run the job immediately, select Retrieve Immediately.
-
To schedule the job or change an existing schedule, follow these steps:
- Select Create/Update Schedule.
- Select Enable.
- Enter the start date and time and the repetition frequency.
- Click Save.
6.4 Provisioning Unified Audit Policies
Learn about provisioning Unified Audit policies.
- Rerun the Oracle privileges script for successful audit policy retrieval for container database targets. For more information see Oracle Database Setup Scripts.
- Retrieve audit policies before provisioning or viewing audit policies. For more information see Retrieving and Modifying Audit Policies from an Oracle Database
6.4.1 Basic Auditing
Learn about basic auditing. It captures logon events, critical activity and schema changes.
The basic audit policy Critical Database Activity is defined as follows and is enabled for all the database users.
CREATE AUDIT POLICY ORA_AV$_CRITICAL_DB_ACTIVITY
PRIVILEGES EXEMPT ACCESS POLICY,EXEMPT REDACTION POLICY,
ADMINISTER KEY MANAGEMENT,EXPORT FULL DATABASE,IMPORT FULL DATABASE,
CREATE PUBLIC DATABASE LINK, ALTER PUBLIC DATABASE LINK, DROP PUBLIC DATABASE LINK,
CREATE PUBLIC SYNONYM, DROP PUBLIC SYNONYM,
SELECT ANY DICTIONARY, ADMINISTER DATABASE TRIGGER,
PURGE DBA_RECYCLEBIN, LOGMINING
ACTIONS CREATE USER, ALTER USER, DROP USER,
CREATE ROLE, DROP ROLE, ALTER ROLE, SET ROLE, GRANT, REVOKE,
CREATE PROFILE, ALTER PROFILE, DROP PROFILE,
CREATE PLUGGABLE DATABASE, DROP PLUGGABLE DATABASE, ALTER PLUGGABLE DATABASE,
CREATE LOCKDOWN PROFILE, ALTER LOCKDOWN PROFILE, DROP LOCKDOWN PROFILE,
ALTER DATABASE, ALTER SYSTEM,
CREATE TABLESPACE, ALTER TABLESPACE, DROP TABLESPACE,
CREATE ROLLBACK SEGMENT, ALTER ROLLBACK SEGMENT, DROP ROLLBACK SEGMENT,
CREATE DIRECTORY, DROP DIRECTORY,
CREATE DISK GROUP,ALTER DISK GROUP,DROP DISK GROUP,
CREATE PFILE,CREATE SPFILE
ACTIONS COMPONENT = datapump EXPORT,IMPORT
ACTIONS COMPONENT = DIRECT_LOAD LOAD;
AUDIT POLICY ORA_AV$_CRITICAL_DB_ACTIVITY;
-- enabled for all users
The basic audit policy Logon/Logoff Events audits logon and logoff activities for database users except for a specified list of users and audits all unsuccessful logons and logoffs.
The following policies are provisioned on the target database for logon events category:
CREATE AUDIT POLICY ORA_AV$_LOGON_EVENTS ACTIONS LOGON,LOGOFF;
CREATE AUDIT POLICY ORA_AV$_LOGON_FAILURE ACTIONS LOGON,LOGOFF;
AUDIT POLICY ORA_AV$_LOGON_EVENTS EXCEPT <comma separated user list>;
AUDIT POLICY ORA_AVS$_LOGON_FAILURE whenever not successful;
The basic audit policy Database Schema is defined as follows and is enabled for all the database users.
CREATE AUDIT POLICY ORA_AV$_DB_SCHEMA_CHANGES
PRIVILEGES
CREATE EXTERNAL JOB, CREATE JOB, CREATE ANY JOB
ACTIONS CREATE PROCEDURE, DROP PROCEDURE, ALTER PROCEDURE,
CREATE PACKAGE, ALTER PACKAGE, DROP PACKAGE, CREATE PACKAGE BODY, ALTER PACKAGE BODY, DROP PACKAGE BODY,
CREATE FUNCTION, DROP FUNCTION, ALTER FUNCTION,
CREATE TRIGGER, ALTER TRIGGER, DROP TRIGGER,
CREATE LIBRARY, ALTER LIBRARY, DROP LIBRARY,
CREATE SYNONYM, DROP SYNONYM,
CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE TABLE,
CREATE DATABASE LINK, ALTER DATABASE LINK, DROP DATABASE LINK,
CREATE INDEX, ALTER INDEX, DROP INDEX,
CREATE OUTLINE, ALTER OUTLINE,DROP OUTLINE,
CREATE CONTEXT, DROP CONTEXT,
CREATE ATTRIBUTE DIMENSION,ALTER ATTRIBUTE DIMENSION,DROP ATTRIBUTE DIMENSION,
CREATE DIMENSION,ALTER DIMENSION,DROP DIMENSION,
CREATE INDEXTYPE,ALTER INDEXTYPE,DROP INDEXTYPE,
CREATE OPERATOR,ALTER OPERATOR,DROP OPERATOR,
CREATE JAVA,ALTER JAVA,DROP JAVA,
CREATE MINING MODEL,ALTER MINING MODEL,DROP MINING MODEL,
CREATE TYPE BODY,ALTER TYPE BODY,DROP TYPE BODY,
CREATE TYPE,ALTER TYPE,DROP TYPE,
CREATE MATERIALIZED VIEW,ALTER MATERIALIZED VIEW,DROP MATERIALIZED VIEW ,
CREATE MATERIALIZED VIEW LOG, ALTER MATERIALIZED VIEW LOG,DROP MATERIALIZED VIEW LOG,
CREATE MATERIALIZED ZONEMAP, ALTER MATERIALIZED ZONEMAP,DROP MATERIALIZED ZONEMAP,
CREATE VIEW, ALTER VIEW, DROP VIEW,CREATE ANALYTIC VIEW, ALTER ANALYTIC VIEW, DROP ANALYTIC VIEW,
CREATE SEQUENCE, ALTER SEQUENCE, DROP SEQUENCE,
CREATE CLUSTER, ALTER CLUSTER, DROP CLUSTER,TRUNCATE CLUSTER;
AUDIT POLICY ORA_AV$_DB_SCHEMA_CHANGES;
-- enabled for all users
6.4.2 Admin Activity Auditing Policy
Learn about provisioning the Admin Activity Auditing policy.
The Admin Activity Auditing policy lets you audit all activities by privileged administrators. These administrators can make significant changes to the wider system. A database administrator (DBA) can have access to sensitive data that is not protected by realms, and can exfiltrate. The Admin Activity auditing policy audits all activities for non Oracle maintained user who has one of the following privileges or roles.
-
Admin privileges:
SYSOPER
,SYSDG
,SYSKM
,SYSRAC
, andSYSBACKUP
-
Roles:
DBA
,DATAPUMP_EXP_FULL_DATABASE
,DATAPUMP_IMP_FULL_DATABASE
,EXP_FULL_DATABASE
,IMP_FULL_DATABASE
Note:
-
Non Oracle maintained users are subset of users from
dba_users
group withoracle_maintained
flag set toN
. -
Oracle maintained users are subset of users from
dba_users
group withoracle_maintained
flag set toY
. - See My Oracle Support to download and apply the RDBMS patch 21493004
on the target Oracle Database. Apply the patch to audit only top level
statements with unified auditing. This patch must be applied on Oracle Database
targets (version 12.2). Also apply the patch on Oracle Database targets
(versions prior to 18c). In case this patch is not applied, the following error
message is observed in the Audit Vault Server console when All Admin Activity
policy is attempted for provisioning:
Unable to provision All Admin Activity audit policy on the target database. Refer to Admin Activity Audit Policy section in Auditor's Guide for details.
Instructions for finding patches on My Oracle Support: How to find a patch on My Oracle Support
The following audit policy gets provisioned on the target database (version 12.2.0.1 or greater):
CREATE AUDIT POLICY ORA_AV$_ADMIN_USER_ACTIVITY ACTIONS ALL
WHEN SYS_CONTEXT('USERENV','CURRENT_USER') NOT IN
(<list of oracle maintained users>) EVALUATE PER STATEMENT
AUDIT POLICY ORA_AV$_ADMIN_USER_ACTIVITY BY USERS WITH GRANTED ROLES DBA,
DATAPUMP_EXP_FULL_DATABASE, DATAPUMP_IMP_FULL_DATABASE, EXP_FULL_DATABASE,
IMP_FULL_DATABASE;
AUDIT POLICY ORA_AV$_ADMIN_USER_ACTIVITY BY PUBLIC, SYSDG, SYSKM, SYSRAC, SYSBACKUP;
Note:
To get the list of Oracle maintained users, run query:
SELECT username from dba_users where oracle_maintained = 'Y'
On Oracle Database 19c and above, the system provisions an additional audit policy
to monitor all top level activities of SYS
as shown here:
CREATE AUDIT POLICY ORA_AV$_SYS_TOP_ACTIVITY ACTIONS ALL ONLY TOPLEVEL;
AUDIT POLICY ORA_AV$_SYS_TOP_ACTIVITY by SYS;
Starting Oracle AVDF release 20.3, the following audit policy gets provisioned on the target database:
CREATE AUDIT POLICY ORA_AV$_ADMIN_USER_ACTIVITY ACTIONS ALL WHEN
SYS_CONTEXT('USERENV','CURRENT_USER') NOT IN(<list of oracle maintained
users>) EVALUATE PER STATEMENT ONLY TOPLEVEL;
After upgrading from Oracle AVDF releases 20.1 or 20.2 to 20.3, follow these steps before provisioning unified audit policies. Also apply the patch on Oracle Database targets (versions prior to 18c) to audit only top level statements with unified auditing. See My Oracle Support to download and apply the RDBMS patch 21493004 on the target Oracle Database.
- Log in to the Audit Vault Server console as auditor.
- Click Policies tab.
- The Audit Policies tab in the left navigation menu is selected by default.
- Click the specific target.
- The policy details page is displayed. Disable the
Admin User Activity
category. -
Log in to the target database as the target user and run these commands:
DROP AUDIT POLICY ORA_AV$_ADMIN_USER_ACTIVITY;
DROP AUDIT POLICY ORA_AV$_SYS_TOP_ACTIVITY;
- Return to the Audit Policies sub tab in the Audit Vault Server console.
- Select the specific policy and click Retrieve button in the top right corner.
- Enable the
Admin User Activity
category.
6.4.3 User Activity Auditing Policy
Learn about provisioning the User Activity Auditing policy.
The User Activity Auditing policy tracks all activity by users who may have access to sensitive data or who are under observation. These users could be “non-admin but privileged” users. When enabling this policy in the interface, you must specify non-Oracle maintained users to audit.
The following audit policy gets provisioned on the target database:
CREATE AUDIT POLICY ORA_AV$_USER_ACTIVITY ACTIONS ALL
WHEN SYS_CONTEXT('USERENV','CURRENT_USER') NOT IN
(<list of oracle maintained users>) EVALUATE PER STATEMENT
AUDIT POLICY ORA_AV$_USER_ACTIVITY BY <comma-separated non-Oracle maintained user list>
6.4.4 Audit Compliance Standards
Learn about audit compliance standards supported in Oracle AVDF.
6.4.4.1 Center for Internet Security Recommendations Unified Audit Policy
Learn about provisioning Center for Internet Security Recommendations (CIS) unified audit policy.
The Center for Internet Security Recommendations (CIS) unified audit policy is a
predefined policy (ORA_CIS_RECOMMENDATIONS
) in Oracle Database
specifically designed to perform audits that the CIS recommends.
You can enable or disable this policy, along with other policies provided by Oracle Audit Vault and Database Firewall. This policy tracks many activities and can help you evaluate whether you are adhering to database compliance requirements. For example, you can track when a user, database link, profile, or procedure is created, altered, or dropped.
CIS is a world-recognized organization that provides consensus-based best practices for helping organizations assess and improve their cyber security posture. They provide resources, such as configuration assessment tools, secure configuration benchmarks, security metrics, and certifications. One of the main objectives of the organization is to help businesses prioritize what they need to do for security, and they strive to provide recommendations in simple, non-technical terms.
Related Topics
6.4.4.2 Security Technical Implementation Guidelines (STIG)
Learn about enabling Security Technical Implementation Guidelines (STIG) unified audit policy.
Starting Oracle AVDF 20.5, Security Technical Implementation Guidelines (STIG) unified audit policy is available for provisioning. This functionality can be enabled on Oracle Database targets to implement Security Technical Implementation Guidelines (STIG) audit requirements. Security Technical Implementation Guidelines (STIG) can be enabled on Oracle Database targets starting with version 21.
When Security Technical Implementation Guidelines (STIG) is provisioned, the following unified policies are enabled on the target database.
Predefined Audit Policies Name | Can be enabled for users | Event Condition |
---|---|---|
|
All users |
|
|
All users |
|
|
Privileged users |
|
You can fetch the privileged user list identified by the user entitlement job or provide your own list. You can enable or disable this policy, along with other policies provided by Oracle AVDF. This policy tracks many activities and can help you evaluate whether you are adhering to STIG compliance requirements or not.
Follow these steps to enable STIG audit policy. These options are
applicable only for ORA_ALL_TOPLEVEL_ACTIONS
audit policy.
6.4.5 User-defined and Oracle Pre-defined Unified Policies
Learn about provisioning custom and Oracle pre-seeded unified policies.
You can enable Oracle Pre-defined Policies or User-defined Policies that you created on your target database using Oracle Audit Vault and Database Firewall. The following are Oracle Pre-defined Policies:
ORA_ACCOUNT_MGMT
ORA_DATABASE_PARAMETER
ORA_SECURECONFIG
ORA_DV_AUDPOL
ORA_DV_AUDPOL2
(Oracle Database 12.2.0.1 and later)ORA_RAS_POLICY_MGMT
ORA_RAS_SESSION_MGMT
ORA_LOGON_FAILURES
Starting Oracle AVDF 20.4, User-defined and Oracle Pre-defined Unified policies can be enforced on users, roles, and on specific event conditions (successful, unsuccessful, or both).
Note:
In case the policies have been enabled or disabled directly from the target database after the last retrieval, then they have to be retrieved again. This is done to fetch the updated list of the unified audit policies that are enabled or disabled on the target database.Follow these steps to edit the audit policy for users or roles:
- Log in to the Audit Vault Server console as an auditor.
- Click Policies tab. The Audit Policies tab in the left navigation menu is selected by default.
- Click on the name of the specific Oracle Database target for which you want to provision the audit policies.
- Unified Auditing sub tab in the main page is selected by default.
- If the checkbox against any pre-defined or user-defined policy is checked, then it can be modified. An edit icon appears next to it.
- Click on the edit icon. The Configure Policy dialog is displayed.
-
Based on users, the audit policy can be enabled for:
- All users
- Only a specific set of users and/or roles
- All users except a specific set of users
-
Based on event status, the audit policy can be enabled for:
- Successful events
- Unsuccessful events
- Both successful and unsuccessful events
- If you choose to modify or enable for only a specific set of users and/or roles, then a table appears. This table has two columns. You can add additional users and event status details. You can also delete any existing entries.
- If you choose to modify or enable for all users and exclude only a specific set of users, then a table component appears. You can move users from the Available column to Excluded column to exclude specific users. You can also select the event status (successful, unsuccessful, both) beneath the table.
- Choose or edit the values according to your specification in the dialog.
- Click Save.
- Click Provision Unified Policy to provision the policy.
- Check the Jobs section for the status.
Note:
To view the list of roles, follow the steps for Retrieving User Entitlement Data for Oracle Database Targets.6.4.6 Provisioning Unified Audit Policies from the Audit Vault Server
You can provision unified audit policies from the Audit Vault Server to the Oracle Database target.
6.5 Provisioning Traditional Audit Policies
Traditional audit policies are used to monitor SQL statements, schema objects, privileges, and fine-grained auditing.
- Rerun the Oracle privileges script for successful audit policy retrieval for container database targets. For more information see Oracle Database Setup Scripts.
- Retrieve audit policies before provisioning or viewing audit policies. For more information see Retrieving and Modifying Audit Policies from an Oracle Database
6.5.1 About Creating Audit Policy Settings
After you retrieve audit policy settings from the target Oracle database, and selected the settings you need, you can create new policy settings for the Oracle database.
Caution:
-
Any audit setting that is not indicated as Needed in the Audit Vault Server console will be turned off on the target. See "Specifying which Audit Policies are needed".
-
After you have updated and/or created the audit policies for a target Oracle Database, you can provision the audit policy changes to that database.
6.5.2 Specifying which Audit Policies are needed
After you retrieve the audit policies from the target Oracle Database, you can view and modify them as needed.
Remember that you are modifying audit policies in use at the time you retrieved them. If you think they may have changed, you should retrieve them again.
-
Log in to the Audit Vault Server console as an auditor.
-
Click Policies tab. The Audit Policies tab in the left navigation menu is selected by default.
-
Click on the name of the specific Oracle Database target for which you want to change the audit policies.
-
An overview page for the target displays two sections:
- Unified Auditing
- Traditional Auditing
-
Click Traditional Auditing. It displays the audit policies in use and marked as needed for the audit types:
-
Statement
-
Object
-
Privilege
-
FGA
-
-
Click on the link of the specific audit type to update the settings. For example, Object.
The Object audit policies for the specific target is displayed on the page. This is the current audit policies. The second column displays a problem icon if there is a difference between the setting at the target database, and the setting in Oracle Audit Vault and Database Firewall.
-
Select the check boxes for each audit setting you determine is needed, then click Set as Needed button on the top right corner.
-
To remove audit policies, select the check boxes for the ones you want to remove, then click Set as Not Needed.
-
To create new audit policies for the audit type, click Create.
6.5.3 Creating Audit Policies for SQL Statements
Auditors can create and manage audit policies for SQL statements.
6.5.3.1 About SQL Statement Auditing
Statement auditing audits SQL statements by type of statement, not by the specific schema objects on which the statement operates.
Statement auditing can be broad or focused (for example, by auditing the activities of all database users or only a select list of users). Typically broad statement auditing audits the use of several types of related actions for each option. These statements are in the following categories:
-
Data definition statements (DDL). For example,
AUDIT TABLE
audits allCREATE TABLE
andDROP TABLE
statements.AUDIT TABLE
tracks several DDL statements regardless of the table on which they are issued. You can also set statement auditing to audit selected users or every user in the database. -
Data manipulation statements (DML). For example,
AUDIT SELECT TABLE
audits allSELECT ... FROM TABLE
orSELECT ... FROM VIEW
statements, regardless of the table or view.
6.5.3.3 Understanding the Statement Audit Settings
The Statement Audit Settings page shows status information such as whether the statement is audited or if the statement audit policy is active.
Table 6-2 lists the columns used in the Statement page.
Table 6-2 Columns in the Statement Audit Settings
Column | Description |
---|---|
(Left most column) |
A checkbox for selecting the audit setting. |
(Problem icon) |
An exclamation mark icon indicates one of the following conditions:
|
Setting |
The statement that is audited. |
In Use |
A green check mark indicates if the setting is active in the target database. A red cross mark indicates if it has not been provisioned or is not active. |
Needed |
A green check mark indicates if the audit setting is marked as needed in Oracle Audit Vault and Database Firewall. A red cross mark indicates if the audit setting is marked as not needed. If an audit setting that is not in use is set to needed, a green check mark appears after provisioning in the In Use column. If an audit setting that is in use is set to not needed, the audit setting is no longer displayed after provisioning. |
Audit granularity |
The granularity of auditing: |
Execution Condition |
The execution condition audited: |
Proxy User |
The proxy user for the database, if any. |
User |
The user to which this setting applies, if any. |
6.5.4 Creating Audit Policies for Schema Objects
Auditors can create and manage schema object audit policies.
6.5.4.1 About Schema Object Auditing
Schema object auditing is the auditing of specific statements on a particular schema object, such as AUDIT SELECT ON HR.EMPLOYEES
.
Schema object auditing is very focused, auditing only a specific statement on a specific schema object for all users of the database.
For example, object auditing can audit all SELECT
and DML statements permitted by object privileges, such as SELECT
or DELETE
statements on a given table. The GRANT
and REVOKE
statements that control those privileges are also audited.
Object auditing lets you audit the use of powerful database commands that enable users to view or delete very sensitive and private data. You can audit statements that reference tables, views, sequences, standalone stored procedures or functions, and packages.
Oracle Database sets schema object audit options for all users of the database. You cannot set these options for a specific list of users.
6.5.4.3 Understanding the Object Audit Settings Page
The Object Audit Settings page shows object status information such as the object that is being audited and whether the policy is active.
Table 6-3 lists the columns used in the Object page.
Table 6-3 Columns in the Object Audit Settings Page
Column | Description |
---|---|
(Leftmost column) |
A checkbox for selecting the audit setting |
Problem icon |
An exclamation mark icon indicates one of the following conditions:
|
Setting |
The statement that is audited |
In Use |
The arrow points upward if the setting is active in the target database, and downward if it has not been provisioned or is not active. |
Needed |
The arrow points upward if the audit setting is marked as needed in Oracle Audit Vault and Database Firewall, and downward if the audit setting is marked as not needed. If an audit setting that is not in use is set to needed, the In Use arrow points up after provisioning. If an audit setting that is in use is set to not needed, the audit setting is no longer displayed after provisioning. |
Name |
The name of the object in the specified schema. |
Type |
The object (such as a database table) to which this setting applies |
Owner Name |
The database schema to which this setting applies |
Audit Granularity |
The granularity of auditing: |
Execution Condition |
The execution condition audited: |
6.5.5 Creating Audit Policies for Privileges
Auditors can create and manage privilege audit policies.
6.5.5.1 About Privilege Auditing
Privilege auditing is the auditing of SQL statements that use a system privilege.
You can audit the use of any system privilege. Like statement auditing, privilege auditing can audit the activities of all database users or only a specified list of users.
For example, if you enable AUDIT SELECT ANY TABLE
, Oracle Database audits all SELECT
tablename
statements issued by users who have the SELECT ANY TABLE
privilege. This type of auditing is very important for the Sarbanes-Oxley (SOX) Act compliance requirements. Sarbanes-Oxley and other compliance regulations require the privileged user be audited for inappropriate data changes or fraudulent changes to records.
Privilege auditing audits the use of powerful system privileges enabling corresponding actions, such as AUDIT CREATE TABLE
. If you set both similar statement and privilege audit options, then only a single audit record is generated. For example, if the statement clause TABLE
and the system privilege CREATE TABLE
are both audited, then only a single audit record is generated each time a table is created. The statement auditing clause, TABLE
, audits CREATE TABLE
, ALTER TABLE
, and DROP TABLE
statements. However, the privilege auditing option, CREATE TABLE
, audits only CREATE TABLE
statements, because only the CREATE TABLE
statement requires the CREATE TABLE
privilege.
Privilege auditing does not occur if the action is already permitted by the existing owner and schema object privileges. Privilege auditing is triggered only if these privileges are insufficient, that is, only if what makes the action possible is a system privilege.
Privilege auditing is more focused than statement auditing for the following reasons:
-
It audits only a specific type of SQL statement, not a related list of statements.
-
It audits only the use of the target privilege.
6.5.5.3 Understanding the Privilege Audit Settings Page
The Privilege Audit Settings page shows status information such as the privileges being audited and whether an audit policy is active.
Table 6-4 lists the columns used in the Privilege Audit Settings page.
Table 6-4 Columns in the Privilege Audit Settings Page
Column | Description |
---|---|
(Leftmost column) |
A checkbox for selecting the audit setting |
Problem icon |
An exclamation mark icon indicates one of the following conditions:
|
Setting |
The statement that is audited |
In Use |
The arrow points upward if the setting is active in the target database, and downward if it has not been provisioned or is not active. |
Needed |
The arrow points upward if the audit setting is marked as needed in Oracle Audit Vault and Database Firewall, and downward if the audit setting is marked as not needed. If an audit setting that is not in use is set to needed, the In Use arrow points up after provisioning. If an audit setting that is in use is set to not needed, the audit setting is no longer displayed after provisioning. |
Audit granularity |
The granularity of auditing: |
Execution Condition |
The execution condition audited: |
User |
The user to which this setting applies, if any |
Proxy User |
The proxy user for the database, if any |
6.5.6 Creating Audit Policies for Fine-Grained Auditing (FGA)
Auditors can create and manage fine-grained audit policies.
6.5.6.1 About Fine-Grained Auditing
Fine-grained auditing (FGA) enables you to create a policy that defines specific conditions that must exist for the audit to occur.
For example, fine-grained auditing lets you audit the following types of activities:
-
Accessing a table between 9 p.m. and 6 a.m. or on Saturday and Sunday
-
Using an IP address from outside the corporate network
-
Selecting or updating a table column
-
Modifying a value in a table column
A fine-grained audit policy provides granular auditing of select, insert, update, and delete operations. Furthermore, you reduce the amount of audit information generated by restricting auditing to only the conditions that you want to audit. This creates a more meaningful audit trail that supports compliance requirements. For example, a central tax authority can use fine-grained auditing to track access to tax returns to guard against employee snooping, with enough detail to determine what data was accessed. It is not enough to know that a specific user used the SELECT
privilege on a particular table. Fine-grained auditing provides a deeper audit, such as when the user queried the table or the computer IP address of the user who performed the action.
6.5.6.2 Using Event Handlers in Fine-Grained Auditing
In a fine-grained audit policy, you can specify an event handler to process an audit event.
The event handler provides flexibility in determining how to handle a triggering audit event. For example, it could write the audit event to a special audit table for further analysis, or it could send a pager or an email alert to a security administrator. This feature enables you to fine-tune audit responses to appropriate levels of escalation.
For additional flexibility in implementation, you can employ a user-defined function to determine the policy condition, and identify a relevant column for auditing (audit column). For example, the function could allow unaudited access to any salary as long as the user is accessing data within the company, but specify audited access to executive-level salaries when they are accessed from outside the company.
6.5.6.3 Auditing Specific Columns and Rows
A fine-grained audit policy can target one or more specific columns, called a relevant column, to be audited if a condition is met.
This feature enables you to focus on particularly important, sensitive, or privacy-related data to audit, such as the data in columns that hold credit card numbers, patient diagnoses, Social Security numbers, and so on. A relevant-column audit helps reduce the instances of false or unnecessary audit records, because the audit is triggered only when a particular column is referenced in the query.
You further can fine-tune the audit to specific columns and rows by adding a condition to the audit policy. For example, suppose you enter the following fields in the Create Fine Grained Audit page:
-
Condition:
department_id = 50
-
Columns:
salary, commission_pct
This setting audits anyone who tries to select data from the salary
and commission_pct
columns of employees in Department 50.
If you do not specify a relevant column, then Oracle Database applies the audit to all the columns in the table; that is, auditing occurs whenever any specified statement type affects any column, whether or not any rows are returned.
6.5.6.5 Understanding the Fine-Grained Audit Settings Page
The Fine-Grained Audit Settings page shows status information, such as the object to which the policy applies.
Table 6-5 lists the columns used in the Fine-Grained Audit Settings page.
Table 6-5 Columns in the Fine-Grained Audit Settings Page
Field | Description |
---|---|
(Leftmost column) |
A checkbox for selecting the audit setting |
Problem |
An exclamation mark icon indicates one of the following conditions:
|
Name |
The name of this fine-grained audit policy |
In Use |
The arrow points upward if the setting is active in the target and downward if it has not been provisioned or is not active. |
Needed |
The arrow points upward if the audit setting is marked as needed in Oracle Audit Vault and Database Firewall, and downward if the audit setting is marked as not needed. If an audit setting that is not in use is set to needed, the In Use arrow points up after provisioning. If an audit settings that is in use is set to not needed, the audit setting is no longer displayed after provisioning. |
Object Owner |
The schema to which this audit setting applies |
Object |
The object, in the specified schema, to which this audit setting applies |
Statement Types |
The SQL statement to which this audit setting applies. Values are:
|
Columns |
The database columns being audited, also referred to as the relevant columns. If this field is empty, all columns are audited. |
6.5.7 Exporting Audit Settings to a SQL Script
You can export audit policy settings for a target to a SQL script from Oracle Audit Vault and Database Firewall.
6.5.8 Provisioning Traditional Audit Policies from the Audit Vault Server
You can provision the traditional audit policy settings directly from the Audit Vault Server to the target Oracle Database.
6.6 Viewing Unified Audit Policies
Starting in Oracle AVDF 20.12, you can view the audit policies that are enabled on your target databases.
Prerequisites
- Rerun the Oracle privileges script for successful audit policy retrieval for container database targets. For more information see Oracle Database Setup Scripts.
- Retrieve audit policies before provisioning or viewing audit policies. For more information see Retrieving and Modifying Audit Policies from an Oracle Database
Procedure
-
Log in to the Audit Vault Server Console as an
auditor
. - Click the Policies tab.
- Select the database(s) you would like to view the audit policies for.
- Click View Policies.
You will see a table specifying the details of the audit policies for the selected target database(s).
For a CDB$ROOT target, you can see the list of common policies that have been enabled on the container database (CDB) and the pluggable database(s) (PDB) and the local policies of each individual PDB as well. This will show the policies of all PDBs that have been set up when the audit retrieval was done. If a PDB is added or removed, perform audit retrieval again to see the latest list.