-
Notifications
You must be signed in to change notification settings - Fork 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
fix(lambda): granting multiple conditional principals is not correctly configured #16782
fix(lambda): granting multiple conditional principals is not correctly configured #16782
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Assigning to @rix0rrr since he's more familiar with the intricacies in IAM grants. |
"bundledDependencies": [ | ||
"object-hash" | ||
], |
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.
You should be able to do crypto without having to use this dependency.
Nodejs' crypto library should suffice - https://nodejs.org/api/crypto.html#cryptocreatecipherivalgorithm-key-iv-options
This PR has been in BUILD FAILING for 21 days, and looks abandoned. It will be closed in 10 days if no further commits are pushed to it. |
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
If
grantInvoke()
is called twice for the same service principal but with different conditions, only one resource policy was getting created. The reason was a conditional skip on policy creation based only on the principal (eg:s3.amazonaws.com
) instead of checking the whole grantable object.Adding a more robust check based on the object hash to handle the cases similar to the conditional principal.
fixes #15710