Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Api gateway: Make client_cert optional #82

Merged
merged 2 commits into from
Apr 13, 2022

Conversation

simonvandel
Copy link
Contributor

The field is only set if using mTLS. See https://aws.amazon.com/blogs/compute/introducing-mutual-tls-authentication-for-amazon-api-gateway/

For Lambda authorizers, the event payload is expanded to include additional certificate properties from the client’s authenticated certificate. These properties are found at requestContext.identity.clientCert with the Lambda authorizer v1 payload version or at requestContext.authentication.clientCert with the v2 payload version.

The field is only set if using mTLS. See https://aws.amazon.com/blogs/compute/introducing-mutual-tls-authentication-for-amazon-api-gateway/

> For Lambda authorizers, the event payload is expanded to include additional certificate properties from the client’s authenticated certificate. These properties are found at requestContext.identity.clientCert with the Lambda authorizer v1 payload version or at requestContext.authentication.clientCert with the v2 payload version.
Copy link
Owner

@calavera calavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a couple of serde attributes for this to work. I left you some suggestions.

@simonvandel
Copy link
Contributor Author

You are right! Opened the PR on mobile, so that's what I get for doing that 🙂

@calavera
Copy link
Owner

no worries at all, thanks a lot for opening this PR with a clear description on why the current behavior is not correct!

@simonvandel
Copy link
Contributor Author

Cool. Do you want me to update the version number to get ready for a new cargo release, or how do you want to do that?

@calavera
Copy link
Owner

Cool. Do you want me to update the version number to get ready for a new cargo release, or how do you want to do that?

I'll do that this evening, don't worry about it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants