Description
It is recommended that the IAM policy on BigQuery datasets does not allow anonymous and/or public access.
Rationaleβ
Granting permissions to allUsers
or allAuthenticatedUsers
allows anyone to access the dataset. Such access might not be desirable if sensitive data is being stored in the dataset. Therefore, ensure that anonymous and/or public access to a dataset is not allowed.
Impactβ
The dataset is not publicly accessible. Explicit modification of IAM privileges would be necessary to make them publicly accessible.
Auditβ
From Google Cloud Consoleβ
- Go to
BigQuery
by visiting: https://console.cloud.google.com/bigquery. - Select a dataset from
Resources
. - Click
SHARING
near the right side of the window and selectPermissions
. - Validate that none of the attached roles contain
allUsers
orallAuthenticatedUsers
.
From Google Cloud CLIβ
List the name of all datasets.
bq ls
Retrieve each dataset details using the following command:
bq show PROJECT_ID:DATASET_NAME
Ensure that allUsers
and allAuthenticatedUsers
have not been granted access to the dataset.
Preventionβ
You can prevent Bigquery dataset from becoming publicly accessible by setting up the Domain restricted sharing
organization policy at: https://console.cloud.google.com/iam-admin/orgpolicies/iam-allowedPolicyMemberDomains.
Default Valueβ
By default, BigQuery datasets are not publicly accessible.