-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 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.
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. |
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing ✅ A exemption request has been requested. Please wait for a maintainer's review. |
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