File tree Expand file tree Collapse file tree
infrastructure/stacks/iams-developer-roles Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -343,24 +343,22 @@ resource "aws_iam_policy" "kms_creation" {
343343 {
344344 Effect = " Allow" ,
345345 Action = [
346+ # Key creation and listing actions require wildcard resource
346347 " kms:CreateKey" ,
347- " kms:DescribeKey" ,
348348 " kms:CreateAlias" ,
349349 " kms:List*" ,
350- " kms:ListAliases" ,
351- " kms:Decrypt" ,
352- " kms:Encrypt" ,
353- " kms:ReEncrypt*" ,
350+ " kms:ListAliases"
354351 ],
355352 Resource = " *"
356353 },
357354 {
358355 Effect = " Allow" ,
359356 Action = [
357+ # Key management actions on account-specific keys only
358+ " kms:DescribeKey" ,
360359 " kms:Describe*" ,
361360 " kms:GetKeyPolicy*" ,
362361 " kms:GetKeyRotationStatus" ,
363- " kms:Decrypt*" ,
364362 " kms:DeleteAlias" ,
365363 " kms:UpdateKeyDescription" ,
366364 " kms:CreateGrant" ,
@@ -369,8 +367,9 @@ resource "aws_iam_policy" "kms_creation" {
369367 " kms:ScheduleKeyDeletion" ,
370368 " kms:PutKeyPolicy" ,
371369 " kms:Encrypt" ,
372- " kms:TagResource" ,
373- " kms:GenerateDataKey" ,
370+ " kms:Decrypt" ,
371+ " kms:ReEncrypt*" ,
372+ " kms:GenerateDataKey"
374373 ],
375374 Resource = [
376375 " arn:aws:kms:${ var . default_aws_region } :${ data . aws_caller_identity . current . account_id } :key/*" ,
You can’t perform that action at this time.
0 commit comments