flymg
flymg

Reputation: 627

Local Development - Authorization in Node.js App after Authentication with AWS Cognito and ALB

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

Upvotes: 3

Views: 1345

Answers (1)

noid11
noid11

Reputation: 49

I'm curious about the knowledge of other users, but as far as I know, it doesn't exist.
I think it's simple to test or debug by reusing the header information actually given by ALB as a local request.

Upvotes: 1

Related Questions