{"_id":"@basis-theory/basis-theory-js-encryption-azure","_rev":"13-642adabba4797b12ed7a7d616bb2886b","name":"@basis-theory/basis-theory-js-encryption-azure","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@basis-theory/basis-theory-js-encryption-azure","version":"1.0.0","author":{"name":"Basis Theory","email":"support@basistheory.com"},"license":"Apache-2.0","_id":"@basis-theory/basis-theory-js-encryption-azure@1.0.0","maintainers":[{"name":"lcschy","email":"lucas@basistheory.com"},{"name":"briangonzalezatbt","email":"brian.gonzalez@basistheory.com"},{"name":"adamletizia","email":"adam@basistheory.com"},{"name":"dhudec","email":"drew@basistheory.com"},{"name":"davi.basistheory","email":"davi@basistheory.com"},{"name":"armsteadj1","email":"armsteadj1@gmail.com"},{"name":"bweber36","email":"brandon@basistheory.com"},{"name":"matthew_basistheory","email":"matthew@basistheory.com"},{"name":"sabriskaybt","email":"sabrina@basistheory.com"},{"name":"bt-platform","email":"platform@basistheory.com"}],"homepage":"https://github.com/Basis-Theory/basis-theory-js-encryption-azure#readme","bugs":{"url":"https://github.com/Basis-Theory/basis-theory-js-encryption-azure/issues"},"dist":{"shasum":"88442d6f9bec7056f2a7ab23fbc58d9a5b099f8d","tarball":"https://registry.npmjs.org/@basis-theory/basis-theory-js-encryption-azure/-/basis-theory-js-encryption-azure-1.0.0.tgz","fileCount":23,"integrity":"sha512-KxzSpFO02g+mrkiG9LLq1M6q9gE/r4gYi9oPmOTJpoGwinNqpx2ToXdgQVktLMJTvBGbtJtirJ4WMNDo5eF1Ag==","signatures":[{"sig":"MEUCIQDPiEyWP260cfqn0F2LeUkKbWenv2uXQMgZoAPV8PmkPQIgNrMG+SRMgl6Ls1DLEReJaIsUQ7NFOFbso9rUMM4kgzQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44058},"main":"index.js","module":"index.js","engines":{"node":">=10.12.0"},"gitHead":"ed7c85916121d5cab24065af5d226f74bab3476d","typings":"index.d.ts","_npmUser":{"name":"bt-platform","email":"platform@basistheory.com"},"prettier":"@basis-theory/eslint-config/prettier","repository":{"url":"git+https://github.com/Basis-Theory/basis-theory-js-encryption-azure.git","type":"git"},"_npmVersion":"7.24.0","description":"Azure (Key Vault) Encryption Provider for the [Basis Theory](https://basistheory.com/) JS [Encryption SDK](https://github.com/Basis-Theory/basis-theory-js-encryption).","directories":{},"_nodeVersion":"14.17.6","dependencies":{"node-cache":"^5.1.2","@azure/identity":"^1.5.2","@azure/keyvault-keys":"^4.3.0","@azure/keyvault-secrets":"^4.3.0","@basis-theory/basis-theory-js-encryption-node":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@basis-theory/basis-theory-js-encryption":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/basis-theory-js-encryption-azure_1.0.0_1632516987475_0.5466086295854591","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-09-24T20:56:27.399Z","modified":"2024-09-16T16:46:30.730Z","1.0.0":"2021-09-24T20:56:27.611Z"},"bugs":{"url":"https://github.com/Basis-Theory/basis-theory-js-encryption-azure/issues"},"author":{"name":"Basis Theory","email":"support@basistheory.com"},"license":"Apache-2.0","homepage":"https://github.com/Basis-Theory/basis-theory-js-encryption-azure#readme","repository":{"url":"git+https://github.com/Basis-Theory/basis-theory-js-encryption-azure.git","type":"git"},"description":"Azure (Key Vault) Encryption Provider for the [Basis Theory](https://basistheory.com/) JS [Encryption SDK](https://github.com/Basis-Theory/basis-theory-js-encryption).","maintainers":[{"email":"robert@basistheory.com","name":"greathouse-bt"},{"email":"kevin@basistheory.com","name":"kevinperaza-bt"},{"email":"josue@basistheory.com","name":"jleon15"},{"email":"lucas@basistheory.com","name":"lcschy"},{"email":"brian.gonzalez@basistheory.com","name":"briangonzalezatbt"},{"email":"drew@basistheory.com","name":"dhudec"},{"email":"davi@basistheory.com","name":"davi.basistheory"},{"email":"armsteadj1@gmail.com","name":"armsteadj1"},{"email":"matthew@basistheory.com","name":"matthew_basistheory"},{"email":"platform@basistheory.com","name":"bt-platform"}],"readme":"# BasisTheory JS Azure Encryption Provider\n\nAzure (Key Vault) Encryption Provider for the [Basis Theory](https://basistheory.com/) JS [Encryption SDK](https://github.com/Basis-Theory/basis-theory-js-encryption).\n\n## Installation\n\nUsing [Node Package Manager](https://docs.npmjs.com/)\n\n```sh\nnpm install --save @basis-theory/basis-theory-js-encryption-azure\n```\n\nUsing [Yarn](https://classic.yarnpkg.com/en/docs/)\n\n```sh\nyarn add @basis-theory/basis-theory-js-encryption-azure\n```\n\n## Documentation\n\nFor further documentation and examples, please refer to our [Docs](https://docs.basistheory.com/api-reference/encryption).\n\n## Usage\n\n### Initialization and Usage with BasisTheoryEncryption\n\nIt's required that user provides the vaulUrl to be used for fetching keys/secrets during initialization.\n\n```javascript\nimport { BasisTheoryEncryption } from '@basis-theory/basis-theory-js-encryption';\nimport { BasisTheoryAzureEncryptionProvider } from '@basis-theory/basis-theory-js-encryption-azure';\n\nconst azureProvider = new BasisTheoryAzureEncryptionProvider().init({\n  vaulUrl: 'https://custom-kms.vault.azure.net'\n});\nconst btEncryption = await new BasisTheoryEncryption().init([azureProvider]);\n```\n\n### Caching, VaultUrl and Additional Options\n\nThe default cache implementation uses [node-cache](https://www.npmjs.com/package/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.\n\n```javascript\nimport { BasisTheoryEncryption } from '@basis-theory/basis-theory-js-encryption';\nimport { BasisTheoryAzureEncryptionProvider } from '@basis-theory/basis-theory-js-encryption-azure';\n\nconst azureProvider = new BasisTheoryAzureEncryptionProvider().init({\n  cache: new CacheService(),\n  tokenCredential: new DefaultAzureCredential()\n  vaulUrl: 'https://custom-kms.vault.azure.net',\n  keyVaultOptions: {\n    rsaKeySize: 2048,\n    keyExpirationInDays: 90,\n    getKeyByKeyId: (keyId: string) => { return key; },\n    getKeyByName: (name: string, prov: string, alg: string) => { return key; },\n    saveKey: (key: ProviderEncryptionKey ) => { return key; },\n  },\n});\n\n\nconst btEncryption = await new BasisTheoryEncryption().init([azureProvider]);\n```\n\n## Development\n\nThe provided scripts with the SDK will check for all dependencies, build the solution, and run all tests.\n\n### Dependencies\n\n- [Docker](https://www.docker.com/products/docker-desktop)\n- [Docker Compose](https://www.docker.com/products/docker-desktop)\n- [NodeJS](https://nodejs.org/en/) > 10.12.0\n- [Yarn](https://classic.yarnpkg.com/en/docs/)\n\n### Build the SDK and run Tests\n\nRun the following command from the root of the project:\n\n```sh\nmake verify\n```\n","readmeFilename":"README.md"}