> For the complete documentation index, see [llms.txt](https://docs.sprinto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinto.com/monitors/authentication-and-access-monitors/restrict-sensitive-gcp-iam-role-assignments.md).

# Restrict Sensitive GCP IAM Role Assignments

This check ensures that sensitive IAM roles — `roles/iam.serviceAccountUser` and `roles/iam.serviceAccountTokenCreator` — are **not assigned to IAM users at the project level** in Google Cloud Platform (GCP).

These roles, when granted to individual users, allow impersonation of service accounts and unauthorised access to resources. Sprinto flags this as a violation of the principle of least privilege, which is a key requirement across SOC 2, ISO 27001, and other frameworks.

***

#### When is this check triggered? <a href="#pdf-page-qjmcrebjr2vsglingfsx-when-is-this-check-triggered" id="pdf-page-qjmcrebjr2vsglingfsx-when-is-this-check-triggered"></a>

This check is triggered if:

* An **IAM user** (non-service account) is assigned either of the following roles:
  * `roles/iam.serviceAccountUser`
  * `roles/iam.serviceAccountTokenCreator`
* These roles are assigned at the **project level**, not constrained to specific service accounts or groups

***

#### How to resolve <a href="#pdf-page-qjmcrebjr2vsglingfsx-how-to-resolve" id="pdf-page-qjmcrebjr2vsglingfsx-how-to-resolve"></a>

Follow these steps to audit and remove risky role assignments:

1. Log in to your **GCP Console**.
2. Navigate to **IAM & Admin → IAM**.
3. In the IAM member list, filter by role:
   * `Service Account User`
   * `Service Account Token Creator`
4. Review each IAM user assigned to these roles:
   * Ensure they are not individual users unless justified
   * Validate if they belong to a secure automation group (e.g. Terraform CI/CD pipelines)
5. If unjustified, click **Edit** for the user and remove the role assignment.
6. Click **Save**.

{% hint style="info" %}
Best practice: Grant these roles only to **service accounts** or tightly scoped automation identities — never to human users directly.
{% endhint %}

***

#### Provide evidence <a href="#pdf-page-qjmcrebjr2vsglingfsx-provide-evidence" id="pdf-page-qjmcrebjr2vsglingfsx-provide-evidence"></a>

To confirm resolution in Sprinto, provide one of the following:

* A **screenshot** showing these roles no longer assigned to IAM users
* A **CSV or JSON export** of IAM policy bindings with verified removal
* A link to an internal role audit script or process (if applicable)

***

#### Best practices <a href="#pdf-page-qjmcrebjr2vsglingfsx-best-practices" id="pdf-page-qjmcrebjr2vsglingfsx-best-practices"></a>

* Regularly review IAM policy bindings via automated scans or GCP Cloud Asset Inventory.
* Use **custom roles** with more limited permissions if full impersonation rights are not required.
* Apply **resource-level role assignments** wherever possible (avoid broad project-level grants).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sprinto.com/monitors/authentication-and-access-monitors/restrict-sensitive-gcp-iam-role-assignments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
