Skip to content

Expose API Gateway mTLS client certificate metadata - #1728

Open
2748109647 wants to merge 1 commit into
aws:mainfrom
2748109647:feat/api-gateway-mtls-client-cert
Open

2748109647 wants to merge 1 commit into
aws:mainfrom
2748109647:feat/api-gateway-mtls-client-cert

Conversation

@2748109647

Copy link
Copy Markdown

Summary

Adds a typed client certificate model and exposes the mTLS fields in both API Gateway event layouts:

  • REST API v1: requestContext.identity.clientCert
  • HTTP API v2: requestContext.authentication.clientCert

The model provides the PEM, subject and issuer DNs, serial number, and validity dates. Date values remain strings to match the event payload. Deserialization tests cover both event layouts.

Closes #1726. Related to #469; this exposes fields when the incoming event includes them, without asserting that every API Gateway integration sends them.

Validation

  • mvn -pl aws-serverless-java-container-core -am test: 414 tests; 2 failures in untouched tests (AwsServletContextTest.getMimeType_mimeTypeOfJavascript_expectApplicationJavascript and ResponseWriterTest.isValidUtf8_testUtf8Strings_allShouldSucceed).
  • mvn -pl aws-serverless-java-container-core -Dtest=ApiGatewayClientCertificateTest,HttpApiV2ProxyRequestTest -Dspotbugs.skip=true -Djacoco.skip=true surefire:test: 8 tests passed.
  • git diff --check: passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for API Gateway mTLS clientCert field

1 participant