You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when we create a new Elasticsearch HTTP Client for things such as the Observer, we provide a slice of trusted certificates []*x509.Certificate. This supports more than one certificate, but currently we seem to only provide the tls.crt key of the generated secret.
We could include the whole certificate chain, including the CA.
// CertChain combines the certificate of the CA and the host certificate.
func (s *CertificatesSecret) CertChain() []byte {
return append(s.CertPem(), s.CAPem()...)
}
Why is this an issue?
When a customer provides their own certificate for Elasticsearch
and the certificate expires and is renewed by something such as cert-manager, there is a brief period of time where the operator's http client has the new tls certificate, but the Elasticsearch cluster hasn't fully propagated the certificate to all nodes in the cluster, and errors are seen in the logs x509: certificate signed by unknown authority because the http client only trusts the new tls certificate, and not the CA. By providing the full chain, this error goes away.
The text was updated successfully, but these errors were encountered:
Current situation
Currently when we create a new Elasticsearch HTTP Client for things such as the Observer, we provide a slice of trusted certificates
[]*x509.Certificate
. This supports more than one certificate, but currently we seem to only provide thetls.crt
key of the generated secret.cloud-on-k8s/pkg/controller/elasticsearch/certificates/reconcile.go
Line 78 in a4de99f
Note the
httpCerts.CertPem()
, which only returns thetls.crt
key in that Map.With a simple change such as
We could include the whole certificate chain, including the CA.
Why is this an issue?
When a customer provides their own certificate for Elasticsearch
and the certificate expires and is renewed by something such as
cert-manager
, there is a brief period of time where the operator's http client has the new tls certificate, but the Elasticsearch cluster hasn't fully propagated the certificate to all nodes in the cluster, and errors are seen in the logsx509: certificate signed by unknown authority
because the http client only trusts the new tls certificate, and not the CA. By providing the full chain, this error goes away.The text was updated successfully, but these errors were encountered: