# From the demo to a POC

**URL:** <https://forum.search-guard.com/t/from-the-demo-to-a-poc/699>\
**Category:** Search Guard\
**Created:** [December 4, 2017, 11:24pm UTC](https://forum.search-guard.com/t/from-the-demo-to-a-poc/699 "2017-12-04T23:24:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Mejia](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@Felipe\_Mejia](https://forum.search-guard.com/u/Felipe_Mejia)\
**Post date:** [December 4, 2017, 11:24pm UTC](https://forum.search-guard.com/t/from-the-demo-to-a-poc/699/1 "2017-12-04T23:24:12Z")

</div>

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’)],)”,))

```auto
# ******* 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:

```auto
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!!

---

<div class="post-metadata">

**Author:** ![searchguard\_google\_group](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/searchguard_google_group/32/462_2.png) [@searchguard\_google\_group](https://forum.search-guard.com/u/searchguard_google_group)\
**Post date:** [December 28, 2017, 12:58pm UTC](https://forum.search-guard.com/t/from-the-demo-to-a-poc/699/2 "2017-12-28T12:58:00Z")

</div>

see here [https://gist.github.com/floragunncom/9319a994ae09df64b2a173128f745ed2](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(
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;"\*\*.\*\*\*.\*\*\*.58",  
> > &nbsp;&nbsp;&nbsp;&nbsp;connection\_class=RequestsHttpConnection,  
> > &nbsp;&nbsp;&nbsp;&nbsp;http\_auth=("user", "password"),  
> > &nbsp;&nbsp;&nbsp;&nbsp;#timeout=30, max\_retries=10, retry\_on\_timeout=True,  
> > &nbsp;&nbsp;&nbsp;&nbsp;port=9200,  
> > &nbsp;&nbsp;&nbsp;&nbsp;use\_ssl=True,  
> > &nbsp;&nbsp;&nbsp;&nbsp;verify\_certs=True,  
> > &nbsp;&nbsp;&nbsp;&nbsp;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\](https://groups.google.com/d/msgid/search-guard/3176ea6a-484c-4c40-878c-0a4567505405%40googlegroups.com%5C).  
> > For more options, visit [https://groups.google.com/d/optout\](https://groups.google.com/d/optout%5C).
