4.2.21 Restrict Access to SYSCAT.ROLES

Information

The SYSCAT.ROLES view contains all roles available in the database. It is recommended that the PUBLIC role be restricted from accessing this view.

Rationale:

PUBLIC should not have access to see all the roles because this could be used as a point of exploit.

Solution

Perform the following to revoke access from PUBLIC.

Connect to the Db2 database.

db2 => connect to <dbname>

Run the following command:

db2 => REVOKE SELECT ON SYSCAT.ROLES FROM PUBLIC

See Also

https://workbench.cisecurity.org/files/4033