Search code examples
elastic-stackelkkibana-7elasticsearch-x-packrole-based-access-control

How to have a read only dashboard for a particular user in Kibana


I am running Kibana 7.7.1 on windows system. I tried to achieve this using xpack security. Kibana license is Basic(free) version.

My ES config:

  • xpack.security.enabled: true
  • discovery.type: single-node

I used following command to generate passwords: bin/elasticsearch-setup-passwords auto

In kibana configuration added following lines:

  • elasticsearch.username: "kibana"
  • elasticsearch.password: "***"

I logged in to Kibana with the credentials (as received from the command above):

  • Username:"elastic"
  • Password:"***"

In Management->security->roles I created new role with privilege read. Then in Management->security->users created a new user with the role just created. Logged out and tried to login with the new user and it showed this message {"statusCode":403, "error":"Forbidden", "message":"Forbidden"}

I am new to Kibana. I followed a tutorial but it did not work for me. Is there a way we can achieve this?


Solution

  • You also need to grant Kibana access through the 'spaces', if you want, you also can give access only to the dashboard module in this config too.

    Kibana spaces doc: https://www.elastic.co/guide/en/kibana/current/xpack-spaces.html

    Kibana