> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/storage/appsec2-gcp-22.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
