@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/types/keyvault-keys.d.ts
CHANGED
|
@@ -404,7 +404,16 @@ export declare class CryptographyClient {
|
|
|
404
404
|
* @param options - Additional options.
|
|
405
405
|
*/
|
|
406
406
|
verifyData(algorithm: SignatureAlgorithm, data: Uint8Array, signature: Uint8Array, options?: VerifyOptions): Promise<VerifyResult>;
|
|
407
|
-
|
|
407
|
+
/**
|
|
408
|
+
* Retrieves the {@link JsonWebKey} from the Key Vault.
|
|
409
|
+
*
|
|
410
|
+
* Example usage:
|
|
411
|
+
* ```ts
|
|
412
|
+
* let client = new CryptographyClient(keyVaultKey, credentials);
|
|
413
|
+
* let result = await client.getKeyMaterial();
|
|
414
|
+
* ```
|
|
415
|
+
*/
|
|
416
|
+
private getKeyMaterial;
|
|
408
417
|
/**
|
|
409
418
|
* Returns the underlying key used for cryptographic operations.
|
|
410
419
|
* If needed, fetches the key from KeyVault and exchanges the ID for the actual key.
|
|
@@ -688,15 +697,8 @@ declare interface JsonWebKey_2 {
|
|
|
688
697
|
/**
|
|
689
698
|
* Json web key operations. For more
|
|
690
699
|
* information on possible key operations, see KeyOperation.
|
|
691
|
-
*
|
|
692
|
-
* @deprecated Use {@link key_ops} instead. keyOps will be removed in version 5.x of `@azure/keyvault-keys`.
|
|
693
700
|
*/
|
|
694
701
|
keyOps?: KeyOperation[];
|
|
695
|
-
/**
|
|
696
|
-
* Json web key operations. For more
|
|
697
|
-
* information on possible key operations, see KeyOperation.
|
|
698
|
-
*/
|
|
699
|
-
key_ops?: KeyOperation[];
|
|
700
702
|
/**
|
|
701
703
|
* RSA modulus.
|
|
702
704
|
*/
|
|
@@ -765,8 +767,15 @@ export declare class KeyClient {
|
|
|
765
767
|
* The base URL to the vault
|
|
766
768
|
*/
|
|
767
769
|
readonly vaultUrl: string;
|
|
768
|
-
|
|
769
|
-
|
|
770
|
+
/**
|
|
771
|
+
* A reference to the auto-generated Key Vault HTTP client.
|
|
772
|
+
*/
|
|
773
|
+
private readonly client;
|
|
774
|
+
/**
|
|
775
|
+
* A reference to the credential that was used to construct this client.
|
|
776
|
+
* Later used to instantiate a {@link CryptographyClient} with the same credential.
|
|
777
|
+
*/
|
|
778
|
+
private readonly credential;
|
|
770
779
|
/**
|
|
771
780
|
* Creates an instance of KeyClient.
|
|
772
781
|
*
|
|
@@ -943,7 +952,13 @@ export declare class KeyClient {
|
|
|
943
952
|
* @param options - The optional parameters.
|
|
944
953
|
*/
|
|
945
954
|
updateKeyProperties(name: string, options?: UpdateKeyPropertiesOptions): Promise<KeyVaultKey>;
|
|
946
|
-
|
|
955
|
+
/**
|
|
956
|
+
* Standardizes an overloaded arguments collection for the updateKeyProperties method.
|
|
957
|
+
*
|
|
958
|
+
* @param args - The arguments collection.
|
|
959
|
+
* @returns - The standardized arguments collection.
|
|
960
|
+
*/
|
|
961
|
+
private disambiguateUpdateKeyPropertiesArgs;
|
|
947
962
|
/**
|
|
948
963
|
* The getKey method gets a specified key and is applicable to any key stored in Azure Key Vault.
|
|
949
964
|
* This operation requires the keys/get permission.
|
|
@@ -1051,6 +1066,7 @@ export declare class KeyClient {
|
|
|
1051
1066
|
restoreKeyBackup(backup: Uint8Array, options?: RestoreKeyBackupOptions): Promise<KeyVaultKey>;
|
|
1052
1067
|
/**
|
|
1053
1068
|
* Gets the requested number of bytes containing random values from a managed HSM.
|
|
1069
|
+
* This operation requires the managedHsm/rng permission.
|
|
1054
1070
|
*
|
|
1055
1071
|
* Example usage:
|
|
1056
1072
|
* ```ts
|
|
@@ -1060,7 +1076,7 @@ export declare class KeyClient {
|
|
|
1060
1076
|
* @param count - The number of bytes to generate between 1 and 128 inclusive.
|
|
1061
1077
|
* @param options - The optional parameters.
|
|
1062
1078
|
*/
|
|
1063
|
-
getRandomBytes(count: number, options?: GetRandomBytesOptions): Promise<
|
|
1079
|
+
getRandomBytes(count: number, options?: GetRandomBytesOptions): Promise<Uint8Array>;
|
|
1064
1080
|
/**
|
|
1065
1081
|
* Rotates the key based on the key policy by generating a new version of the key. This operation requires the keys/rotate permission.
|
|
1066
1082
|
*
|
|
@@ -1086,26 +1102,28 @@ export declare class KeyClient {
|
|
|
1086
1102
|
* ```
|
|
1087
1103
|
*
|
|
1088
1104
|
* @param name - The name of the key.
|
|
1089
|
-
* @param
|
|
1105
|
+
* @param targetAttestationToken - The attestation assertion for the target of the key release.
|
|
1090
1106
|
* @param options - The optional parameters.
|
|
1091
1107
|
*/
|
|
1092
|
-
releaseKey(name: string,
|
|
1108
|
+
releaseKey(name: string, targetAttestationToken: string, options?: ReleaseKeyOptions): Promise<ReleaseKeyResult>;
|
|
1093
1109
|
/**
|
|
1094
1110
|
* Gets the rotation policy of a Key Vault Key.
|
|
1111
|
+
* By default, all keys have a policy that will notify 30 days before expiry.
|
|
1095
1112
|
*
|
|
1113
|
+
* This operation requires the keys/get permission.
|
|
1096
1114
|
* Example usage:
|
|
1097
1115
|
* ```ts
|
|
1098
1116
|
* let client = new KeyClient(vaultUrl, credentials);
|
|
1099
|
-
* await client.updateKeyRotationPolicy("MyKey", myPolicy);
|
|
1100
1117
|
* let result = await client.getKeyRotationPolicy("myKey");
|
|
1101
1118
|
* ```
|
|
1102
1119
|
*
|
|
1103
|
-
* @param
|
|
1120
|
+
* @param keyName - The name of the key.
|
|
1104
1121
|
* @param options - The optional parameters.
|
|
1105
1122
|
*/
|
|
1106
|
-
getKeyRotationPolicy(
|
|
1123
|
+
getKeyRotationPolicy(keyName: string, options?: GetKeyRotationPolicyOptions): Promise<KeyRotationPolicy>;
|
|
1107
1124
|
/**
|
|
1108
1125
|
* Updates the rotation policy of a Key Vault Key.
|
|
1126
|
+
* This operation requires the keys/update permission.
|
|
1109
1127
|
*
|
|
1110
1128
|
* Example usage:
|
|
1111
1129
|
* ```ts
|
|
@@ -1113,13 +1131,24 @@ export declare class KeyClient {
|
|
|
1113
1131
|
* const setPolicy = await client.updateKeyRotationPolicy("MyKey", myPolicy);
|
|
1114
1132
|
* ```
|
|
1115
1133
|
*
|
|
1116
|
-
* @param
|
|
1134
|
+
* @param keyName - The name of the key.
|
|
1117
1135
|
* @param policyProperties - The {@link KeyRotationPolicyProperties} for the policy.
|
|
1118
1136
|
* @param options - The optional parameters.
|
|
1119
1137
|
*/
|
|
1120
|
-
updateKeyRotationPolicy(
|
|
1121
|
-
|
|
1122
|
-
|
|
1138
|
+
updateKeyRotationPolicy(keyName: string, policy: KeyRotationPolicyProperties, options?: UpdateKeyRotationPolicyOptions): Promise<KeyRotationPolicy>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Deals with the pagination of {@link listPropertiesOfKeyVersions}.
|
|
1141
|
+
* @param name - The name of the Key Vault Key.
|
|
1142
|
+
* @param continuationState - An object that indicates the position of the paginated request.
|
|
1143
|
+
* @param options - Common options for the iterative endpoints.
|
|
1144
|
+
*/
|
|
1145
|
+
private listPropertiesOfKeyVersionsPage;
|
|
1146
|
+
/**
|
|
1147
|
+
* Deals with the iteration of all the available results of {@link listPropertiesOfKeyVersions}.
|
|
1148
|
+
* @param name - The name of the Key Vault Key.
|
|
1149
|
+
* @param options - Common options for the iterative endpoints.
|
|
1150
|
+
*/
|
|
1151
|
+
private listPropertiesOfKeyVersionsAll;
|
|
1123
1152
|
/**
|
|
1124
1153
|
* Iterates all versions of the given key in the vault. The full key identifier, properties, and tags are provided
|
|
1125
1154
|
* in the response. This operation requires the keys/list permission.
|
|
@@ -1136,8 +1165,17 @@ export declare class KeyClient {
|
|
|
1136
1165
|
* @param options - The optional parameters.
|
|
1137
1166
|
*/
|
|
1138
1167
|
listPropertiesOfKeyVersions(name: string, options?: ListPropertiesOfKeyVersionsOptions): PagedAsyncIterableIterator<KeyProperties>;
|
|
1139
|
-
|
|
1140
|
-
|
|
1168
|
+
/**
|
|
1169
|
+
* Deals with the pagination of {@link listPropertiesOfKeys}.
|
|
1170
|
+
* @param continuationState - An object that indicates the position of the paginated request.
|
|
1171
|
+
* @param options - Common options for the iterative endpoints.
|
|
1172
|
+
*/
|
|
1173
|
+
private listPropertiesOfKeysPage;
|
|
1174
|
+
/**
|
|
1175
|
+
* Deals with the iteration of all the available results of {@link listPropertiesOfKeys}.
|
|
1176
|
+
* @param options - Common options for the iterative endpoints.
|
|
1177
|
+
*/
|
|
1178
|
+
private listPropertiesOfKeysAll;
|
|
1141
1179
|
/**
|
|
1142
1180
|
* Iterates the latest version of all keys in the vault. The full key identifier and properties are provided
|
|
1143
1181
|
* in the response. No values are returned for the keys. This operations requires the keys/list permission.
|
|
@@ -1154,8 +1192,17 @@ export declare class KeyClient {
|
|
|
1154
1192
|
* @param options - The optional parameters.
|
|
1155
1193
|
*/
|
|
1156
1194
|
listPropertiesOfKeys(options?: ListPropertiesOfKeysOptions): PagedAsyncIterableIterator<KeyProperties>;
|
|
1157
|
-
|
|
1158
|
-
|
|
1195
|
+
/**
|
|
1196
|
+
* Deals with the pagination of {@link listDeletedKeys}.
|
|
1197
|
+
* @param continuationState - An object that indicates the position of the paginated request.
|
|
1198
|
+
* @param options - Common options for the iterative endpoints.
|
|
1199
|
+
*/
|
|
1200
|
+
private listDeletedKeysPage;
|
|
1201
|
+
/**
|
|
1202
|
+
* Deals with the iteration of all the available results of {@link listDeletedKeys}.
|
|
1203
|
+
* @param options - Common options for the iterative endpoints.
|
|
1204
|
+
*/
|
|
1205
|
+
private listDeletedKeysAll;
|
|
1159
1206
|
/**
|
|
1160
1207
|
* Iterates the deleted keys in the vault. The full key identifier and properties are provided
|
|
1161
1208
|
* in the response. No values are returned for the keys. This operations requires the keys/list permission.
|
|
@@ -1332,8 +1379,16 @@ export declare interface KeyReleasePolicy {
|
|
|
1332
1379
|
* Defaults to "application/json; charset=utf-8" if omitted.
|
|
1333
1380
|
*/
|
|
1334
1381
|
contentType?: string;
|
|
1335
|
-
/**
|
|
1336
|
-
|
|
1382
|
+
/**
|
|
1383
|
+
* The policy rules under which the key can be released. Encoded based on the {@link KeyReleasePolicy.contentType}.
|
|
1384
|
+
*
|
|
1385
|
+
* For more information regarding the release policy grammar for Azure Key Vault, please refer to:
|
|
1386
|
+
* - https://aka.ms/policygrammarkeys for Azure Key Vault release policy grammar.
|
|
1387
|
+
* - https://aka.ms/policygrammarmhsm for Azure Managed HSM release policy grammar.
|
|
1388
|
+
*/
|
|
1389
|
+
encodedPolicy?: Uint8Array;
|
|
1390
|
+
/** Marks a release policy as immutable. An immutable release policy cannot be changed or updated after being marked immutable. */
|
|
1391
|
+
immutable?: boolean;
|
|
1337
1392
|
}
|
|
1338
1393
|
|
|
1339
1394
|
/**
|
|
@@ -1493,7 +1548,7 @@ export declare enum KnownDeletionRecoveryLevel {
|
|
|
1493
1548
|
CustomizedRecoverableProtectedSubscription = "CustomizedRecoverable+ProtectedSubscription"
|
|
1494
1549
|
}
|
|
1495
1550
|
|
|
1496
|
-
/** Known values of {@link
|
|
1551
|
+
/** Known values of {@link EncryptionAlgorithm} that the service accepts. */
|
|
1497
1552
|
export declare enum KnownEncryptionAlgorithms {
|
|
1498
1553
|
/** Encryption Algorithm - RSA-OAEP */
|
|
1499
1554
|
RSAOaep = "RSA-OAEP",
|
|
@@ -1539,6 +1594,16 @@ export declare enum KnownKeyCurveNames {
|
|
|
1539
1594
|
P256K = "P-256K"
|
|
1540
1595
|
}
|
|
1541
1596
|
|
|
1597
|
+
/** Known values of {@link KeyExportEncryptionAlgorithm} that the service accepts. */
|
|
1598
|
+
export declare enum KnownKeyExportEncryptionAlgorithm {
|
|
1599
|
+
/** CKM_RSA_AES_KEY_WRAP Key Export Encryption Algorithm */
|
|
1600
|
+
CkmRsaAesKeyWrap = "CKM_RSA_AES_KEY_WRAP",
|
|
1601
|
+
/** RSA_AES_KEY_WRAP_256 Key Export Encryption Algorithm */
|
|
1602
|
+
RsaAesKeyWrap256 = "RSA_AES_KEY_WRAP_256",
|
|
1603
|
+
/** RSA_AES_KEY_WRAP_384 Key Export Encryption Algorithm */
|
|
1604
|
+
RsaAesKeyWrap384 = "RSA_AES_KEY_WRAP_384"
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1542
1607
|
/** Known values of {@link KeyOperation} that the service accepts. */
|
|
1543
1608
|
export declare enum KnownKeyOperations {
|
|
1544
1609
|
/** Key operation - encrypt */
|
|
@@ -1656,14 +1721,6 @@ export { PollOperationState }
|
|
|
1656
1721
|
export declare interface PurgeDeletedKeyOptions extends coreHttp.OperationOptions {
|
|
1657
1722
|
}
|
|
1658
1723
|
|
|
1659
|
-
/**
|
|
1660
|
-
* Result of the {@link KeyClient.getRandomBytes} operation.
|
|
1661
|
-
*/
|
|
1662
|
-
export declare interface RandomBytes {
|
|
1663
|
-
/** The random bytes returned by the service. */
|
|
1664
|
-
bytes: Uint8Array;
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
1724
|
/**
|
|
1668
1725
|
* Options for {@link KeyClient.releaseKey}
|
|
1669
1726
|
*/
|