# Elasticsearch.py Python API communication over HTTPS

**URL:** <https://discuss.elastic.co/t/elasticsearch-py-python-api-communication-over-https/180075>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [May 7, 2019, 9:48pm UTC](https://discuss.elastic.co/t/elasticsearch-py-python-api-communication-over-https/180075 "2019-05-07T21:48:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbrase](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@kbrase](https://discuss.elastic.co/u/kbrase)\
**Post date:** [May 7, 2019, 9:48pm UTC](https://discuss.elastic.co/t/elasticsearch-py-python-api-communication-over-https/180075/1 "2019-05-07T21:48:23Z")

</div>

My goal is to secure communications between my elasticsearch cluster and my python application that I am creating. I however do not want to pay for a platinum license. Is it possible to use a gold license to secure between python clients and elasticsearch? What are the main differences between platinum and gold when securing communication between python clients?

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [May 8, 2019, 2:54am UTC](https://discuss.elastic.co/t/elasticsearch-py-python-api-communication-over-https/180075/2 "2019-05-08T02:54:34Z")

</div>

Can you clarify:

- Which version of Elasticsearch you're running?
- Wht exactly you mean by "secure communications"? Are we talking SSL/TLS, or username/password authentication, or something else?

---

<div class="post-metadata">

**Author:** ![kbrase](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@kbrase](https://discuss.elastic.co/u/kbrase)\
**Post date:** [May 8, 2019, 5:55pm UTC](https://discuss.elastic.co/t/elasticsearch-py-python-api-communication-over-https/180075/3 "2019-05-08T17:55:05Z")

</div>

Tim,

I am using Elasticsearch 6.3.2.  
By secure communications I do mean SSL/TLS.

Thank you for taking the time to respond and clarify.

Best,  
Keith

---

<div class="post-metadata">

**Author:** ![iukea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iukea/32/49083_2.png) [@iukea](https://discuss.elastic.co/u/iukea)\
**Post date:** [May 8, 2019, 9:11pm UTC](https://discuss.elastic.co/t/elasticsearch-py-python-api-communication-over-https/180075/4 "2019-05-08T21:11:13Z")

</div>

maybe this might help?  
es = Elasticsearch(  
['your server IP'],  
# turn on SSL  
use\_ssl=True,  
# make sure we verify SSL certificates  
http\_auth=('user', 'password'),  
# no verify SSL certificates  
verify\_certs=False,  
# don't show warnings about ssl certs verification  
ssl\_show\_warn=False

also, more info about python auth can be found here

[https://elasticsearch-py.readthedocs.io/en/master/#ssl-and-authentication](https://elasticsearch-py.readthedocs.io/en/master/#ssl-and-authentication)

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [May 9, 2019, 2:16am UTC](https://discuss.elastic.co/t/elasticsearch-py-python-api-communication-over-https/180075/5 "2019-05-09T02:16:18Z")

</div>

On 6.3, you can enable SSL for HTTP and Transport (node-to-node) on a Gold license. This is the "encrypted communications" row under "Security" on our [Subscriptions page](https://www.elastic.co/subscriptions).

The steps for Elasticsearch are here:

- [https://www.elastic.co/guide/en/elasticsearch/reference/6.3/configuring-tls.htm](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/configuring-tls.htm)

Let us know if you run into any difficulties.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 6, 2019, 2:16am UTC](https://discuss.elastic.co/t/elasticsearch-py-python-api-communication-over-https/180075/6 "2019-06-06T02:16:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
