Using kms:GetKeyRotationStatus on AWS managed key(ex aws/acm), AWS doesn't grant access to this API call to anyone, including the account owner. Is that correct?

0

I'm testing Java AP with KMS API. When I do kms:GetKeyRotationStatus on AWS managed key "aws/acm", It will fail no matter what permissions are set.

AccessDeniedException is displayed. <User: arn:aws:iam::xxxxxxxx:user/zzzz is not authorized to perform: kms:GetKeyRotationStatus on resource: arn:aws:kms:ap-northeast-1:xxxxxxxxxx:key/xxxxxxxxxxxxxxxxxx because no resource-based policy allows the kms:GetKeyRotationStatus action>

So, Although the documentation doesn't explain it, using kms:GetKeyRotationStatus on AWS managed key(ex aws/acm), AWS doesn't grant access to this API call to anyone, including the account owner. Is that correct?

  • I have the exactly same problem, also with aws/acm. The below answer doesn't help me.

feita há 2 anos421 visualizações
1 Resposta
0

Hi, I was able to get the KeyRotationStatus on a aws-managed kms key.

Make sure that the user/role used by the JAVA AP is in the same region as the KMS managed key, and that it really has enough permissions. You should then be able to run the following:

$aws kms list-keys                                                                                                                                                                                                       
{
    "Keys": [
        {
            "KeyId": "e1xxxxx-e6xx-45xx-xxxx-xxxxxxxxxxxxx",
            "KeyArn": "arn:aws:kms:us-west-2:000000000000:key/e1xxxxx-e6xx-45xx-xxxx-xxxxxxxxxxxxx"
        }
    ]
}

followed by

$ aws kms get-key-rotation-status --key-id e1xxxxx-e6xx-45xx-xxxx-xxxxxxxxxxxxx                                                                                                                                           
{
    "KeyRotationEnabled": true
}

That key id belongs to an aws-managed KMS key (aws/sns)

Hope this helps.

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas