> 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-api-key-not-rotating-in-every-90-days.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP API key not rotating in every 90 days

### Synopsis

| Field               | Value                                        |
| ------------------- | -------------------------------------------- |
| Rule Type           | Detection                                    |
| Finding Type        | GCP API key not rotating in every 90 days    |
| Finding ID          | 60000654                                     |
| Generates a Finding | This detection rule also generates a finding |
| Severity            | Low                                          |
| Category            | CONFIGURATION                                |
| Cloud Providers     | GCP                                          |
| Platform Module     | CSPM                                         |
| Asset Types         | GOOGLE\_API\_KEYS                            |
| ATT\&CK Tactic      | TA0006 (TA0006)                              |
| ATT\&CK Technique   | T1552 (T1552)                                |

### Description

GCP API keys older than 90 days pose a significant security risk, increasing the likelihood of unauthorized access and data breaches.

The Google Cloud Platform (GCP) allows the creation of API keys for authentication. However, relying on long-lived API keys presents a substantial security risk. Compromised or leaked keys can grant attackers persistent access to sensitive data and resources. Failure to rotate keys regularly exacerbates this risk.

Unrotated API keys can lead to data exfiltration, unauthorized modifications, and service disruptions. Rotating API keys regularly minimizes the impact of a compromised key, as its access is limited to a shorter timeframe. This is crucial for maintaining data integrity and confidentiality.

Implement a process for regularly rotating API keys every 90 days or less. Utilize GCP's IAM roles and permissions to restrict access to only those users and services requiring access to specific keys. Consider using alternative authentication methods, such as service accounts, whenever feasible, to reduce reliance on API keys.

### Remediation

**Manual steps:**

Google API Keys - Manual remediation steps:

1. Log in to google cloud console
2. Navigate to 'Credentials', Under service 'APIs & Services'
3. In the section 'API Keys', Click on the reported 'API Key Name'
4. Click on 'REGENERATE KEY' to rotate the API key
5. On the pop-up window click on 'REPLACE KEY'
6. Validate the Creation date once it is updated.


---

# 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-api-key-not-rotating-in-every-90-days.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.
