Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

TLS support #28

Merged
merged 6 commits into from
May 11, 2020
Merged

TLS support #28

merged 6 commits into from
May 11, 2020

Conversation

johanot
Copy link
Contributor

@johanot johanot commented May 9, 2020

First of all: Thank you for a good usable etcdv3 crate!

Now that Tonic got tls-support for the load-balanced client (hyperium/tonic#338), it is possible to add true tls support to this crate as well.

This PR includes:

  1. Some minor Client code refactoring to avoid too much code duplication for when a Channel is established.

  2. Tonic 0.1 -> 0.2 (specifically v0.2.1 is required to get tls-support).

  3. Add optional tls-config to the ClientConfig struct. Note that this change breaks existing clients in that they will have to add tls: None explicitly.

  4. Update README with a minimal tls example and add a more comprehensive example in examples/tls.rs.

re 3) if you want, we can introduce a builder and/or default-pattern for the ClientConfig struct to avoid breaking clients when new fields are added in the future?

re 4) let me know if you want more or better docs + examples

I've tested this on my own tls-enabled production etcd cluster, with client cert auth enabled as well. I've also done a small regression test with tls disabled to ensure that I didn't break anything.

@zarvd
Copy link
Owner

zarvd commented May 11, 2020

Thanks! LGTM

@zarvd zarvd merged commit 4b054bc into zarvd:master May 11, 2020
@johanot johanot deleted the tls branch May 11, 2020 07:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants