feat(cognito): support password history size#33164
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33164 +/- ##
=======================================
Coverage 80.79% 80.79%
=======================================
Files 232 232
Lines 14110 14110
Branches 2453 2453
=======================================
Hits 11400 11400
Misses 2430 2430
Partials 280 280
Flags with carried forward coverage won't be shown. Click here to find out more.
|
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
| if (props.featurePlan === FeaturePlan.LITE) { | ||
| throw new Error('`passwordHistorySize` can not be set when `featurePlan` is `FeaturePlan.LITE`.'); | ||
| } | ||
| if (passwordHistorySize < 0 || passwordHistorySize > 24) { | ||
| throw new Error(`\`passwordHistorySize\` must be between 0 and 24 (received: ${passwordHistorySize})`); |
There was a problem hiding this comment.
could you please change the Error to be ValidationError according to the ongoing change the team is doing now .. see tracking issue #32324
There was a problem hiding this comment.
Thank you for the comment.
Am I correct in understanding that in this PR, you want to replace all Errors within aws-cognito with ValidationErrors? I was aware that the replacement was in progress, but I thought the maintenance team would handle it, so I left the Errors as they were.
There was a problem hiding this comment.
at least do it for the new added throw statements .. I believe we can have both in the sam construct .. and if you like to help more, you can open a new pr to replace the Errors in this construct with the validation error :)
There was a problem hiding this comment.
Thank you. I've replaced only the Errors added this time. If this PR is merged before the maintainer starts work, I'm considering creating a PR to replace other Errors in aws-cognito.
Pull request has been modified.
4bc10c3 to
03cccb6
Compare
|
@mergify update |
❌ Sorry but I didn't understand the command. Please consult the commands documentation 📚. |
✅ 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 requeue |
❌ Command disallowed due to command restrictions in the Mergify configuration.Details
|
|
@Mergifyio update |
☑️ Nothing to doDetails
|
|
@Mergifyio refresh |
✅ Pull request refreshed |
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)
Closes #33106.
Reason for this change
To enable password reuse prevention settings in Cognito user pools.
Description of changes
Add
passwordHistorySizeproperty.Describe any new or updated permissions being added
No permission update.
Description of how you validated changes
Add 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