# Trusting remote clusters' CA

**URL:** <https://discuss.elastic.co/t/trusting-remote-clusters-ca/326465>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [February 24, 2023, 6:55pm UTC](https://discuss.elastic.co/t/trusting-remote-clusters-ca/326465 "2023-02-24T18:55:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [February 24, 2023, 6:55pm UTC](https://discuss.elastic.co/t/trusting-remote-clusters-ca/326465/1 "2023-02-24T18:55:32Z")

</div>

Hi,

I have two scenarios and would like a solution for both.

1. I created a new cluster (8.6.X) with the self-generated certificates and enrolling new nodes. After that, I want to create a separate cluster, but I'd like to have it as a remote cluster. Without creating a ton of new certificates, copying those all over the world, how can I make the two clusters trust each other? I tried to change the transport xpack settings like this, but it didn't work (duh):

```auto
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
# truststore.path: certs/transport.p12
  certificate_authorities: ["certs/http_ca.crt","certs/http_ca_remote.crt"]

```

1. I have a cluster with certificates I generated myself without the ES tool (20+ nodes) and a new cluster with the automatically generated certificates. I have to connect the old cluster as a remote cluster until I can age out data (100TB+) and would like to avoid generating new certificates since the setup gets a lot less complicated if I can use the auto-generated certs. What can I do?

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [February 27, 2023, 5:59am UTC](https://discuss.elastic.co/t/trusting-remote-clusters-ca/326465/2 "2023-02-27T05:59:56Z")

</div>

> [@YvorL](#):
>
> `certificate_authorities: ["certs/http_ca.crt","certs/http_ca_remote.crt"]`

Remote cluster connection uses the Transport interface, not HTTP. You'll need to configure it with the Transport CA files.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [February 27, 2023, 10:36am UTC](https://discuss.elastic.co/t/trusting-remote-clusters-ca/326465/3 "2023-02-27T10:36:47Z")

</div>

@Yang_Wang , so when I install a vanilla Elasticsearch, it creates two different CA-s, one for the HTTP and one for the transport interface. And I need to extract the CA from the p12 file that was created for the transport layer?

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [February 27, 2023, 2:33pm UTC](https://discuss.elastic.co/t/trusting-remote-clusters-ca/326465/4 "2023-02-27T14:33:53Z")

</div>

I did run this:  
`openssl pkcs12 -in transport.p12 -cacerts -nokeys -chain > transport_self.ca.pem`

And it seems this is working. Now I can use those files to connect clusters.

---

<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:** [March 27, 2023, 2:34pm UTC](https://discuss.elastic.co/t/trusting-remote-clusters-ca/326465/5 "2023-03-27T14:34:52Z")

</div>

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