fastify-secrets-azure
Advanced tools
Weekly downloads
Changelog
v2.1.0
Full Changelog: https://github.com/nearform/fastify-secrets-azure/compare/v2.0.0...v2.1.0
Readme
Fastify secrets plugin for Azure Key Vault.
npm install --save fastify-secrets-azure
In order to be able to read from Azure Key Vault you will need some permissions.
You will also probably manage permissions in different ways in local dev and production environment.
In general you may want to use a different secrets manager on your local machine (i.e. fastify-secrets-env
to read secrets from env variables).
To set up a Key Vault to be accessed by fastify-secrets-azure
please read the instructions in the official documentation.
This will set up the vault and create an application capable of accessing it.
The information required to connect to Azure Key Vault can be stored in the environment or provided via plugin options, as described below.
Check out the official documentation for information about which environment variables are needed.
const FastifySecrets = require('fastify-secrets-azure')
fastify.register(FastifySecrets, {
secrets: {
dbPassword: 'secret-name'
},
clientOptions: {
vaultName: 'vault-name'
}
})
secret-name
is the name of the secret as created in Azure Key Vault.
await fastify.ready()
console.log(fastify.secrets.dbPassword) // content of 'secret-name'
secrets
[object]
(required) A map of keys and resource ids for the secrets. fastify-secrets-azure
will decorate the fastify server with a secrets
object where keys will be the same keys of the options and the value will be the content of the secret as fetched from Azure Key VaultclientOptions
[object]
(required) An object containing properties to be provided to the client used to connect to Azure Key Vault. Supports the following keys:
vaultName
[string]
(required) The name of the vaultcredentials
[object]
(optional). Credentials for connection. If not provided, the client will use the default ones configured in environment variables:
tenantId
Defaults to AZURE_TENANT_ID
environment variableclientId
Defaults to AZURE_CLIENT_ID
environment variableclientSecret
Defaults to AZURE_CLIENT_SECRET
environment variableSee CONTRIBUTING.md
Copyright NearForm Ltd 2021. Licensed under the Apache-2.0 license.
FAQs
Fastify secrets plugin for Azure Key Vault
The npm package fastify-secrets-azure receives a total of 429 weekly downloads. As such, fastify-secrets-azure popularity was classified as not popular.
We found that fastify-secrets-azure demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.