본문 바로가기
카테고리 없음

[elasticsearch] elasticsearch ssl 인증 (elasticsearch api in python)

by whathelllllllllllllllll 2020. 10. 27.
728x90

import ssl 

import requests 

from elasticsearch import Elasticsearch

    

#context=ssl.create_default_context(cafile="/home/elastic/elastic-7.8.0/elasticsearch-7.8.0/config/cert/ca/ca.crt")

    #context.check_hostname = False 

    #context.verify_mode = ssl.CERT_NONE 

 

    # es = Elasticsearch( ["192.168.4."], 

    #         scheme="https", 

    #         port=9200, 

    #         http_auth=('id', 'pw'), 

    #         ssl_context=context 

    #     ) 

댓글