AWS kms medium security documentation change
Summary
Enhanced grant security best practices with specific parameter guidance and updated duplicate grant warnings
Security assessment
Strengthened least privilege guidance by requiring specific grant parameters (operations, principals, constraints) and added SourceArn constraint recommendation. Revised duplicate grant section removes previous privilege escalation warning but adds quota management guidance. Security impact: improves access control precision but reduces emphasis on a known security risk.
Diff
diff --git a/kms/latest/developerguide/grant-best-practices.md b/kms/latest/developerguide/grant-best-practices.md index fbd794660..4243b2d3b 100644 --- a//kms/latest/developerguide/grant-best-practices.md +++ b//kms/latest/developerguide/grant-best-practices.md @@ -11 +11 @@ AWS KMS recommends the following best practices when creating, using, and managi - * Limit the permissions in the grant to those that the grantee principal requires. Use the principle of [least privileged access](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). + * Limit the permissions in the grant to those that the grantee requires. Use the principle of [least privileged access](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). Be as specific as possible in all grant parameters: @@ -13 +13,5 @@ AWS KMS recommends the following best practices when creating, using, and managi - * Use a specific grantee principal, such as an IAM role, and give the grantee principal permission to use only the API operations that they require. + * Specify only the [grant operations](./grants.html#terms-grant-operations) that the grantee needs. + + * Use a specific [grantee principal](./grants.html#terms-grantee-principal), such as an IAM role, or a specific [grantee service principal](./grants.html#terms-grantee-service-principal). + + * Use [grant constraints](./grants.html#terms-grant-constraint) to further restrict the grant. @@ -21 +25 @@ Use the [EncryptionContextEqual](./create-grant-overview.html#grant-constraints) - * Delete duplicate grants. Duplicate grants have the same key ARN, API actions, grantee principal, encryption context, and name. If you retire or revoke the original grant but leave the duplicates, the leftover duplicate grants constitute unintended escalations of privilege. To avoid duplicating grants when retrying a `CreateGrant` request, use the [Name parameter](./create-grant-overview.html#grant-create). To detect duplicate grants, use the [ListGrants](https://docs.aws.amazon.com/kms/latest/APIReference/API_ListGrants.html) operation. If you accidentally create a duplicate grant, retire or revoke it as soon as possible. + * When creating grants for supported AWS services, use the [SourceArn grant constraint](./create-grant-overview.html#terms-source-arn-constraint) to restrict the grant to a specific resource. @@ -23 +27 @@ Use the [EncryptionContextEqual](./create-grant-overview.html#grant-constraints) -###### Note + * Be aware of duplicate grants. Duplicate grants have the same parameters except for the grant name. Needless duplication can cause you to reach the [Grants per KMS key quota](./resource-limits.html#grants-per-key). To avoid duplicating grants when retrying a `CreateGrant` request, use the [Name parameter](./create-grant-overview.html#grant-create). To detect duplicate grants, use the [ListGrants](https://docs.aws.amazon.com/kms/latest/APIReference/API_ListGrants.html) operation. @@ -25 +29 @@ Use the [EncryptionContextEqual](./create-grant-overview.html#grant-constraints) -Grants for [AWS managed keys](./concepts.html#aws-managed-key) might look like duplicates but have different grantee principals. +###### Note @@ -27 +31 @@ Grants for [AWS managed keys](./concepts.html#aws-managed-key) might look like d -The `GranteePrincipal` field in the `ListGrants` response usually contains the grantee principal of the grant. However, when the grantee principal in the grant is an AWS service, the `GranteePrincipal` field contains the [service principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services), which might represent several different grantee principals. +Some AWS services create grants for different resources that might appear to be duplicates. These grants have lifecycles tied to the different resources. Deleting grants created by an AWS service can be disruptive and requires extra precaution.