-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[ feature request ] Use rustls #29
Comments
this would also allow KTLS support rustls/rustls#198 |
This is currently rather complicated because Pingora is using OpenSSL APIs directly, almost without any intermediate layer. So doing this would require implementing OpenSSL APIs on top of rustls. My work in #277 at least shows which parts need to be implemented as OpenSSL is rather massive. |
Am I missing something here? Wouldn't the rustls implementation make OpenSSL obsolete? Of course Pingora has to re-implement everything to be compatible with rustls. But isn't that the general goal of the request? |
I suspect that Pingora will want to keep OpenSSL and BoringSSL support around rather than throw it all out for rustls. And while it’s possible to use BoringSSL via rustls (though I’m not sure how reliable boring-rustls-provider is), there is currently nothing comparable for OpenSSL. |
There is a compatibility layer that can be used to replace OpenSSL's |
The choice of supporting OpenSSL and BoringSSL is for compliance reasons. Even with rustls got FIPS certifications recently, switching from one crypto to another could cause millions of dollars and years to audit and certify for large organizations. Therefore, OpenSSL/BoringSSL is unlikely to be replaced. That being said, rustls is a good addition. |
We know that it's a pain but we really need rustls re-implemented version or optional rustls feature support. We need both speed, security, modern features and rusty. |
I would like to thank the Cloudflare team, and especially @johnhurt for their help and support to integrate Rustls into Pingora. My PR is not ideal in several ways and especially in terms of layout/structure and performance. Thank you for addressing these issues by enhancing the PR and for splitting it into smaller PRs to allow reviewing and to maintain the original authors. After having spent some time with the Rustls Pingora integration and performance comparisons of OpenSSL & Rustls within Pingora I'd like to share some of the results. As performance related topics are hard to compare as they depend on hardware, supported instruction sets, OS, architecture, compilers and various other influences all the following should be taken just as what it is: a measurement in a single scenario. The comparisons are based on the branch in PR #336/(90a823a) which will be in some aspects different from the final implementation. The benchmarks have been run using #367/(36274b4) with slight modifications for RSA 4096 (cert/key & timeout setup). I hope that the chosen method for comparing is suitable and provides a good view on the performance of the different TLS implementations within Pingora. In case there are issues with the selected procedure please let me know. The comparisions have been created starting with RSA 4096Pingora Acceptor
Pingora Connector
EC prime256v1Pingora Acceptor
Pingora Connector
System Details
Have a great time, and many thanks for reading till the end. 😃 Kind regards, |
Preliminary Rustls support is ready 354a6ee Looking for test and feedbacks. |
What is the problem your feature solves, or the need it fulfills?
Use rustls instead of OpenSSL.
Describe the solution you'd like
Either fully replace OpenSSl dependency with rustls (my preference) or publish a new feature that would substitute OpenSSL with rustls.
Describe alternatives you've considered
N/A.
The text was updated successfully, but these errors were encountered: