简体   繁体   中英

How to prevent inadvertent writes and deletion of data for an index in Elasticsearch?

How to prevent users who have access to kibana dev tools, from making any inadvertent changes, updates or deletes in a particular index.Basically what I am looking for is, some kind of authorisation for a particular index, so that only authorised users can be given R/W access and any other users should have only R permission.

You can define privileges like read, write, delete etc. in user roles. Privileges can be categorized into cluster- and index-privileges as documented on this page:

https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html

The index-privileges are what you're looking for.

After creating the roles (eg one for read-write and one for read-only), you simply need to add the particular users to these roles. Elasticsearch will then check the user's privileges on every action they try to execute and prevent them if needed. This is done via the has_privileges API Elasticsearch internally uses.

Here's a guide on how to define roles:

https://www.elastic.co/guide/en/elasticsearch/reference/current/defining-roles.html

Here are some further resources related to that topic:

I hope I could help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM