> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-user-managed-service-accounts-have-user-managed-service-account-keys.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP User managed service accounts have user managed service account keys

### Synopsis

| Field               | Value                                                                    |
| ------------------- | ------------------------------------------------------------------------ |
| Rule Type           | Detection                                                                |
| Finding Type        | GCP User managed service accounts have user managed service account keys |
| Finding ID          | 60000142                                                                 |
| Generates a Finding | This detection rule also generates a finding                             |
| Severity            | Medium                                                                   |
| Category            | CONFIGURATION                                                            |
| Cloud Providers     | GCP                                                                      |
| Platform Module     | CSPM                                                                     |
| Asset Types         | GOOGLE\_CLOUD\_IAM\_SERVICE\_ACCOUNT\_KEY                                |

### Description

User-managed service account keys for Google Cloud Platform (GCP) service accounts present a significant security risk, increasing the likelihood of key leakage and unauthorized access.

User-managed service account keys, unlike Google-managed keys, allow downloading and direct control by users. This control, while offering flexibility, introduces vulnerabilities. Accidental exposure through insecure practices such as committing keys to source code repositories or leaving them in publicly accessible locations can lead to account compromise and potential data breaches. Attackers gaining access to these keys could perform unauthorized actions within the GCP environment.

Compromised service account keys could result in data exfiltration, unauthorized resource modifications, and complete account takeover. Using Google-managed keys eliminates the risk of key leakage as they are not downloadable, enforcing a more secure key management lifecycle. This best practice aligns with the principle of least privilege and reduces the attack surface.

To mitigate this risk, organizations should enforce the use of Google-managed service account keys wherever possible. Regularly review and audit service account key usage. Implement secure coding practices to prevent accidental key exposure and educate developers on the risks associated with handling service account credentials.

### Remediation

Follow the below mentioned URL to delete user managed service account keys:

<https://cloud.google.com/iam/docs/creating-managing-service-account-keys#deleting>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-user-managed-service-accounts-have-user-managed-service-account-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
