Status: Reference documentation for the kong-akeyless-integration vault strategy. After Kong bundles the backend, this page will appear on developer.konghq.com.
Configure a Kong Gateway Vault entity with name: akeyless, your Akeyless gateway URL (config.gateway_url), Access ID and Access Key (config.access_id, config.access_key), and an optional path prefix (config.path_prefix). Reference secrets like {vault://akeyless-vault/customer/acme/api-key} when akeyless-vault is your Vault prefix and the secret is stored at /kong/customer/acme/api-key with path_prefix: /kong.
Secrets Management vault backends (other than environment variables) require Kong Gateway Enterprise. Use the Kong quickstart with an enterprise license:
export KONG_LICENSE_DATA='LICENSE-CONTENTS-GO-HERE'
curl -Ls https://get.konghq.com/quickstart | bash -s -- -e KONG_LICENSE_DATAInstall the Akeyless vault strategy into Kong Gateway until it is bundled natively:
luarocks install kong-vault-akeyless-0.1.0-1.rockspecOr mount the strategy files from this repository into the Kong lua_package_path.
deck version- Create an Akeyless account.
- Create an Access ID + Access Key auth method scoped to your Kong secret paths.
- Store a demo secret, for example
/kong/demo/api-key.
Set credentials in examples/.env (or export the same AKEYLESS_* variables in your shell before running decK).
Using decK:
_format_version: "3.0"
vaults:
- name: akeyless
description: Storing secrets in Akeyless Secrets Manager
prefix: akeyless-vault
config:
gateway_url: "${{ env "AKEYLESS_GATEWAY_URL" }}"
auth_method: api_key
access_id: "${{ env "AKEYLESS_ACCESS_ID" }}"
access_key: "${{ env "AKEYLESS_ACCESS_KEY" }}"
path_prefix: "/kong"
ttl: 60deck gateway apply kong.yamldocker exec kong-quickstart-gateway kong vault get '{vault://akeyless-vault/demo/api-key}'If configured correctly, Kong returns the secret value. Use {vault://akeyless-vault/demo/api-key} in any referenceable field.
Store a JSON object in Akeyless:
{"username":"john","password":"doe"}at path /kong/pg. Reference individual keys:
{vault://akeyless-vault/pg/username}→john{vault://akeyless-vault/pg/password}→doe
config.auth_method |
Required fields | Use case |
|---|---|---|
api_key (default) |
access_id, access_key |
Most deployments |
token |
token |
Pre-authenticated token |
kubernetes |
access_id, k8s_auth_config_name |
Kong on Kubernetes |
aws_iam |
access_id |
Kong on AWS EC2/EKS |
azure_ad |
access_id |
Kong on Azure VM |
gcp |
access_id |
Kong on GKE/GCE |
universal_identity |
uid_token |
Universal Identity workloads |
Organize Kong secrets under a dedicated prefix:
/kong/<environment>/<service>/<secret-name>
/kong/production/payments/stripe-key
/kong/production/database/credentials # JSON with username/password keys
| Kong reference | path_prefix |
Akeyless path |
|---|---|---|
{vault://akeyless-vault/production/payments/stripe-key} |
/kong |
/kong/production/payments/stripe-key |
{vault://akeyless-vault/pg/password} |
/kong |
/kong/pg (JSON key password) |
When bundled by Kong, these parameters will be available via Vault entity, kong.conf, and environment variables (see the Kong Vaults reference):
| Parameter | Vault entity | kong.conf | Environment variable |
|---|---|---|---|
| Gateway URL | vaults.config.gateway_url |
vault_akeyless_gateway_url |
KONG_VAULT_AKEYLESS_GATEWAY_URL |
| Auth method | vaults.config.auth_method |
vault_akeyless_auth_method |
KONG_VAULT_AKEYLESS_AUTH_METHOD |
| Access ID | vaults.config.access_id |
vault_akeyless_access_id |
KONG_VAULT_AKEYLESS_ACCESS_ID |
| Access key | vaults.config.access_key |
vault_akeyless_access_key |
KONG_VAULT_AKEYLESS_ACCESS_KEY |
| Path prefix | vaults.config.path_prefix |
vault_akeyless_path_prefix |
KONG_VAULT_AKEYLESS_PATH_PREFIX |
| TTL | vaults.config.ttl |
vault_akeyless_ttl |
KONG_VAULT_AKEYLESS_TTL |
| Negative TTL | vaults.config.neg_ttl |
vault_akeyless_neg_ttl |
KONG_VAULT_AKEYLESS_NEG_TTL |
| Resurrect TTL | vaults.config.resurrect_ttl |
vault_akeyless_resurrect_ttl |
KONG_VAULT_AKEYLESS_RESURRECT_TTL |
How do I rotate secrets?
Update the value in Akeyless. Configure config.ttl on the Vault entity so Kong refreshes periodically (default background rotation is every 60 seconds).
Can I use this with Konnect?
Yes, once the backend is bundled in Kong Gateway Enterprise and supported on your Konnect data plane version.
Can I configure Vault without a Vault entity?
Yes — after Kong bundles the backend, use kong.conf or startup environment variables (see table above). Values used before the database is initialized must use kong.conf/env, not the Vault entity.