fix: requested changes

This commit is contained in:
Daniel Hougaard
2025-04-04 04:21:00 +04:00
parent c7416c825c
commit 53b5497271
23 changed files with 222 additions and 202 deletions
+8 -12
View File
@@ -1,21 +1,17 @@
import {
AsymmetricKeySignVerify,
KmsKeyIntent,
SymmetricKeyEncryptDecrypt
} from "@app/hooks/api/cmeks";
import { AsymmetricKeyAlgorithm, KmsKeyUsage, SymmetricKeyAlgorithm } from "@app/hooks/api/cmeks";
export const kmsKeyUsageOptions: Record<
KmsKeyIntent,
KmsKeyUsage,
{
label: string;
tooltip: string;
}
> = {
[KmsKeyIntent.ENCRYPT_DECRYPT]: {
[KmsKeyUsage.ENCRYPT_DECRYPT]: {
label: "Encrypt/Decrypt",
tooltip: "Use the key only to encrypt and decrypt data."
},
[KmsKeyIntent.SIGN_VERIFY]: {
[KmsKeyUsage.SIGN_VERIFY]: {
label: "Sign/Verify",
tooltip:
"Key pairs for digital signing. Uses the private key for signing and the public key for verification."
@@ -23,9 +19,9 @@ export const kmsKeyUsageOptions: Record<
};
export const keyUsageDefaultOption: Record<
KmsKeyIntent,
SymmetricKeyEncryptDecrypt | AsymmetricKeySignVerify
KmsKeyUsage,
SymmetricKeyAlgorithm | AsymmetricKeyAlgorithm
> = {
[KmsKeyIntent.ENCRYPT_DECRYPT]: SymmetricKeyEncryptDecrypt.AES_GCM_256,
[KmsKeyIntent.SIGN_VERIFY]: AsymmetricKeySignVerify.RSA_4096
[KmsKeyUsage.ENCRYPT_DECRYPT]: SymmetricKeyAlgorithm.AES_GCM_256,
[KmsKeyUsage.SIGN_VERIFY]: AsymmetricKeyAlgorithm.RSA_4096
};