# Mutual tls between fluentd(act as client) and elasticsearch(act as server)

**URL:** <https://discuss.elastic.co/t/mutual-tls-between-fluentd-act-as-client-and-elasticsearch-act-as-server/334816>\
**Category:** Elasticsearch\
**Created:** [May 31, 2023, 2:20pm UTC](https://discuss.elastic.co/t/mutual-tls-between-fluentd-act-as-client-and-elasticsearch-act-as-server/334816 "2023-05-31T14:20:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)\
**Post date:** [May 31, 2023, 2:20pm UTC](https://discuss.elastic.co/t/mutual-tls-between-fluentd-act-as-client-and-elasticsearch-act-as-server/334816/1 "2023-05-31T14:20:47Z")

</div>

Hi

I am trying to establish mutual tls between fluentd and elasticsearch.  
I have followed steps described in [https://www.elastic.co/guide/en/elasticsearch/reference/8.7/security-basic-setup.html#generate-certificates](https://www.elastic.co/guide/en/elasticsearch/reference/8.7/security-basic-setup.html#generate-certificates)  
at [https://www.elastic.co/guide/en/elasticsearch/reference/8.7/security-basic-setup.html#encrypt-internode-communication](https://www.elastic.co/guide/en/elasticsearch/reference/8.7/security-basic-setup.html#encrypt-internode-communication) and  
[https://www.elastic.co/guide/en/elasticsearch/reference/8.7/security-basic-setup-https.html#encrypt-http-communication](https://www.elastic.co/guide/en/elasticsearch/reference/8.7/security-basic-setup-https.html#encrypt-http-communication)

What other steps should I follow in order to establish mTLS?  
Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)\
**Post date:** [June 1, 2023, 2:47pm UTC](https://discuss.elastic.co/t/mutual-tls-between-fluentd-act-as-client-and-elasticsearch-act-as-server/334816/2 "2023-06-01T14:47:41Z")

</div>

Hi

Could you please help here?!

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 1, 2023, 3:05pm UTC](https://discuss.elastic.co/t/mutual-tls-between-fluentd-act-as-client-and-elasticsearch-act-as-server/334816/3 "2023-06-01T15:05:33Z")

</div>

Hi @Voula_Mikr

We need a bit more....

Do you alreay have elasticsearch running with TLS on the HTTP interface?

You need to show us your elasticsearch.yml [and the settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html#http-tls-ssl-settings)

You will need to set

`xpack.security.http.ssl.client_authentication: optional`

> `xpack.security.http.ssl.client_authentication`  
> ([Static](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#static-cluster-setting)) Controls the server’s behavior in regard to requesting a certificate from client connections. Valid values are `required`, `optional`, and `none`. `required` forces a client to present a certificate, while `optional` requests a client certificate but the client is not required to present one. Defaults to `none`.

You will need to setup the path to the client side CA / Cert (honestly I am a bit fuzzy on that, perhaps I can look at that later today at some point)

Then the rest should be on the fluentd side, which some folks here _may_ be familiar with but you may need to visit the fluent forum.

So back to the first question do you have elasticsearch set up with TLS?

Have you verified that with `curl`?

---

<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:** [June 29, 2023, 3:05pm UTC](https://discuss.elastic.co/t/mutual-tls-between-fluentd-act-as-client-and-elasticsearch-act-as-server/334816/4 "2023-06-29T15:05:42Z")

</div>

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