Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saved object authorization - Phase 1 #4453

Closed
tbragin opened this issue Jul 17, 2015 · 81 comments
Closed

Saved object authorization - Phase 1 #4453

tbragin opened this issue Jul 17, 2015 · 81 comments
Labels
release_note:enhancement Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@tbragin
Copy link
Contributor

tbragin commented Jul 17, 2015

Currently, Kibana does not support any fine-grained access control in the UI, so all dashboards, visualizations, and saved searches are available to every authenticated user. This may present a problem when Kibana is used by multiple groups that wish to share a single Kibana instance and restrict who can see each of these saved objects.

To be clear, a reasonable workaround at this time is to set up multiple Kibana instances, one per group. However, as the number of groups gets large and dynamic, this may not be an ideal approach.

Here we propose an initial cut at proposed functionality and workflow for sharing one Kibana instance among multiple groups with different access rights. At a high-level this enhancement will allow for two things:

  • Saved objects (views, dashboards, searches) can be grouped
  • Users will have access to these groups

From an interaction perspective, we propose to explore using the concept of object tags to group Kibana objects (#1052).

  • Saved objects can be tagged
  • Users can also be associated with tags
  • Anyone can create new tags and associate them with user groups
  • If a user is associated with a tag, this user has all access to the saved object (view, modify, delete, etc..)
  • If a user is associated with a tag, this user can also add this tag to any object he already has access to (users can delegate rights to objects they have access to)
  • If a user is associated with a tag, this user can also add any other user to this tag (users can modify membership of groups they are a part of)
    When a user creates a new object and does not assign a tag to it, the “everyone” tag is automatically assigned and the object is visible to everyone
  • If a user wants a private object, he can create a new tag only associated with himself
  • There is a static “everyone” tag that every user gets. Assigning this tag to an object makes it accessible to everyone.

Out of scope for this phase:

  • No fine-grained capabilities, such as create, update, delete, view (all-or-nothing access to objects)
  • No special superuser privileges, such as ability to restrict access to administrative actions, such as modifying advanced settings, adding index patterns, etc..
  • No fine-grained access to parts of saved objects (e.g. particular buttons, parts of a specific visualization, etc..)

Related issues: #1559, #3904

@rashidkpc rashidkpc changed the title Access control at the saved object-level - Phase 1 Saved object access controls - Phase 1 Jul 17, 2015
@rashidkpc rashidkpc changed the title Saved object access controls - Phase 1 Saved object access control - Phase 1 Jul 17, 2015
@surbhi26
Copy link

+1

@rashidkpc rashidkpc changed the title Saved object access control - Phase 1 Saved object authorization - Phase 1 Jul 23, 2015
@rashidkpc rashidkpc added v4.5.0 and removed v4.4.0 labels Jul 23, 2015
@chandlermelton
Copy link

tbragin: you mentioned a workaround using multiple kibana instances. that would work for me as i only have two groups. one gets full access, the other would be limited to certain types of logs such as access logs.

for this setup, would i need to save access logs to an additional index that the second kibana instance connects points to?

@Malu44
Copy link

Malu44 commented Aug 5, 2015

Does this approach works with Shield?

Currently we use multiple Kibana instances with different .kibana-index to split our groups.
User in the group should see different dashboard / data.
For every new group we've to setup an new instance. This would be a big issue for our customer.
Due to organizational requirements this generate costs.

@rashidkpc
Copy link
Contributor

via @dannymeijer in #4714

In our use-case we are looking to start deploying Kibana to a very broad user base. To prevent issues with people 'accidentally' breaking something for someone else (for example, deleting someone else's dashboard) we want to be able to define authorization levels.

I was thinking something like this (as an example):

A regular user:
Can discover and use any of the stored visualizations, but you don't want a regular user to 'mess anything up'. Unable to save or manage objects.
A privileged user:
Has some more rights than a regular user. Can create dashboards and manage some of the settings, but nothing too extensive.
Power users:
people that can modify everything.
Problem (as far as I can tell with the current releases) is that the level of lockdown is not to this level of detail that I am explaining. For example, I am able to remove the settings plugin, which gives me some security that the the settings will not get messed with. But this also removes the functionality/ability for users to manage saved objects (since it is nested within the settings plugin).

Another example of this is visualizations. I don't want regular users to create and store visualizations (they are just stopping by to check out content that is already there) - but disabling the visualization plugin will not just remove the visualizations tab; it completely disables all and every visualizations.

I hope I was extensive enough with examples to portray what I am talking about. The solution I had in mind would involve having the ability to customize in a more detailed level what users are presented with, maybe in the form of tags or buckets that you can predefine.

A requirement for this to work is obviously that the authentication framework is in place (issue #3904 / #4419 / #4634).

@TinLe
Copy link

TinLe commented Aug 19, 2015

+1

If this can be tied to LDAP/AD where we already have different groups defined, that would be very nice.

@gustavomr
Copy link

+1
with LDAP!

@sand0id
Copy link

sand0id commented Sep 15, 2015

+1
We're in the same situation as @Malu44, so would be great to integrate this with Shield

@Kudo
Copy link

Kudo commented Sep 16, 2015

+1

8 similar comments
@tehsphinx
Copy link

+1

@tulku
Copy link

tulku commented Sep 21, 2015

+1

@cdenneen
Copy link

+1

@schast
Copy link

schast commented Sep 29, 2015

+1

@davidw2
Copy link

davidw2 commented Sep 29, 2015

+1

@dev-rke
Copy link

dev-rke commented Oct 9, 2015

+1

@etfeet
Copy link

etfeet commented Oct 19, 2015

+1

@raphaele81
Copy link

+1

@jonatansver
Copy link

+1!!
People that are meant to only warch my dashboard for analisys and getting information change my dashboards and visualizations(most of them think the changes are local) and i must import a backup every now and then.....
Group permissions will be great!

@urtens
Copy link

urtens commented Feb 21, 2017

+1

@sergiolr100
Copy link

Hi all,

could be this a possible solution?

I used 5.2.0 version. In Kibana-Management-Users, create an user (user1) and specific role for this user (role1).

This user only must have access to the index "example-*", and only their visualizations, dashboards, searches...

== ROLE1 ==

Name: Role1
Cluster privileges: None
Index privileges:

| Indices: example-*
| Privileges: read, view_index_metadata
| Granted Fields: *

| Indices: .kibana
| Privileges: read, view_index_metadata
| Granted Fields: *
| Granted Documents Query

{
  "bool" : {
      "should" :  [
              { "term" :  { "_id" : "default_index" } },
              { "term" :  { "_id" : "5.2.0" } },
              { "term" :  { "_id" : "example-*" } },
		 { "term" :  { "_id" : "DASHBOARD1" } },
		 { "term" :  { "_id" : "DASHBOARD2" } },
		 { "term" :  { "_id" : "..." } },
		 { "term" :  { "_id" : "VISUALIZATION1" } },
		 { "term" :  { "_id" : "VISUALIZATION2" } },
		 { "term" :  { "_id" : "..." } },
		 { "term" :  { "_id" : "SEARCH1" } },
		 { "term" :  { "_id" : "SEARCH2" } },
		 { "term" :  { "_id" : "..." } }
      ],
      "minimum_should_match" : 1
  }
}

You can create a neutral default index empty for all users. PUT /start

Regards

@AlexandrTuniev
Copy link

Any updates on this ?

@xycloud
Copy link

xycloud commented Mar 27, 2017

+1

@ghost
Copy link

ghost commented Mar 28, 2017

плюс один

@vg15
Copy link

vg15 commented Apr 10, 2017

@sergiolr100

Well I like the solution but facing some issue. Extremely sorry that I am asking query here .
So my role is like
Rolename :- Management
Cluster privileges: None
Index privileges:
| Indices: management
| Privileges: read, view_index_metadata
| Granted Fields: *

| Indices: .kibana_management
| Privileges: read, view_index_metadata
| Granted Fields: *
| Granted Documents Query

{
  "bool" : {
      "should" :  [
{ "term" :  { "_id" : "management" } },
{ "term" :  { "_id" : "5.2.2" } },
{ "term" :  { "_id" : "7a386190-19e5-11e7-90e2-a52016cb5a60" } }
      ],
      "minimum_should_match" : 1
  }
}

With above I cannot see data/document in the discover page, however with elastic user who created this index (management) can see the document/data in the discover page . FYI i have merged both above settings in a single role only also here ID is my visualization ID even this is not showing any data.

@drakkhen
Copy link

+1

@epixa epixa removed the P2 label Apr 25, 2017
@AndreAga
Copy link

AndreAga commented May 4, 2017

+1

@guyboertje
Copy link

guyboertje commented May 13, 2017

Apache Shiro inspired me to create Rushiro https://github.com/guyboertje/rushiro for an e-commerce Rails platform that I worked on a few years back.

From what I have seen of the AWS permission system, it too is inspired by Shiro.

------ extract
The permission part has several pipe separated sections, you are completely free
to choose the schema, but remember that evaluation is on a left to right basis.

One suggestion might be: Domain|Action|Instance

  • Domain - aka resources, e.g. webpages, db entities, domain models or services
  • Action - entries from the set of actions available for the domain (crud, rw, use/manage)
  • Instance - these entries are 'labels' you have given to instances of the domain,
    e.g. a particular webpage, a uuid or unique id of a db record
    Note: Multiple comma separated entries are allowed, as is the * wildcard

example: this hash is processed into a hierarchy of objects

perm = {
  allows: {
    individual: [
      "feature|create,read,update|feat-x",
      "page|*|posts",
      "company|read"
      "company|update|5b90a720-e6b0-012e-dc18-782bcb979e60"
    ],
    organization: [],
    system: []
  },
  denies: {}
}

access_control = AllowBasedControl.new(perm)
access_control.permitted?("company|read|5b90a720-e6b0-012e-dc18-782bcb979e60") ==> true
access_control.permitted?("feature|delete|feat-x") ==> false

------ extract

@arult
Copy link

arult commented Sep 8, 2017

Hi @tbragin
Any update on this enhancement? When and which version of Kibana we can see this? Will this be available as open source?

@dfinkbeiner
Copy link

What is the issue # in GitHub to enhance kibana to provide real fine grained access to kibana objects (where some users will have read, others can have full access) based on roles/group memebership? I can't find any. If that issue doesn't exist yet, it should. The approach used in this issue with tags that you can assign to objects still gives all users with that tag the same access level (full access) - not what a lot of people want. Thanks.

@mostrovoi
Copy link

Best solution I found so far regarding this issue:

https://github.com/wtakase/kibana-own-home

@CamiloSierraH
Copy link

+1

1 similar comment
@StephanBenning
Copy link

+1

@georgezoto
Copy link

+1

1 similar comment
@dbroeh
Copy link

dbroeh commented May 31, 2018

+1

@drakkhen
Copy link

Our company has figured out how to solve this problem: give up on ELK and just use Splunk. ELK is fine for a few people on a close-knit team but Splunk has way better user account-related functionality for a larger team or multiple teams.

@tudro
Copy link

tudro commented Jun 15, 2018

+1

1 similar comment
@patrickmhoge
Copy link

+1

@jeffrey-e
Copy link

+1, would love to see this feature be implemented in any proper form!

@Sjaak01
Copy link

Sjaak01 commented Jul 23, 2018

+1 but three years in and I don't believe anything has been done on this front?

We want to give outside access to our Kibana instance but fine grained access to dashboards is a MUST. Even internally this is kind of a necessity and I suppose that goes for everyone using Kibana outside of a small team.

@timroes timroes added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Aug 13, 2018
@timroes
Copy link
Contributor

timroes commented Aug 13, 2018

cc @elastic/kibana-security please feel free to close and refer to a more up to date issue, if there is any

@kobelb
Copy link
Contributor

kobelb commented Aug 13, 2018

Superseded by #18473

@kobelb kobelb closed this as completed Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests