we have setup a simple Node.js App on ElasticBeanstalk with an additional authentication Step on an Application Load Balancer in front of the app using AWS Cognito.
This is working just fine, Users get authenticated so that
the Application receives the headers x-amzn-oidc-accesstoken, x-amzn-oidc-identity and x-amzn-oidc-data forwarded by the ALB.
Now we need an authorization Step (ABAC - Attribute based Access) on the JWT supplied by the ALB. The Application shall only be useable depending on an email attribute, contained in the headers.
How can we develop this locally and debug it? Headers are only supplied in AWS so they are not available without ALB. Is there any Framework to simulate or mock these Headers?
Thank you