# Cluster certificate update

**URL:** <https://forum.opensearch.org/t/cluster-certificate-update/24100>\
**Category:** OpenSearch\
**Created:** [April 11, 2025, 4:13pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100 "2025-04-11T16:13:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [April 11, 2025, 4:13pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/1 "2025-04-11T16:13:51Z")

</div>

Version 2.9

Current certs are about to expire referenced in the OpenSearch yaml config. After I stage new certs in the same location, and doing a rolling restart, do I need anything else? Will the nodes talk to each other while others have new certs after a restart vs those with old certs? Do I need to run the securityadmin script? Nothing changed as far roles go.

Going to do coordinator, data and master nodes in this order.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![yeonghyeonKo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/yeonghyeonko/32/8202_2.png) [@yeonghyeonKo](https://forum.opensearch.org/u/yeonghyeonKo)\
**Post date:** [April 14, 2025, 3:35am UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/2 "2025-04-14T03:35:51Z")

</div>

@stecino

1. Which method did you use to host your OpenSearch Clusters? (ex. helm, k8s operator, docker, etc)

2. Yes, you need .pem(s) or .crt(s) files to call `securityadmin.sh` when making a change in `opensearch/config/opensearch-security` directory. See the below code.

```auto
/usr/share/opensearch/plugins/opensearch-security/tools/securityadmin.sh \
  -cacert /etc/opensearch/root-ca.pem \
  -cert /etc/opensearch/kirk.pem \
  -key /etc/opensearch/kirk-key.pem \
  -cd /usr/share/opensearch/config/opensearch-security/

```

---

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [April 15, 2025, 3:57pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/3 "2025-04-15T15:57:00Z")

</div>

Thanks for the reply. Do I run the security admin script after rolling restart? Distribution I use is tar distro, I have physicals and VMs.

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [April 15, 2025, 11:26pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/4 "2025-04-15T23:26:29Z")

</div>

@stecino securityadmin.sh is required only for the security plugin configuration.  
Certificates must be managed separately.  
You’ll need to just replace certificates.

Which certificates expired? Node, client, RootCA or all of them?  
How big is the cluster?

---

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [April 17, 2025, 4:42pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/5 "2025-04-17T16:42:23Z")

</div>

@pablo thanks for the reply. It’s the node certificate and one admin cert. I have total of 19 nodes, 6 coordinator, 3 master and 10 data nodes. So just replace those and do rolling restart or not even that?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [April 18, 2025, 11:03am UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/6 "2025-04-18T11:03:04Z")

</div>

@stecino As long as RootCA will remain the same and DNs in the new node certs match the old ones you are ok.

---

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [April 18, 2025, 5:15pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/7 "2025-04-18T17:15:00Z")

</div>

Awesome!! Thanks a lot. This will buy me another 2 years 😂😂

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [April 18, 2025, 5:20pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/8 "2025-04-18T17:20:34Z")

</div>

@stecino You should also consider the hot reload. Since you’ll be restarting all of the nodes, you can enable hot reloading in opensearch.yml and avoid rolling restarts in the future.

> **[Configuring TLS certificates](https://docs.opensearch.org/docs/latest/security/configuration/tls/#hot-reloading-tls-certificates)**
>
> Configuring TLS certificates

---

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [April 18, 2025, 6:48pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/9 "2025-04-18T18:48:54Z")

</div>

Does that apply to 2.9? I will be upgrading to latest version in a few months

---

<div class="post-metadata">

**Author:** ![yeonghyeonKo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/yeonghyeonko/32/8202_2.png) [@yeonghyeonKo](https://forum.opensearch.org/u/yeonghyeonKo)\
**Post date:** [April 19, 2025, 1:38am UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/10 "2025-04-19T01:38:42Z")

</div>

@pablo thanks for your time

For what I’ve understood, if `plugins.security.ssl_cert_reload_enabled` setting is `true`, [superadmin](https://docs.opensearch.org/docs/latest/security/access-control/users-roles/#super-admin-users) can replace the expired certificates to new ones using the [**Reload Certificates API**](https://docs.opensearch.org/docs/latest/security/configuration/tls/#using-the-reload-certificates-api).

```auto
curl --cacert <ca.pem> --cert <admin.pem> --key <admin.key> \
  -XPUT https://localhost:9200/_plugins/_security/api/ssl/transport/reloadcerts

```

But what if @stecino 's cluster has been set neither `plugins.security.ssl.certificates_hot_reload.enabled` nor `plugins.security.ssl_cert_reload_enabled`? They seem like to be `false` by default.

1. In this case, just replacing certificates in the same file path is enough?
2. If we want to use the [Reload Certificates API](https://docs.opensearch.org/docs/latest/security/configuration/tls/#using-the-reload-certificates-api), do we have to set `true` to both `certificates_hot_reload` and `ssl_cert_reload_enabled` and restart all nodes?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [April 23, 2025, 8:47pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/11 "2025-04-23T20:47:42Z")

</div>

@stecino According to the documentation the hot reloading wasn’t available until version 2.13 .  
Are you planning to upgrade?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [April 23, 2025, 8:52pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/12 "2025-04-23T20:52:54Z")

</div>

@yeonghyeonKo

> [@yeonghyeonKo](#):
>
> In this case, just replacing certificates in the same file path is enough?

No, it’s not. When hot reloading is not activate then rolling restart is required.

> [@yeonghyeonKo](#):
>
> If we want to use the [Reload Certificates API](https://docs.opensearch.org/docs/latest/security/configuration/tls/#using-the-reload-certificates-api), do we have to set `true` to both `certificates_hot_reload` and `ssl_cert_reload_enabled` and restart all nodes?

As per OpenSearch documentation. The below option enables active monitoring of the certificates keystore and replaces certificates once the keystore is updated.

```auto
plugins.security.ssl.certificates_hot_reload.enabled: true

```

The below option, gives you more control as hot reload must be initiated manually with an API call.

```auto
plugins.security.ssl_cert_reload_enabled: true

```

Any change of the opensearch.yml file requires restart of the OpenSearch service.

---

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [April 23, 2025, 9:07pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/13 "2025-04-23T21:07:47Z")

</div>

I will be updating in a few months, yes.

---

<div class="post-metadata">

**Author:** ![yeonghyeonKo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/yeonghyeonko/32/8202_2.png) [@yeonghyeonKo](https://forum.opensearch.org/u/yeonghyeonKo)\
**Post date:** [April 23, 2025, 10:38pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/14 "2025-04-23T22:38:02Z")

</div>

Thanks for your time, then in my opinion it’s recommended to set those two options _True_, when users try to initially configure the clusters.  
(I mean, there’s no need to leave those options to be default : _False_)

---

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [September 8, 2025, 11:17pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/15 "2025-09-08T23:17:35Z")

</div>

@pablo, question for you. What happens if my node DN is changing. How do I approach the problem? I tried to update one of my coordinator nodes with new certs, updated the DN in the config and after restart I am getting this. Rolled back and it’s working again.

```auto
[2025-09-08T18:03:16,260][WARN][o.o.d.HandshakingTransportAddressConnector] [xxxxx-01-alpha] handshake failed for [connectToRemoteMasterNode[10.xx.x.xxx:9300]]
org.opensearch.transport.RemoteTransportException: [xxxxx-01-alpha][10.xx.x.xxx:9300][internal:transport/handshake]
Caused by: org.opensearch.OpenSearchException: Transport client authentication no longer supported.
        at org.opensearch.security.ssl.util.ExceptionUtils.createTransportClientNoLongerSupportedException(ExceptionUtils.java:68) ~[?:?]
        at org.opensearch.security.transport.SecurityRequestHandler.messageReceivedDecorate(SecurityRequestHandler.java:292) ~[?:?]

```

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [September 9, 2025, 2:01am UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/16 "2025-09-09T02:01:41Z")

</div>

@stecino Did you update nodes\_dn in opensearch.yml?  
The error is expected when nodes\_dn entries don’t match node’s certificate.

---

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [September 9, 2025, 1:07pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/17 "2025-09-09T13:07:54Z")

</div>

Yes I did. New CN entry matches with the new certificate. As a result the node I made the change on doesn’t show up in my nodes list when I run \_cart/nodes command

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [September 16, 2025, 9:46pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/18 "2025-09-16T21:46:00Z")

</div>

@stecino, As per our conversation, you can use regular expressions in plugins.security.authcz.nodes\_dn instead of exact node’s DN. The nodes\_dn must be updated in all nodes before replacing certificate so the existing nodes would recognize a new certificate from a joining node.

> **[Configuring TLS certificates](https://docs.opensearch.org/latest/security/configuration/tls/#configuring-node-certificates)**
>
> Configuring TLS certificates

Let me know if you managed to replace your certificate.

---

<div class="post-metadata">

**Author:** ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)\
**Post date:** [September 18, 2025, 3:37am UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/19 "2025-09-18T03:37:54Z")

</div>

Hello @pablo it was nice seeing you at the event!! I did update nodes\_dn as we discussed on all the nodes with a rolling restart. After that I replaced the certificate, but still same handshake error.

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [September 19, 2025, 4:10pm UTC](https://forum.opensearch.org/t/cluster-certificate-update/24100/20 "2025-09-19T16:10:35Z")

</div>

@stecino It was great to meet you in person too. Do you see these errors on all of the nodes?  
Did you also update `plugins.security.ssl.transport.pemtrustedcas_filepath` on all of the nodes?  
Was the new certificate signed by a different RootCA?

[Next page](https://forum.opensearch.org/t/cluster-certificate-update/24100.md?page=2)
