> 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/appsec-rules/iac-security/storage/appsec2-gcp-22.md).

# Document AI Processors not encrypted with a Customer Managed Key (CMK) misconfiguration detected in

## Rule Details

|                        |                           |
| ---------------------- | ------------------------- |
| Cortex AppSec Rule ID  | APPSEC2\_GCP\_22          |
| Category - Subcategory | Storage - Encryption      |
| Provider               | GCP                       |
| Severity               | MEDIUM                    |
| Framework              | Terraform, Terraform Plan |

## Impact

This rule is checking to ensure that Document AI Processors are encrypted with a Customer Managed Key (CMK). The purpose of this is to protect sensitive information that may be contained in the documents being processed. If Document AI Processors are not properly encrypted, an unauthorized individual could potentially gain access to this data. This could lead to a serious confidentiality breach. Therefore, encryption using a Customer Managed Key (CMK) is recommended as it offers more control and security, reducing the risk of data exposure.

## How to Fix

*Resource:* google\_document\_ai\_processor

* *Arguments:* kms\_key\_name

To fix this issue, you should modify the Document AI Processors in your Terraform code to specify a "kms\_key\_name" attribute. This attribute represents the Cloud KMS key used for encryption/decryption. This will ensure encryption with a Customer Managed Key (CMK).

## The above code is secure because it applies the Google Cloud customer-managed encryption keys (CMEKs) to this Document AI Processor. By doing this, you ensure that even Google will only be able to access the data in an encrypted format. The keys are centrally managed by you and will give you full control over who can decrypt and access the data. This is a recommended best practice for sensitive or regulated data. \[source,go]

## resource "google\_document\_ai\_processor" "example" { ... kms\_key\_name = "key\_name" ... }


---

# 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/appsec-rules/iac-security/storage/appsec2-gcp-22.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.
