# File base authentication doesn't work in elastic in version 7.0.0

**URL:** <https://discuss.elastic.co/t/file-base-authentication-doesnt-work-in-elastic-in-version-7-0-0/194213>\
**Category:** Elasticsearch\
**Tags:** license\
**Created:** [August 7, 2019, 10:35am UTC](https://discuss.elastic.co/t/file-base-authentication-doesnt-work-in-elastic-in-version-7-0-0/194213 "2019-08-07T10:35:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![George\_Wainwright](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/george_wainwright/32/51054_2.png) [@George\_Wainwright](https://discuss.elastic.co/u/George_Wainwright)\
**Post date:** [August 7, 2019, 10:35am UTC](https://discuss.elastic.co/t/file-base-authentication-doesnt-work-in-elastic-in-version-7-0-0/194213/1 "2019-08-07T10:35:20Z")

</div>

Hi I've configured the next users with roles and added them to elastic:  
/etc/elasticsearch/roles.yml  
readonly\_role:  
cluster:  
- monitor  
indices:  
- names: '\*'  
privileges:  
- read  
- view\_index\_metadata  
- monitor  
run\_as:  
- ''

cat /etc/elasticsearch/users  
test\_user:$2a$10$O/PbKqD0ODTSBXrDaP8weuYrF9KynDESh2mWPtyuNLrQOkBznuR5W

cat /etc/elasticsearch/users\_roles  
kibana\_system:test\_user

but when I do

curl localhost:9200/

It allows without password.

I added into config:  
xpack:  
security:  
authc:  
realms:  
file:  
file1:  
order: 0

What can be wrong? According to license info basic support native and file authentication.

Could somebody please help?

---

<div class="post-metadata">

**Author:** ![George\_Wainwright](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/george_wainwright/32/51054_2.png) [@George\_Wainwright](https://discuss.elastic.co/u/George_Wainwright)\
**Post date:** [August 7, 2019, 3:59pm UTC](https://discuss.elastic.co/t/file-base-authentication-doesnt-work-in-elastic-in-version-7-0-0/194213/2 "2019-08-07T15:59:46Z")

</div>

[https://www.elastic.co/guide/en/elasticsearch/reference/7.2/release-highlights-7.1.0.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.2/release-highlights-7.1.0.html)

That was the reason. Issue is sorted out.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 9, 2019, 6:15am UTC](https://discuss.elastic.co/t/file-base-authentication-doesnt-work-in-elastic-in-version-7-0-0/194213/3 "2019-08-09T06:15:51Z")

</div>

have you enabled security by setting `xpack.security.enabled: true` in the YAML configuration file?

---

<div class="post-metadata">

**Author:** ![George\_Wainwright](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/george_wainwright/32/51054_2.png) [@George\_Wainwright](https://discuss.elastic.co/u/George_Wainwright)\
**Post date:** [August 9, 2019, 6:30am UTC](https://discuss.elastic.co/t/file-base-authentication-doesnt-work-in-elastic-in-version-7-0-0/194213/4 "2019-08-09T06:30:49Z")

</div>

Hi Alexander, the main problem was that I used version 7.0.0 when security for basic license started available from 7.1.0. Once I upgraded to 7.1.0 all started working. I have shown a link above which proves it. Thank you!

---

<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:** [September 6, 2019, 6:43am UTC](https://discuss.elastic.co/t/file-base-authentication-doesnt-work-in-elastic-in-version-7-0-0/194213/5 "2019-09-06T06:43:43Z")

</div>

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