Effective Use of Google Cloud IAM Deny Policies for BigQuery Data Security
Background
Recently, I assisted a customer who required protection for sensitive data in BigQuery, ensuring access was restricted to a small group of individuals. They wanted to prevent any accidental access by employees. To address this, I recommended using Google Cloud IAM deny policies. These policies allow you to establish strict access controls on BigQuery resources by defining deny rules at the organisation level. This ensures that selected principals are prevented from using certain permissions, regardless of the roles they have been granted. I want to use a lab to show you how it works so you can apply this in your organization if you have similiar requirements.
Lab
Grant your user roles/iam.denyAdmin role, or you get an error like the one below:

To grant the role, you need to do it at Organization level IAM:

Create a deny policy to block a group of users from accessing BigQuery data and creating BigQuery jobs:

After being created, the policy looks like this:

This policy means, users in admins@googlegroups.com cannot have these IAM permissions, therefore, they will not be able to create BigQuery jobs and view the data in the tables.
Summary
In conclusion, securing sensitive data in BigQuery is crucial for organizations that handle confidential information. By implementing Google Cloud IAM deny policies, you can effectively restrict access to BigQuery resources, ensuring that only authorized individuals have the necessary permissions. This approach not only prevents accidental access by employees but also strengthens your organization's data security posture. By following the steps outlined in this guide, you can apply these practices to safeguard your data and maintain compliance with security standards.