-
Notifications
You must be signed in to change notification settings - Fork 18
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
[sdk-v2]: ability to create a custom HttpClient with custom TLS certificates/connect via proxy #249
Comments
@lann mentioned an idea in fermyon/spin#2596 (comment):
|
I believe this will need changes upstream before the SDK can support it. @tschneidereit can you confirm that? |
@bacongobbler do you think it's strictly necessary to do this in content? A potential alternative could be to add a way to specify certificates to use for specific connections in the That way, content would never see the certificate, and we'd not have the overhead of loading it for every instance. We could do the same thing for proxies, in addition or alternatively to building something on top of WASI extensions, along the lines of a sketch I did a while ago. |
@tschneidereit it's not strictly necessary, no. fermyon/spin#2596 adds it to
Adding it to guest code would allow things like kubernetes client libraries to continue to work as expected, though. It expects to load TLS certificates from the filesystem. To work around this, we're loading certificates into the host via runtime-config and making raw Have you read @endocrimes's comment in that thread? Might be worth considering that use case and seeing if we may need to implement it on the guest side. |
Currently, Spin's v2 SDK doesn't support self-signed server certificates which are used by almost all Kubernetes deployments, including AWS and Google. This is because we're using the web platform's
fetch()
API, which does not allow programs to load custom TLS certificates due to the security implications of the browser APIs.It would be great if there was a way to create a custom HttpClient to use with
fetch()
. This would be an extension of the web platform Fetch API which would allow applications to load custom TLS certificates and connect via a proxy while usingfetch()
.See also https://deno.land/[email protected]?s=fetch&unstable=
The text was updated successfully, but these errors were encountered: