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

Adds azureProperty property to handle backward compatibility when using the isBinary property #495

Closed
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
5 changes: 4 additions & 1 deletion lib/backends/azure-keyvault-backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class AzureKeyVaultBackend extends KVBackend {
const secret = await client.getSecret(key)
// Handle binary files, since the Azure client does not
if (keyOptions && keyOptions.isBinary) {
return Buffer.from(secret.value, 'base64')
if (!keyOptions.azureProperty) {
keyOptions.azureProperty = 'value'
}
return Buffer.from(secret[keyOptions.azureProperty], 'base64')
}
return JSON.stringify(secret)
}
Expand Down