# Logstash Jdbc input Plugin configuration with SSL cert information

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-input-plugin-configuration-with-ssl-cert-information/215639>\
**Category:** Logstash\
**Created:** [January 19, 2020, 5:58pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-configuration-with-ssl-cert-information/215639 "2020-01-19T17:58:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mullan](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@mullan](https://discuss.elastic.co/u/mullan)\
**Post date:** [January 19, 2020, 5:58pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-configuration-with-ssl-cert-information/215639/1 "2020-01-19T17:58:16Z")

</div>

Hi,

Iam new to Logstash. My project requires to configure logstash with jdbc input plugin.Below is the conf file I had used.

input {  
jdbc {  
jdbc\_driver\_library =\> "lib\jars\mongodb\_unityjdbc\_full.jar"  
jdbc\_driver\_class =\> "Java::mongodb.jdbc.MongoDriver"  
jdbc\_connection\_string =\> "jdbc:mongo://testdb:27017/dbtest? ssl=true&authMechanism=SCRAM-SHA-1"  
jdbc\_user =\> "test"  
jdbc\_password =\> "Asdf~123"  
jdbc\_validate\_connection =\> true  
statement =\> "Select userId as id,firstName as firstname, lastName as lastname From IntUser"  
}  
}

I have my SSL CA and key file . How do I configure my conf file to set the those cert information ?

Any help or guidance on this would be of great help.

Thanks.

---

<div class="post-metadata">

**Author:** ![Ramicoh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramicoh/32/61017_2.png) [@Ramicoh](https://discuss.elastic.co/u/Ramicoh)\
**Post date:** [January 21, 2020, 10:17pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-configuration-with-ssl-cert-information/215639/2 "2020-01-21T22:17:20Z")

</div>

Hi Mullan,

Take a look at the following documentation: [https://jdbc.postgresql.org/documentation/head/connect.html](https://jdbc.postgresql.org/documentation/head/connect.html).

In short - the connection string should include the “ssl=true” parameter.

Hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![mullan](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@mullan](https://discuss.elastic.co/u/mullan)\
**Post date:** [January 23, 2020, 6:25am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-configuration-with-ssl-cert-information/215639/3 "2020-01-23T06:25:28Z")

</div>

Hi Ramicoh,

Thank you for the reply.  
My connection string already has ssl =true. I wanted to include the cert information because of two way authentication.

I had done a workaround to include them as jvm options.

jvm.options file i had included the following  
-Djavax.net.ssl.keyStore="\xxxxx.jks"  
-Djavax.net.ssl.keyStoreType=JKS  
-Djavax.net.ssl.keyStorePassword="xxx"

Hope this helps someone.

---

<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:** [February 20, 2020, 6:33am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-configuration-with-ssl-cert-information/215639/4 "2020-02-20T06:33:08Z")

</div>

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