
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@basis-theory/basis-theory-js-encryption-azure
Advanced tools
Azure (Key Vault) Encryption Provider for the [Basis Theory](https://basistheory.com/) JS [Encryption SDK](https://github.com/Basis-Theory/basis-theory-js-encryption).
Azure (Key Vault) Encryption Provider for the Basis Theory JS Encryption SDK.
Using Node Package Manager
npm install --save @basis-theory/basis-theory-js-encryption-azure
Using Yarn
yarn add @basis-theory/basis-theory-js-encryption-azure
For further documentation and examples, please refer to our Docs.
It's required that user provides the vaulUrl to be used for fetching keys/secrets during initialization.
import { BasisTheoryEncryption } from '@basis-theory/basis-theory-js-encryption';
import { BasisTheoryAzureEncryptionProvider } from '@basis-theory/basis-theory-js-encryption-azure';
const azureProvider = new BasisTheoryAzureEncryptionProvider().init({
vaulUrl: 'https://custom-kms.vault.azure.net'
});
const btEncryption = await new BasisTheoryEncryption().init([azureProvider]);
The default cache implementation uses node-cache, but users can implement their own from the interface. Users can also provide their own methods for fetching/saving keys using the keyVaultOptions
object.
import { BasisTheoryEncryption } from '@basis-theory/basis-theory-js-encryption';
import { BasisTheoryAzureEncryptionProvider } from '@basis-theory/basis-theory-js-encryption-azure';
const azureProvider = new BasisTheoryAzureEncryptionProvider().init({
cache: new CacheService(),
tokenCredential: new DefaultAzureCredential()
vaulUrl: 'https://custom-kms.vault.azure.net',
keyVaultOptions: {
rsaKeySize: 2048,
keyExpirationInDays: 90,
getKeyByKeyId: (keyId: string) => { return key; },
getKeyByName: (name: string, prov: string, alg: string) => { return key; },
saveKey: (key: ProviderEncryptionKey ) => { return key; },
},
});
const btEncryption = await new BasisTheoryEncryption().init([azureProvider]);
The provided scripts with the SDK will check for all dependencies, build the solution, and run all tests.
Run the following command from the root of the project:
make verify
FAQs
Azure (Key Vault) Encryption Provider for the [Basis Theory](https://basistheory.com/) JS [Encryption SDK](https://github.com/Basis-Theory/basis-theory-js-encryption).
We found that @basis-theory/basis-theory-js-encryption-azure demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.