How do I rotate my secrets in AWS Secrets Manager and how does Kong Gateway pick up the new secret values?
You can rotate your secret in AWS Secrets Manager 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.
My secret in AWS Secret Manager has a /
backslash in the secret name. How do I reference this secret in Kong Gateway?
The slash symbol (/
) is a valid character for the secret name in AWS Secrets Manager. If you want to reference a secret name that starts with a slash or has two consecutive slashes, transform one of the slashes in the name into URL-encoded format. For example:
- A secret named
/secret/key
should be referenced as{vault://aws/%2Fsecret/key}
- A secret named
secret/path//aaa/key
should be referenced as{vault://aws/secret/path/%2Faaa/key}
Since Kong Gateway tries to resolve the secret reference as a valid URL, using a slash instead of a URL-encoded slash will result in unexpected secret name fetching.
I have secrets stored in multiple AWS Secret Manager regions, how do I reference those secrets in Kong Gateway?
You can create multiple Vault entities, one per region with the config.region
parameter. You’d then reference the secret by the name of the Vault:
{vault://aws-eu-central-vault/secret-name/foo}
{vault://aws-us-west-vault/secret-name/snip}