-
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
feat(cognito): user pool feature plans #32367
Conversation
props.advancedSecurityMode && props.advancedSecurityMode !== AdvancedSecurityMode.OFF | ||
) { | ||
throw new Error('you cannot enable Advanced Security Mode when feature plan is Essentials or higher.'); | ||
} |
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.
If the advanced security mode is enabled with Essentials or Plus feature plan, CloudFormation will fail with following error:
Resource handler returned message: "The following features need to be disabled for the ESSENTIALS pricing tier configured: Threat Protection (Service: CognitoIdenti
tyProvider, Status Code: 400, Request ID: xx)"
We cannot validate advancedSecurityMode
is off when featurePlan
is not specified (defaults to Essentials) because existing user pools are set to Lite feature plan for backward compatibility and CDK cannot determine what the actual feature plan is.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32367 +/- ##
==========================================
- Coverage 78.67% 78.66% -0.02%
==========================================
Files 107 107
Lines 7237 7237
Branches 1329 1329
==========================================
- Hits 5694 5693 -1
- Misses 1357 1358 +1
Partials 186 186
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
One comment on the validation part.
@Mergifyio update |
✅ Branch has been successfully updated |
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). |
@Mergifyio update |
✅ Branch has been successfully updated |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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)
N/A
Reason for this change
Amazon Cognito introduces the feature plans which replaces the Advanced Security Mode.
See: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html
Related to #32369 - passwordless sign-in requires Essentials or higher feature plan.
Description of changes
featurePlan
property andFeaturePlan
enum to specify user pool feature plan.advancedSecurityMode
property andAdvancedSecurityMode
enum.Note that the previous AWS document about Advanced Security Mode is now redirected to Advanced security with threat protection.
Description of how you validated changes
Added new unit tests and an integ test.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license