Skip to content

Conversation

@maczac150
Copy link

Issue # (if applicable)

None

Reason for this change

AWS KMS supports bypassing the key policy lockout safety check via the BypassPolicyLockoutSafetyCheck parameter (Link).
This feature was not previously configurable in the AWS CDK L2 construct.

Description of changes

  • Added bypassPolicyLockoutSafetyCheck to KeyProps and threaded it through to CfnKey.
  • Documented the property with security warnings and usage examples in README.

Describe any new or updated permissions being added

None – This property only affects how AWS KMS performs its key policy lockout safety check, and does not introduce any new permissions or access scope changes.

Description of how you validated changes

  • Added unit tests covering all three cases (true/false/undefined)
  • Added integration test demonstrating all three scenarios

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team November 6, 2025 23:25
@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Nov 6, 2025
Copy link
Contributor

@go-to-k go-to-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Left some minor comments

@maczac150
Copy link
Author

Thank you for the review. I'll make the suggested changes and commit them shortly.

@maczac150 maczac150 force-pushed the kms-bypass-policy-lockout branch from f4fd1b0 to 7a8d97d Compare November 7, 2025 15:01
@maczac150
Copy link
Author

I’ve committed all three suggested changes. Thank you again for the feedback.

Copy link
Contributor

@go-to-k go-to-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@aws-cdk-automation aws-cdk-automation added the pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants