SV-89109r1_rule
V-74435
SRG-APP-000080-DB-000063
DB2X-00-000500
CAT II
10
Define the audit policy using the following Create Audit Policy SQL statement:
DB2> CREATE AUDIT POLICY <audit policy name>
CATEGORIES CONTEXT STATUS BOTH, EXECUTE STATUS BOTH
ERROR TYPE AUDIT
Apply such a policy to either the database as a whole or to the specific application tables using one of these two statements:
DB2> AUDIT DATABASE USING POLICY <audit policy name>
Or
DB2> AUDIT TABLE <table name> USING POLICY <audit policy name>
Note : While DB2 does provide basic audit capabilities, IBM highly recommends investing in and using a dedicated enterprise audit tool such as the IBM Security Guardium Data Activity Monitor in order to provide a comprehensive audit solution.
Run the following SQL statement to ensure that an audit policy is defined upon all the required application tables and/or the database:
DB2> SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE
FROM SYSCAT.AUDITUSE
WHERE OBJECTTYPE IN ('T',' ')
If no rows are returned, this is a finding.
If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy.
If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy.
For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy:
DB2> SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE
FROM SYSCAT.AUDITPOLICIES
If the database audit policy has the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) as well as the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding.
If the database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required application tables.
If all the required application table audit policies do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) as well as the value in the ERRORTYPE column set to 'A' (Audit), this is a finding.
V-74435
False
DB2X-00-000500
Run the following SQL statement to ensure that an audit policy is defined upon all the required application tables and/or the database:
DB2> SELECT AUDITPOLICYNAME, OBJECTSCHEMA, OBJECTNAME, OBJECTTYPE
FROM SYSCAT.AUDITUSE
WHERE OBJECTTYPE IN ('T',' ')
If no rows are returned, this is a finding.
If a row with OBJECTTYPE of ' ' (Database; value is a blank) exists in the output, it is a database level policy.
If a row with OBJECTTYPE of 'T' exists in the output, it is a table level policy.
For each audit policy returned in the statement above, run the following SQL statement to confirm that the CONTEXT and EXECUTE categories are part of that policy:
DB2> SELECT AUDITPOLICYNAME, CONTEXTSTATUS, EXECUTESTATUS, ERRORTYPE AS ERRORTYPE
FROM SYSCAT.AUDITPOLICIES
If the database audit policy has the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) as well as the value in the ERRORTYPE column set to 'A' (Audit), this is not a finding.
If the database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required application tables.
If all the required application table audit policies do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) as well as the value in the ERRORTYPE column set to 'A' (Audit), this is a finding.
M
3161