Urllib3HttpConnection should have separate client_cert and client_key arguments #344

https://github.com/elastic/elasticsearch-py/issues/344
Add a client_key parameter to complement the client_cert parameter.  If
client_key is used, it is assumed that client_cert will contain only the
certificate, not the combined cert and key in a single file.

Closes #344
This commit is contained in:
Rich Megginson
2016-02-29 22:35:40 +01:00
committed by Honza Král
parent 90f18fa132
commit fe6e9a7f5c
4 changed files with 45 additions and 6 deletions
+12
View File
@@ -194,6 +194,18 @@ elasticsearch cluster, including certificate verification and http auth::
ca_certs=certifi.where(),
)
# SSL client authentication using client_cert and client_key
es = Elasticsearch(
['localhost', 'otherhost'],
http_auth=('user', 'secret'),
port=443,
use_ssl=True,
verify_certs=True,
ca_certs='/path/to/cacert.pem',
client_cert='/path/to/client_cert.pem',
client_key='/path/to/client_key.pem',
)
.. warning::