-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix(cognito): remove overly strict validation for threat protection on non-PLUS plans #36027
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
fix(cognito): remove overly strict validation for threat protection on non-PLUS plans #36027
Conversation
- Remove runtime validation of feature plan requirements for threat protection - Allow CloudFormation to handle validation of threat protection settings - Update test cases to generate CloudFormation templates instead of throwing errors - Preserve existing behavior for user pools with grandfathered configurations - Improve flexibility for user pool configuration across different feature plans This change allows more flexible configuration of Cognito User Pool threat protection settings during CDK synthesis, deferring strict validation to CloudFormation deployment time.
- Remove feature plan validation statement for Threat Protection - Add clarifying note about feature plan requirements for new user pools - Improve documentation readability for Threat Protection section - Explain CDK and CloudFormation behavior for threat protection configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
|
Exemption Request - remove synth-time validations. No integ tests update required. |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #36023.
Reason for this change
CDK v2.181.0 introduced validation that blocks deployments of existing Cognito User Pools with threat protection enabled on LITE feature plans. This validation incorrectly assumes all user pools must follow current AWS requirements, but existing user pools on LITE plans are grandfathered and can legitimately use threat protection. This regression prevents users from upgrading CDK beyond v2.160.0.
Description of changes
Removed two CDK-level validation blocks in
UserPoolconstruct that incorrectly rejected threat protection configurations on non-PLUS feature plans:advancedSecurityMode(deprecated property) on LITE/ESSENTIALS plansstandardThreatProtectionModeandcustomThreatProtectionModeon LITE/ESSENTIALS plansRationale: CDK cannot determine the actual feature plan of existing user pools at synthesis time. CloudFormation validates feature plan requirements at deployment time, which correctly allows grandfathered user pools to continue working while still catching invalid configurations for new resources.
Describe any new or updated permissions being added
N/A - No IAM permissions or resource access changes.
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license