@commercetools-frontend/vault-utils
v1.0.1
Published
Utilities to integrate with Vault
Downloads
3,640
Readme
@commercetools-frontend/vault-utils
This package provide utilities to integrate with Vault to retrieve secrets.
Installation
$ npm install --save @commercetools-frontend/vault-utils
Usage
getCredentialsForCI
Retrieve credentials for a given secret path, given that the CI
environment variable is set.
Credentials are returned as a JSON object.
const credentialsFromVault = await getCredentialsForCI({
vaultAddr: '',
repositoryName: '',
secretPath: '',
});
When running within CircleCI, the method uses the CIRCLE_OIDC_TOKEN
environment variable for authentication.