Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 2.64 KB

kms-key-policy.md

File metadata and controls

28 lines (24 loc) · 2.64 KB

CloudSploit

AWS / KMS / KMS Key Policy

Quick Info

Plugin Title KMS Key Policy
Cloud AWS
Category KMS
Description Validates the KMS key policy to ensure least-privilege access.
More Info KMS key policies should be designed to limit the number of users who can perform encrypt and decrypt operations. Each application should use its own key to avoid over exposure.
AWS Link http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
Recommended Action Modify the KMS key policy to remove any wildcards and limit the number of users and roles that can perform encrypt and decrypt operations using the key.

Detailed Remediation Steps

  1. Log into the AWS Management Console.
  2. Select the "Services" option and search for KMS.
  3. Scroll down the left navigation panel and choose "Customer managed keys" under "Key Management Service".
  4. Select the "KMS key" that needs to be verified.
  5. On the "Customer managed keys" page scroll down and on the "Key policy" tab click on the "Switch to policy view" button.
  6. In the "key policy" tab if the "Principal" element value is set to ("AWS" : * ) and there are no Condition clauses to filter the access then the selected "KMS policy" is using wildcards.
  7. Repeat step number 2 - 6 to verify other "KMS key" in the region.
  8. Navigate to "Customer Managed Keys" under "Key Management Service" and select the "KMS key" that needs to modify to restrict the he number of users and roles that can perform encrypt and decrypt operation and have any wildcards.
  9. On the "Customer managed keys" page scroll down and on the "Key policy" tab click on the "Switch to policy view" button and replace the "Everyone" grantee ("AWS" : * ) from the Principal element value with an "AWS account ID" or "AWS ARN" and click on the "Save" changes button.
  10. Restrict the number of users and roles that can use the selected "KMS key" for encrypt and decrypt operations by making each application should use its own key .
  11. Repeat steps number 7 - 10 to modify the "KMS key" policy of other "KMS keys" in the selected region.