Skip to content
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

mTLS support in API construct #3616

Open
morcs opened this issue Jan 10, 2024 · 5 comments
Open

mTLS support in API construct #3616

morcs opened this issue Jan 10, 2024 · 5 comments

Comments

@morcs
Copy link

morcs commented Jan 10, 2024

I'd like to add the mTLS config to the Api construct. It's possible through the older ApiGatewayV1Api construct and is implemented on the underlying CDK v2 API gateway/custom domain constructs, so I think it should be relatively straightforward.

I'm happy to work on this myself and PR if it's not something that's already been ruled out?

@Samantaaparajita
Copy link

Samantaaparajita commented Jan 10, 2024 via email

@jayair
Copy link
Contributor

jayair commented Jan 13, 2024

Oh interesting. Can you point me to the CDK doc on the props you use to set this in ApiGatewayV1Api? I can figure out how we want to do it for the Api construct.

@morcs
Copy link
Author

morcs commented Jan 15, 2024

Awesome, thanks Jay!

There's an optional mtls property on aws-cdk-lib/aws_apigatewayv2/DomainName:

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.DomainName.html

This allows us to provide an S3 bucket reference and key (plus optional S3 version) to the pem encoded public key file used to validate client certificates.

N.b. This is already available in SST, via the legacy ApiGatewayV1Api construct https://docs.sst.dev/constructs/ApiGatewayV1Api#mtls, it's just not exposed on the newer Api (HTTP API) construct, if that makes sense.

@jayair
Copy link
Contributor

jayair commented Jan 17, 2024

Ah I see. Let me check with the team.

@fwang
Copy link
Contributor

fwang commented Jan 25, 2024

I'm happy to work on this myself and PR if it's not something that's already been ruled out?

@morcs that would be great!

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

No branches or pull requests

4 participants