Ensure that the IAM policy associated with your Google Cloud Storage buckets is restricting anonymous and/or public access. Cloud Storage buckets, like other GCP resources, have Cloud Identity and Access Management (IAM) policies configured to determine who can have access to the storage resources. To deny access from anonymous and public users, remove the bindings for "allUsers" and "allAuthenticatedUsers" members from the storage bucket's IAM policy. The "allUsers" is a special member identifier that represents any user on the Internet, including authenticated and unauthenticated users, while the "allAuthenticatedUsers" is an identifier that represents any user or service account that can sign in to Google Cloud Platform (GCP) with a Google account.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
Misconfigured access permissions is a common security vulnerability that involves Cloud Storage resources. Granting permissions to "allUsers" and "allAuthenticatedUsers" members can allow anyone to access your buckets content. To prevent sensitive data leaks and data loss, ensure that anonymous and/or public access to your Google Cloud Storage buckets is not allowed.
Note: If you enable uniform bucket-level access, you revoke access from users who get their access exclusively through object ACLs. Certain Google Cloud Platform (GCP) services, such as Cloud Audit Logs and Datastore, cannot export to Cloud Storage buckets that have uniform bucket-level access enabled.
Audit
To determine if there are any publicly accessible buckets available within your Google Cloud account, perform the following operations:
Remediation / Resolution
To remove "allUsers" and/or "allAuthenticatedUsers" IAM member bindings from the associated IAM policy in order to restrict anonymous and/or public access to your Google Cloud Storage buckets, perform the following operations:
Note: If you want to configure access to individual objects, you have 90 days left to switch back to fine-grained access control.References
- Google Cloud Platform (GCP) Documentation
- Overview
- IAM references for Cloud Storage
- Making data public
- iam - Get, set, or change bucket and/or object IAM permissions.
- CIS Security Documentation
- Securing Google Cloud Computing Platform
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list