-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-cdk): enable key rotation in bootstrap kms key #22125
Comments
This may not be something we want to have by default due to the increased cost for the user - CDK does not claim to be security hub compliant. Maybe this would work well as a CLI option, @rix0rrr what do you think about this? Currently, you can customize the bootstrapping experience to suit your needs if the out-of-the-box experience doesn't work for you |
@peterwoodworth as far as I am aware, there is no additional cost for this feature and the keys already exist. |
There is definitely an additional cost:
https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html Effectively, automatically rotating keys cost $1/mo the first year, $2/mo the second year, $3/mo the third year, etc. That is why we have decided not to turn this on by default. Of course, if you decide that you want this, you can customize the bootstrapping template to turn the feature on. |
Although this is a |
@rix0rrr I didn't realise that KMS key rotation compounded that way. Thanks for looking in to this. |
|
Describe the feature
There may be a good reason for it, however, key rotation is not enabled on the kms keys created by the
cdk bootstrap
process. This results in failed security hub checks, config checks etc. If you work in some industries, this may (?) be classed as a security vulnerability assuming that key rotation was a compliance requirement.For the security hub finding problem, you could automate the suppression of this check or disable it completely but that is not ideal and adds complexity. For compliance requirements, there may not be a way around this.
Use Case
Proposed Solution
Enable key rotation for keys created as part of the cdk bootstrap process.
Other Information
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml
For all
Type: AWS::KMS::Key
, addEnableKeyRotation: true
.Cfn docs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html
Acknowledgements
CDK version used
2.41.0
Environment details (OS name and version, etc.)
N/A
The text was updated successfully, but these errors were encountered: