π Google KMS Crypto Key is anonymously or publicly accessible π π’
- Contextual name: π Crypto Key is anonymously or publicly accessible π π’
- ID:
/ce/ca/google/kms/kms-cryptokey-access
- Located in: π Google KMS
Flagsβ
- π’ Impossible policy
- π’ Policy with categories
- π Policy with internal.md
- π’ Policy with type
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
Internal Notes π β
Relationship type: many-to-many
IAM Policy Binding.Name = CryptoKey.CA10__name__c
We cannot do this check automatically.
List all Cloud KMS Cryptokeys.
gcloud kms keys list --keyring=[key_ring_name] --location=global --format=json | jq '.[].name'
Remove IAM policy binding for a KMS key to remove access to allUsers and allAuthenticatedUsers using the below command.
gcloud kms keys remove-iam-policy-binding [key_name] --keyring=[key_ring_name] --location=global --member='allAuthenticatedUsers' --role='[role]' gcloud kms keys remove-iam-policy-binding [key_name] --keyring=[key_ring_name] --location=global --member='allUsers' --role='[role]'
Descriptionβ
Descriptionβ
It is recommended that the IAM policy on Cloud KMS
cryptokeys
should restrict anonymous and/or public access.Rationaleβ
Granting permissions to
allUsers
orallAuthenticatedUsers
allows anyone to access the dataset. Such access might not be desirable if sensitive data is stored at the location. In this case, ensure that anonymous and/or public access to a Cloud KMScryptokey
is not allowed.Impactβ
Removing the binding for
allUsers
andallAuthenticatedUsers
members denies accessingcryptokeys
to anonymous or public users.Auditβ
From Google Cloud CLIβ
List all Cloud KMS
Cryptokeys
.gcloud kms keys list --keyring=[key_ring_name] --location=global --format=json | jq '.[].name'
Ensure the below command's output does not contain
allUsers
orallAuthenticatedUsers
.gcloud kms keys get-iam-policy [key_name] --keyring=[key_ring_name] --location=global --format=json | jq '.bindings[].members[]'
Default Valueβ
By default Cloud KMS does not allow access to
allUsers
orallAuthenticatedUsers
.... see more
Remediationβ
Remediationβ
From Google Cloud CLIβ
List all Cloud KMS
Cryptokeys
.gcloud kms keys list --keyring=[key_ring_name] --location=global --format=json | jq '.[].name'
Remove IAM policy binding for a KMS key to remove access to
allUsers
andallAuthenticatedUsers
using the below command.gcloud kms keys remove-iam-policy-binding [key_name] --keyring=[key_ring_name] --location=global --member='allAuthenticatedUsers' --role='[role]'
gcloud kms keys remove-iam-policy-binding [key_name] --keyring=[key_ring_name] --location=global --member='allUsers' --role='[role]'
policy.yamlβ
Linked Framework Sectionsβ
Section | Sub Sections | Internal Rules | Policies | Flags |
---|---|---|---|---|
πΌ CIS GCP v3.0.0 β πΌ 1.9 Ensure That Cloud KMS Cryptokeys Are Not Anonymously or Publicly Accessible - Level 1 (Automated) | 1 | |||
πΌ Cloudaware Framework β πΌ Public and Anonymous Access | 24 |