# API Key not enabled

**URL:** <https://discuss.elastic.co/t/api-key-not-enabled/314962>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 22, 2022, 4:36pm UTC](https://discuss.elastic.co/t/api-key-not-enabled/314962 "2022-09-22T16:36:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SilasMuniz1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/silasmuniz1/32/108267_2.png) [@SilasMuniz1](https://discuss.elastic.co/u/SilasMuniz1)\
**Post date:** [September 22, 2022, 4:36pm UTC](https://discuss.elastic.co/t/api-key-not-enabled/314962/1 "2022-09-22T16:36:58Z")

</div>

Hello,

I have a cluster with 3 nodes of elasticsearch. In the first node I've installed kibana.

Configured TLS/SSL in all cluster nodes. And use credential to communicate with kibana and logstash.

My problem is about create alerting in kibana.

I create the kibana keys with this tools /bin/kibana-encryption-keys generate.

Copy output inside kibana.yml and restart them. But it didn't work.

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/c/ac9437c02f9924978150aa971627fb36758fcfe3.png)

I saw in API KEYS the informtion: API Key not enabled.

And when make the get /\_security/api\_key received this information:

![image](https://us1.discourse-cdn.com/elastic/original/3X/c/7/c718bbdba80c57addfe05ca9c58e9014428adc50.png)

How I enable this api key feature ?

My elasticsearch.yml:

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/4/d44d2eb7e45fdfc5184036399bb120b595d4d0a3.png)

I can use elasticsearch, kibana and metricbeat 7.17 version.

Everything working well, only i can't generate alarms.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 22, 2022, 5:02pm UTC](https://discuss.elastic.co/t/api-key-not-enabled/314962/2 "2022-09-22T17:02:05Z")

</div>

Hi @SilasMuniz1 Please don't post screen shots of text... please post formatted text.

Looks You have not secured the elasticsearch HTTP endpoint 9200 with TLS therefore you can not create API Keys / The service is not enabled.

See [Here](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-api-create-api-key.html#security-api-create-api-key-desc)

> The API keys are created by the Elasticsearch API key service, which is automatically enabled when you [configure TLS on the HTTP interface](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-basic-setup-https.html#encrypt-http-communication). Alternatively, you can explicitly enable the `xpack.security.authc.api_key.enabled` setting.

---

<div class="post-metadata">

**Author:** ![SilasMuniz1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/silasmuniz1/32/108267_2.png) [@SilasMuniz1](https://discuss.elastic.co/u/SilasMuniz1)\
**Post date:** [September 22, 2022, 5:21pm UTC](https://discuss.elastic.co/t/api-key-not-enabled/314962/3 "2022-09-22T17:21:11Z")

</div>

@stephenb

Sorry, I inside the picture because my elastic stack where in na place with i don't copy and past. Only make a printscreen. Sorry again.

I've insert xpack.security.authc.api\_key.enabled: true in the elasticsearch.yml and the problem is solved.

Thank you a lot.

---

<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:** [October 20, 2022, 5:21pm UTC](https://discuss.elastic.co/t/api-key-not-enabled/314962/4 "2022-10-20T17:21:17Z")

</div>

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