Kibana and Shield: user read-only access to his index

I'm using Kibana with Shield and I want to create read-only users that they can see only his respective index.

I created this role for foo user:

    - names: 'foo-*'
        - indices:admin/mappings/fields/get
        - indices:admin/validate/query
    - names: '.kibana'
        - indices:data/read/get
        - indices:data/read/mget
        - indices:data/read/search

After logged-in, user gets an empty Kibana page, what am I doing wrong? Thanks in advance.

A few questions:

What version of Kibana/ES/Shield are you using? Are you using the Kibana Shield plugin?

Are you getting any error messages, either on the page or in your DevTools console?

Do you only want the data to be read only, or do you also want to prevent users from creating new visualizations, dashboards, saved searches, etc?

Hi Bargs

  • ES: 2.3.1
  • Kibana: 4.5.0
  • Shield (plugin installed from ES): 2.3.1

I want the data being read-only and limit user access to other indices.

And I got this error message:

Error: [security_exception] action [indices:admin/mappings/fields/get] is unauthorized for user [foo]

I want the data being read-only and limit user access to other indices.

If you use this example role as a base, I think that should achieve what you need. You'll just need to switch logstash-* to foo-* and remove the cluster section. Let me know if that doesn't work for some reason.

As an aside, you might also want to install the Kibana Shield plugin which will give you some additional functionality like a proper login screen.

1 Like

This is what I wanted, thank you @Bargs!