-
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
(apigatewayv2-authorizers): WebSocketLambdaAuthorizer's default is invalid #18307
Comments
Thanks for bringing this to our attention @Tietew! I have reproduced this bug and it looks like we need to update the default |
… `WebSocketLambdaAuthorizer` (#18315) We introduced `WebSocketLambdaAuthorizer` in #16886 with an incorrect default `identitySource`, according to these [docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource). The result is that using the default `identitySource` results in a deploy-time failure. This PR fixes the error and adds documentation for the syntax for all `identitySource` possibilities. I can confirm that this default successfully passes `cdk deploy` on my local app. Fixes #18307. BREAKING CHANGE: `WebSocketLambdaAuthorizerProps.identitySource` default changes from `['$request.header.Authorization']` to `['route.request.header.Authorization']`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
… `WebSocketLambdaAuthorizer` (aws#18315) We introduced `WebSocketLambdaAuthorizer` in aws#16886 with an incorrect default `identitySource`, according to these [docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource). The result is that using the default `identitySource` results in a deploy-time failure. This PR fixes the error and adds documentation for the syntax for all `identitySource` possibilities. I can confirm that this default successfully passes `cdk deploy` on my local app. Fixes aws#18307. BREAKING CHANGE: `WebSocketLambdaAuthorizerProps.identitySource` default changes from `['$request.header.Authorization']` to `['route.request.header.Authorization']`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
What is the problem?
WebSocketLambdaAuthorizer
's defaultidentitySource
is currently['$request.header.Authorization']
.But this value is rejected by CloudFormation with following error message:
identitySource
shoud not have default value (mandatory prop) because constant does not match required criteria.Reproduction Steps
What did you expect to happen?
WebSocketApi is successfully created.
What actually happened?
Failed to deploy stack with an error described above.
CDK CLI Version
2.4.0
Framework Version
No response
Node.js Version
14.18.0
OS
Linux 5.10.60.1-microsoft-standard-WSL2
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: