Ensure that the IAM policy associated with your Cloud Key Management Service (KMS) keys is restricting anonymous and/or public access. KMS cryptographic keys, like any other GCP resources, have Cloud Identity and Access Management (IAM) policies configured to determine who can have access to these resources. To deny access from anonymous and public users, remove the bindings for "allUsers" and "allAuthenticatedUsers" members from the KMS key'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 KMS resources. Granting permissions to "allUsers" and "allAuthenticatedUsers" members can allow anyone to access your KMS keys and the data encrypted with these keys. To prevent sensitive data leaks and data loss, ensure that anonymous and/or public access to your KMS cryptographic keys is not allowed.
Audit
To determine if there are any publicly accessible KMS keys available within your Google Cloud account, perform the following operations:
Remediation / Resolution
To remove "allUsers" and/or "allAuthenticatedUsers" IAM member bindings from the required IAM policy in order to restrict anonymous and/or public access to your Cloud Key Management Service (KMS) keys, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- Cloud Key Management
- Using IAM with Cloud KMS
- Cloud KMS resources
- CIS Security Documentation
- Securing Google Cloud Computing Platform
- GCP Command Line Interface (CLI) Documentation
- gcloud kms keyrings list
- gcloud kms keys list
- gcloud kms keys get-iam-policy
- gcloud kms keys remove-iam-policy-binding