# Configured ELK Basic TLS Security

**URL:** https://discuss.elastic.co/t/configured-elk-basic-tls-security/308387
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [June 28, 2022, 6:23pm UTC](https://discuss.elastic.co/t/configured-elk-basic-tls-security/308387 "2022-06-28T18:23:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ftayyab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ftayyab/32/107635_2.png) [@ftayyab](https://discuss.elastic.co/u/ftayyab)
#### Post date: [June 28, 2022, 6:23pm UTC](https://discuss.elastic.co/t/configured-elk-basic-tls-security/308387/1 "2022-06-28T18:23:11Z")

</div>

Hi,

I have been able to follow the documentation and generate my own certificates and used them in Elasticsearch for Transport and HTTP security. Elasticsearch is up and running. I have also been able to establish connection from Kibana to the manually configured secure Elasticsearch. However when I am trying to run

```auto
elasticsearch-create-enrollment-token -s kibana

```

I am getting:  
ERROR: Unable to create an enrollment token. Elasticsearch node HTTP layer SSL configuration Keystore doesn't contain any PrivateKey entries where the associated certificate is a CA certificate

The reason I wanted to configure the security and generate new certificates is because the default auto configuration stops working when elasticsearch is restarted a day later or so.

Any idea how I can sort out the error with the enrollment token

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 29, 2022, 2:05pm UTC](https://discuss.elastic.co/t/configured-elk-basic-tls-security/308387/2 "2022-06-29T14:05:24Z")

</div>

Hello. Would you be able to give details about how or why `the default auto configuration stops working when elasticsearch is restarted a day later or so`? Is it possible the hostname is changing? Thank you.

---

<div class="post-metadata">

### Author: ![ftayyab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ftayyab/32/107635_2.png) [@ftayyab](https://discuss.elastic.co/u/ftayyab)
#### Post date: [June 29, 2022, 2:34pm UTC](https://discuss.elastic.co/t/configured-elk-basic-tls-security/308387/3 "2022-06-29T14:34:06Z")

</div>

It was IP address changing issue. (if I stick with the auto configuration done by ES)

However I would still like to know why on configuring security manually (by following the TLS and HTTP security documentation) results in:

Unable to create an enrollment token. **Elasticsearch node HTTP layer SSL configuration Keystore doesn't contain any PrivateKey entries where the associated certificate is a CA certificate**

Thanks

---

<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 27, 2022, 2:34pm UTC](https://discuss.elastic.co/t/configured-elk-basic-tls-security/308387/4 "2022-07-27T14:34:42Z")

</div>

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