Role based access control in elastic search - elasticsearch

What are the elastic search versions will support security features like role based access control ??
I am using elastic search only as a document store (no kibana or logstash), can we achieve role based access ?
If yes, how to create users and provide read/write role for it ?

I would suggest you read the X-pack docs for the same.
This is not the exact answer but I am new to the elastic as well.
I would recommend using ELK stack for getting the access control.

Related

Add users to AWS elasticsearch kibana dashboard through API

I'm trying to map users to kibana roles, however, when I do a GET request on _plugins/_security
I get a 401 error. I'm trying to do this from Kibana dashboard where I have all_access
role as well as from an Ec2 instance where the machine role is mapped to all_access
role. Need help in understanding how can I fix the same.
{"Message":"Your request: '/_plugins/_security' is not allowed."}
you will need to ask aws about this, as they run a fork of Elasticsearch that doesn't contain this particular functionality
On our version of AWS ES, I have to do this prefix in order to access the security API:
GET _opendistro/_security/api/roles
What you have to understand is the AWS ES does not use the "normal" ElasticSearch, it uses the OpenDistro version, therefor some commands are different.
Here is the link to the API doc for security :
https://opendistro.github.io/for-elasticsearch-docs/docs/security/access-control/api/#access-control-for-the-api

How to create a user that can only manage the dashboards in kibana?

Is there anyway to create a user that can only do the CRUD operations on dashboards in kibana?i need this kind of permission but i cant figure out how to create it.
Can someone help?
Ok, in the recent versions it´s pretty easy as you can use kibana to manage the roles and kibana features per space and role.
Have a closer look at kibana role management and kibana privileges - I´ts pretty well documented!

Enable RBAC features in kibana alone

I want to create a new space in kibana and create a new user , attach a role with specific access and only to the space. This is a straight-forward thing with lot of docs provided by elasticsearch itself, but however there is one thing that I cannot find any clear documentation on. Does kibana support RBAC without enabling security features in elasticsearch? Is it possible to create roles in kibana without enabling security features in elasticsearch? I'm almost sure that it is not possible but since there is not direct wordings in the documents stating the above, I'm skeptical about it and hence posting here for expert suggestions.
I'm using kibana version 7.7.1. In my dashboard I'm not able to see the word "security" anywhere as described in the document. Posting a sample screenshot below.
Finally Found an official document that states the same. To answer the question, Yes Kibana doesn't support RBAC in a standalone manner. It depends on elasticsearch.
https://www.elastic.co/guide/en/kibana/7.x/using-kibana-with-security.html

Lock Kibana Dashboard

I have set up Elastic Search and Kibana and prepared different monitoring dashboard. So how can i lock my dashboard so dashboard is visible to all and even they can apply filters and visualize but it shouldn't change original dashboard so when they open dashboard again it should be same as one which i had prepared. I tried to check elastic search website and they offer subscription for X-pack which provides role based access control. But is there anyway I can lock the dashboard rather than subscription because i used Kibana as it was open source.
Thank You in advance.
- Sam

Implementing security on ELK using x-pack

I want to secure all the communications in ELK. For that i have installed x-pack plugin. Please let me know if its right plugin to do so. I want to introduce username & password and also SSL enabled communication.
I have installed x-pack plugin in elasticsearch.
elasticsearch-plugin.bat install x-pack
i have also learnt that there are 3 default users in x-pack. elastic, kibana and logstash-system.
Even though i have installed x-pack only on elasticsearch, kibana also asks for credentials.
My Doubts:
I want to know why kibana is asking for credentials.
If i give credentials as kibana/changeme, i dont get any logs in kibana. But if i login as elastic/changeme, i can see logs in kibana.Why it is so? Is it like, the credentials used should be same across elasticsearch and kibana?
How should i manage using elastic, kibana and logstash-system users provided by x-pack?
You can check out the users (assuming you are accessing Kibana on localhost and authenticate with elastic and changeme) at http://localhost:5601/app/kibana#/management/security/users?_g=().
In that list you'll also see the user kibana with the role kibana_system. If you check out the details of that role, you'll see that it only has the monitor privilege and can only access the indices .kibana* and .reporting-*. That explains why your kibana user cannot see any data.
If you want to make this production ready:
Only enable the users that you need.
Change passwords.
Maybe disable the default users and just create your own.
PS: I've only checked this on the 6.0.0-alpha2, but I think this should be the same on version 5 as well.

Resources