Add support for authorizer REQUEST type#1113
Conversation
|
@hellno @javulticat @wrboyce can this PR get a review? |
|
@ppartarr Can you check why this is failing? You may need need to run |
|
Hi there! Unfortunately, this PR has not seen any activity for at least 90 days. If the PR is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed. |
|
Hi there! Unfortunately, this PR was automatically closed as it had not seen any activity in at least 100 days. If the PR is still relevant to the latest version of Zappa, please open a new PR. |
|
Looks like this may need to be re-based off the lastest head. |
|
Hi there! Unfortunately, this PR has not seen any activity for at least 90 days. If the PR is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed. |
|
Hi there! Unfortunately, this PR was automatically closed as it had not seen any activity in at least 100 days. If the PR is still relevant to the latest version of Zappa, please open a new PR. |
Description
AWS gateway supports the use of Lambda authorizers to perform authorization (grant access to certain resources) based on a given authentication strategy (OpenID connect, basic auth, SAML etc). AWS Gateway offers two kinds of authorizers: REQUEST & TOKEN.
TOKEN authorizers receive the bearer token, like a JWT or a OAuth token.
REQUEST authorizers receive a combination of headers, query strings, stage variables and context variables.
Zappa only supports TOKEN authorizers, which is quite limiting since some authentication schemes may depend on information provided in the request.
This PR adds support for REQUEST authorizers. The authorizer config now takes a new
typefield as well as anidentity_sourcesobject which can be a combination of the various request expressions needed for theREQUESTauthorizer (header, query string, stage variable, or context). We don't explicity support multi stage variable since fields can appear multiple times e.g.For backwards compatibility, if the
typeof an authorizer is not specified, it defaults toTOKEN.GitHub Issues
#847
Miserlou/Zappa#1159