[feat] kms.getKey return the SigningAlgorithm used in key creation
Closed this issue · 1 comments
davidkhala commented
Currently, the returned info from kms.getKey come in following format
{
...
definedTags: {},
displayName: 'ec',
freeformTags: {},
keyShape: { algorithm: 'ECDSA', length: 32, curveId: 'NIST_P256' },
protectionMode: 'SOFTWARE',
lifecycleState: 'ENABLED',
timeCreated: '2022-07-07T08:04:11.437Z',
timeOfDeletion: null,
restoredFromKeyId: null,
replicaDetails: undefined,
isPrimary: true,
autoKeyRotationSchedule: null,
autoKeyRotationStatus: null,
externalKeyReference: null
}
While we can guess and map it back to enum SigningAlgorithm, can we let it return exactly same with the SigningAlgorithm string?
enum SigningAlgorithm {
Sha224RsaPkcsPss = "SHA_224_RSA_PKCS_PSS",
Sha256RsaPkcsPss = "SHA_256_RSA_PKCS_PSS",
Sha384RsaPkcsPss = "SHA_384_RSA_PKCS_PSS",
Sha512RsaPkcsPss = "SHA_512_RSA_PKCS_PSS",
Sha224RsaPkcs1V15 = "SHA_224_RSA_PKCS1_V1_5",
Sha256RsaPkcs1V15 = "SHA_256_RSA_PKCS1_V1_5",
Sha384RsaPkcs1V15 = "SHA_384_RSA_PKCS1_V1_5",
Sha512RsaPkcs1V15 = "SHA_512_RSA_PKCS1_V1_5",
EcdsaSha256 = "ECDSA_SHA_256",
EcdsaSha384 = "ECDSA_SHA_384",
EcdsaSha512 = "ECDSA_SHA_512"
}
davidkhala commented
close, I make a mistatke here.