Reputation: 1
Is it in any way possible to restrict AWS KMS signing operation with a EC private key to a particular AWS Nitro Enclave? That is, make is such that only the enclave with a given PCR hash is capable/allowed to call kms:Sign
on a certain key.
This sounds like something that the EC key's kms:RecipientAttestation:ImageSha384
condition policy should handle, but based on the doc, this policy is only applicable to Decrypt
, DeriveSharedSecret
, GenerateDataKey
, GenerateDataKeyPair
, and GenerateRandom
operations... Or am I missing something?
Upvotes: 0
Views: 57
Reputation: 31
Correct, according to the doc, you cannot use the Nitro Enclaves IAM Conditions for kms:Sign
. There are a couple paths forward here that might be appropriate depending on your use case:
GenerateDataKeyPair
(see https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-key-pairs for docs on using this key for signing).In both of these cases, you will use the kms:RecipientAttestation
to restrict access to the kms:Decrypt
operation, that is needed to decrypt the private key. You can use the same pattern to deliver any secret to a Nitro Enclave.
The downside here is that you will no longer be able to use kms:GetPublicKey
since the keypair is not managed by KMS, and you will need a new way for clients to get the public key. If kms:GetPublicKey
is required, then there is a third option that may work eventually:
Upvotes: 0