-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
RFC: Usage Plans for Auth #1141
Comments
I would like to add a +1 to suggestion 1 to create one Usage Plan if the |
I like this, it would definitely work for our use case. It seems well thought out, and has reasonable defaults with the ability to override as necessary. We'd not be impacted by shared vs individual usage plans, as our templates each only have one API. I like the flexibility of the proposal to be able to create a shared or individual usage plan, depending on where the option is specified. My only small concern there is that it could be a little bit counter-intuitive. TBH, we'd be happy just to be able to require the API key without diving into swagger; we'd be happy to explicitly define the usage plan etc, especially as requirements there are likely to be very divergent. Would it be possible to use One final thought: usage plan and key names are very short, the generated names are often not too helpful, eg 'rfc-a-Serve-BDPXKE2ZILLS'. We've found that we need to specify them explicitly for them to be useful. |
Thanks for the input! |
I have updated the RFC to be able to create a single Usage Plan or multiple Usage Plans based on the requirement. Please let us know your thoughts |
Released! |
Resources
Api keys, create and use Api keys with Usage Plans, Auth
Associated Issues
#248, #547
Description
Api keys can be generated by creating a Usage Plan or by using existing Usage Plan.
The template for Usage plans in SAM would look like:
AWS::ApiGateway::ApiKey
with nameServerlessApiKey
,AWS::ApiGateway::UsagePlan
with nameServerlessUsagePlan
, andAWS::ApiGateway::UsagePlanKey
with nameServerlessUsagePlanKey
for a stack whenCreateUsagePlan
is set toSHARED
in Globals / Api.AWS::ApiGateway::ApiKey
with name<ApiName>ApiKey
,AWS::ApiGateway::UsagePlan
with name<ApiName>UsagePlan
, andAWS::ApiGateway::UsagePlanKey
with name<ApiName>UsagePlanKey
for an Api whenCreateUsagePlan
is set toSINGLE
in Globals / Api.AWS::ApiGateway::ApiKey
andAWS::ApiGateway::UsagePlanKey
whenUsagePlanId
is given. SAM will not create/updateAWS::ApiGateway::UsagePlan
resource and expectsApiStages
to be defined by the user seperately.Input to SAM
CloudFormation Template generated by SAM for Usage Plans
The text was updated successfully, but these errors were encountered: