# Security enabled for all communications to an Elasticsearch cluster including communications from application servers

**URL:** <https://discuss.elastic.co/t/security-enabled-for-all-communications-to-an-elasticsearch-cluster-including-communications-from-application-servers/227054>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [April 8, 2020, 5:11am UTC](https://discuss.elastic.co/t/security-enabled-for-all-communications-to-an-elasticsearch-cluster-including-communications-from-application-servers/227054 "2020-04-08T05:11:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashish/32/65891_2.png) [@ashish](https://discuss.elastic.co/u/ashish)\
**Post date:** [April 8, 2020, 5:11am UTC](https://discuss.elastic.co/t/security-enabled-for-all-communications-to-an-elasticsearch-cluster-including-communications-from-application-servers/227054/1 "2020-04-08T05:11:18Z")

</div>

I am using `spring-boot 2.1.6.RELEASE` and `elasticsearch-rest-high-level-client 7.4.2` . At present  
I am working on enabling security for all communication to an Elasrticsearch including communication to/from my application. My application runs on HTTPS.

So think, in Elastic search, I need to secure two-level of communication,

- Transport communications (Elasticsearch Internal communication)
- HTTP communications. (Elastic search communication with my Application)

For securing Transport communication, I created a certificate authority for the Elasticsearch cluster using the [elasticsearch-certutil](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/certutil.html) ca command and it generates the single output file elastic-stack-ca.p12. In my spring-boot application, I am creating a `high-level REST client` with x-pack + TLS using [this](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/_encrypted_communication.html) example and it's working absolutely fine.

1. What do I need to secure the HTTP communication?
2. Should I create a `high-level REST' client using the certificates that I created using` elasticsearch-certutil `or using the certificate that I created to enable SSL (HTTPS) support for my Spring Boot application? or should I need both the certificates while creating` high-level REST' client in my code
3. Can't I use a single certificate for both i.e. for my `application` and for `elastic search` to enable SSL (HTTPS) support?

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [April 8, 2020, 8:16am UTC](https://discuss.elastic.co/t/security-enabled-for-all-communications-to-an-elasticsearch-cluster-including-communications-from-application-servers/227054/2 "2020-04-08T08:16:10Z")

</div>

Have you seen our documentation : [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/\_encrypted\_communication.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/_encrypted_communication.html) ?

---

<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:** [May 6, 2020, 8:16am UTC](https://discuss.elastic.co/t/security-enabled-for-all-communications-to-an-elasticsearch-cluster-including-communications-from-application-servers/227054/3 "2020-05-06T08:16:14Z")

</div>

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