How to SSL with Elasticsearch Cloud

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?

Which client are you using?

Please also see this blog post about how to contact and raise issues with Elastic Cloud Support.

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;
	}

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