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

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?

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

That was the reason. Issue is sorted out.

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

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!

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