Description
allAuthenticatedUsers includes users signed in with Google Accounts, including personal Gmail accounts, and service accounts outside your organization. It excludes anonymous users. The dataset role determines what this group can do.
Potential impact
Read access can let outside users copy data. A broader role can allow changes to data or permissions. Replacing the entire access list can also remove access that applications need.
Remediation
For an internal dataset, inspect existing access entries, dataset IAM and inherited permissions. Keep required users, groups and service accounts with the minimum roles they need, and explicitly revoke any unnecessary public grant. In google.cloud 1.14.0, omitting or emptying access does not explicitly revoke existing grants. Read back the policy and test both approved and unapproved access.
Examples
Authenticated-users group entry
---
- name: create a dataset
google.cloud.gcp_bigquery_dataset:
name: my_example_dataset
access:
- special_group: allAuthenticatedUsers
dataset_reference:
dataset_id: my_example_dataset
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
Default access for a new dataset
- name: create a dataset
google.cloud.gcp_bigquery_dataset:
name: my_example_dataset
dataset_reference:
dataset_id: my_example_dataset
project: test_project
auth_kind: serviceaccount
service_account_file: /tmp/auth.pem
state: present
Explanation:
- Authenticated-users group entry: The entry sets
special_group: allAuthenticatedUsersbut omits itsrole, so it is incomplete. - Default access for a new dataset: On creation, omitting
accessgives default access toprojectOwners,projectWriters,projectReadersand the dataset creator. Check those permissions against your needs. Supply the actual project and replace/tmp/auth.pemwith the path to your service account JSON credential file.