Opensearch throws the below exception, when reloading new certificates with existing emergency certificates has longer expiration dates.
PUT /_opendistro/_security/api/ssl/transport/reloadcerts
{“error”:“OpenSearchSecurityException[Error while initializing transport SSL layer from PEM: java.lang.Exception: New certificates should not expire before the current ones.]; nested: Exception[New certificates should not expire before the current ones.];”
Configuration:
accesscontrol is enabled
http:
anonymous_auth_enabled: true
1.Reload of new certificates are failed.
2.Since OpenSearch is not available,
“message”: “[logstash.outputs.opensearch] Attempted to resurrect connection to dead OpenSearch instance, but got an error {:url=>‘https://service-tls:port/’, :exception=>LogStash::Outputs::OpenSearch::HttpClient::Pool::BadResponseCodeError, :message=>‘Got response code ‘503’ contacting OpenSearch at URL ‘https://service-tls:port/’’}”}
After multiple retries only it was able to restore the connection
“[logstash.outputs.opensearch] Restored connection to OpenSearch instance {:url=>‘https://service-tls:port/’}”}
Kindly provide a workaround/solution to proceed further.
STATUS=$(/bin/ PUT “/_plugins/_security/api/ssl/transport/reloadcerts” 2>&1)
echo $STATUS
{“error”:“OpenSearchSecurityException[Error while initializing transport SSL layer from PEM: java.lang.Exception: New certificates should not expire before the current ones.]; nested: Exception[New certificates should not expire before the current ones.];”}
Node restart will reload new certificates. But restart solution is not acceptable since it affects other services leads to traffic/data loss with restart counts.
Is there any update from OpenSearch regarding the issue?
The /_plugins/_security/api/ssl/transport/reloadcerts API is not functioning as expected in the scenarios mentioned above. Specifically, when the new refreshed certificate has a shorter expiry than the active certificate, the API throws an exception.
Is this restriction intentional, or are there plans to address this behavior?