aws-samples / aws-samples/cloudfront-authorization-at-edge

Missing User-Agent header in Post request to cognito

Open
#264 4 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.