-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(apigatewayv2-authorizers): add payloadFormatVersion field to HttpLambdaAuthorizer #30843
base: main
Are you sure you want to change the base?
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
…daAuthorizer from array to single object
…pLambdaAuthorizer
…daAuthorizer test
b6faf0d
to
1ed6ae9
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
The pull request linter fails with the following errors:
❌ Breaking changes in stable modules [apigatewayv2-authorizers] is disallowed.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed, add Clarification Request
to a comment.
✅ A exemption request has been requested. Please wait for a maintainer's review.
Exemption Request From the contribution guideline:
I would argue that this breaking change qualifies for this criterion. Previously, users would deal with 1 of 4 variants of
Please advise on how to proceed and whether there is a solid path forward to not introduce a breaking change as I cannot think of a solution that is not messy given that there seems to be a bug and that this breaking change both resolves the bug and paves the way forward to implementing a feature. Thank you very much. |
Thank you for the information! I disagree that we should allow breaking change in this case given that 3 out of the 4 scenarios are correct behaviour currently. IMO, the best way to handle this kind of scenario is to deprecate the current property and introduce a new property with the current behaviour and document this change in README accordingly. Adding a |
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
Thank you for the reply! I plan to work on this further to implement the required changes, but I did not have time to do so yet. As far as I have seen, changes were requested just a week ago, but Could the timer be reset just so I have time to work on this PR in the next few days hopefully? Thank you very much. |
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. |
Comments on closed issues and PRs are hard for our team to see. |
@yasamoka Sorry that the tool automatically closed the PR. I re-opened it and added an action item internally to review the close PR policy and I don't think it's valid given that this PR is closed right after discussion. |
Thank you so much! |
Issue
Closes #21492.
Reason for this change
Allows one to set the payload format version to 2.0 when IAM response type is requested.
BREAKING CHANGE:
responseTypes
array field was replaced withresponseType
enum inHttpLambdaAuthorizer
Description of changes
Previously, the CDK would not allow the payload format version to be set manually and would automatically set the version to 1.0 if IAM response type is requested.
This change allows for the use of either payload format version 1.0 or 2.0 when IAM response type is requested. Previous behavior is respected:
In reverse as well, setting the payload format version to 1.0 sets the response type to IAM, while setting the version to 2.0 sets the response type to simple.
Furthermore, when attaching an authorizer in API Gateway using the web interface, the response type is a radio button group allowing either simple or IAM response type, but not both. Attempting to provide
responseTypes
as an array containing both in a CDK deployment results in only simple showing up and IAM policy responses failing. The fix forresponseTypes
brings the behavior in the CDK in line with that shown in the web interface.Description of how you validated changes
I have added unit tests according to the following truth table:
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license