-
-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty identity source support is broken #1638
Comments
Related issue: serverless-offline/src/events/http/HttpServer.js Lines 326 to 328 in f9f1f79
|
What's missing to get this merged? |
Can this be merged? The PR looks fine. |
Bug Report
Current Behavior
When an identity source setting of authorizer is empty, serverless-offline always returns 401 and logs the following message:
Sample Code
Expected behavior/code
If the authorizer type is
REQUEST
and its caching is disabled, the identity source is not required.https://docs.aws.amazon.com/apigateway/latest/developerguide/configure-api-gateway-lambda-authorization-with-console.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html
Environment
serverless
version: v3.26.0serverless-offline
version: v12.0.3node.js
version: v18.12.1OS
: Debian 11.1 (WSL2, Windows 11)Possible Solution
If
type
isrequest
andresultTtlInSeconds
is 0, identity source checking should be skipped.Additional context/Screenshots
It looks like this issue was introduced in #1610.
It works correctly with v11.3.0 and earlier.
The text was updated successfully, but these errors were encountered: