kibana-authentication-proxy icon indicating copy to clipboard operation
kibana-authentication-proxy copied to clipboard

Restrict access to particular elasticsearch index for a given user?

Open woolfie opened this issue 11 years ago • 10 comments

Can this be used to restrict access to a particular index for a given user?

Currently, I think once logged in a user could create a new dashboard (by going to the root URL) and select whichever index they would like.

It would be great if this root URL could be restricted so that users were only able to access pre-built dashboards, or prevented from changing the index that a dashboard can access.

woolfie avatar Jul 12 '14 17:07 woolfie

I am voting for this issue. Let me know if there is any current efforts on this. If not I am willing to contribute this feature.

Vineeth-Mohan avatar Jul 24 '14 08:07 Vineeth-Mohan

Yes +1 for this

wjimenez5271 avatar Jul 24 '14 22:07 wjimenez5271

see the pull request #18

yang66 avatar Jul 29 '14 00:07 yang66

@coogleyou - I would prefer it as user should be able to access indices with pattern logstash-%user%-user

Vineeth-Mohan avatar Jul 29 '14 08:07 Vineeth-Mohan

@vineeth: could you elaborate this ? since the filter is regex based i mean it's no problem that you do something like this in your index_filter_file:

usernameA:^logstash-usernameA-.+ usernameB:^logstash-usernameB-.+

i personally see no sense in setting such things programmatically (but on the other hand i wrote this pull request this way)

strima avatar Aug 05 '14 13:08 strima

@strima - Well instead of mapping users to indices in the proxy , I map them by index name. My index names are in format <USER>-logstash-date and only if it starts with the username , can a user use that particular index.

My point here is that , when a new user comes , i dont want to add any config change on proxy side , rather it should be seemless.

Vineeth-Mohan avatar Aug 06 '14 11:08 Vineeth-Mohan

+1

misawsneto avatar Feb 03 '15 04:02 misawsneto

Did you saw this? https://www.elastic.co/blog/restricting-users-kibana-filtered-aliases

javifr avatar Apr 10 '15 15:04 javifr

@javifr - yes i saw this, but personally didn't find it that elegant ;)

strima avatar Apr 13 '15 09:04 strima

@Vineeth-Mohan - ok, one last question before i implement your wishes: you said you dont want to do any config changes on proxy side - so how do you enable a new user ? did you see my last commits where i added a filewatcher , so that if you change anything in the index_filter_file or in the basic auth file it gets reloaded by the application w/o need to restart ?

for the concrete thingie: what would you vote for ?

one username defined per convention in index_filter_file which can take the %user% placeholder, e.g.: GLOBALSETTINGS:^logstash-%user%-

or the left part of one line in the index_filter_file being also a regex instead of just an string

?

strima avatar Apr 13 '15 09:04 strima