-
Notifications
You must be signed in to change notification settings - Fork 109
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
Migrate to rustls
#820
Migrate to rustls
#820
Conversation
Skipping CI for Draft Pull Request. |
.cargo/config.toml
Outdated
@@ -1,5 +1,5 @@ | |||
[build] | |||
target-dir = "out/rust" | |||
[env] | |||
BORING_BSSL_PATH = { value = "vendor/boringssl-fips/linux_x86_64", force = true, relative = true } | |||
BORING_BSSL_INCLUDE_PATH = { value = "vendor/boringssl-fips/include/", force = true, relative = true } | |||
BORING_BSSL_FIPS_PATH = { value = "vendor/boringssl-fips/linux_x86_64", force = true, relative = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BORING_BSSL_FIPS_PATH = { value = "vendor/boringssl-fips/linux_x86_64", force = true, relative = true } | |
BORING_BSSL_FIPS_PATH = { value = "vendor/boringssl-fips/linux_x86_64", force = true, relative = true } |
Does this also fix: #399 ?
I haven't checked, but one of the minor annoyances before was we couldn't conditionally set this variable in build.rs
per-arch/platform, because boring-sys
was doing stuff in its own build.rs
that both
A) didn't work with vendoring
B) defeated cargo's "recompute" logic making it impossible to override in our build.rs
which means the build has to sed
this for multiarch builds, and those of us on linux_arm64
have to locally munge this file constantly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so unless you buid with ring
instead of boring which sidesteps the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I forgot a bit part of this - I am proposing we default Istio builds to ring as well.. that decision can be decoupled from the broader PR though
Big plus 1 for moving to rustls! |
fda4e13
to
55e0860
Compare
55e0860
to
30809fb
Compare
30dfb3d
to
d3794a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems happy building locally with both FIPS and non-FIPS variants on arm64 (with the vendored lib move mentioned in comments).
6d16bce
to
4878635
Compare
@@ -25,70 +26,78 @@ name = "throughput" | |||
harness = false | |||
|
|||
[dependencies] | |||
http-02 = { package = "http", version = "0.2.9" } | |||
# Enabled with 'tls-boring' | |||
boring-rustls-provider = { git = "https://github.com/janrueth/boring-rustls-provider", optional = true } # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this repo actively maintained, and who takes charge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am working to get this actively maintained (TBD by who). Note this is an off by default feature; the default Istio builds do not use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has nothing todo with default or not. Every dependency should be actively maintained. So I get it, you own this crate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this approach, LGTM.
@@ -25,70 +26,78 @@ name = "throughput" | |||
harness = false | |||
|
|||
[dependencies] | |||
http-02 = { package = "http", version = "0.2.9" } | |||
# Enabled with 'tls-boring' | |||
boring-rustls-provider = { git = "https://github.com/janrueth/boring-rustls-provider", optional = true } # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has nothing todo with default or not. Every dependency should be actively maintained. So I get it, you own this crate
This PR moves from usage of
boring
as a crypto library and TLS library, to usingrustls
. Rustls is the standard TLS library in the rust ecosystem.Rustls offers a pluggable crypto interface. There are ~3 providers (2 in core, 1 external): ring, aws_lc_rs, and boring. The latter two provider FIPS certified builds (though I think aws_lc only has in progress builds);
ring
has no FIPS certified builds though I think they are working towards one. In this model, the TLS aspects (which are a large portion of the code involved) are handled purely by rustls's code, written in safe rust. Just the crypto primitives are offloaded to these various libraries (which are all ultimately varying degrees of openssl forks, as I understand it).This offers a few benefits:
Fixes #797
Fixes #641
Helps with #149
Fixes #110