Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Google Cloud Platform Foundation v5.0.0 · 1.12

No one person should hold both key-management and key-use roles in Cloud KMS

  • Level 2
  • Identity and Access Management

This check looks at the IAM roles granted for Cloud KMS and whether a single user holds both the role that manages keys and a role that uses them. The safe setting keeps those duties with different people.

Why it matters

Cloud KMS keys protect your encrypted data. The person who administers keys can create, rotate and disable them. People or services who use keys encrypt and decrypt data. If one user holds both kinds of role, a single compromised account can both control a key and use it to read the data it protects.

Google's own guidance on KMS permissions recommends separating these duties, so that managing keys and using them are different responsibilities.

Source: Google Cloud documentation, Separation of duties and Permissions and roles for Cloud KMS.

How to check it yourself

In the Google Cloud console, open IAM & Admin, then IAM, and filter the list for the Cloud KMS roles. Look for any user who appears with Cloud KMS Admin together with an encrypt or decrypt role. Check this at the organization, folder and project levels, because roles are inherited.

The read-only gcloud command below prints the policy for a project. Replace the placeholder with a project in a test environment.

gcloud projects get-iam-policy PROJECT_ID --format=json |
  jq '.bindings[] | select(.role | startswith("roles/cloudkms")) | {role, members}'

Compare the member lists of the admin role and the use roles, and note any identity that is in both.

How to fix it

Portal: on the IAM page, edit the principal that holds both roles and remove one of them. Decide which duty the person truly needs. Assign key usage to the application service accounts that need it, and keep administration with a small security or platform team.

Script: use the command below with your own admin account. ConfigCobra itself never changes your environment; it reads and points to the fix.

gcloud projects remove-iam-policy-binding PROJECT_ID \
  --member="user:person@example.com" \
  --role="roles/cloudkms.admin"

If your organization uses groups for access, make the change on the group so it stays consistent.

What changes when you fix it

The person whose role you remove can no longer perform that duty. If it was the admin role, they cannot create, rotate or disable keys. If it was a use role, they cannot encrypt or decrypt with those keys through their own account.

Check first whether jobs, scripts or pipelines run under that user's identity, because they can start failing with permission-denied errors. Moving usage to a dedicated service account before you remove the role avoids interruptions.

Included in

BenchmarkCIS IDProfile
CIS Google Cloud Platform Foundation v5.0.01.12Level 2

Check this on your Google Cloud

ConfigCobra runs this check with every other control of the CIS Google Cloud Platform Foundation Benchmark, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial