Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

fix(vault): follow all redirects to support vault HA #394

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ const systemManagerBackend = new SystemManagerBackend({
assumeRole: awsConfig.assumeRole,
logger
})
const vaultClient = vault({ apiVersion: 'v1', endpoint: envConfig.vaultEndpoint })
const vaultClient = vault({
apiVersion: 'v1',
endpoint: envConfig.vaultEndpoint,
requestOptions: {
// When running vault in HA mode, you must follow redirects on PUT/POST/DELETE
// See: https://github.com/kr1sp1n/node-vault/issues/23
followAllRedirects: true
}
})
const vaultBackend = new VaultBackend({ client: vaultClient, logger })
const azureKeyVaultBackend = new AzureKeyVaultBackend({
credential: azureConfig.azureKeyVault(),
Expand Down