# Security in elasticsearch

**URL:** <https://discuss.elastic.co/t/security-in-elasticsearch/322119>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 28, 2022, 7:00pm UTC](https://discuss.elastic.co/t/security-in-elasticsearch/322119 "2022-12-28T19:00:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex\_96](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@alex\_96](https://discuss.elastic.co/u/alex_96)\
**Post date:** [December 28, 2022, 7:00pm UTC](https://discuss.elastic.co/t/security-in-elasticsearch/322119/1 "2022-12-28T19:00:10Z")

</div>

Hello everyone, such a question, I recently set up elasticsearch 7.17, when I created certificates, I caught myself thinking that I didn’t fully understand the meaning, I hope you can help me.

1. as I understand it, there are three degrees of protection, this is protection between the nodes themselves in the cluster, then there is protection when third-party clients contact (which, as I understand it, kibana is), and the third is protection when accessing kibana through a browser, is it correct I got it?
2. When creating a config for connecting logstash to a secure elasticsearch cluster, the certificate that was created for kibana is indicated `elasticsearch-ca.pem` so the question is, why do we add a kibana certificate, and do not create, for example, 2 separate certificates for logstash?

---

<div class="post-metadata">

**Author:** ![dadiasish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadiasish/32/114221_2.png) [@dadiasish](https://discuss.elastic.co/u/dadiasish)\
**Post date:** [December 29, 2022, 11:56am UTC](https://discuss.elastic.co/t/security-in-elasticsearch/322119/2 "2022-12-29T11:56:34Z")

</div>

> 1. as I understand it, there are three degrees of protection, this is protection between the nodes themselves in the cluster, then there is protection when third-party clients contact (which, as I understand it, kibana is), and the third is protection when accessing kibana through a browser, is it correct I got it?

Yes, your understanding is absolutely right.

> 1. When creating a config for connecting logstash to a secure elasticsearch cluster, the certificate that was created for kibana is indicated `elasticsearch-ca.pem` so the question is, why do we add a kibana certificate, and do not create, for example, 2 separate certificates for logstash?

This point is not very clear for me.

But with what I understood, when you connect with elasticsearch, in the logstash config file output, you need to provide the certificate of elasticsearch as it authenticates with the certificate inside elasticsearch and then the handshake happens and the data will get transmitted to elasticsearch.

Try explaining your 2nd point in more detail so that we can guide further.

Thanks.

---

<div class="post-metadata">

**Author:** ![alex\_96](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@alex\_96](https://discuss.elastic.co/u/alex_96)\
**Post date:** [December 29, 2022, 3:16pm UTC](https://discuss.elastic.co/t/security-in-elasticsearch/322119/3 "2022-12-29T15:16:18Z")

</div>

Hi, on the 2nd point, it turns out `elasticsearch-ca.pem` for kibana is used as a CA public key (`ca.crt`) so that applications trust elasticsearch?

---

<div class="post-metadata">

**Author:** ![dadiasish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadiasish/32/114221_2.png) [@dadiasish](https://discuss.elastic.co/u/dadiasish)\
**Post date:** [December 29, 2022, 3:32pm UTC](https://discuss.elastic.co/t/security-in-elasticsearch/322119/4 "2022-12-29T15:32:51Z")

</div>

ca.crt or ca.pem is the certificate authority/signing authority using which the certificates try to authenticate eachother for authentication.

---

<div class="post-metadata">

**Author:** ![alex\_96](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@alex\_96](https://discuss.elastic.co/u/alex_96)\
**Post date:** [December 29, 2022, 3:58pm UTC](https://discuss.elastic.co/t/security-in-elasticsearch/322119/5 "2022-12-29T15:58:27Z")

</div>

Now it’s clear, between ca.pem and ca.crt you can set equal

---

<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:** [January 26, 2023, 3:59pm UTC](https://discuss.elastic.co/t/security-in-elasticsearch/322119/6 "2023-01-26T15:59:22Z")

</div>

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