Adding WAF to sit in front of cognito for additional security #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
AWS Cognito has API endpoints that are public similar to api gateway or cloudfront it is a good practice to protect this resource with a web application firewall (WAF) to restrict traffic and provide additional security measures from the firewall. This PR adds a WAF to cognito following the pattern of the other MDCT apps.
https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-waf.html
Related ticket(s)
https://jiraent.cms.gov/browse/CMDCT-3665
How to test
after merge to main log into main env with idm user to verify no issues are seen.
Important updates
I'm not crazy about adding more severless changes as we're attempting to migrate to the cdk but its a fairly straight approach from our other services so when we do waf changes in any other service for cdk that will just carry over to here.
Author checklist
convert to a different template: test → val | val → prod