From the demo to a POC

Hi everyone,

i just installed Elasticsearch Kibana 5.6.3 version and the SearchGuard demo, the demo it´s running ok with the login and other Kibana security, but the problem come when i try to use a python 2.7 or 3.6 script to connect and index some data, the recurrent error it´s a bad handshake ( i know that the problem it´s for the bad configuration)

Error:

Error in connection init: ConnectionError((“bad handshake: Error([(‘SSL routines’, ‘ssl3_get_server_certificate’, ‘certificate verify failed’)],)”,)) caused by: SSLError((“bad handshake: Error([(‘SSL routines’, ‘ssl3_get_server_certificate’, ‘certificate verify failed’)],)”,))

#*******config from demo
searchguard.ssl.transport.keystore_filepath: keystore.jks
searchguard.ssl.transport.truststore_filepath: truststore.jks
searchguard.ssl.transport.enforce_hostname_verification: true #false
searchguard.ssl.http.enabled: true
searchguard.ssl.http.keystore_filepath: keystore.jks
searchguard.ssl.http.truststore_filepath: truststore.jks

searchguard.ssl.transport.pemkey_filepath: key.pem
searchguard.ssl.transport.pemkey_password: some_pass
searchguard.ssl.transport.pemcert_filepath: cert.pem
#searchguard.ssl.transport.pemtrustedcas_filepath: NONE

searchguard.ssl.http.pemkey_filepath: key.pem
searchguard.ssl.http.pemkey_password: some_pass
searchguard.ssl.http.pemcert_filepath: cert.pem
#searchguard.ssl.http.pemtrustedcas_filepath: NONE

the python part it’s:

es = Elasticsearch(

    "**.***.***.58",
    connection_class=RequestsHttpConnection,
    http_auth=("user", "password"),
    #timeout=30, max_retries=10, retry_on_timeout=True,
    port=9200,
    use_ssl=True,
    verify_certs=True,
    ca_certs='logsday/cert.pem',
)

Can you give me some advice to start from the demo and add a new key to do my connections (step by step, the tutorials are a bit tricky for the people that don´t are too familiar whit the security field) ? or how i can do with the current ones in the demo?, the python script it’s supposed to run on another machine.

Best Regards!!

see here https://gist.github.com/floragunncom/9319a994ae09df64b2a173128f745ed2 how to python working

···

Am 05.12.2017 um 00:24 schrieb Felipe Mejia <leaxael@gmail.com>:

Hi everyone,
i just installed Elasticsearch Kibana 5.6.3 version and the SearchGuard demo, the demo it´s running ok with the login and other Kibana security, but the problem come when i try to use a python 2.7 or 3.6 script to connect and index some data, the recurrent error it´s a bad handshake ( i know that the problem it´s for the bad configuration)

Error:
Error in connection init: ConnectionError(("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)) caused by: SSLError(("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",))

#*******config from demo
searchguard.ssl.transport.keystore_filepath: keystore.jks
searchguard.ssl.transport.truststore_filepath: truststore.jks
searchguard.ssl.transport.enforce_hostname_verification: true #false
searchguard.ssl.http.enabled: true
searchguard.ssl.http.keystore_filepath: keystore.jks
searchguard.ssl.http.truststore_filepath: truststore.jks

searchguard.ssl.transport.pemkey_filepath: key.pem
searchguard.ssl.transport.pemkey_password: some_pass
searchguard.ssl.transport.pemcert_filepath: cert.pem
#searchguard.ssl.transport.pemtrustedcas_filepath: NONE

searchguard.ssl.http.pemkey_filepath: key.pem
searchguard.ssl.http.pemkey_password: some_pass
searchguard.ssl.http.pemcert_filepath: cert.pem
#searchguard.ssl.http.pemtrustedcas_filepath: NONE

the python part it's:

es = Elasticsearch(

    "**.***.***.58",
    connection_class=RequestsHttpConnection,
    http_auth=("user", "password"),
    #timeout=30, max_retries=10, retry_on_timeout=True,
    port=9200,
    use_ssl=True,
    verify_certs=True,
    ca_certs='logsday/cert.pem',
)

Can you give me some advice to start from the demo and add a new key to do my connections (step by step, the tutorials are a bit tricky for the people that don´t are too familiar whit the security field) ? or how i can do with the current ones in the demo?, the python script it's supposed to run on another machine.

Best Regards!!

--
You received this message because you are subscribed to the Google Groups "Search Guard Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to search-guard+unsubscribe@googlegroups.com.
To post to this group, send email to search-guard@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/3176ea6a-484c-4c40-878c-0a4567505405%40googlegroups.com\.
For more options, visit https://groups.google.com/d/optout\.