7.1 Ensure That BigQuery Datasets Are Not Anonymously or Publicly Accessible

Information

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.

Solution

From Google Cloud Console

Go to BigQuery by visiting: https://console.cloud.google.com/bigquery.

Select the dataset from 'Resources'.

Click SHARING near the right side of the window and select Permissions.

Review each attached role.

Click the delete icon for each member allUsers or allAuthenticatedUsers. On the popup click Remove.

From Google Cloud CLI
List the name of all datasets.

bq ls

Retrieve the data set details:

bq show --format=prettyjson PROJECT_ID:DATASET_NAME > PATH_TO_FILE

In the access section of the JSON file, update the dataset information to remove all roles containing allUsers or allAuthenticatedUsers.
Update the dataset:

bq update --source PATH_TO_FILE PROJECT_ID:DATASET_NAME

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.

See Also

https://workbench.cisecurity.org/benchmarks/11843

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2, CSCv7|14.6

Plugin: GCP

Control ID: 70474e6e1e28768c932132cd3066a21baa987be8035aa105605c7d5fc1a69229