# Connecting to Elasticsearch from GUI using API and http security

**URL:** <https://discuss.elastic.co/t/connecting-to-elasticsearch-from-gui-using-api-and-http-security/307299>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [June 15, 2022, 3:28pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-from-gui-using-api-and-http-security/307299 "2022-06-15T15:28:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jamesp/32/73041_2.png) [@jamesp](https://discuss.elastic.co/u/jamesp)\
**Post date:** [June 15, 2022, 3:28pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-from-gui-using-api-and-http-security/307299/1 "2022-06-15T15:28:29Z")

</div>

I am currently running ES 7.11.1 and have set up basic security using a self created ca, certificates for each ES node, and ssl.http for External API access. All nodes and Kibana connect and work without an issue.

However, I am unable to get my search GUI, which connects to the API on the back end, to connect to the ES node I set up for the connection. I get a net::ERR\_CERT\_AUTHORITY\_INVALID error when it attempts to connect to the ES node.

The GUI has a non self-signed certificate and I have added the root ca for the GUI cert to the elastic _ssl.transport.keystore/truststore_ (same file) and I have also added the root ca to the _http.p12_ file.

Xpack config from Elasticsearch.yml file:

```auto
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: full
xpack.security.transport.ssl.keystore.path: <path to node cert>
xpack.security.transport.ssl.truststore.path: <path to node cert>
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: http.p12

```

Any suggestions on what I might try next?

Thanks!

---

<div class="post-metadata">

**Author:** ![Justin\_Cranford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_cranford/32/85302_2.png) [@Justin\_Cranford](https://discuss.elastic.co/u/Justin_Cranford)\
**Post date:** [June 15, 2022, 4:04pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-from-gui-using-api-and-http-security/307299/2 "2022-06-15T16:04:29Z")

</div>

Are the Kibana HTTPS and Elasticsearch HTTPS certs signed by different CA certificates?

For this error, I think Kibana might not be trusting the Elasticsearch HTTPS cert chain, so append the Elasticsearch CA cert to the Kibana trusted CA certs list setting.

Another option is use a single CA to sign all of your HTTPS certs, so they all trust each other, and external access to both Kibana and Elasticsearch only need to import that common CA cert.

---

<div class="post-metadata">

**Author:** ![jamesp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jamesp/32/73041_2.png) [@jamesp](https://discuss.elastic.co/u/jamesp)\
**Post date:** [June 15, 2022, 5:07pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-from-gui-using-api-and-http-security/307299/3 "2022-06-15T17:07:09Z")

</div>

Thanks for the reply,

The Kibana https and Elasticsearch https file are the same and are working.

The issue is with a search GUI that is separate from Kibana that is using a certificate from a outside CA.

The HTTPS p12 file is a self-signed certificate created using the Elasticsearch documentation and uses an Elasticsearch created CA.

I have tried importing the root CA of the GUI certificate into the HTTPS cert and the transport truststore.

What does Elasticsearch use to authorize access for HTTPS? Elasticsearch.keystore? The file in the xpack.security.http.ssl.keystore.path? A different file?

Thank you again.

---

<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:** [July 13, 2022, 5:07pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-from-gui-using-api-and-http-security/307299/4 "2022-07-13T17:07:29Z")

</div>

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