Http client did not trust this server's certificate from the browser

Hello,

SSL does not work when I try to access https://localhost:9200 from the browser
I get
: http client did not trust this server's certificate, closing connection

my elasticsearch.yml

xpack.security.enabled : true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.key: instance.key
xpack.security.transport.ssl.certificate: instance.crt
xpack.security.transport.ssl.certificate_authorities: [ "ca.crt" ]
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.key: instance.key
xpack.security.http.ssl.certificate: instance.crt
xpack.security.http.ssl.certificate_authorities: [ "ca.crt" ]

I generated the certificates with .elasticsearch-certutil (pem format)

Hi @NNN

First of all, what version of Elasticsearch are you using? Then, did you include "localhost" as a SAN (Subject Alternative Name) when you created the certificate?

MiTschMR

1 Like

This is expected. You are using an SSL certificate that was generated with elasticsearch-certutil and singed by a custom local CA which, as expected, is not trusted by your browser. Most browsers will allow you to add an exception for this certificate so that you can bypass this warning and access your Elasticsearch node on localhost over https.

This is fine for a dev environment on localhost.

2 Likes

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