@azure/keyvault-keys 4.4.0-beta.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -1
- package/README.md +11 -10
- package/dist/index.js +332 -295
- package/dist/index.js.map +1 -1
- package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js +14 -25
- package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js.map +1 -1
- package/dist-esm/keyvault-common/src/index.js +1 -0
- package/dist-esm/keyvault-common/src/index.js.map +1 -1
- package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js +1 -1
- package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js.map +1 -1
- package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js +52 -0
- package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js.map +1 -0
- package/dist-esm/keyvault-common/src/tracingHelpers.js +4 -4
- package/dist-esm/keyvault-common/src/tracingHelpers.js.map +1 -1
- package/dist-esm/keyvault-keys/src/constants.js +1 -1
- package/dist-esm/keyvault-keys/src/constants.js.map +1 -1
- package/dist-esm/keyvault-keys/src/cryptography/aesCryptographyProvider.js +7 -7
- package/dist-esm/keyvault-keys/src/cryptography/aesCryptographyProvider.js.map +1 -1
- package/dist-esm/keyvault-keys/src/cryptography/crypto.js +2 -2
- package/dist-esm/keyvault-keys/src/cryptography/crypto.js.map +1 -1
- package/dist-esm/keyvault-keys/src/cryptography/models.js.map +1 -1
- package/dist-esm/keyvault-keys/src/cryptography/remoteCryptographyProvider.js +11 -12
- package/dist-esm/keyvault-keys/src/cryptography/remoteCryptographyProvider.js.map +1 -1
- package/dist-esm/keyvault-keys/src/cryptography/rsaCryptographyProvider.js +7 -9
- package/dist-esm/keyvault-keys/src/cryptography/rsaCryptographyProvider.js.map +1 -1
- package/dist-esm/keyvault-keys/src/cryptographyClient.js +10 -11
- package/dist-esm/keyvault-keys/src/cryptographyClient.js.map +1 -1
- package/dist-esm/keyvault-keys/src/cryptographyClientModels.js +36 -2
- package/dist-esm/keyvault-keys/src/cryptographyClientModels.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/keyVaultClient.js +4 -50
- package/dist-esm/keyvault-keys/src/generated/keyVaultClient.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/keyVaultClientContext.js +2 -2
- package/dist-esm/keyvault-keys/src/generated/keyVaultClientContext.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/models/index.js +6 -21
- package/dist-esm/keyvault-keys/src/generated/models/index.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/models/mappers.js +36 -29
- package/dist-esm/keyvault-keys/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/models/parameters.js +4 -16
- package/dist-esm/keyvault-keys/src/generated/models/parameters.js.map +1 -1
- package/dist-esm/keyvault-keys/src/identifier.js.map +1 -1
- package/dist-esm/keyvault-keys/src/index.js +32 -42
- package/dist-esm/keyvault-keys/src/index.js.map +1 -1
- package/dist-esm/keyvault-keys/src/keysModels.js +5 -2
- package/dist-esm/keyvault-keys/src/keysModels.js.map +1 -1
- package/dist-esm/keyvault-keys/src/lro/delete/poller.js.map +1 -1
- package/dist-esm/keyvault-keys/src/lro/keyVaultKeyPoller.js +1 -1
- package/dist-esm/keyvault-keys/src/lro/keyVaultKeyPoller.js.map +1 -1
- package/dist-esm/keyvault-keys/src/lro/recover/poller.js.map +1 -1
- package/dist-esm/keyvault-keys/src/transformations.js +12 -13
- package/dist-esm/keyvault-keys/src/transformations.js.map +1 -1
- package/package.json +16 -32
- package/types/keyvault-keys.d.ts +93 -36
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
## 4.4.0 (2022-03-24)
|
|
4
|
+
|
|
5
|
+
### Features Added
|
|
6
|
+
|
|
7
|
+
- Added support for `KeyClient.getRandomBytes` which, when connected to a managed HSM, can be used to generate a byte array of a given length with random values.
|
|
8
|
+
- Added support for Secure key Release from a Managed HSM.
|
|
9
|
+
- Added `KeyClient.releaseKey` to release a key from a Managed HSM.
|
|
10
|
+
- Added `exportable` and `releasePolicy` to `KeyVaultKey.properties`, `createKeyOptions`, and `importKeyOptions` in order to specify whether the key is exportable and to associate a release policy to a given key.
|
|
11
|
+
- Added support for automated key rotation in Azure Key Vault and Managed HSM.
|
|
12
|
+
- Added `KeyClient.rotateKey` to rotate a key on-demand.
|
|
13
|
+
- Added `KeyClient.updateKeyRotationPolicy` to update a key's automated rotation policy.
|
|
14
|
+
- Added support for `KeyClient.getCryptographyClient(keyName, options)` which provides a simple way to create a `CryptographyClient` for a given key (identified by its name).
|
|
15
|
+
- An optional `keyVersion` property may be used in the `options` parameter to create a cryptography client targeting a specific key version. The latest version is used by default.
|
|
16
|
+
|
|
17
|
+
### Other Changes
|
|
18
|
+
|
|
19
|
+
- This release updates `KeyClient` and `CryptographyClient` to support service version 7.3 by default.
|
|
20
|
+
|
|
21
|
+
## 4.4.0-beta.4 (2022-02-08)
|
|
22
|
+
|
|
23
|
+
### Features Added
|
|
24
|
+
|
|
25
|
+
- Added `KeyReleasePolicy#immutable` flag to support immutable release policies. Once a release policy is marked as immutable, it can no longer be modified.
|
|
26
|
+
|
|
27
|
+
## 4.4.0-beta.3 (2021-11-09)
|
|
28
|
+
|
|
29
|
+
### Features Added
|
|
30
|
+
|
|
31
|
+
- Support multi-tenant authentication against Key Vault and Managed HSM when using @azure/identity 2.0.0 or newer.
|
|
32
|
+
|
|
33
|
+
### Breaking Changes
|
|
34
|
+
|
|
35
|
+
- `KeyClient.getRandomBytes` will now return the generated bytes directly instead of wrapping them in a `RandomBytes` model.
|
|
36
|
+
- Since it's no longer used, `RandomBytes` has been removed from the public API.
|
|
37
|
+
- `KeyReleasePolicy.data` has been renamed to `KeyReleasePolicy.encodedPolicy`.
|
|
38
|
+
- `KeyClient.releaseKey`'s `target` parameter has been renamed to `targetAttestationToken`.
|
|
39
|
+
|
|
3
40
|
## 4.4.0-beta.2 (2021-10-05)
|
|
4
41
|
|
|
5
42
|
### Features Added
|
|
@@ -9,7 +46,6 @@
|
|
|
9
46
|
- Added support for automated key rotation in Azure Key Vault.
|
|
10
47
|
- Added `KeyClient.rotateKey` to rotate a key on-demand.
|
|
11
48
|
- Added `KeyClient.updateKeyRotationPolicy` to update a key's automated rotation policy.
|
|
12
|
-
- Added `JsonWebKey.key_ops` property to `JsonWebKey` in addition to the existing `JsonWebKey.keyOps` property in order to comply with the JSON Web Key spec.
|
|
13
49
|
|
|
14
50
|
## 4.4.0-beta.1 (2021-08-10)
|
|
15
51
|
|
package/README.md
CHANGED
|
@@ -80,7 +80,6 @@ Use the [Azure CLI][azure-cli] snippet below to create/get client secret credent
|
|
|
80
80
|
{
|
|
81
81
|
"appId": "generated-app-ID",
|
|
82
82
|
"displayName": "dummy-app-name",
|
|
83
|
-
"name": "http://dummy-app-name",
|
|
84
83
|
"password": "random-password",
|
|
85
84
|
"tenant": "tenant-ID"
|
|
86
85
|
}
|
|
@@ -206,7 +205,7 @@ const url = `https://${vaultName}.vault.azure.net`;
|
|
|
206
205
|
|
|
207
206
|
// Change the Azure Key Vault service API version being used via the `serviceVersion` option
|
|
208
207
|
const client = new KeyClient(url, credential, {
|
|
209
|
-
serviceVersion: "7.0" // Or 7.1
|
|
208
|
+
serviceVersion: "7.0", // Or 7.1
|
|
210
209
|
});
|
|
211
210
|
```
|
|
212
211
|
|
|
@@ -308,7 +307,7 @@ const keyName = "MyKeyName";
|
|
|
308
307
|
|
|
309
308
|
async function main() {
|
|
310
309
|
const result = await client.createKey(keyName, "RSA", {
|
|
311
|
-
enabled: false
|
|
310
|
+
enabled: false,
|
|
312
311
|
});
|
|
313
312
|
console.log("result: ", result);
|
|
314
313
|
}
|
|
@@ -338,7 +337,7 @@ const keyName = "MyKeyName";
|
|
|
338
337
|
async function main() {
|
|
339
338
|
const result = await client.createKey(keyName, "RSA");
|
|
340
339
|
await client.updateKeyProperties(keyName, result.properties.version, {
|
|
341
|
-
enabled: false
|
|
340
|
+
enabled: false,
|
|
342
341
|
});
|
|
343
342
|
}
|
|
344
343
|
|
|
@@ -501,12 +500,12 @@ async function main() {
|
|
|
501
500
|
lifetimeActions: [
|
|
502
501
|
{
|
|
503
502
|
action: "Rotate",
|
|
504
|
-
timeBeforeExpiry: "P30D"
|
|
505
|
-
}
|
|
503
|
+
timeBeforeExpiry: "P30D",
|
|
504
|
+
},
|
|
506
505
|
],
|
|
507
506
|
// You may also specify the duration after which any newly rotated key will expire.
|
|
508
507
|
// In this case, any new key versions will expire after 90 days.
|
|
509
|
-
expiresIn: "P90D"
|
|
508
|
+
expiresIn: "P90D",
|
|
510
509
|
});
|
|
511
510
|
|
|
512
511
|
// You can get the current key rotation policy of a given key by calling the getKeyRotationPolicy method.
|
|
@@ -652,7 +651,7 @@ async function main() {
|
|
|
652
651
|
|
|
653
652
|
const encryptResult = await cryptographyClient.encrypt({
|
|
654
653
|
algorithm: "RSA1_5",
|
|
655
|
-
plaintext: Buffer.from("My Message")
|
|
654
|
+
plaintext: Buffer.from("My Message"),
|
|
656
655
|
});
|
|
657
656
|
console.log("encrypt result: ", encryptResult.result);
|
|
658
657
|
}
|
|
@@ -681,13 +680,13 @@ async function main() {
|
|
|
681
680
|
|
|
682
681
|
const encryptResult = await cryptographyClient.encrypt({
|
|
683
682
|
algorithm: "RSA1_5",
|
|
684
|
-
plaintext: Buffer.from("My Message")
|
|
683
|
+
plaintext: Buffer.from("My Message"),
|
|
685
684
|
});
|
|
686
685
|
console.log("encrypt result: ", encryptResult.result);
|
|
687
686
|
|
|
688
687
|
const decryptResult = await cryptographyClient.decrypt({
|
|
689
688
|
algorithm: "RSA1_5",
|
|
690
|
-
ciphertext: encryptResult.result
|
|
689
|
+
ciphertext: encryptResult.result,
|
|
691
690
|
});
|
|
692
691
|
console.log("decrypt result: ", decryptResult.result.toString());
|
|
693
692
|
}
|
|
@@ -876,6 +875,8 @@ main();
|
|
|
876
875
|
|
|
877
876
|
## Troubleshooting
|
|
878
877
|
|
|
878
|
+
See our [troubleshooting guide](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-keys/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios.
|
|
879
|
+
|
|
879
880
|
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
880
881
|
|
|
881
882
|
```javascript
|