-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(lambda): refactor Function URL permissions #35725
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
Conversation
…c6d55f7ca5ba5f.zip to Git LFS pointer
…L code Co-authored-by: Roger Zhang <roger.zhang.cs@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
|
Exemption Request : Changes bring a new default behaviour, will not require test updates |
|
Reviewed thoroughly in the private repo with the service team. Approved since this is a clone of that PR. |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
|
@Mergifyio queue |
🛑 There are no queue conditions matchingThere are queue conditions defined in the configuration, but none matches. The pull request has not been embarked. Details:
|
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #.
Reason for this change
This change is tracking https://github.com/aws/aws-cdk-private/pull/278
Lambda is introducing dual auth on function URL(FURL). Which requires both allow on
lambda:InvokeFunctionandlambda:InvokeFunctionUrl(Dual Auth) to allow a function to be invoked through FURL. Before it only require allow onlambda:InvokeFunctionUrl.Please notice this is a breaking change on Lambda side so few integration test's snapshot will need to be overwrite.
Description of changes
aws-lambda.FunctionUrl()withFunctionUrlAuthType.NONEwill create a FURL resource and add dual auth to allow same user experience as before. (this function only add allow onlambda:InvokeFunctionUrlbefore)aws-lambda.FunctionUrl.grantInvokeUrl(grantee)Will grant dual auth to the grantee, to insure user will still able to invoke their FURL.Also, a new prop
invokedViaFunctionUrlis introduce onlambda:InvokeFunction, the dual auth granted above will setlambda:InvokeFunction: true. And when this prop is set to true, this permission will only allow the principal to invoke lambda function through FURL. This additional permission will not allow the granted principal to invoke Lambda directly without FURL. If user need this permission, they will still need to calllambda.Function.grantInvoke(grantee)directly.Describe any new or updated permissions being added
As mentioned above,
grantInvokeUrlwill add an additional permissionlambda:InvokeFunctionto allow FURL invoke without the need for code change after dual auth goes live.Example
Description of how you validated changes
New test cases are added
Integration test snapshot are updated.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license