Skip to content

Commit 39c22de

Browse files
Tietewmergify[bot]
andauthored
feat(cognito): user pool feature plans (#32367)
### 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 - Add new `featurePlan` property and `FeaturePlan` enum to specify user pool feature plan. - Deprecate `advancedSecurityMode` property and `AdvancedSecurityMode` enum. Note that the previous AWS document about Advanced Security Mode is now redirected to [Advanced security with threat protection](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-threat-protection.html). ### Description of how you validated changes Added new unit tests and an integ test. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 7d1dd0d commit 39c22de

12 files changed

+744
-12
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-feature-plans.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-feature-plans.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-feature-plans.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-feature-plans.js.snapshot/integ-user-pool-feature-plans.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"Resources": {
3+
"userpoolliteplanA197F128": {
4+
"Type": "AWS::Cognito::UserPool",
5+
"Properties": {
6+
"AccountRecoverySetting": {
7+
"RecoveryMechanisms": [
8+
{
9+
"Name": "verified_phone_number",
10+
"Priority": 1
11+
},
12+
{
13+
"Name": "verified_email",
14+
"Priority": 2
15+
}
16+
]
17+
},
18+
"AdminCreateUserConfig": {
19+
"AllowAdminCreateUserOnly": true
20+
},
21+
"EmailVerificationMessage": "The verification code to your new account is {####}",
22+
"EmailVerificationSubject": "Verify your new account",
23+
"SmsVerificationMessage": "The verification code to your new account is {####}",
24+
"UserPoolTier": "LITE",
25+
"VerificationMessageTemplate": {
26+
"DefaultEmailOption": "CONFIRM_WITH_CODE",
27+
"EmailMessage": "The verification code to your new account is {####}",
28+
"EmailSubject": "Verify your new account",
29+
"SmsMessage": "The verification code to your new account is {####}"
30+
}
31+
},
32+
"UpdateReplacePolicy": "Delete",
33+
"DeletionPolicy": "Delete"
34+
},
35+
"userpoolessentialsplan605F6755": {
36+
"Type": "AWS::Cognito::UserPool",
37+
"Properties": {
38+
"AccountRecoverySetting": {
39+
"RecoveryMechanisms": [
40+
{
41+
"Name": "verified_phone_number",
42+
"Priority": 1
43+
},
44+
{
45+
"Name": "verified_email",
46+
"Priority": 2
47+
}
48+
]
49+
},
50+
"AdminCreateUserConfig": {
51+
"AllowAdminCreateUserOnly": true
52+
},
53+
"EmailVerificationMessage": "The verification code to your new account is {####}",
54+
"EmailVerificationSubject": "Verify your new account",
55+
"SmsVerificationMessage": "The verification code to your new account is {####}",
56+
"UserPoolTier": "ESSENTIALS",
57+
"VerificationMessageTemplate": {
58+
"DefaultEmailOption": "CONFIRM_WITH_CODE",
59+
"EmailMessage": "The verification code to your new account is {####}",
60+
"EmailSubject": "Verify your new account",
61+
"SmsMessage": "The verification code to your new account is {####}"
62+
}
63+
},
64+
"UpdateReplacePolicy": "Delete",
65+
"DeletionPolicy": "Delete"
66+
},
67+
"userpoolplusplan01FBD006": {
68+
"Type": "AWS::Cognito::UserPool",
69+
"Properties": {
70+
"AccountRecoverySetting": {
71+
"RecoveryMechanisms": [
72+
{
73+
"Name": "verified_phone_number",
74+
"Priority": 1
75+
},
76+
{
77+
"Name": "verified_email",
78+
"Priority": 2
79+
}
80+
]
81+
},
82+
"AdminCreateUserConfig": {
83+
"AllowAdminCreateUserOnly": true
84+
},
85+
"EmailVerificationMessage": "The verification code to your new account is {####}",
86+
"EmailVerificationSubject": "Verify your new account",
87+
"SmsVerificationMessage": "The verification code to your new account is {####}",
88+
"UserPoolTier": "PLUS",
89+
"VerificationMessageTemplate": {
90+
"DefaultEmailOption": "CONFIRM_WITH_CODE",
91+
"EmailMessage": "The verification code to your new account is {####}",
92+
"EmailSubject": "Verify your new account",
93+
"SmsMessage": "The verification code to your new account is {####}"
94+
}
95+
},
96+
"UpdateReplacePolicy": "Delete",
97+
"DeletionPolicy": "Delete"
98+
}
99+
},
100+
"Parameters": {
101+
"BootstrapVersion": {
102+
"Type": "AWS::SSM::Parameter::Value<String>",
103+
"Default": "/cdk-bootstrap/hnb659fds/version",
104+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
105+
}
106+
},
107+
"Rules": {
108+
"CheckBootstrapVersion": {
109+
"Assertions": [
110+
{
111+
"Assert": {
112+
"Fn::Not": [
113+
{
114+
"Fn::Contains": [
115+
[
116+
"1",
117+
"2",
118+
"3",
119+
"4",
120+
"5"
121+
],
122+
{
123+
"Ref": "BootstrapVersion"
124+
}
125+
]
126+
}
127+
]
128+
},
129+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
130+
}
131+
]
132+
}
133+
}
134+
}

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-feature-plans.js.snapshot/integ.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-feature-plans.js.snapshot/manifest.json

+125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)