diff --git a/libs/keyStore/package.json b/libs/keyStore/package.json index 73b4227..083a146 100644 --- a/libs/keyStore/package.json +++ b/libs/keyStore/package.json @@ -35,7 +35,7 @@ "typescript": "3.9.2" }, "dependencies": { - "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.8", "@types/node": "12.12.16", "base64url": "^3.0.1", "clone": "^2.1.2", diff --git a/libs/plugin-cryptofactory-suites/package.json b/libs/plugin-cryptofactory-suites/package.json index d5ff807..c7fabd7 100644 --- a/libs/plugin-cryptofactory-suites/package.json +++ b/libs/plugin-cryptofactory-suites/package.json @@ -36,9 +36,9 @@ "typescript": "3.9.2" }, "dependencies": { - "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-elliptic": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-elliptic": "1.1.11-preview.8", "base64url": "^3.0.1", "clone": "2.1.2", "webcrypto-core": "1.1.8" diff --git a/libs/plugin-elliptic/package.json b/libs/plugin-elliptic/package.json index 2abbffd..4fa5f57 100644 --- a/libs/plugin-elliptic/package.json +++ b/libs/plugin-elliptic/package.json @@ -29,7 +29,7 @@ "elliptic": "6.5.3", "minimalistic-crypto-utils": "1.0.1", "sha.js": "^2.4.11", - "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.8", "webcrypto-core": "1.1.8" }, "devDependencies": { diff --git a/libs/plugin-factory/package.json b/libs/plugin-factory/package.json index b30f144..ae9153d 100644 --- a/libs/plugin-factory/package.json +++ b/libs/plugin-factory/package.json @@ -39,10 +39,10 @@ "dependencies": { "@azure/identity": "1.0.0", "lru-cache": "^5.1.1", - "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-cryptofactory-suites": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-keyvault": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-cryptofactory-suites": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-keyvault": "1.1.11-preview.8", "@types/node": "12.12.16", "webcrypto-core": "1.1.8" }, diff --git a/libs/plugin-keyvault/package.json b/libs/plugin-keyvault/package.json index 077aa19..bc36172 100644 --- a/libs/plugin-keyvault/package.json +++ b/libs/plugin-keyvault/package.json @@ -47,10 +47,10 @@ "@azure/identity": "1.0.0", "@azure/keyvault-keys": "4.0.2", "@azure/keyvault-secrets": "4.0.2", - "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-elliptic": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-elliptic": "1.1.11-preview.8", "base64url": "3.0.1", "clone": "2.1.2", "webcrypto-core": "1.1.8" diff --git a/libs/plugin-keyvault/src/keyStore/KeyStoreKeyVault.ts b/libs/plugin-keyvault/src/keyStore/KeyStoreKeyVault.ts index a383054..f4acc4f 100644 --- a/libs/plugin-keyvault/src/keyStore/KeyStoreKeyVault.ts +++ b/libs/plugin-keyvault/src/keyStore/KeyStoreKeyVault.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ClientCertificateCredential, ClientSecretCredential, TokenCredential } from '@azure/identity'; +import { TokenCredential } from '@azure/identity'; import { KeyClient, JsonWebKey, CryptographyClient } from '@azure/keyvault-keys'; import { SecretClient } from '@azure/keyvault-secrets'; import { KeyStoreOptions, IKeyStore, KeyStoreListItem, KeyReference } from 'verifiablecredentials-crypto-sdk-typescript-keystore'; @@ -41,6 +41,11 @@ export default class KeyStoreKeyVault implements IKeyStore { } } + private chacheId(keyReference: KeyReference): string { + const reference = keyReference.remoteKeyReference || keyReference.keyReference; + const id = `${keyReference.type}-${reference}-${this.vaultUri}`; + return id; + } /** * Returns the key container associated with the specified @@ -48,10 +53,11 @@ export default class KeyStoreKeyVault implements IKeyStore { * @param keyIdentifier for which to return the key. * @param [options] Options for retrieving. */ - public async get(keyReference: KeyReference, options: KeyStoreOptions = new KeyStoreOptions({ extractable: false })): Promise { + public async get(keyReference: KeyReference, options: KeyStoreOptions = new KeyStoreOptions({ extractable: false })): Promise { try { const client = this.getKeyStoreClient(keyReference.type); const keyName = keyReference.remoteKeyReference || keyReference.keyReference; + const versionList: any[] = []; if (keyReference.type === KeyStoreKeyVault.SECRETS) { // Get extractable secrets diff --git a/libs/plugin/package.json b/libs/plugin/package.json index 5b18d0f..872fdf8 100644 --- a/libs/plugin/package.json +++ b/libs/plugin/package.json @@ -35,8 +35,8 @@ "typescript": "3.9.2" }, "dependencies": { - "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.8", "@peculiar/webcrypto": "1.1.3", "@types/node": "12.12.16", "base64url": "^3.0.1", diff --git a/libs/protocol-jose/package.json b/libs/protocol-jose/package.json index fb63fce..7e820d7 100644 --- a/libs/protocol-jose/package.json +++ b/libs/protocol-jose/package.json @@ -39,11 +39,11 @@ "typescript": "3.9.2" }, "dependencies": { - "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-protocols-common": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-cryptofactory-suites": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-protocols-common": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-cryptofactory-suites": "1.1.11-preview.8", "base64url": "^3.0.1", "typescript-map": "0.0.7", "webcrypto-core": "1.1.8" diff --git a/libs/protocols-common/package.json b/libs/protocols-common/package.json index 0baa40a..46da347 100644 --- a/libs/protocols-common/package.json +++ b/libs/protocols-common/package.json @@ -39,9 +39,9 @@ "typescript": "3.9.2" }, "dependencies": { - "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.8", "base64url": "3.0.1", "typescript-map": "0.0.7", "webcrypto-core": "1.1.8" diff --git a/libs/sdk/package.json b/libs/sdk/package.json index 29ee860..3018edc 100644 --- a/libs/sdk/package.json +++ b/libs/sdk/package.json @@ -52,15 +52,15 @@ "jsonld": "2.0.2", "typescript-map": "0.0.7", "uuid": "^8.3.1", - "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-cryptofactory-suites": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-elliptic": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-factory": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-plugin-keyvault": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-protocol-jose": "1.1.11-preview.7", - "verifiablecredentials-crypto-sdk-typescript-protocols-common": "1.1.11-preview.7", + "verifiablecredentials-crypto-sdk-typescript-keys": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-keystore": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-cryptofactory-suites": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-elliptic": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-factory": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-plugin-keyvault": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-protocol-jose": "1.1.11-preview.8", + "verifiablecredentials-crypto-sdk-typescript-protocols-common": "1.1.11-preview.8", "webcrypto-core": "1.1.8" }, "nyc": { diff --git a/libs/sdk/tests/Jose.spec.ts b/libs/sdk/tests/Jose.spec.ts index 808e25a..d1c1232 100644 --- a/libs/sdk/tests/Jose.spec.ts +++ b/libs/sdk/tests/Jose.spec.ts @@ -203,7 +203,6 @@ describe('Jose', () => { return; } const keyReference = new KeyReference(name, 'key'); - cryptoKeyVault.builder.useSigningKeyReference(keyReference); try { for (let inx = 0; inx < 10; inx++) {