AWS KMS.1 compliant policy with dedicated kms key list#1020
AWS KMS.1 compliant policy with dedicated kms key list#1020ge0Aja merged 2 commits intoDataDog:masterfrom
Conversation
Wildcard permissions on all kms keys is a security issue. Allowing access to only dedicated KMS keys keeps the setup secure. Keys using default encryption aws/secretsmanager are accessible by default.
|
👋 @n0pants |
|
Hi @ge0Aja 👋 Rather than opting out of wildcard secret resource permissions, it should be an explicit opt in to keep it secure. I do completely agree that you need |
Thanks for the explanation, I'd suggest to pass the list of keys as an optional parameter then. I believe we should still keep the option to use a wildcard if no keys were specified. |
Input parameter KmsKeyList set default empty, gives permission on all resources. Override allow explicit list via input parameter
|
Thanks & agree. As it would also remove the breaking character of the change. |
What does this PR do?
Adding an input parameter KmsKeyList to the CFN template.yaml to define a comma seperated list of KMS Key ARNs.
That list will be used to tailor kms:decrypt resource access in the IAM policy of the datadog serverless forwarder.
Motivation
AWS security Hub finding KMS.1 as well as CKV_AWS_356 in the default template.
Having wildcard permissions on all AWS KMS keys is a security issue.
Allowing access to only dedicated KMS keys keeps the setup secure.
Keys using default encryption aws/secretsmanager are accessible by default.
Testing Guidelines
Additional Notes
While the original CFN template contains a wildcard permission for "customer managed" keys, integrating this version will break access to those CMKs, if they are not listed in the parameter.
Types of changes
Check all that apply