aws-samples / aws-samples/cloudfront-authorization-at-edge
Missing User-Agent header in Post request to cognito
- Dominant language
- TypeScript
- Stars
- 534
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
When using a Congito User Pool with a WAF attached the following scenario occurs:
The post request to exchange the authorization token to Cognito /oauth/token endpoint is blocked by a WAF that contains the AWS managed rule AWSManagedRulesCommonRuleSet.
Specifically, the NoUserAgent_HEADER rule blocks the request.
Is it possible to update the request configurations, so that the User-Agent header is set?
Contributor guide
Research direction
Locate the TypeScript entry point that sends the POST request to Cognito's /oauth/token endpoint and inspect its request configuration. Done means the token-exchange request includes a User-Agent header and no longer triggers the AWSManagedRulesCommonRuleSet NoUserAgent_HEADER rule; the issue names no test or source file to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- authentication, cloud, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100