Kong Gateway uses a key to automatically authenticate
with the Azure Key Vaults API and grant you access.
If you’re using a client secret for authentication, set the following environment variable on your data plane to connect with an Azure Key Vault:
export AZURE_CLIENT_SECRET='YOUR_CLIENT_SECRET'
By default, the vault looks for AZURE_CLIENT_SECRET, but you can customize this with the credentials_prefix field.
If you’re using an Instance Managed Identity Token, you don’t need to set the client secret env variable.
Dedicated Cloud Gateway limitations:
- Azure Key Vault is not supported as a Vault backend on Dedicated Cloud Gateways: Since the client secret has no Vault entity equivalent, it can only be set through this environment variable (or the
credentials_prefix variant). Dedicated Cloud Gateways only accept KONG_ and OTEL_ prefixed environment variables, so AZURE_CLIENT_SECRET can’t be set.
- Azure managed identity is not supported on Dedicated Cloud Gateways.
You also need to set KONG_LUA_SSL_VERIFY_DEPTH to at least 3 on your data plane to allow Kong to verify the Azure Key Vault TLS certificate chain:
export KONG_LUA_SSL_VERIFY_DEPTH=3
At minimum, you’ll also need to set the following values on your data plane:
export KONG_VAULT_AZURE_CERTS_VAULT_URI='https://your-vault.vault.azure.com'
export KONG_VAULT_AZURE_CERTS_TENANT_ID='YOUR_TENANT_ID'
export KONG_VAULT_AZURE_CERTS_CLIENT_ID='YOUR_CLIENT_ID'