Support pluggable rustls crypto providers (ring, aws-lc-rs, OpenSSL) …#2269
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2269 +/- ##
==========================================
- Coverage 87.56% 87.55% -0.01%
==========================================
Files 570 571 +1
Lines 193480 193505 +25
==========================================
+ Hits 169414 169423 +9
- Misses 23540 23556 +16
Partials 526 526
🚀 New features to boost your workflow:
|
553b19b to
3fbdfcb
Compare
18fe76a to
5355f5b
Compare
drewrelmas
left a comment
There was a problem hiding this comment.
Looks good to me, we can take my questions on removal of experimental-tls feature flag up in later PR.
Would like to wait for @lalitb's approval as well before merging.
5355f5b to
5c30c5b
Compare
lalitb
left a comment
There was a problem hiding this comment.
LGTM! Clean abstraction for pluggable crypto providers - nice work @pritishnahar95.
…via feature flags
ff22bb3 to
76e2386
Compare
76e2386 to
4be43b1
Compare
I'm wondering whether we actually have a real problem here. In the medium term, I expected that we would no longer have Regarding Weaver, we could imagine introducing a feature that enables dev-only capabilities (disabled by default). If we do that, it seems to me that nothing would remain that is not configured through the feature flags introduced in this PR. |
That's a good point @lquerel! Let's tackle the weaver feature-gating in a separate issue/PR since it seems to touch the fake_data_generator module, its linkme registrations, and test/validation configs — better as a focused follow-up. |
Change Summary
Support pluggable rustls crypto providers (ring, aws-lc-rs, OpenSSL) via
compile-time feature flags. TLS support previously hardcoded
ringas therustls crypto backend. This PR introduces three mutually exclusive feature
flags (
crypto-ring,crypto-aws-lc,crypto-openssl) so users can selecttheir preferred
CryptoProviderat build time, enabling compliance withenvironments that require OpenSSL or FIPS-validated cryptography.
What issue does this PR close?
How are these changes tested?
cargo checkpasses with default features (crypto-ring).cargo check --no-default-features --features jemalloc,crypto-openssl,experimental-tlspasses.tls_utils,mtls_tests,tls_stream,tls_reload,otlp_exporter_tls,otlp_exporter_proxy_tls) now use the centralizedinstall_crypto_provider()helper and will exercise whichever backend isselected by feature flags.
compile_error!guards prevent enabling multiple crypto features simultaneously.Are there any user-facing changes?
Yes:
otap-df-otap:crypto-ring(default) — usesring, backward-compatible.crypto-aws-lc— usesaws-lc-rsfor AWS environments.crypto-openssl— usesrustls-opensslfor regulated/FIPS environments.crypto-ringis included in the defaultfeature set, so existing builds are unaffected.
cargo build --no-default-features --features jemalloc,crypto-opensslringdependencies fromopentelemetry-otlp(viareqwest 0.12)and
weaver(viaureq) remain and are tracked for resolution as upstreamcrates release updates. Weaver is dev/test tooling only, not a production
pipeline component.