# How to SSL with Elasticsearch Cloud

**URL:** <https://discuss.elastic.co/t/how-to-ssl-with-elasticsearch-cloud/108229>\
**Category:** Elasticsearch\
**Created:** [November 18, 2017, 8:06am UTC](https://discuss.elastic.co/t/how-to-ssl-with-elasticsearch-cloud/108229 "2017-11-18T08:06:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mc1392](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mc1392](https://discuss.elastic.co/u/mc1392)\
**Post date:** [November 18, 2017, 8:06am UTC](https://discuss.elastic.co/t/how-to-ssl-with-elasticsearch-cloud/108229/1 "2017-11-18T08:06:10Z")

</div>

I cannot find any documentation on SSL using thr Elastic Cloud.

I see in the documentation a hint at using the Java KeyStore, but there is nothing else on Elastic Cloud, Certificates and SSL.

Any help out there?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 18, 2017, 9:01am UTC](https://discuss.elastic.co/t/how-to-ssl-with-elasticsearch-cloud/108229/2 "2017-11-18T09:01:04Z")

</div>

Which client are you using?

Please also see [this blog post](https://discuss.elastic.co/t/now-live-new-elastic-cloud-standard-support/84161) about how to contact and raise issues with Elastic Cloud Support.

---

<div class="post-metadata">

**Author:** ![mc1392](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mc1392](https://discuss.elastic.co/u/mc1392)\
**Post date:** [November 18, 2017, 1:25pm UTC](https://discuss.elastic.co/t/how-to-ssl-with-elasticsearch-cloud/108229/3 "2017-11-18T13:25:49Z")

</div>

I'm using the Java REST client.

```
public RestHighLevelClient getClient(){
		String CREDENTIALS_STRING = this.username+":"+this.password;
		String encodedBytes = Base64.getEncoder().encodeToString(CREDENTIALS_STRING.getBytes());
		Header[] headers = { new BasicHeader(HttpHeaders.CONTENT_TYPE, "application/json"),
				new BasicHeader("Authorization", "Basic " + encodedBytes) };
		this.restLowLevelClient = RestClient.builder(
		        new HttpHost(this.END_POINT, 9243, "https")).setDefaultHeaders(headers).build();
		this.client = new RestHighLevelClient(restLowLevelClient);
		
		return this.client;
	}
```

---

<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:** [December 16, 2017, 1:37pm UTC](https://discuss.elastic.co/t/how-to-ssl-with-elasticsearch-cloud/108229/4 "2017-12-16T13:37:09Z")

</div>

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