π‘οΈ 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