This package provide utilities to integrate with Vault to retrieve secrets.
$ npm install --save @commercetools-frontend/vault-utils
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.