dherault / serverless-offline

Emulate AWS λ and API Gateway locally when developing your Serverless project
MIT License
5.19k stars 796 forks source link

feat: Adding handling for multiple identitySource headers in the REST API. #1675

Closed kevinhankens closed 11 months ago

kevinhankens commented 1 year ago

Description

From https://github.com/dherault/serverless-offline/issues/1674

According to the REST API docs:

In this case, your identitySource could contain multiple entries for your policy cache.

Currently on startup createAuthScheme() only allows for one header when validating the identitySource entry.

Motivation and Context

This is preventing us from running serverless offline with our production configuration of using multiple headers to cache auth.

How Has This Been Tested?

Tested locally and added integration tests.

Screenshots (if appropriate):

dev-z commented 1 year ago

Tested these changes locally as well and it works well, accepting multiple values in identitySource as a comma-separated string as specified in serverless framework docs here

dev-z commented 1 year ago

@dherault Can you please have a look?

leanderpeter commented 1 year ago

👍

dnalborczyk commented 11 months ago

close/re-open in order to run ci.

dnalborczyk commented 11 months ago

thank you @kevinhankens !