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

rustls support #293

Open
Milo123459 opened this issue Sep 19, 2021 · 7 comments
Open

rustls support #293

Milo123459 opened this issue Sep 19, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@Milo123459
Copy link

No description provided.

@psarna
Copy link
Contributor

psarna commented Sep 20, 2021

Back in the days when we implemented TLS, rustls was originally picked as the TLS library, but we later decided to temporarily go with openssl for a few reasons:

  • rustls did not allow creating certificates for IP addresses, which was a must-have for certain Scylla clusters
  • rustls was very opinionated with the standard of created keys and certificates (mandatory fields, etc.), and thus made it harder to use already generated pairs

We'd very much like to migrate back to rustls, but first we need to verify that the project got mature enough to fit our needs.

Also - contributions are welcome :)

@jtcarnes
Copy link

I would suggest waiting until rustls v0.20, which is currently in beta. They introduced a few breaking changes but it's supposed to stabilize after this (is at least their claim).

@psarna
Copy link
Contributor

psarna commented Nov 3, 2021

update: judging from https://docs.rs/rustls/0.20.0/rustls/client/enum.ServerName.html , 0.2.0 still does not allow using certificates generated for specific IP addresses, so rustls integration will still be on hold

@insanitybit
Copy link

I believe that the issue is ultimately due to the webpki dependency. The relevant issue is here:
briansmith/webpki#54

According to this issue Brian Smith intends to start working on that "relatively soon".

@colin-grapl
Copy link
Contributor

I wonder if it would be acceptable to put rustls behind a feature flag? That way if someone needed to perform an IP connection they could do so with openssl, but otherwise they could enable rustls?

@psarna
Copy link
Contributor

psarna commented Mar 22, 2022

Certainly, contributions guarded with an optional flag are welcome. Note however that the main issue is that Scylla and Cassandra generally operate on IP addresses, not domain names, when recognizing nodes, so their certificates are usually also generated for given address. So while we could have optional rustls support for setting up proper tls context with given certificate, it might so happen that the IP-based certificate (that the database node has) is not supported by the library, and thus can't be verified.

@mykaul mykaul added the enhancement New feature or request label Jan 9, 2023
@nemosupremo
Copy link
Contributor

Seems like as of January 17, Rustls now supports certs for IP addresses.

@Lorak-mmk Lorak-mmk self-assigned this Nov 15, 2023
nemosupremo added a commit to ionosnetworks/scylla-rust-driver that referenced this issue Jan 11, 2024
@Lorak-mmk Lorak-mmk removed their assignment Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants