SV-89115r2_rule
V-74441
SRG-APP-000091-DB-000066
DB2X-00-000800
CAT II
10
Define the audit policy using the CREATE AUDIT POLICY SQL statement:
DB2> CREATE AUDIT POLICY CATALOGAUDIT CATEGORIES CONTEXT STATUS BOTH, EXECUTE STATUS BOTH ERROR TYPE AUDIT
To modify an existing audit policy, replace "CREATE" with "ALTER" in the preceding statement. Only the categories explicitly named in the statement will be affected. In this case, the changes take effect immediately.
If CREATE was used above, apply the correct audit policy to either the database as a whole or to the specific catalog tables using one of these two statements:
DB2> AUDIT DATABASE USING POLICY CATALOGAUDIT
Or
DB2> AUDIT TABLE <table name> USING POLICY CATALOGAUDIT
Note: The Database level policy in the Check category, covered in SRG-DB2X-00-000600, generates audit events of successful/unsuccessful read attempts on views based on these catalog tables.
To monitor who/what is reading the privilege/permission/role information from catalog tables a minimum audit set of CONTEXT and EXECUTE (with data) categories on the following catalog tables are required:
SYSIBM.SYSINDEXAUTH
SYSIBM.SYSPLANAUTH
SYSIBM.SYSPASSTHRUAUTH
SYSIBM.SYSROUTINEAUTH
SYSIBM.SYSSCHEMAAUTH
SYSIBM.SYSSECURITYLABELACCESS
SYSIBM.SYSSECURITYPOLICYEXEMPTIONS
SYSIBM.SYSSEQUENCEAUTH
SYSIBM.SYSSURROGATEAUTHIDS
SYSIBM.SYSTABAUTH
SYSIBM.SYSTBSPACEAUTH
SYSIBM.SYSXSROBJECTAUTH
SYSIBM.SYSCOLAUTH
SYSIBM.SYSLIBRARYAUTH
SYSIBM.SYSMODULEAUTH
SYSIBM.SYSROLEAUTH
SYSIBM.SYSVARIABLEAUTH
SYSIBM.SYSWORKLOADAUTH
SYSIBM.SYSDBAUTH
SYSIBM.SYSUSERAUTH
Run the following SQL statement to ensure that an audit policy is defined upon the above catalog 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 the 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 values for CONTEXTSTATUS and EXECUTESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.
If a database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required tables listed above.
If audit policies for the required tables do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.
V-74441
False
DB2X-00-000800
To monitor who/what is reading the privilege/permission/role information from catalog tables a minimum audit set of CONTEXT and EXECUTE (with data) categories on the following catalog tables are required:
SYSIBM.SYSINDEXAUTH
SYSIBM.SYSPLANAUTH
SYSIBM.SYSPASSTHRUAUTH
SYSIBM.SYSROUTINEAUTH
SYSIBM.SYSSCHEMAAUTH
SYSIBM.SYSSECURITYLABELACCESS
SYSIBM.SYSSECURITYPOLICYEXEMPTIONS
SYSIBM.SYSSEQUENCEAUTH
SYSIBM.SYSSURROGATEAUTHIDS
SYSIBM.SYSTABAUTH
SYSIBM.SYSTBSPACEAUTH
SYSIBM.SYSXSROBJECTAUTH
SYSIBM.SYSCOLAUTH
SYSIBM.SYSLIBRARYAUTH
SYSIBM.SYSMODULEAUTH
SYSIBM.SYSROLEAUTH
SYSIBM.SYSVARIABLEAUTH
SYSIBM.SYSWORKLOADAUTH
SYSIBM.SYSDBAUTH
SYSIBM.SYSUSERAUTH
Run the following SQL statement to ensure that an audit policy is defined upon the above catalog 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 the 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 values for CONTEXTSTATUS and EXECUTESTATUS are not 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.
If a database policy does not exist or does not cover CONTEXTSTATUS or EXECUTESTATUS then check if the appropriate policies are defined for all the required tables listed above.
If audit policies for the required tables do not have the values for the CONTEXTSTATUS and EXECUTESTATUS columns set to 'S' (Success) or 'B' (Both) or ERRORTYPE is not 'A' (Audit), this is a finding.
M
3161