-
Notifications
You must be signed in to change notification settings - Fork 479
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
Add support for ITlsConnectionFeature and marshall the APIGW client cert to HttpContext (#786) #787
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.
Looks good. Just a minor change request to improve the error handling.
Libraries/src/Amazon.Lambda.AspNetCoreServer/APIGatewayHttpApiV2ProxyFunction.cs
Show resolved
Hide resolved
if (clientCertPem != null) | ||
{ | ||
// Remove "--------BEGIN CERTIFICATE-----\n" and "-----END CERTIFICATE-----" | ||
clientCertPem = clientCertPem.Substring(28, clientCertPem.Length - 53); |
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.
Same comment as above about verify the cert. Probably put it a utility method that converts incoming cert into the X509Certificate2.
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.
See comment above #787 (comment)
9b94083
to
bd4a713
Compare
@normj Changes done as requested. Cheers. |
…tion and add a check the PEM starts and end with expected values.
Thanks for the fast feedback and accepting @normj ! |
Thanks again. The PR was just released today in version 5.3.0 of Amazon.Lambda.AspNetCoreServer. |
Issue #, if available:
Fixes #786
Description of changes:
ItlsConnectionFeature
support toInvokeFeatures
X509Certificate2
and sets the feature property that then flows through to HttpContextAPIGatewayHttpApiV2ProxyRequest
andAPIGatewayProxyRequest
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.