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

chore: Cleans up TLS dependencies #1519

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

tarikeshaq
Copy link
Contributor

@tarikeshaq tarikeshaq commented Feb 9, 2024

Description

We had a few places where we were importing native-tls (which pulls openssl in linux boxes) unintentionally. First was reqwest, where we enable the rustls-tls feature in a couple of places, but it was a no-op in one but since we did call use_rustls_tls in our tokenserver browserid verifier that used rustls properly. The second place was sentry, where even though we were using the curl feature, the transport feature is enabled by default, which pulls in request again, with the native-tls feature

Regardless, having both rustls and native-tls in our dependency tree could be a future foot gun, so this PR removes native-tls (alternatively, we can go the route of removing rustls but we seem to have consciously chose that, where native-tls snuck in with reqwest and sentry)

What this PR does not touch, is boring-ssl that is pulled in using grpc-io.

One possible improvement we can make to this, that fits well with https://mozilla-hub.atlassian.net/browse/SYNC-4127 is to setup rust features, where we can support multiple tls backends... but I'm struggling to see the value from that (i.e why do we need to support multiple backends in a binary?)

@jrconlin
Copy link
Member

jrconlin commented Feb 9, 2024

Looks good so far. Thanks for untangling some of that.

@tarikeshaq tarikeshaq force-pushed the tarikeshaq/clean-ssl branch from 14cc5b1 to 367b787 Compare February 9, 2024 19:12
@@ -42,10 +41,6 @@ hostname = "0.3.1"
hawk = "5.0"
hmac = "0.12"
mime = "0.3"
reqwest = { workspace = true, features = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like both reqwest and env_logger weren't being used by this crate, so I removed them while cleaning this up

@@ -15,7 +15,7 @@ serde_json.workspace = true
async-trait = "0.1.40"
dyn-clone = "1.0.4"
pyo3 = { version = "0.20", features = ["auto-initialize"] }
reqwest = { workspace = true, features = ["json", "rustls-tls"] }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since rust features are additive, and we specify the rustls feature in the workspace, there is no need to specify it here

@tarikeshaq tarikeshaq marked this pull request as ready for review February 9, 2024 19:15
@tarikeshaq tarikeshaq requested a review from jrconlin February 9, 2024 19:15
@tarikeshaq tarikeshaq merged commit ac3b479 into mozilla-services:master Feb 13, 2024
8 checks passed
@tarikeshaq tarikeshaq deleted the tarikeshaq/clean-ssl branch February 13, 2024 01:33
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

Successfully merging this pull request may close these issues.

2 participants