Skip to content
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

Support for custom authorizer in Swagger definition #223

Closed
sapessi opened this issue Dec 6, 2017 · 8 comments
Closed

Support for custom authorizer in Swagger definition #223

sapessi opened this issue Dec 6, 2017 · 8 comments

Comments

@sapessi
Copy link
Contributor

sapessi commented Dec 6, 2017

Implement support for the execution of custom authorizers when defined in the API swagger template. The implementation should at least run the authorizer function, capture the output template, and verify that the request is allowed. Context variables returned by the authorizer should be injected in the context.

@ericofusco
Copy link

@sapessi Anyone actively working on that? Any help needed?

@jfuss
Copy link
Contributor

jfuss commented Jan 25, 2019

@ericofusco I am not aware of anyone working on this currently. Contributions are always welcome. :)

Calling the cloud function could difficult currently. SAM CLI does not yet resolve Fn:Sub intrinsic functions. We may be able to extract the function name and assume we are in the account and region specified but full ARNs won't be possible to support yet. This issue was originally created before SAM supported Custom Authorizers, so it's worth considering starting from local execution first and then expand to the cloud if needed.

The best place to start would be to do a quick write up, full design isn't probably needed. This will help orient/align us before getting deep into code. Happy to talk more on the #samdev channel as well.

@ericofusco
Copy link

Thanks @jfuss. I'll reach out on #samdev to get this started.

@retka
Copy link

retka commented Oct 2, 2019

So is it currently impossible to execute an API Gateway locally with authorizer and lambda proxy integration?

@NightWatchman
Copy link

NightWatchman commented Feb 14, 2020

So is it currently impossible to execute an API Gateway locally with authorizer and lambda proxy integration?

My testing seems to bear this out. As far as I can tell using the sam local start-api command simply ignores the existence of custom authorizers and passes the request straight to the API backing lambda functions.

@LennyDuan
Copy link

LennyDuan commented May 12, 2020

SAM doesn't support custom authorizers when you run locally now (SAM version 0.48). So you can't test it by using "sam local start-api".

But it supports in SAM YAML template and you can use SAM CLI to build and deploy custom authorizers to you AWS cloud Api Gateway. It can work well if your YAML setup is correct.

@jfuss jfuss added the stage/pm-review Waiting for review by our Product Manager, please don't work on this yet label Oct 13, 2020
@jfuss
Copy link
Contributor

jfuss commented Dec 20, 2022

This is a duplicate of #137.

Closing

@jfuss jfuss closed this as completed Dec 20, 2022
@jfuss jfuss added type/duplicate and removed stage/pm-review Waiting for review by our Product Manager, please don't work on this yet labels Dec 20, 2022
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants