> 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-sql-instance-not-encrypted-with-cmek.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP SQL Instance not encrypted with CMEK

### Synopsis

| Field               | Value                                        |
| ------------------- | -------------------------------------------- |
| Rule Type           | Detection                                    |
| Finding Type        | GCP SQL Instance not encrypted with CMEK     |
| Finding ID          | 60001495                                     |
| Generates a Finding | This detection rule also generates a finding |
| Severity            | Medium                                       |
| Category            | CONFIGURATION                                |
| Cloud Providers     | GCP                                          |
| Platform Module     | CSPM                                         |
| Asset Types         | GOOGLE\_CLOUD\_SQL\_DB\_INSTANCE             |
| ATT\&CK Tactic      | TA0040 (TA0040)                              |
| ATT\&CK Technique   | T1486 (T1486)                                |

### Description

Unencrypted Google Cloud SQL instances with CMEK are susceptible to unauthorized data access if compromised. This exposes sensitive data stored within the database to potential breaches.

Google Cloud SQL instances offer the option of Customer Managed Encryption Keys (CMEK) for encrypting data at rest. Failing to utilize CMEK leaves the encryption keys managed by Google, reducing organizational control over encryption and key management. An attacker gaining access to the instance could directly access the data.

A successful compromise of an unencrypted SQL instance results in data leakage, violating privacy regulations and potentially causing significant reputational damage. CMEK provides granular control over encryption keys, enabling stronger security posture through key rotation and revocation capabilities. This limits the impact of a potential compromise by controlling access to encryption keys.

To mitigate this misconfiguration, encrypt all Google Cloud SQL instances using CMEK. Regularly rotate CMEK keys to further enhance security. Implement robust access controls, limiting who can access and manage the encryption keys. Monitor for any unauthorized attempts to access or modify the database.

### Remediation

**Manual steps:**

Google Cloud SQL DB Instance - Manual remediation steps:

GCP SQL Instance encryption cannot be changed after creation. To make use of CMEK a new SQL Instance can be created.

To create a new SQL Instance with CMEK, please follow the steps below:

1. Login to the GCP console
2. Navigate to the 'SQL' service
3. Click 'CREATE INSTANCE'
4. Select the database engine
5. Under 'Customize your instance', expand 'SHOW CONFIGURATION OPTIONS'
6. Expand 'STORAGE'
7. Expand 'ADVANCED ENCRYPTION OPTIONS'
8. Select 'Cloud KMS key'
9. Select the appropriate 'Key type' and then select the required CMEK
10. Configure the rest of the SQL instance as required
11. Click 'CREATE INSTANCE' at the bottom of the page


---

# 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-sql-instance-not-encrypted-with-cmek.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.
