๐ก๏ธ Google Project with KMS keys has a principal with Owner role๐ข
- Contextual name: ๐ก๏ธ Project with KMS keys has a principal with Owner role๐ข
- ID:
/ce/ca/google/iam/kms-project-has-owner - Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Descriptionโ
Descriptionโ
This policy identifies Google Projects that contain one or more Cloud KMS cryptographic keys and have at least one principal (user, group, or service account) assigned the primitive
roles/ownerrole.Rationaleโ
The
roles/ownerrole is a highly privileged primitive role that grants full administrative access to all resources within a project, including Cloud KMS keys. This permission allows principals to create, delete, modify, and use keys for cryptographic operations such as encryption and decryption.Assigning the Owner role in projects containing sensitive cryptographic keys violates the principle of least privilege and the security best practice of separation of duties. A single compromised Owner account could lead to the exposure, misuse, or destruction of sensitive encrypted data.
Auditโ
This policy flags a Google Project as
INCOMPLIANTif it contains at least one Google Cloud KMS Crypto Key and has a related IAM Policy Binding with the roles/owner role.
Remediationโ
Remediationโ
From Google Cloud Consoleโ
- Navigate to IAM & Admin - IAM: https://console.cloud.google.com/iam-admin/iam
- Locate any principals (users, groups, or service accounts) assigned the Owner (roles/owner) role within the project.
- Click the Delete Bin icon to remove the Owner role from the principal.
- Assign a more granular role (e.g., roles/editor, roles/viewer, or a specific KMS-related predefined/custom role**) based on the userโs job responsibilities.
Note: Role removal should be performed carefully to ensure users retain the permissions necessary for their tasks.
From gcloud CLIโ
Remove the Owner role from the principal:
gcloud projects remove-iam-policy-binding {{project-id}} \
--member="{{principal-type}}:{{principal-email}}" \
--role="roles/owner"Assign a least-privilege role appropriate for the principalโs responsibilities:
gcloud projects add-iam-policy-binding {{project-id}} \... see more