How do I fix the Error: could not get value from external vault (no value found (unable to retrieve secret from gcp secret manager (code : 403, status: PERMISSION_DENIED)))
error when I try to use my secret from the Google Cloud vault?
Verify that your Google Cloud service account has the Secret Manager Secret Accessor
role. This role is required for Kong Gateway to access secrets in the vault.
How do I rotate my secrets in Google Cloud and how does Kong Gateway pick up the new secret values?
You can rotate your secret in Google Cloud by creating a new secret version with the updated value. You’ll also want to configure the ttl
settings in your Kong Gateway Vault entity so that Kong Gateway pulls the rotated secret periodically. For more information, see Store and rotate Mistral API keys as secrets in Google Cloud with Kong Gateway and the AI Proxy plugin.
I’m using Google Workload Identity, how do I configure a Vault?
To use GCP Secret Manager with
Workload Identity
on a GKE cluster, update your pod spec so that the service account (GCP_SERVICE_ACCOUNT
) is
attached to the pod. For configuration information, read the Workload
Identity configuration
documentation.
Notes:
- With Workload Identity, setting the
GCP_SERVICE_ACCOUNT
isn’t necessary.- When using GCP Vault as a backend, make sure you have configured
system
as part of thelua_ssl_trusted_certificate
configuration directive so that the SSL certificates used by the official GCP API can be trusted by Kong Gateway.