# Security is disabled but enabled in elasticsearch.yml

**URL:** https://discuss.elastic.co/t/security-is-disabled-but-enabled-in-elasticsearch-yml/232875
**Category:** Elasticsearch
**Created:** [May 15, 2020, 7:31pm UTC](https://discuss.elastic.co/t/security-is-disabled-but-enabled-in-elasticsearch-yml/232875 "2020-05-15T19:31:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Amine\_Maalfi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amine_maalfi/32/62335_2.png) [@Amine\_Maalfi](https://discuss.elastic.co/u/Amine_Maalfi)
#### Post date: [May 15, 2020, 7:31pm UTC](https://discuss.elastic.co/t/security-is-disabled-but-enabled-in-elasticsearch-yml/232875/1 "2020-05-15T19:31:50Z")

</div>

when i run elasticsearch in the console it shows that the security is disabled while i'm setting it to true in the elasticsearch.yml i'm also getting cors errors, so i'm starting to doubt that elasticsearch doesn't read my yaml file anymore: here's my yaml file:

```
#action.destructive_requires_name: true
xpack.ml.enabled: false
xpack.security.enabled: true
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: Authorization,X-Requested-With,X-Auth-Token,Content-Type,Content- Length
http.cors.allow-credentials: true

```

thanks in advance!

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [May 15, 2020, 8:10pm UTC](https://discuss.elastic.co/t/security-is-disabled-but-enabled-in-elasticsearch-yml/232875/2 "2020-05-15T20:10:34Z")

</div>

Can you share the output of the following requests via `curl`:

- `GET _cluster/settings?include_defaults`
- `GET /_xpack`

Please conceal critical or sensitive text.

Also ensure you have a basic license installed.

---

<div class="post-metadata">

### Author: ![Amine\_Maalfi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amine_maalfi/32/62335_2.png) [@Amine\_Maalfi](https://discuss.elastic.co/u/Amine_Maalfi)
#### Post date: [May 15, 2020, 8:34pm UTC](https://discuss.elastic.co/t/security-is-disabled-but-enabled-in-elasticsearch-yml/232875/3 "2020-05-15T20:34:36Z")

</div>

thank you @Luca_Belluccini for your answer, the problem was solved by restarting the cmd and trying to run elasticsearch again, i think it was a bug since i didn't change anything in the configuration.

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [May 15, 2020, 10:02pm UTC](https://discuss.elastic.co/t/security-is-disabled-but-enabled-in-elasticsearch-yml/232875/4 "2020-05-15T22:02:09Z")

</div>

I might think of a misconfiguration.

---

<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: [June 12, 2020, 10:02pm UTC](https://discuss.elastic.co/t/security-is-disabled-but-enabled-in-elasticsearch-yml/232875/5 "2020-06-12T22:02:21Z")

</div>

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