@scaleway/sdk-key-manager 2.20.0 → 2.22.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.
|
@@ -6,10 +6,7 @@ const GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS = [
|
|
|
6
6
|
"unknown_wrapping_algorithm",
|
|
7
7
|
"rsa_oaep_2048_sha256",
|
|
8
8
|
"rsa_oaep_3072_sha256",
|
|
9
|
-
"rsa_oaep_4096_sha256"
|
|
10
|
-
"rsa_aes_key_wrap_2048_sha256",
|
|
11
|
-
"rsa_aes_key_wrap_3072_sha256",
|
|
12
|
-
"rsa_aes_key_wrap_4096_sha256"
|
|
9
|
+
"rsa_oaep_4096_sha256"
|
|
13
10
|
];
|
|
14
11
|
/** Lists all values of the enum {@link KeyAlgorithmAsymmetricEncryption}. */
|
|
15
12
|
const KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS = [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CreateKeyRequest, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GenerateKeyMaterialImportParametersRequest, GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, GenerateKeyMaterialImportParametersResponse, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotation, KeyRotationPolicy, KeyRotationStatus, KeyState, KeyUsage, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeyRotationsRequest, ListKeyRotationsRequestOrderBy, ListKeyRotationsResponse, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
|
|
1
|
+
import { CreateKeyRequest, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GenerateKeyMaterialImportParametersRequest, GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, GenerateKeyMaterialImportParametersResponse, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, ImportKeyMaterialRequestEncryptedKeyMaterial, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotation, KeyRotationPolicy, KeyRotationStatus, KeyState, KeyUsage, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeyRotationsRequest, ListKeyRotationsRequestOrderBy, ListKeyRotationsResponse, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
|
|
2
2
|
import { API } from "./api.gen.js";
|
|
3
3
|
import { DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES } from "./constants.gen.js";
|
|
4
4
|
import { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse } from "./marshalling.gen.js";
|
|
5
5
|
import { validation_rules_gen_d_exports } from "./validation-rules.gen.js";
|
|
6
6
|
declare namespace index_gen_d_exports {
|
|
7
|
-
export { API, CreateKeyRequest, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, GenerateDataKeyRequest, GenerateKeyMaterialImportParametersRequest, GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, GenerateKeyMaterialImportParametersResponse, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotation, KeyRotationPolicy, KeyRotationStatus, KeyState, KeyUsage, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeyRotationsRequest, ListKeyRotationsRequestOrderBy, ListKeyRotationsResponse, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, validation_rules_gen_d_exports as ValidationRules, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
|
|
7
|
+
export { API, CreateKeyRequest, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, GenerateDataKeyRequest, GenerateKeyMaterialImportParametersRequest, GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, GenerateKeyMaterialImportParametersResponse, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, ImportKeyMaterialRequestEncryptedKeyMaterial, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotation, KeyRotationPolicy, KeyRotationStatus, KeyState, KeyUsage, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeyRotationsRequest, ListKeyRotationsRequestOrderBy, ListKeyRotationsResponse, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, validation_rules_gen_d_exports as ValidationRules, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
-
export { API, type CreateKeyRequest, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, type DataKey, type DataKeyAlgorithmSymmetricEncryption, type DecryptRequest, type DecryptResponse, type DeleteKeyMaterialRequest, type DeleteKeyRequest, type DisableKeyRequest, type EnableKeyRequest, type EncryptRequest, type EncryptResponse, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, type GenerateDataKeyRequest, type GenerateKeyMaterialImportParametersRequest, type GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, type GenerateKeyMaterialImportParametersResponse, type GetKeyRequest, type GetPublicKeyRequest, type ImportKeyMaterialRequest, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, type Key, type KeyAlgorithmAsymmetricEncryption, type KeyAlgorithmAsymmetricSigning, type KeyAlgorithmKeyEncapsulation, type KeyAlgorithmSymmetricEncryption, type KeyOrigin, type KeyProtectionLevel, type KeyRotation, type KeyRotationPolicy, type KeyRotationStatus, type KeyState, type KeyUsage, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, type ListAlgorithmsRequest, type ListAlgorithmsRequestUsage, type ListAlgorithmsResponse, type ListAlgorithmsResponseAlgorithm, type ListKeyRotationsRequest, type ListKeyRotationsRequestOrderBy, type ListKeyRotationsResponse, type ListKeysRequest, type ListKeysRequestOrderBy, type ListKeysRequestUsage, type ListKeysResponse, type ProtectKeyRequest, type PublicKey, type RestoreKeyRequest, type RotateKeyRequest, type SignRequest, type SignResponse, type UnprotectKeyRequest, type UnwrapKeyRequest, type UnwrapKeyResponse, type UpdateKeyRequest, validation_rules_gen_d_exports as ValidationRules, type VerifyRequest, type VerifyResponse, type WrapKeyRequest, type WrapKeyResponse, index_gen_d_exports, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
|
|
10
|
+
export { API, type CreateKeyRequest, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, type DataKey, type DataKeyAlgorithmSymmetricEncryption, type DecryptRequest, type DecryptResponse, type DeleteKeyMaterialRequest, type DeleteKeyRequest, type DisableKeyRequest, type EnableKeyRequest, type EncryptRequest, type EncryptResponse, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, type GenerateDataKeyRequest, type GenerateKeyMaterialImportParametersRequest, type GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, type GenerateKeyMaterialImportParametersResponse, type GetKeyRequest, type GetPublicKeyRequest, type ImportKeyMaterialRequest, type ImportKeyMaterialRequestEncryptedKeyMaterial, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, type Key, type KeyAlgorithmAsymmetricEncryption, type KeyAlgorithmAsymmetricSigning, type KeyAlgorithmKeyEncapsulation, type KeyAlgorithmSymmetricEncryption, type KeyOrigin, type KeyProtectionLevel, type KeyRotation, type KeyRotationPolicy, type KeyRotationStatus, type KeyState, type KeyUsage, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, type ListAlgorithmsRequest, type ListAlgorithmsRequestUsage, type ListAlgorithmsResponse, type ListAlgorithmsResponseAlgorithm, type ListKeyRotationsRequest, type ListKeyRotationsRequestOrderBy, type ListKeyRotationsResponse, type ListKeysRequest, type ListKeysRequestOrderBy, type ListKeysRequestUsage, type ListKeysResponse, type ProtectKeyRequest, type PublicKey, type RestoreKeyRequest, type RotateKeyRequest, type SignRequest, type SignResponse, type UnprotectKeyRequest, type UnwrapKeyRequest, type UnwrapKeyResponse, type UpdateKeyRequest, validation_rules_gen_d_exports as ValidationRules, type VerifyRequest, type VerifyResponse, type WrapKeyRequest, type WrapKeyResponse, index_gen_d_exports, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
|
|
@@ -191,11 +191,34 @@ const marshalGenerateDataKeyRequest = (request, defaults) => ({
|
|
|
191
191
|
without_plaintext: request.withoutPlaintext
|
|
192
192
|
});
|
|
193
193
|
const marshalGenerateKeyMaterialImportParametersRequest = (request, defaults) => ({ wrapping_algorithm: request.wrappingAlgorithm });
|
|
194
|
+
const marshalImportKeyMaterialRequestEncryptedKeyMaterial = (request, defaults) => ({
|
|
195
|
+
data: request.data,
|
|
196
|
+
import_token: request.importToken
|
|
197
|
+
});
|
|
194
198
|
const marshalImportKeyMaterialRequest = (request, defaults) => ({
|
|
195
|
-
|
|
196
|
-
|
|
199
|
+
salt: request.salt,
|
|
200
|
+
...resolveOneOf([{
|
|
201
|
+
param: "key_material",
|
|
202
|
+
value: request.keyMaterial
|
|
203
|
+
}, {
|
|
204
|
+
param: "encrypted_key_material",
|
|
205
|
+
value: request.encryptedKeyMaterial !== void 0 ? marshalImportKeyMaterialRequestEncryptedKeyMaterial(request.encryptedKeyMaterial, defaults) : void 0
|
|
206
|
+
}])
|
|
197
207
|
});
|
|
198
|
-
const marshalSignRequest = (request, defaults) => ({
|
|
208
|
+
const marshalSignRequest = (request, defaults) => ({ ...resolveOneOf([
|
|
209
|
+
{
|
|
210
|
+
param: "digest",
|
|
211
|
+
value: request.digest
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
param: "msg",
|
|
215
|
+
value: request.msg
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
param: "external_mu",
|
|
219
|
+
value: request.externalMu
|
|
220
|
+
}
|
|
221
|
+
]) });
|
|
199
222
|
const marshalUnwrapKeyRequest = (request, defaults) => ({
|
|
200
223
|
associated_data: request.associatedData,
|
|
201
224
|
ciphertext: request.ciphertext
|
|
@@ -207,8 +230,14 @@ const marshalUpdateKeyRequest = (request, defaults) => ({
|
|
|
207
230
|
tags: request.tags
|
|
208
231
|
});
|
|
209
232
|
const marshalVerifyRequest = (request, defaults) => ({
|
|
210
|
-
|
|
211
|
-
|
|
233
|
+
signature: request.signature,
|
|
234
|
+
...resolveOneOf([{
|
|
235
|
+
param: "digest",
|
|
236
|
+
value: request.digest
|
|
237
|
+
}, {
|
|
238
|
+
param: "msg",
|
|
239
|
+
value: request.msg
|
|
240
|
+
}])
|
|
212
241
|
});
|
|
213
242
|
const marshalWrapKeyRequest = (request, defaults) => ({
|
|
214
243
|
associated_data: request.associatedData,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Region } from "@scaleway/sdk-client";
|
|
2
2
|
//#region src/v1alpha1/types.gen.d.ts
|
|
3
3
|
export type DataKeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
|
|
4
|
-
export type GenerateKeyMaterialImportParametersRequestWrappingAlgorithm = 'unknown_wrapping_algorithm' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256'
|
|
4
|
+
export type GenerateKeyMaterialImportParametersRequestWrappingAlgorithm = 'unknown_wrapping_algorithm' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256';
|
|
5
5
|
export type KeyAlgorithmAsymmetricEncryption = 'unknown_asymmetric_encryption' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256';
|
|
6
6
|
export type KeyAlgorithmAsymmetricSigning = 'unknown_asymmetric_signing' | 'ec_p256_sha256' | 'ec_p384_sha384' | 'rsa_pss_2048_sha256' | 'rsa_pss_3072_sha256' | 'rsa_pss_4096_sha256' | 'rsa_pkcs1_2048_sha256' | 'rsa_pkcs1_3072_sha256' | 'rsa_pkcs1_4096_sha256' | 'ml_dsa_44' | 'ml_dsa_65' | 'ml_dsa_87' | 'ec_secp256k1_sha256';
|
|
7
7
|
export type KeyAlgorithmKeyEncapsulation = 'unknown_key_encapsulation' | 'ml_kem_768' | 'ml_kem_1024';
|
|
@@ -50,6 +50,16 @@ export interface KeyUsage {
|
|
|
50
50
|
*/
|
|
51
51
|
keyEncapsulation?: KeyAlgorithmKeyEncapsulation;
|
|
52
52
|
}
|
|
53
|
+
export interface ImportKeyMaterialRequestEncryptedKeyMaterial {
|
|
54
|
+
/**
|
|
55
|
+
* This material must be encrypted using the public key and the exact wrapping algorithm returned by the `GetKeyMaterialImportParameters` method.
|
|
56
|
+
*/
|
|
57
|
+
data: string;
|
|
58
|
+
/**
|
|
59
|
+
* The secure import token returned by the `GetKeyMaterialImportParameters` method.
|
|
60
|
+
*/
|
|
61
|
+
importToken: string;
|
|
62
|
+
}
|
|
53
63
|
export interface ListAlgorithmsResponseAlgorithm {
|
|
54
64
|
usage: string;
|
|
55
65
|
name: string;
|
|
@@ -360,9 +370,8 @@ export type GenerateKeyMaterialImportParametersRequest = {
|
|
|
360
370
|
*/
|
|
361
371
|
keyId: string;
|
|
362
372
|
/**
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
*/
|
|
373
|
+
* Supported values are: `rsa_oaep_2048_sha256`, `rsa_oaep_3072_sha256`, `rsa_oaep_4096_sha256`.
|
|
374
|
+
*/
|
|
366
375
|
wrappingAlgorithm?: GenerateKeyMaterialImportParametersRequestWrappingAlgorithm;
|
|
367
376
|
};
|
|
368
377
|
export interface GenerateKeyMaterialImportParametersResponse {
|
|
@@ -409,13 +418,21 @@ export type ImportKeyMaterialRequest = {
|
|
|
409
418
|
*/
|
|
410
419
|
keyId: string;
|
|
411
420
|
/**
|
|
412
|
-
* The key material is a random sequence of bytes used to derive a cryptographic key.
|
|
421
|
+
* @deprecated Deprecated. Use `encrypted_key_material` instead. The key material is a random sequence of bytes used to derive a cryptographic key.
|
|
422
|
+
*
|
|
423
|
+
* One-of ('material'): at most one of 'keyMaterial', 'encryptedKeyMaterial' could be set.
|
|
413
424
|
*/
|
|
414
|
-
keyMaterial
|
|
425
|
+
keyMaterial?: string;
|
|
415
426
|
/**
|
|
416
427
|
* A salt is random data added to key material to ensure unique derived keys, even if the input is similar. It helps strengthen security when the key material has low randomness (low entropy).
|
|
417
428
|
*/
|
|
418
429
|
salt?: string;
|
|
430
|
+
/**
|
|
431
|
+
* This material must be encrypted using the public key and the exact wrapping algorithm returned by the `GetKeyMaterialImportParameters` method.
|
|
432
|
+
*
|
|
433
|
+
* One-of ('material'): at most one of 'keyMaterial', 'encryptedKeyMaterial' could be set.
|
|
434
|
+
*/
|
|
435
|
+
encryptedKeyMaterial?: ImportKeyMaterialRequestEncryptedKeyMaterial;
|
|
419
436
|
};
|
|
420
437
|
export type ListAlgorithmsRequest = {
|
|
421
438
|
/**
|
|
@@ -547,9 +564,25 @@ export type SignRequest = {
|
|
|
547
564
|
*/
|
|
548
565
|
keyId: string;
|
|
549
566
|
/**
|
|
550
|
-
|
|
567
|
+
* For ECDSA and RSA keys, the digest generated using the key's hashing algorithm: 32 bytes (SHA-256) or 48 bytes (SHA-384).
|
|
568
|
+
The 64-byte bound only exists for the ML-DSA backward-compatibility case below.
|
|
569
|
+
Also accepted for ML-DSA for backward compatibility only; signatures may not conform to the ML-DSA spec, not recommended for new usage. Prefer `message` or `external_mu` for ML-DSA.
|
|
570
|
+
*
|
|
571
|
+
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
572
|
+
*/
|
|
573
|
+
digest?: string;
|
|
574
|
+
/**
|
|
575
|
+
* Only supported for ML-DSA keys (`raw` signing): the server computes the μ message representative internally before signing. Between 1 and 4096 bytes.
|
|
576
|
+
*
|
|
577
|
+
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
551
578
|
*/
|
|
552
|
-
|
|
579
|
+
msg?: string;
|
|
580
|
+
/**
|
|
581
|
+
* Must equal SHAKE256(tr ‖ 0x00 ‖ 0x00 ‖ message), where `tr` is the SHAKE256 of the key's public key. Signatures produced from other pre-hash computations (e.g. HashML-DSA) cannot be verified through this API.
|
|
582
|
+
*
|
|
583
|
+
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
584
|
+
*/
|
|
585
|
+
externalMu?: string;
|
|
553
586
|
};
|
|
554
587
|
export interface SignResponse {
|
|
555
588
|
/**
|
|
@@ -620,9 +653,17 @@ export type VerifyRequest = {
|
|
|
620
653
|
*/
|
|
621
654
|
keyId: string;
|
|
622
655
|
/**
|
|
623
|
-
*
|
|
656
|
+
* For ECDSA and RSA keys, the digest of the original message, generated using the key's hashing algorithm.
|
|
657
|
+
*
|
|
658
|
+
* One-of ('payload'): at most one of 'digest', 'msg' could be set.
|
|
659
|
+
*/
|
|
660
|
+
digest?: string;
|
|
661
|
+
/**
|
|
662
|
+
* For ML-DSA keys, the full original message. This also verifies signatures made with `raw` or `external_mu`: send the message whose μ was signed, not the μ itself (a μ payload always fails). Messages over 4096 bytes cannot be verified through this endpoint.
|
|
663
|
+
*
|
|
664
|
+
* One-of ('payload'): at most one of 'digest', 'msg' could be set.
|
|
624
665
|
*/
|
|
625
|
-
|
|
666
|
+
msg?: string;
|
|
626
667
|
/**
|
|
627
668
|
* The message signature to verify.
|
|
628
669
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-key-manager",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"description": "Scaleway SDK key-manager",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@scaleway/random-name": "6.0.2",
|
|
36
|
-
"@scaleway/sdk-std": "2.9.
|
|
36
|
+
"@scaleway/sdk-std": "2.9.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@repo/configs": "^0.1.1",
|
|
40
|
-
"@scaleway/sdk-client": "^2.
|
|
40
|
+
"@scaleway/sdk-client": "^2.15.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@scaleway/sdk-client": "^2.
|
|
43
|
+
"@scaleway/sdk-client": "^2.15.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"package:check": "pnpm publint",
|