PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, October 25, 2022

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

 October 25, 2022     elasticsearch, elasticsearch-7, kibana-7     No comments   

Issue

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.


Solution

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 (e.g. 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:

  • https://www.elastic.co/guide/en/elasticsearch/reference/current/authorization.html

  • https://www.elastic.co/guide/en/kibana/current/development-security-rbac.html

I hope I could help you.



Answered By - apt-get_install_skill
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing