From becc0e39f86940e678cf7849db9d7e2ecfb7856a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 20 Jun 2018 18:24:30 +0000 Subject: [PATCH] Generated from b5dc60ee8947a4fd2cc3f2db659d3017ca3fbded renaming crv secp256k1 and alg ECDSA256 to align with proposed JOSE standards updates --- lib/services/keyvault/LICENSE.txt | 21 ++ lib/services/keyvault/lib/keyVaultClient.d.ts | 120 ++++++++---- lib/services/keyvault/lib/keyVaultClient.js | 180 ++++++++++++------ .../keyvault/lib/models/certificateBundle.js | 11 +- .../lib/models/certificateCreateParameters.js | 9 +- .../lib/models/certificateImportParameters.js | 9 +- .../keyvault/lib/models/certificatePolicy.js | 11 +- .../lib/models/certificateUpdateParameters.js | 9 +- lib/services/keyvault/lib/models/index.d.ts | 92 ++++++--- .../keyvault/lib/models/jsonWebKey.js | 7 +- lib/services/keyvault/lib/models/keyBundle.js | 7 +- .../lib/models/keyCreateParameters.js | 6 +- .../lib/models/keyImportParameters.js | 7 +- .../keyvault/lib/models/keyProperties.js | 20 +- .../keyvault/lib/models/keySignParameters.js | 2 +- .../lib/models/keyVerifyParameters.js | 2 +- lib/services/keyvault/package.json | 25 +++ 17 files changed, 384 insertions(+), 154 deletions(-) create mode 100644 lib/services/keyvault/LICENSE.txt create mode 100644 lib/services/keyvault/package.json diff --git a/lib/services/keyvault/LICENSE.txt b/lib/services/keyvault/LICENSE.txt new file mode 100644 index 0000000000..5431ba98b9 --- /dev/null +++ b/lib/services/keyvault/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/keyvault/lib/keyVaultClient.d.ts b/lib/services/keyvault/lib/keyVaultClient.d.ts index b96b511d42..fdb45a0788 100644 --- a/lib/services/keyvault/lib/keyVaultClient.d.ts +++ b/lib/services/keyvault/lib/keyVaultClient.d.ts @@ -70,8 +70,8 @@ export default class KeyVaultClient extends AzureServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {number} [options.keySize] The key size in bytes. For example, 1024 - * or 2048. + * @param {number} [options.keySize] The key size in bits. For example: 2048, + * 3072, or 4096 for RSA. * * @param {array} [options.keyOps] * @@ -89,7 +89,7 @@ export default class KeyVaultClient extends AzureServiceClient { * * @param {string} [options.curve] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -122,8 +122,8 @@ export default class KeyVaultClient extends AzureServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {number} [options.keySize] The key size in bytes. For example, 1024 - * or 2048. + * @param {number} [options.keySize] The key size in bits. For example: 2048, + * 3072, or 4096 for RSA. * * @param {array} [options.keyOps] * @@ -141,7 +141,7 @@ export default class KeyVaultClient extends AzureServiceClient { * * @param {string} [options.curve] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -190,8 +190,9 @@ export default class KeyVaultClient extends AzureServiceClient { * * @param {string} [key.kid] Key identifier. * - * @param {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @param {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible + * values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {array} [key.keyOps] * @@ -218,7 +219,7 @@ export default class KeyVaultClient extends AzureServiceClient { * * @param {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {buffer} [key.x] X component of an EC public key. * @@ -269,8 +270,9 @@ export default class KeyVaultClient extends AzureServiceClient { * * @param {string} [key.kid] Key identifier. * - * @param {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @param {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible + * values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {array} [key.keyOps] * @@ -297,7 +299,7 @@ export default class KeyVaultClient extends AzureServiceClient { * * @param {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {buffer} [key.x] X component of an EC public key. * @@ -1145,7 +1147,7 @@ export default class KeyVaultClient extends AzureServiceClient { * more information on possible algorithm types, see * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' + * 'ES256K' * * @param {buffer} value * @@ -1180,7 +1182,7 @@ export default class KeyVaultClient extends AzureServiceClient { * more information on possible algorithm types, see * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' + * 'ES256K' * * @param {buffer} value * @@ -1236,7 +1238,7 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {string} algorithm The signing/verification algorithm. For more * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K' * * @param {buffer} digest The digest used for signing. * @@ -1275,7 +1277,7 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {string} algorithm The signing/verification algorithm. For more * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K' * * @param {buffer} digest The digest used for signing. * @@ -3514,15 +3516,20 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -3631,15 +3638,20 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -3777,15 +3789,20 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -3904,15 +3921,20 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -4184,14 +4206,20 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if * the private key can be exported. * - * @param {string} [certificatePolicy.keyProperties.keyType] The key type. + * @param {string} [certificatePolicy.keyProperties.kty] The type of key pair + * to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' * * @param {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the * same key pair will be used on certificate renewal. * + * @param {string} [certificatePolicy.keyProperties.curve] Elliptic curve name. + * For valid values, see JsonWebKeyCurveName. Possible values include: 'P-256', + * 'P-384', 'P-521', 'P-256K' + * * @param {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @@ -4291,14 +4319,20 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if * the private key can be exported. * - * @param {string} [certificatePolicy.keyProperties.keyType] The key type. + * @param {string} [certificatePolicy.keyProperties.kty] The type of key pair + * to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' * * @param {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the * same key pair will be used on certificate renewal. * + * @param {string} [certificatePolicy.keyProperties.curve] Elliptic curve name. + * For valid values, see JsonWebKeyCurveName. Possible values include: 'P-256', + * 'P-384', 'P-521', 'P-256K' + * * @param {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @@ -4424,15 +4458,20 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -4546,15 +4585,20 @@ export default class KeyVaultClient extends AzureServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * diff --git a/lib/services/keyvault/lib/keyVaultClient.js b/lib/services/keyvault/lib/keyVaultClient.js index 37b5ef7c25..1c457fd88d 100644 --- a/lib/services/keyvault/lib/keyVaultClient.js +++ b/lib/services/keyvault/lib/keyVaultClient.js @@ -42,8 +42,8 @@ const models = require('./models'); * * @param {object} [options] Optional Parameters. * - * @param {number} [options.keySize] The key size in bytes. For example, 1024 - * or 2048. + * @param {number} [options.keySize] The key size in bits. For example: 2048, + * 3072, or 4096 for RSA. * * @param {array} [options.keyOps] * @@ -61,7 +61,7 @@ const models = require('./models'); * * @param {string} [options.curve] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -277,8 +277,9 @@ function _createKey(vaultBaseUrl, keyName, kty, options, callback) { * * @param {string} [key.kid] Key identifier. * - * @param {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @param {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible + * values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {array} [key.keyOps] * @@ -305,7 +306,7 @@ function _createKey(vaultBaseUrl, keyName, kty, options, callback) { * * @param {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {buffer} [key.x] X component of an EC public key. * @@ -2090,7 +2091,7 @@ function _decrypt(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, * more information on possible algorithm types, see * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' + * 'ES256K' * * @param {buffer} value * @@ -2285,7 +2286,7 @@ function _sign(vaultBaseUrl, keyName, keyVersion, algorithm, value, options, cal * @param {string} algorithm The signing/verification algorithm. For more * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K' * * @param {buffer} digest The digest used for signing. * @@ -7021,15 +7022,20 @@ function _deleteCertificateIssuer(vaultBaseUrl, issuerName, options, callback) { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -7307,15 +7313,20 @@ function _createCertificate(vaultBaseUrl, certificateName, options, callback) { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -7905,14 +7916,20 @@ function _getCertificatePolicy(vaultBaseUrl, certificateName, options, callback) * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if * the private key can be exported. * - * @param {string} [certificatePolicy.keyProperties.keyType] The key type. + * @param {string} [certificatePolicy.keyProperties.kty] The type of key pair + * to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' * * @param {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the * same key pair will be used on certificate renewal. * + * @param {string} [certificatePolicy.keyProperties.curve] Elliptic curve name. + * For valid values, see JsonWebKeyCurveName. Possible values include: 'P-256', + * 'P-384', 'P-521', 'P-256K' + * * @param {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @@ -8158,15 +8175,20 @@ function _updateCertificatePolicy(vaultBaseUrl, certificateName, certificatePoli * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -15585,8 +15607,8 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {number} [options.keySize] The key size in bytes. For example, 1024 - * or 2048. + * @param {number} [options.keySize] The key size in bits. For example: 2048, + * 3072, or 4096 for RSA. * * @param {array} [options.keyOps] * @@ -15604,7 +15626,7 @@ class KeyVaultClient extends ServiceClient { * * @param {string} [options.curve] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15649,8 +15671,8 @@ class KeyVaultClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {number} [options.keySize] The key size in bytes. For example, 1024 - * or 2048. + * @param {number} [options.keySize] The key size in bits. For example: 2048, + * 3072, or 4096 for RSA. * * @param {array} [options.keyOps] * @@ -15668,7 +15690,7 @@ class KeyVaultClient extends ServiceClient { * * @param {string} [options.curve] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15732,8 +15754,9 @@ class KeyVaultClient extends ServiceClient { * * @param {string} [key.kid] Key identifier. * - * @param {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @param {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible + * values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {array} [key.keyOps] * @@ -15760,7 +15783,7 @@ class KeyVaultClient extends ServiceClient { * * @param {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {buffer} [key.x] X component of an EC public key. * @@ -15823,8 +15846,9 @@ class KeyVaultClient extends ServiceClient { * * @param {string} [key.kid] Key identifier. * - * @param {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @param {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible + * values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {array} [key.keyOps] * @@ -15851,7 +15875,7 @@ class KeyVaultClient extends ServiceClient { * * @param {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * * @param {buffer} [key.x] X component of an EC public key. * @@ -16957,7 +16981,7 @@ class KeyVaultClient extends ServiceClient { * more information on possible algorithm types, see * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' + * 'ES256K' * * @param {buffer} value * @@ -17004,7 +17028,7 @@ class KeyVaultClient extends ServiceClient { * more information on possible algorithm types, see * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' + * 'ES256K' * * @param {buffer} value * @@ -17075,7 +17099,7 @@ class KeyVaultClient extends ServiceClient { * @param {string} algorithm The signing/verification algorithm. For more * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K' * * @param {buffer} digest The digest used for signing. * @@ -17126,7 +17150,7 @@ class KeyVaultClient extends ServiceClient { * @param {string} algorithm The signing/verification algorithm. For more * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K' * * @param {buffer} digest The digest used for signing. * @@ -20136,15 +20160,20 @@ class KeyVaultClient extends ServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -20265,15 +20294,20 @@ class KeyVaultClient extends ServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -20426,15 +20460,20 @@ class KeyVaultClient extends ServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -20565,15 +20604,20 @@ class KeyVaultClient extends ServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -20914,14 +20958,20 @@ class KeyVaultClient extends ServiceClient { * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if * the private key can be exported. * - * @param {string} [certificatePolicy.keyProperties.keyType] The key type. + * @param {string} [certificatePolicy.keyProperties.kty] The type of key pair + * to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' * * @param {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the * same key pair will be used on certificate renewal. * + * @param {string} [certificatePolicy.keyProperties.curve] Elliptic curve name. + * For valid values, see JsonWebKeyCurveName. Possible values include: 'P-256', + * 'P-384', 'P-521', 'P-256K' + * * @param {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @@ -21033,14 +21083,20 @@ class KeyVaultClient extends ServiceClient { * @param {boolean} [certificatePolicy.keyProperties.exportable] Indicates if * the private key can be exported. * - * @param {string} [certificatePolicy.keyProperties.keyType] The key type. + * @param {string} [certificatePolicy.keyProperties.kty] The type of key pair + * to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' * * @param {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if the * same key pair will be used on certificate renewal. * + * @param {string} [certificatePolicy.keyProperties.curve] Elliptic curve name. + * For valid values, see JsonWebKeyCurveName. Possible values include: 'P-256', + * 'P-384', 'P-521', 'P-256K' + * * @param {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @@ -21181,15 +21237,20 @@ class KeyVaultClient extends ServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * @@ -21315,15 +21376,20 @@ class KeyVaultClient extends ServiceClient { * @param {boolean} [options.certificatePolicy.keyProperties.exportable] * Indicates if the private key can be exported. * - * @param {string} [options.certificatePolicy.keyProperties.keyType] The key - * type. + * @param {string} [options.certificatePolicy.keyProperties.kty] The type of + * key pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * * @param {number} [options.certificatePolicy.keyProperties.keySize] The key - * size in bytes. For example; 1024 or 2048. + * size in bits. For example: 2048, 3072, or 4096 for RSA. * * @param {boolean} [options.certificatePolicy.keyProperties.reuseKey] * Indicates if the same key pair will be used on certificate renewal. * + * @param {string} [options.certificatePolicy.keyProperties.curve] Elliptic + * curve name. For valid values, see JsonWebKeyCurveName. Possible values + * include: 'P-256', 'P-384', 'P-521', 'P-256K' + * * @param {object} [options.certificatePolicy.secretProperties] Properties of * the secret backing a certificate. * diff --git a/lib/services/keyvault/lib/models/certificateBundle.js b/lib/services/keyvault/lib/models/certificateBundle.js index 8679004f9c..6813d70b64 100644 --- a/lib/services/keyvault/lib/models/certificateBundle.js +++ b/lib/services/keyvault/lib/models/certificateBundle.js @@ -29,11 +29,16 @@ class CertificateBundle { * certificate. * @member {boolean} [policy.keyProperties.exportable] Indicates if the * private key can be exported. - * @member {string} [policy.keyProperties.keyType] The key type. - * @member {number} [policy.keyProperties.keySize] The key size in bytes. For - * example; 1024 or 2048. + * @member {string} [policy.keyProperties.kty] The type of key pair to be + * used for the certificate. Possible values include: 'EC', 'EC-HSM', 'RSA', + * 'RSA-HSM', 'oct' + * @member {number} [policy.keyProperties.keySize] The key size in bits. For + * example: 2048, 3072, or 4096 for RSA. * @member {boolean} [policy.keyProperties.reuseKey] Indicates if the same * key pair will be used on certificate renewal. + * @member {string} [policy.keyProperties.curve] Elliptic curve name. For + * valid values, see JsonWebKeyCurveName. Possible values include: 'P-256', + * 'P-384', 'P-521', 'P-256K' * @member {object} [policy.secretProperties] Properties of the secret * backing a certificate. * @member {string} [policy.secretProperties.contentType] The media type diff --git a/lib/services/keyvault/lib/models/certificateCreateParameters.js b/lib/services/keyvault/lib/models/certificateCreateParameters.js index f4b1db45f8..10a713fcb9 100644 --- a/lib/services/keyvault/lib/models/certificateCreateParameters.js +++ b/lib/services/keyvault/lib/models/certificateCreateParameters.js @@ -26,11 +26,16 @@ class CertificateCreateParameters { * backing a certificate. * @member {boolean} [certificatePolicy.keyProperties.exportable] Indicates * if the private key can be exported. - * @member {string} [certificatePolicy.keyProperties.keyType] The key type. + * @member {string} [certificatePolicy.keyProperties.kty] The type of key + * pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * @member {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if * the same key pair will be used on certificate renewal. + * @member {string} [certificatePolicy.keyProperties.curve] Elliptic curve + * name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' * @member {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @member {string} [certificatePolicy.secretProperties.contentType] The diff --git a/lib/services/keyvault/lib/models/certificateImportParameters.js b/lib/services/keyvault/lib/models/certificateImportParameters.js index 4e2c6ce9f4..1d61814ebf 100644 --- a/lib/services/keyvault/lib/models/certificateImportParameters.js +++ b/lib/services/keyvault/lib/models/certificateImportParameters.js @@ -31,11 +31,16 @@ class CertificateImportParameters { * backing a certificate. * @member {boolean} [certificatePolicy.keyProperties.exportable] Indicates * if the private key can be exported. - * @member {string} [certificatePolicy.keyProperties.keyType] The key type. + * @member {string} [certificatePolicy.keyProperties.kty] The type of key + * pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * @member {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if * the same key pair will be used on certificate renewal. + * @member {string} [certificatePolicy.keyProperties.curve] Elliptic curve + * name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' * @member {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @member {string} [certificatePolicy.secretProperties.contentType] The diff --git a/lib/services/keyvault/lib/models/certificatePolicy.js b/lib/services/keyvault/lib/models/certificatePolicy.js index 94a2841684..168a57e117 100644 --- a/lib/services/keyvault/lib/models/certificatePolicy.js +++ b/lib/services/keyvault/lib/models/certificatePolicy.js @@ -24,11 +24,16 @@ class CertificatePolicy { * certificate. * @member {boolean} [keyProperties.exportable] Indicates if the private key * can be exported. - * @member {string} [keyProperties.keyType] The key type. - * @member {number} [keyProperties.keySize] The key size in bytes. For - * example; 1024 or 2048. + * @member {string} [keyProperties.kty] The type of key pair to be used for + * the certificate. Possible values include: 'EC', 'EC-HSM', 'RSA', + * 'RSA-HSM', 'oct' + * @member {number} [keyProperties.keySize] The key size in bits. For + * example: 2048, 3072, or 4096 for RSA. * @member {boolean} [keyProperties.reuseKey] Indicates if the same key pair * will be used on certificate renewal. + * @member {string} [keyProperties.curve] Elliptic curve name. For valid + * values, see JsonWebKeyCurveName. Possible values include: 'P-256', + * 'P-384', 'P-521', 'P-256K' * @member {object} [secretProperties] Properties of the secret backing a * certificate. * @member {string} [secretProperties.contentType] The media type (MIME diff --git a/lib/services/keyvault/lib/models/certificateUpdateParameters.js b/lib/services/keyvault/lib/models/certificateUpdateParameters.js index 747251a33d..6dd76d349e 100644 --- a/lib/services/keyvault/lib/models/certificateUpdateParameters.js +++ b/lib/services/keyvault/lib/models/certificateUpdateParameters.js @@ -26,11 +26,16 @@ class CertificateUpdateParameters { * backing a certificate. * @member {boolean} [certificatePolicy.keyProperties.exportable] Indicates * if the private key can be exported. - * @member {string} [certificatePolicy.keyProperties.keyType] The key type. + * @member {string} [certificatePolicy.keyProperties.kty] The type of key + * pair to be used for the certificate. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * @member {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if * the same key pair will be used on certificate renewal. + * @member {string} [certificatePolicy.keyProperties.curve] Elliptic curve + * name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' * @member {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @member {string} [certificatePolicy.secretProperties.contentType] The diff --git a/lib/services/keyvault/lib/models/index.d.ts b/lib/services/keyvault/lib/models/index.d.ts index bbb1ad5f0c..8765f80b63 100644 --- a/lib/services/keyvault/lib/models/index.d.ts +++ b/lib/services/keyvault/lib/models/index.d.ts @@ -43,8 +43,9 @@ export interface Attributes { * As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 * * @member {string} [kid] Key identifier. - * @member {string} [kty] JsonWebKey key type (kty). Possible values include: - * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @member {string} [kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible + * values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {array} [keyOps] * @member {buffer} [n] RSA modulus. * @member {buffer} [e] RSA public exponent. @@ -59,7 +60,7 @@ export interface Attributes { * @member {buffer} [t] HSM Token, used with 'Bring Your Own Key'. * @member {string} [crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * @member {buffer} [x] X component of an EC public key. * @member {buffer} [y] Y component of an EC public key. */ @@ -107,8 +108,9 @@ export interface KeyAttributes extends Attributes { * * @member {object} [key] The Json web key. * @member {string} [key.kid] Key identifier. - * @member {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @member {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible + * values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {array} [key.keyOps] * @member {buffer} [key.n] RSA modulus. * @member {buffer} [key.e] RSA public exponent. @@ -123,7 +125,7 @@ export interface KeyAttributes extends Attributes { * @member {buffer} [key.t] HSM Token, used with 'Bring Your Own Key'. * @member {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * @member {buffer} [key.x] X component of an EC public key. * @member {buffer} [key.y] Y component of an EC public key. * @member {object} [attributes] The key management attributes. @@ -413,17 +415,22 @@ export interface CertificateIssuerItem { * Properties of the key pair backing a certificate. * * @member {boolean} [exportable] Indicates if the private key can be exported. - * @member {string} [keyType] The key type. - * @member {number} [keySize] The key size in bytes. For example; 1024 or - * 2048. + * @member {string} [kty] The type of key pair to be used for the certificate. + * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @member {number} [keySize] The key size in bits. For example: 2048, 3072, or + * 4096 for RSA. * @member {boolean} [reuseKey] Indicates if the same key pair will be used on * certificate renewal. + * @member {string} [curve] Elliptic curve name. For valid values, see + * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', + * 'P-256K' */ export interface KeyProperties { exportable?: boolean; - keyType?: string; + kty?: string; keySize?: number; reuseKey?: boolean; + curve?: string; } /** @@ -563,11 +570,16 @@ export interface IssuerParameters { * certificate. * @member {boolean} [keyProperties.exportable] Indicates if the private key * can be exported. - * @member {string} [keyProperties.keyType] The key type. - * @member {number} [keyProperties.keySize] The key size in bytes. For example; - * 1024 or 2048. + * @member {string} [keyProperties.kty] The type of key pair to be used for the + * certificate. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', + * 'oct' + * @member {number} [keyProperties.keySize] The key size in bits. For example: + * 2048, 3072, or 4096 for RSA. * @member {boolean} [keyProperties.reuseKey] Indicates if the same key pair * will be used on certificate renewal. + * @member {string} [keyProperties.curve] Elliptic curve name. For valid + * values, see JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', + * 'P-521', 'P-256K' * @member {object} [secretProperties] Properties of the secret backing a * certificate. * @member {string} [secretProperties.contentType] The media type (MIME type). @@ -632,11 +644,16 @@ export interface CertificatePolicy { * certificate. * @member {boolean} [policy.keyProperties.exportable] Indicates if the private * key can be exported. - * @member {string} [policy.keyProperties.keyType] The key type. - * @member {number} [policy.keyProperties.keySize] The key size in bytes. For - * example; 1024 or 2048. + * @member {string} [policy.keyProperties.kty] The type of key pair to be used + * for the certificate. Possible values include: 'EC', 'EC-HSM', 'RSA', + * 'RSA-HSM', 'oct' + * @member {number} [policy.keyProperties.keySize] The key size in bits. For + * example: 2048, 3072, or 4096 for RSA. * @member {boolean} [policy.keyProperties.reuseKey] Indicates if the same key * pair will be used on certificate renewal. + * @member {string} [policy.keyProperties.curve] Elliptic curve name. For valid + * values, see JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', + * 'P-521', 'P-256K' * @member {object} [policy.secretProperties] Properties of the secret backing * a certificate. * @member {string} [policy.secretProperties.contentType] The media type (MIME @@ -936,7 +953,8 @@ export interface Contacts { * @member {string} kty The type of key to create. For valid values, see * JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', * 'oct' - * @member {number} [keySize] The key size in bytes. For example, 1024 or 2048. + * @member {number} [keySize] The key size in bits. For example: 2048, 3072, or + * 4096 for RSA. * @member {array} [keyOps] * @member {object} [keyAttributes] * @member {string} [keyAttributes.recoveryLevel] Reflects the deletion @@ -949,7 +967,7 @@ export interface Contacts { * key-value pairs. * @member {string} [curve] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' */ export interface KeyCreateParameters { kty: string; @@ -970,8 +988,9 @@ export interface KeyCreateParameters { * software key. * @member {object} key The Json web key * @member {string} [key.kid] Key identifier. - * @member {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @member {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible + * values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {array} [key.keyOps] * @member {buffer} [key.n] RSA modulus. * @member {buffer} [key.e] RSA public exponent. @@ -986,7 +1005,7 @@ export interface KeyCreateParameters { * @member {buffer} [key.t] HSM Token, used with 'Bring Your Own Key'. * @member {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * @member {buffer} [key.x] X component of an EC public key. * @member {buffer} [key.y] Y component of an EC public key. * @member {object} [keyAttributes] The key management attributes. @@ -1031,7 +1050,7 @@ export interface KeyOperationsParameters { * For more information on possible algorithm types, see * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' + * 'ES256K' * @member {buffer} value */ export interface KeySignParameters { @@ -1048,7 +1067,7 @@ export interface KeySignParameters { * @member {string} algorithm The signing/verification algorithm. For more * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K' * @member {buffer} digest The digest used for signing. * @member {buffer} signature The signature to be verified. */ @@ -1156,11 +1175,16 @@ export interface SecretUpdateParameters { * backing a certificate. * @member {boolean} [certificatePolicy.keyProperties.exportable] Indicates if * the private key can be exported. - * @member {string} [certificatePolicy.keyProperties.keyType] The key type. + * @member {string} [certificatePolicy.keyProperties.kty] The type of key pair + * to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' * @member {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * @member {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if * the same key pair will be used on certificate renewal. + * @member {string} [certificatePolicy.keyProperties.curve] Elliptic curve + * name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' * @member {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @member {string} [certificatePolicy.secretProperties.contentType] The media @@ -1244,11 +1268,16 @@ export interface CertificateCreateParameters { * backing a certificate. * @member {boolean} [certificatePolicy.keyProperties.exportable] Indicates if * the private key can be exported. - * @member {string} [certificatePolicy.keyProperties.keyType] The key type. + * @member {string} [certificatePolicy.keyProperties.kty] The type of key pair + * to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' * @member {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * @member {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if * the same key pair will be used on certificate renewal. + * @member {string} [certificatePolicy.keyProperties.curve] Elliptic curve + * name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' * @member {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @member {string} [certificatePolicy.secretProperties.contentType] The media @@ -1329,11 +1358,16 @@ export interface CertificateImportParameters { * backing a certificate. * @member {boolean} [certificatePolicy.keyProperties.exportable] Indicates if * the private key can be exported. - * @member {string} [certificatePolicy.keyProperties.keyType] The key type. + * @member {string} [certificatePolicy.keyProperties.kty] The type of key pair + * to be used for the certificate. Possible values include: 'EC', 'EC-HSM', + * 'RSA', 'RSA-HSM', 'oct' * @member {number} [certificatePolicy.keyProperties.keySize] The key size in - * bytes. For example; 1024 or 2048. + * bits. For example: 2048, 3072, or 4096 for RSA. * @member {boolean} [certificatePolicy.keyProperties.reuseKey] Indicates if * the same key pair will be used on certificate renewal. + * @member {string} [certificatePolicy.keyProperties.curve] Elliptic curve + * name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' * @member {object} [certificatePolicy.secretProperties] Properties of the * secret backing a certificate. * @member {string} [certificatePolicy.secretProperties.contentType] The media diff --git a/lib/services/keyvault/lib/models/jsonWebKey.js b/lib/services/keyvault/lib/models/jsonWebKey.js index 5c0b221573..b79057c182 100644 --- a/lib/services/keyvault/lib/models/jsonWebKey.js +++ b/lib/services/keyvault/lib/models/jsonWebKey.js @@ -18,8 +18,9 @@ class JsonWebKey { /** * Create a JsonWebKey. * @member {string} [kid] Key identifier. - * @member {string} [kty] JsonWebKey key type (kty). Possible values include: - * 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @member {string} [kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. + * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {array} [keyOps] * @member {buffer} [n] RSA modulus. * @member {buffer} [e] RSA public exponent. @@ -34,7 +35,7 @@ class JsonWebKey { * @member {buffer} [t] HSM Token, used with 'Bring Your Own Key'. * @member {string} [crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * @member {buffer} [x] X component of an EC public key. * @member {buffer} [y] Y component of an EC public key. */ diff --git a/lib/services/keyvault/lib/models/keyBundle.js b/lib/services/keyvault/lib/models/keyBundle.js index 2c554e4c9e..6efcc4d4af 100644 --- a/lib/services/keyvault/lib/models/keyBundle.js +++ b/lib/services/keyvault/lib/models/keyBundle.js @@ -21,8 +21,9 @@ class KeyBundle { * Create a KeyBundle. * @member {object} [key] The Json web key. * @member {string} [key.kid] Key identifier. - * @member {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @member {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. + * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {array} [key.keyOps] * @member {buffer} [key.n] RSA modulus. * @member {buffer} [key.e] RSA public exponent. @@ -37,7 +38,7 @@ class KeyBundle { * @member {buffer} [key.t] HSM Token, used with 'Bring Your Own Key'. * @member {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * @member {buffer} [key.x] X component of an EC public key. * @member {buffer} [key.y] Y component of an EC public key. * @member {object} [attributes] The key management attributes. diff --git a/lib/services/keyvault/lib/models/keyCreateParameters.js b/lib/services/keyvault/lib/models/keyCreateParameters.js index f3fe1f1651..2eef6d475c 100644 --- a/lib/services/keyvault/lib/models/keyCreateParameters.js +++ b/lib/services/keyvault/lib/models/keyCreateParameters.js @@ -22,8 +22,8 @@ class KeyCreateParameters { * @member {string} kty The type of key to create. For valid values, see * JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', * 'oct' - * @member {number} [keySize] The key size in bytes. For example, 1024 or - * 2048. + * @member {number} [keySize] The key size in bits. For example: 2048, 3072, + * or 4096 for RSA. * @member {array} [keyOps] * @member {object} [keyAttributes] * @member {string} [keyAttributes.recoveryLevel] Reflects the deletion @@ -37,7 +37,7 @@ class KeyCreateParameters { * key-value pairs. * @member {string} [curve] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' */ constructor() { } diff --git a/lib/services/keyvault/lib/models/keyImportParameters.js b/lib/services/keyvault/lib/models/keyImportParameters.js index 224f128ce8..fc520230be 100644 --- a/lib/services/keyvault/lib/models/keyImportParameters.js +++ b/lib/services/keyvault/lib/models/keyImportParameters.js @@ -23,8 +23,9 @@ class KeyImportParameters { * software key. * @member {object} key The Json web key * @member {string} [key.kid] Key identifier. - * @member {string} [key.kty] JsonWebKey key type (kty). Possible values - * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + * @member {string} [key.kty] JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. + * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' * @member {array} [key.keyOps] * @member {buffer} [key.n] RSA modulus. * @member {buffer} [key.e] RSA public exponent. @@ -39,7 +40,7 @@ class KeyImportParameters { * @member {buffer} [key.t] HSM Token, used with 'Bring Your Own Key'. * @member {string} [key.crv] Elliptic curve name. For valid values, see * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', - * 'SECP256K1' + * 'P-256K' * @member {buffer} [key.x] X component of an EC public key. * @member {buffer} [key.y] Y component of an EC public key. * @member {object} [keyAttributes] The key management attributes. diff --git a/lib/services/keyvault/lib/models/keyProperties.js b/lib/services/keyvault/lib/models/keyProperties.js index af010fb036..cceb85ff50 100644 --- a/lib/services/keyvault/lib/models/keyProperties.js +++ b/lib/services/keyvault/lib/models/keyProperties.js @@ -19,11 +19,16 @@ class KeyProperties { * Create a KeyProperties. * @member {boolean} [exportable] Indicates if the private key can be * exported. - * @member {string} [keyType] The key type. - * @member {number} [keySize] The key size in bytes. For example; 1024 or - * 2048. + * @member {string} [kty] The type of key pair to be used for the + * certificate. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', + * 'oct' + * @member {number} [keySize] The key size in bits. For example: 2048, 3072, + * or 4096 for RSA. * @member {boolean} [reuseKey] Indicates if the same key pair will be used * on certificate renewal. + * @member {string} [curve] Elliptic curve name. For valid values, see + * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', + * 'P-256K' */ constructor() { } @@ -49,7 +54,7 @@ class KeyProperties { name: 'Boolean' } }, - keyType: { + kty: { required: false, serializedName: 'kty', type: { @@ -69,6 +74,13 @@ class KeyProperties { type: { name: 'Boolean' } + }, + curve: { + required: false, + serializedName: 'crv', + type: { + name: 'String' + } } } } diff --git a/lib/services/keyvault/lib/models/keySignParameters.js b/lib/services/keyvault/lib/models/keySignParameters.js index 2adf801f80..d2255b7aa3 100644 --- a/lib/services/keyvault/lib/models/keySignParameters.js +++ b/lib/services/keyvault/lib/models/keySignParameters.js @@ -21,7 +21,7 @@ class KeySignParameters { * For more information on possible algorithm types, see * JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', - * 'ECDSA256' + * 'ES256K' * @member {buffer} value */ constructor() { diff --git a/lib/services/keyvault/lib/models/keyVerifyParameters.js b/lib/services/keyvault/lib/models/keyVerifyParameters.js index b6c6b935b6..ab1689822f 100644 --- a/lib/services/keyvault/lib/models/keyVerifyParameters.js +++ b/lib/services/keyvault/lib/models/keyVerifyParameters.js @@ -20,7 +20,7 @@ class KeyVerifyParameters { * @member {string} algorithm The signing/verification algorithm. For more * information on possible algorithm types, see JsonWebKeySignatureAlgorithm. * Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', - * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' + * 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K' * @member {buffer} digest The digest used for signing. * @member {buffer} signature The signature to be verified. */ diff --git a/lib/services/keyvault/package.json b/lib/services/keyvault/package.json new file mode 100644 index 0000000000..cfb25fea47 --- /dev/null +++ b/lib/services/keyvault/package.json @@ -0,0 +1,25 @@ +{ + "name": "azure-keyvault", + "author": "Microsoft Corporation", + "description": "KeyVaultClient Library with typescript type definitions for node", + "version": "3.0.4-preview", + "dependencies": { + "ms-rest": "^2.3.3", + "ms-rest-azure": "^2.5.5" + }, + "keywords": [ + "node", + "azure" + ], + "license": "MIT", + "main": "./lib/keyVaultClient.js", + "types": "./lib/keyVaultClient.d.ts", + "homepage": "http://github.com/azure/azure-sdk-for-node", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-node.git" + }, + "bugs": { + "url": "http://github.com/Azure/azure-sdk-for-node/issues" + } +}