How to use elasticsearch-py to test elastic client using authentication

Hey,
I am trying to test elastic client using authentications with the elasticsearch-py.

I use the trial license and connect to AD for my team.

reference here https://github.com/elastic/elasticsearch-py

>>> from elasticsearch import Elasticsearch
>>> from ssl import create_default_context

>>> context = create_default_context(cafile="path/to/cafile.pem")
>>> es = Elasticsearch("https://elasticsearch.url:port", ssl_context=context, http_auth=('elastic','yourpassword'))
>>> es.info()

what should I do with ssl_context or the cafile?

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