> 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-spanner-databases-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 Spanner Databases not encrypted with CMEK

### Synopsis

| Field               | Value                                         |
| ------------------- | --------------------------------------------- |
| Rule Type           | Detection                                     |
| Finding Type        | GCP Spanner Databases not encrypted with CMEK |
| Finding ID          | 60001529                                      |
| Generates a Finding | This detection rule also generates a finding  |
| Severity            | Low                                           |
| Category            | CONFIGURATION                                 |
| Cloud Providers     | GCP                                           |
| Platform Module     | CSPM                                          |
| Asset Types         | GOOGLE\_CLOUD\_SPANNER\_DATABASE              |

### Description

GCP Spanner databases lacking Customer-Managed Encryption Keys (CMEK) represent a significant security misconfiguration, as sensitive data is encrypted using platform-managed keys instead of customer-controlled ones, reducing organizational control over data protection.

GCP Spanner databases often store critical business information, and their encryption settings are paramount for data security. When databases are not configured with CMEK, the data relies on default platform-managed keys. This configuration limits customer oversight and control over the encryption key lifecycle. An attacker gaining unauthorized access to the underlying encryption infrastructure or exploiting a security incident involving the platform's key management system could potentially expose data, as the customer has no direct key revocation capability without CMEK.

The impact of this misconfiguration could be severe, including unauthorized data exposure, regulatory non-compliance, and significant reputational damage. Employing CMEK ensures organizations maintain exclusive control over the cryptographic keys used to encrypt their Spanner data. This practice is essential for enhancing data governance, meeting stringent industry compliance standards, and providing an additional layer of security by separating key management from the cloud provider's default offerings.

To mitigate this risk, it is strongly recommended to configure all Spanner databases to utilize Customer-Managed Encryption Keys (CMEK). This involves creating and managing encryption keys within a dedicated key management service and then associating these keys with your Spanner database instances. Implementing CMEK ensures data is encrypted using keys exclusively controlled by the organization, providing enhanced security and compliance over sensitive data stored within Spanner.

### Remediation

Encryption configuration can only be updated during spanner database creation. Follow the below steps to create a new spanner database with a customer-managed encryption key:

1. Sign in to the Google Cloud Management Console. Navigate to the Cloud Spanner page
2. Under instances, select the instance under which the reported database exists
3. Under databases, select the 'CREATE DATABASE' option
4. Under the create database page, under the 'SHOW ENCRYPTION OPTIONS' section, select 'Cloud KMS Key'
5. Select the KMS key you prefer
6. Click on 'CREATE'.

Note: It is recommended to migrate data from an old database to a new database created.


---

# 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-spanner-databases-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.
