Vertex AI endpoint is not using a Customer Managed Key (CMK) misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC2_GCP_24
Category - Subcategory
Storage - Encryption
Provider
GCP
Severity
MEDIUM
Framework
Terraform, Terraform Plan
Impact
This rule is checking to ensure that a Vertex AI endpoint uses a Customer Managed Key (CMK). This is significant because the use of a CMK allows organizations to maintain control over their encryption keys. This can help improve the security of data by adding an additional layer of protection - any data encrypted with a CMK can only be accessed with the appropriate decryption key. Without using a CMK, organizations would be relying solely on provider managed keys, which could potentially leave them more exposed to data breaches.
How to Fix
Resource: google_vertex_ai_endpoint
Arguments: encryption_spec
To fix the issue you need to modify the terraform code for the Vertex AI endpoint to use a customer managed key (CMK) instead of the default Google-managed key. Set the "encryption_spec" field in the Vertex AI endpoint block to use a customer managed key.
The above code instructs Google Cloud to use a customer managed encryption key (CMK) for the Vertex AI endpoint. In the "encryption_spec" block, "kms_key_name" is the resource ID of the customer managed key. This is secure as it gives you more control over the key management, as well as the ability to audit key use and issue key revocation. [source,go]
resource "google_vertex_ai_endpoint" "endpoint" { ... encryption_spec { kms_key_name = "some_name" ... } ... }
Last updated
Was this helpful?
