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

Feature request: allow to choose one authorizer when there's more than one #6628

Open
RecuencoJones opened this issue Jan 31, 2024 · 4 comments
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. type/feature Feature request

Comments

@RecuencoJones
Copy link

Describe your idea/feature/enhancement

There are APIs where more than one Authorizer may be used, for example an api key + Authorization header.
In those cases sam local start-api fails with:

Error: There must only be a single authorizer defined for path='/' method='get', found '2'

Proposal

Add some flag that allows the user to choose one instead of bypassing the authorizer:

sam local start-api --authorizer AzureAuthorizer
@RecuencoJones RecuencoJones added stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. type/feature Feature request labels Jan 31, 2024
@mndeveci mndeveci removed the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Feb 2, 2024
@mndeveci
Copy link
Contributor

mndeveci commented Feb 2, 2024

Thanks for the feature request, I will bring it to the team for prioritization.

@mndeveci
Copy link
Contributor

mndeveci commented Feb 5, 2024

Hi @RecuencoJones

Can you share an example template which has multiple authorizers setup for single route?

@mndeveci mndeveci added the blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. label Feb 5, 2024
@RecuencoJones
Copy link
Author

Hi @mndeveci I will try to create a simple repository and share how we are working this around

@RecuencoJones
Copy link
Author

Hi @mndeveci I created a reproduction repository here https://github.com/RecuencoJones/SAM-CLI-issue-6628 please let me know if this is good enough!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. type/feature Feature request
Projects
None yet
Development

No branches or pull requests

2 participants