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

feat: New DisableFunctionDefaultPermissions property to block the creation of permissions resource from SAM API Auth #2885

Merged
merged 18 commits into from
Feb 15, 2023

Conversation

aaythapa
Copy link
Contributor

@aaythapa aaythapa commented Feb 10, 2023

Issue #, if available

#1656

Description of changes

A new opt-in boolean property DisableFunctionDefaultPermissions added to the lambda authorizers (LambdaRequestAuthorizer and LambdaTokenAuthorizer) in SAM API that will block the creation of the AWS::Lambda::Permissions resource that allows the API to invoke the authorizer function (its not created for the Cognito authorizer).

The type changes may make the PR a bit confusing to review so the main changes are in api_generator.py and apigateway.py

Description of how you validated changes

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be
added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@aaythapa aaythapa changed the title feat: New opt-in property to block the creation of permissions resource that allows API to invoke authorizer function feat: New opt-in property to block the creation of permissions resource from SAM API Auth Feb 10, 2023
@aaythapa aaythapa marked this pull request as ready for review February 10, 2023 19:49
@aaythapa aaythapa requested a review from a team as a code owner February 10, 2023 19:49
@aaythapa aaythapa changed the title feat: New opt-in property to block the creation of permissions resource from SAM API Auth feat: New property to block the creation of permissions resource from SAM API Auth Feb 10, 2023
@aaythapa aaythapa changed the title feat: New property to block the creation of permissions resource from SAM API Auth feat: New DisableDefaultFunctionPermissions property to block the creation of permissions resource from SAM API Auth Feb 10, 2023
@aaythapa aaythapa requested a review from hoffa February 10, 2023 21:37
@aaythapa aaythapa requested a review from hoffa February 13, 2023 18:13
@hoffa hoffa self-requested a review February 13, 2023 22:53
@aaythapa aaythapa changed the title feat: New DisableDefaultFunctionPermissions property to block the creation of permissions resource from SAM API Auth feat: New DisableFunctionDefaultPermissions property to block the creation of permissions resource from SAM API Auth Feb 14, 2023
Copy link
Contributor

@aahung aahung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm, one comment

samtranslator/model/api/api_generator.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants