Before you start
- Use a test AWS account, a customer-managed KMS key whose key spec supports the action, and separate roles for the permitted and denied attempts.
- Keep an administrator who can restore the key policy. Check the key policy, identity policies and grants before testing the action.
Data and access
Who does what
Choose your test operation
Record the test key, test roles and exact operation. For a signing test, check that the key’s usage permits signing and choose a supported algorithm.
Check. The test key and operation match the record. For signing, the key lists signing as an allowed use and supports the selected algorithm.
Review what authorizes each role
Check the key policy and the role’s AWS identity policies, plus any grants on the test key. Keep an authorized administrator able to restore the policy.
Check. For each role, identify the policy or grant you expect to allow the action, or record that you found no applicable grant.
Compare allowed and denied results
Run the same test action as the intended role and as a role without that permission. Check that a role allowed to use the key cannot edit the policy unless you intentionally granted both permissions.
Check. Keep the response for both roles on the same key and operation. Check policy-edit access separately from key use.
Check your result
The results establish access for the exact AWS key, roles and action you tested. Confirm separately whether any step calls a KeySigner approval.
If you get stuck
An unexpected role can use the key
Review AWS KMS grants as well as the key and identity policies. Compare the principal in CloudTrail with the role you intended to test before changing access to the key.