> 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-service-account-is-publicly-accessible.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP Service account is publicly accessible

### Synopsis

| Field               | Value                                        |
| ------------------- | -------------------------------------------- |
| Rule Type           | Detection                                    |
| Finding Type        | GCP Service account is publicly accessible   |
| Finding ID          | 60000878                                     |
| Generates a Finding | This detection rule also generates a finding |
| Severity            | High                                         |
| Category            | CONFIGURATION                                |
| Cloud Providers     | GCP                                          |
| Platform Module     | CSPM                                         |
| Asset Types         | GOOGLE\_CLOUD\_IAM\_SERVICE\_ACCOUNT         |
| ATT\&CK Tactic      | TA0001 (TA0001)                              |
| ATT\&CK Technique   | T1190 (T1190)                                |

### Description

Publicly accessible GCP service accounts pose a significant security risk. Unrestricted access granted to 'allUsers' or 'allAuthenticatedUsers' allows unauthorized individuals to exploit the service account's permissions.

GCP service accounts manage application and workload access within a project. Granting broad access, such as to 'allUsers' or 'allAuthenticatedUsers', bypasses least privilege principles. This misconfiguration enables malicious actors to potentially access sensitive data or resources, leading to data breaches or unauthorized modifications.

The impact of this misconfiguration includes data loss, unauthorized resource modification, and potential account compromise. Following the principle of least privilege by limiting access to only necessary entities is crucial to maintain security. Restricting access minimizes the potential damage from compromised credentials.

To remediate this risk, implement least privilege by granting only necessary permissions to specific service accounts. Avoid granting permissions to 'allUsers' or 'allAuthenticatedUsers'. Regularly review and revoke unnecessary permissions. Restrict access to the service account through appropriate network configurations and Identity and Access Management (IAM) roles.

### Remediation

**Manual steps:**

Google Cloud IAM Service Account - Manual remediation steps:

To revoke access from 'allusers'/'allAuthenticatedUsers', follow the below mentioned steps:

1. Login to the GCP console
2. Navigate to the 'IAM and Admin' service (Left Panel)
3. Go to 'Service Accounts'
4. Click on the alerting service account
5. Under the 'PERMISSIONS' tab, select the 'VIEW BY PRINCIPALS' tab
6. Select the entries with 'allUsers' or 'allAuthenticatedUsers'
7. Click on the 'REMOVE ACCESS' to revoke access from 'allusers'/'allAuthenticatedUsers'
8. Click on 'CONFIRM'


---

# 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-service-account-is-publicly-accessible.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.
