# Logstash management with self signed sertificate

**URL:** <https://discuss.elastic.co/t/logstash-management-with-self-signed-sertificate/216981>\
**Category:** Logstash\
**Tags:** elastic-stack-monitoring, fleet\
**Created:** [January 29, 2020, 10:32am UTC](https://discuss.elastic.co/t/logstash-management-with-self-signed-sertificate/216981 "2020-01-29T10:32:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pszemesy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@pszemesy](https://discuss.elastic.co/u/pszemesy)\
**Post date:** [January 29, 2020, 10:32am UTC](https://discuss.elastic.co/t/logstash-management-with-self-signed-sertificate/216981/1 "2020-01-29T10:32:47Z")

</div>

Hi All,

I have secured my Elasticsearch cluster's (3 nodes) http communication as below:  
_xpack.security.enabled: true_  
_xpack.security.transport.ssl.enabled: true_  
_xpack.security.transport.ssl.verification\_mode: certificate_  
_xpack.security.transport.ssl.keystore.path: /etc/elasticsearch/cert/elastic-certificates.p12_  
_xpack.security.transport.ssl.truststore.path: /etc/elasticsearch/cert/elastic-certificates.p12_  
_xpack.security.http.ssl.enabled: true_  
_xpack.security.http.ssl.keystore.path: /etc/elasticsearch/cert/elastic-certificates.p12_  
_xpack.security.http.ssl.truststore.path: /etc/elasticsearch/cert/elastic-certificates.p12_  
(The certificates are generated with elasticsearch-certutil. I have copied the same certs to all nodes.)

I have configured my Logstash nodes like below:  
_xpack.monitoring.enabled: true_  
_xpack.monitoring.elasticsearch.username: logstash\_system_  
_xpack.monitoring.elasticsearch.password: some\_password_  
_xpack.monitoring.elasticsearch.hosts: ["[https://xxx.xxx.xxx.210:9200](https://xxx.xxx.xxx.210:9200)", "[https://xxx.xxx.xxx.211:9200](https://xxx.xxx.xxx.211:9200)", "[https://xxx.xxx.xxx.212:9200](https://xxx.xxx.xxx.212:9200)"]_  
_xpack.monitoring.elasticsearch.ssl.verification\_mode: none_  
_xpack.management.enabled: true_  
_xpack.management.pipeline.id: ["some pipelne1", "some pipelne2"]_  
_xpack.management.elasticsearch.username: elastic_  
_xpack.management.elasticsearch.password: some\_password_  
_xpack.management.elasticsearch.hosts: ["[https://xxx.xxx.xxx.210:9200](https://xxx.xxx.xxx.210:9200)", "[https://xxx.xxx.xxx.211:9200](https://xxx.xxx.xxx.211:9200)", "[https://xxx.xxx.xxx.212:9200](https://xxx.xxx.xxx.212:9200)"]_  
_xpack.management.elasticsearch.ssl.verification\_mode: none_

It is unable to connect to the ES cluster.  
Version of ES and Logstash: 7.5.2

Everything worked fine till the SSL was not introduced.

Please help me how to avoid this connection issue. Thanks!

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [January 29, 2020, 12:07pm UTC](https://discuss.elastic.co/t/logstash-management-with-self-signed-sertificate/216981/2 "2020-01-29T12:07:44Z")

</div>

Hi @pszemesy,

I am by no means an expert when it comes to the SSL part of Logstash and Elasticsearch but this is what seems to be working for a test setup I have running.

Elasticsearch

```
xpack.security.enabled: true
xpack.security.http.ssl.client_authentication: optional
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: certs/elastic-stack-ca.p12
xpack.security.http.ssl.keystore.type: PKCS12
xpack.security.http.ssl.supported_protocols: TLSv1.2, TLSv1.1
xpack.security.http.ssl.truststore.path: certs/elastic-stack-ca.p12
xpack.security.http.ssl.truststore.type: PKCS12
xpack.security.http.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: optional
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.keystore.path: certs/elastic-stack-ca.p12
xpack.security.transport.ssl.keystore.type: PKCS12
xpack.security.transport.ssl.supported_protocols: TLSv1.2, TLSv1.1
xpack.security.transport.ssl.truststore.path: certs/elastic-stack-ca.p12
xpack.security.transport.ssl.truststore.type: PKCS12
xpack.security.transport.ssl.verification_mode: certificate 

```

My Logstash output config is

```
output {
  elasticsearch {
    hosts => ["10.0.0.14:9200", "10.0.0.34:9200"]
    index => "my_index"
    cacert => "/etc/logstash/ssl/client-ca.cer"
    ssl_certificate_verification => false
    ssl => true
    user => "elastic"
    password => "my_password"
  }
}

```

I use my own CA to generate self-signed SSL certs. Logstash should only really need the intermediate cert so that it trusts the CA.

That test setup is running version 7.3.0 of Elasticsearch and Logstash.

Reading through my notes I followed [this blog post](https://www.elastic.co/blog/elasticsearch-security-configure-tls-ssl-pki-authentication) to set it up.

---

<div class="post-metadata">

**Author:** ![pszemesy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@pszemesy](https://discuss.elastic.co/u/pszemesy)\
**Post date:** [January 30, 2020, 7:32am UTC](https://discuss.elastic.co/t/logstash-management-with-self-signed-sertificate/216981/3 "2020-01-30T07:32:19Z")

</div>

Hi,  
My problem is not with the pipeline configs, but with the Management and Monitoring.  
Due to the issue with the _xpack.management_ Logstash not able to retrieve the license information (we have Gold subscription) the pipeline configurations from Elasticsearch.

---

<div class="post-metadata">

**Author:** ![pszemesy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@pszemesy](https://discuss.elastic.co/u/pszemesy)\
**Post date:** [February 12, 2020, 9:27am UTC](https://discuss.elastic.co/t/logstash-management-with-self-signed-sertificate/216981/4 "2020-02-12T09:27:08Z")

</div>

Hi All,  
It was a certificate issue.

---

<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:** [March 11, 2020, 9:27am UTC](https://discuss.elastic.co/t/logstash-management-with-self-signed-sertificate/216981/5 "2020-03-11T09:27:23Z")

</div>

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