π Google IAM Users are assigned the Service Account User or Service Account Token Creator roles at Project level π’
- Contextual name: π IAM Users are assigned the Service Account User or Service Account Token Creator roles at Project level π’
- ID:
/ce/ca/google/project/iam-user-roles
- Located in: π Google Project
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
It is recommended to assign the
Service Account User (iam.serviceAccountUser)
andService Account Token Creator (iam.serviceAccountTokenCreator)
roles to a user for a specific service account rather than assigning the role to a user at project level.Rationaleβ
A service account is a special Google account that belongs to an application or a virtual machine (VM), instead of to an individual end-user. Application/VM-Instance uses the service account to call the service's Google API so that users aren't directly involved. In addition to being an identity, a service account is a resource that has IAM policies attached to it. These policies determine who can use the service account.
Users with IAM roles to update the App Engine and Compute Engine instances (such as App Engine Deployer or Compute Instance Admin) can effectively run code as the service accounts used to run these instances, and indirectly gain access to all the resources for which the service accounts have access. Similarly, SSH access to a Compute Engine instance may also provide the ability to execute code as that instance/Service account.
... see more
Remediationβ
Remediationβ
From Google Cloud Consoleβ
- Go to the IAM page in the GCP Console by visiting: https://console.cloud.google.com/iam-admin/iam.
- Click on the filter table text bar. Type
Role: Service Account User
- Click the
Delete Bin
icon in front of the roleService Account User
for every user listed as a result of a filter.- Click on the filter table text bar. Type
Role: Service Account Token Creator
- Click the
Delete Bin
icon in front of the roleService Account Token Creator
for every user listed as a result of a filter.From Google Cloud CLIβ
Using a text editor, remove the bindings with the
roles/iam.serviceAccountUser
orroles/iam.serviceAccountTokenCreator
.For example, you can use the iam.json file shown below as follows:
{
"bindings": [
{ "members": [ "serviceAccount:our-project-123@appspot.gserviceaccount.com", ], "role": "roles/appengine.appViewer" },
{ "members": [ "user:email1@gmail.com" ], "role": "roles/owner" },
{ "members": [ "serviceAccount:our-project-123@appspot.gserviceaccount.com", "serviceAccount:123456789012-compute@developer.gserviceaccount.com" ], "role": "roles/editor" }... see more
policy.yamlβ
Linked Framework Sectionsβ
Section | Sub Sections | Internal Rules | Policies | Flags |
---|---|---|---|---|
πΌ CIS GCP v3.0.0 β πΌ 1.6 Ensure That IAM Users Are Not Assigned the Service Account User or Service Account Token Creator Roles at Project Level - Level 1 (Automated) | 1 | |||
πΌ Cloudaware Framework β πΌ Role-Based Access Control (RBAC) Management | 9 |