Open ThatIsGeek opened 6 years ago
While setting up Calico in our OpenStack deployment we've encountered issues when trying to use TLS authentication to access etcd cluster.
To reproduce:
c = Etcd3Client(host="server", protocol="https", ca_cert="server_ca.crt", cert_cert="user.crt", cert_key="user.key")
c.get("random_key")
alert bad certificate
CERTIFICATE_VERIFY_FAILED
When looking through the source code we've noticed that the TLS parameters are stored in self.kwargs and then never used.
https://github.com/dims/etcd3-gateway/blob/11cf6c43f1f737be29a175d40eca4b714ef82548/etcd3gw/client.py#L55
When edited to actually set the values on the session object, the TLS auth started working.
Issue appeared on both Ubuntu Xenial (Python 2.7.12, OpenSSL 1.0.2g) and Fedora 27 (Python 2.7.14, OpenSSL 1.1.0h).
@ThatIsGeek can you please submit a patch?
@dims sure :) I am already working on it. Sorry for not mentioning it in the report.
While setting up Calico in our OpenStack deployment we've encountered issues when trying to use TLS authentication to access etcd cluster.
To reproduce:
c = Etcd3Client(host="server", protocol="https", ca_cert="server_ca.crt", cert_cert="user.crt", cert_key="user.key")
c.get("random_key")
alert bad certificate
orCERTIFICATE_VERIFY_FAILED
if you don't have server_ca in your system trust.When looking through the source code we've noticed that the TLS parameters are stored in self.kwargs and then never used.
https://github.com/dims/etcd3-gateway/blob/11cf6c43f1f737be29a175d40eca4b714ef82548/etcd3gw/client.py#L55
When edited to actually set the values on the session object, the TLS auth started working.
Issue appeared on both Ubuntu Xenial (Python 2.7.12, OpenSSL 1.0.2g) and Fedora 27 (Python 2.7.14, OpenSSL 1.1.0h).