If you like this plugin, leave it a ⭐ on Github!
A plugin for Insomnia to retrieve secrets from Azure Key Vault and use them in your environment.
This plugin installs a template tag to read secrets from a Azure Key Vault.
- Install the Azure Cli and login with
az login
. The plugin will automaticlaly read the cached credentials.
You can find the plugin at this link.
- Install the plugin from the Insomnia plugin Hub.
- Add an environment variable with the name
AZURE_KEYVAULT
, only the name will do, the plugin will create the full url. For example if the full key vault url ishttps://my-key-vault-name.vault.azure.net
, the variable will be"AZURE_KEYVAULT": "my-key-vault-name"
.
- Hit
Ctrl + Space
in any place where an environment variable is available and pickAzure Key Vault Secret
- The template tag will become red indicating an error, in fact it requires a secret name, click on it
- Set the secret name
The live preview will show the value. Click Done.
- The template tag shows now the secret name
The secrets are retrieved once and cached for the lifetime of the application because Insomnia evaluates all environment variables and template tags very often. To force the retrieval of the secrets simply restart Insomnia.
If you need to inject local trusted certificates into the plugin, you can do so by setting the AZURE_KEYVAULT_CA_CERT
environment variable to the path of the certificate file. See PR