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
validate Http Api Authorizers identity Header #2339
Conversation
samtranslator/model/apigatewayv2.py
Outdated
if self.identity.get("Headers"): | ||
headers = self.identity.get("Headers") |
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.
To prevent the duplication:
if self.identity.get("Headers"): | |
headers = self.identity.get("Headers") | |
headers = self.identity.get("Headers") | |
if headers: |
Codecov Report
@@ Coverage Diff @@
## develop #2339 +/- ##
===========================================
+ Coverage 93.58% 94.38% +0.80%
===========================================
Files 90 98 +8
Lines 6124 7217 +1093
Branches 1260 1493 +233
===========================================
+ Hits 5731 6812 +1081
- Misses 183 196 +13
+ Partials 210 209 -1
Continue to review full report at Codecov.
|
@jonife .. could you please resolve the merge conflicts. |
ae91988
to
b0f45e4
Compare
Issue #, if available:
Description of changes:
added validation to validate the property type of Authorizers Identity parameter Headers to arrest a situation where an intrinsic value can't be resolved.
Description of how you validated changes:
created a test sam template and tested the exception
Checklist:
make pr
passesExamples?
Please reach out in the comments, if you want to add an example. Examples will be
added to
sam init
through https://github.com/awslabs/aws-sam-cli-app-templates/By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.