Identify any publicly accessible Cloud Tasks queues within your Google Cloud Platform (GCP) account and update their IAM policy in order to protect against unauthorized access. To deny access from anonymous and public users, remove the bindings for allUsers and allAuthenticatedUsers members from the IAM policy associated with your queue. 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.
Misconfigured access permissions are a common security vulnerability that involves Google Cloud resources. Making Cloud Tasks queues publicly accessible allows anyone to add tasks, which can lead to abuse (such as submitting unauthorized tasks), unexpected costs, and security risks. To avoid this, ensure that anonymous and/or public access to your Cloud Tasks queues is not allowed.
Audit
To determine if there are any publicly accessible Cloud Tasks queues available in your GCP account, perform the following operations:
Remediation / Resolution
To remove the allUsers and/or allAuthenticatedUsers IAM member bindings from the IAM policy associated with your Cloud Tasks queue in order to protect against unauthorized access, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- Understand Cloud Tasks
- Control access using IAM
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud tasks queues list
- gcloud tasks queues get-iam-policy
- gcloud tasks queues remove-iam-policy-binding
- gcloud tasks queues add-iam-policy-binding