serverless / serverless/serverless
Conditional custom authorizer depending on the stage
Open
Nobody has claimed this yet.
cat/aws-event-api-gateway
enhancement
- Dominant language
- JavaScript
- Stars
- 46.9k
- Forks
- 5.7k
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 57
Description
This is a Feature Proposal
Description
The use case: You want to add a basic auth (using an authorizer) to access the staging environment but not for the production.
If the authorizer bloc would have an enabled attribute (like the pluging: serverless-domain-manager) we could do something like this:
custom:
stage: ${opt:stage}
staging_auth: true
prod_auth: false
...
authorizer:
enabled: ${custom:stage}_auth
name: authorizerFunc
...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The proposal concerns the custom stage setting and the authorizer block, with authorizerFunc as the referenced entry point. Start by tracing how stage variables and authorizer configuration are parsed; done means the authorizer can be enabled or disabled per stage, with both settings covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- authorization, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100