8.4 Review Roles granted to PUBLIC

Information

Granting to PUBLIC increases the risk of unauthorized entry into the database. Because PUBLIC is accessible by any database user, it is important to understand the exposure it has on all database objects. It would make sense to grant role membership to PUBLIC if all users required all the privileges granted through that role.

Solution

To remove a role member from a particular role-
1. Attach to a DB2 Instance-
db2 => attach to $DB2INSTANCE
2. Connect to DB2 database-
db2 => connect to $DBNAME
3. Run the following-
db2 => revoke role <role name> from PUBLIC

See Also

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