Hello,
I would like to have a dataset in BQ which only specific users/groups can access. The issue here is that I don't want inherited access to work on this dataset. Is there a way to achieve that?
To add more context: Some groups already have access to this project, so by inheritance they have access to all the datasets. I need a secured dataset where I would like to keep sensitive data and only a few users should have access to that.
Yes, you can achieve a high level of control and prevent unwanted inherited access in BigQuery by using a combination of IAM roles and permissions, along with column-level access control. Here's how you can do it:
Using IAM Roles and Permissions:
bigquery.dataViewer
or bigquery.dataEditor
to users or groups for the dataset you want to secure. These roles should be granted directly at the dataset level, ensuring that only the intended users have access.Implementing Column-Level Access Control (CLAC):
Additional Tips:
By carefully managing IAM roles and permissions at the dataset level and utilizing column-level access control with policy tags, you can create a secure environment in BigQuery. This approach ensures that sensitive data is accessible only to specific users or groups, effectively preventing unwanted access due to inherited permissions. Remember, regular audits and monitoring are key to maintaining this security over time.
Google Cloud uses IAM for security. When you create a BigQuery dataset, that dataset is owned by a project. You can grant permissions to users/groups at the dataset level and that would allow those users to access the dataset and tables contained within. If you have granted BigQuery permissions at the project level (for the project which owns the dataset) then YES ... inheritance will be honored and EVERYONE that was granted BigQuery permissions at the project level will ALSO have permissions at the dataset level. The resolution is to contemplate the thinking behind granting access at the project level. Instead, consider granting access to users at the dataset level and remove permissions at the project level. While this appears to be more work ... lets contemplate what you have currently said ... "I have users that I want to be give permissions to ALL datasets owned by this project and have hence granted them permissions at the project level ... however now I have a dataset that is also owned by this project and I don't want to grant permissions to those users that I previously gave permissions". Another solution would be to create a separate project and create your dataset in that project and don't give project level permissions to anyone (in that project).
Cant we use Deny Policy here?