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

Adding GET/PUT ILM cluster privileges to kibana_system role #49451

Merged
merged 3 commits into from
Jan 10, 2020

Conversation

legrego
Copy link
Member

@legrego legrego commented Nov 21, 2019

Resolves #46894

As outlined in #46894, the kibana_system role needs the ability to retrieve and create ILM policies. Additionally, it needs to be able to assign these policies to indices matching the .kibana* pattern.

Since kibana_system can already do everything against .kibana*, the latter is already taken care of. This PR addresses the former by granting the appropriate cluster privileges to the kibana_system role.

@legrego legrego added :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC v8.0.0 v7.6.0 labels Nov 21, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Authorization)

Copy link
Contributor

@kobelb kobelb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I ultimately defer to @elastic/es-security. I don't know of a way to accomplish what @albertzaharovits suggested here...

@albertzaharovits
Copy link
Contributor

Thanks for raising this @legrego ! We'll be discussing this at our next team meeting. I am particularly worried that the kibana_system can now manipulate all the policies and add the delete action, thereby deleting all the indices that have a policy assigned.

@albertzaharovits
Copy link
Contributor

We've discussed and raised #50130 as a consequence.

@albertzaharovits
Copy link
Contributor

@pmuellr May I ask you to name the ILM policy and not change its name? We plan to introduce a new privilege so that kibana_system can manipulate only a namespace subset of ILM policies.

Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, provided we'll have to revise this when we introduce a new privilege, possibly not before the next minor release.

@legrego
Copy link
Member Author

legrego commented Dec 12, 2019

May I ask you to name the ILM policy and not change its name? We plan to introduce a new privilege so that kibana_system can manipulate only a namespace subset of ILM policies.

Would it be ok if the policy had a known unchangeable prefix, but a customizable suffix? We'll need to support multi-tenant Kibana setups, so if users have multiple .kibana indices in the same cluster, I imagine we'll also need multiple ILM policies to manage the different indices we'd create for alerting's event log.

We do something similar today with the application privileges Kibana registers with Elasticsearch.

@pmuellr
Copy link
Member

pmuellr commented Dec 12, 2019

Would it be ok if the policy had a known unchangeable prefix, but a customizable suffix? We'll need to support multi-tenant Kibana setups, so if users have multiple .kibana indices in the same cluster, I imagine we'll also need multiple ILM policies to manage the different indices we'd create for alerting's event log.

Larry is correct - the name of the ES resources for the new event log are all prefixed with the "kibana index name" (default: .kibana), to accommodate multi-tenant scenarios. The ILM policy is something like {kibana-index-name}-event-log-ilm-policy, so the default would be .kibana-event-log-ilm-policy.

My understanding is these multi-tenant scenarios require some amount of additional admin work by the customer to set up correctly - new roles need to be created, etc for the new "alternative" kibana indices. Adding some additional work by the customer to accommodate a new policy for the ILM bits seems like it would be ok.

@kobelb
Copy link
Contributor

kobelb commented Dec 12, 2019

My understanding is these multi-tenant scenarios require some amount of additional admin work by the customer to set up correctly - new roles need to be created, etc for the new "alternative" kibana indices. Adding some additional work by the customer to accommodate a new policy for the ILM bits seems like it would be ok.

Customers are able to exploit the fact that kibana_system has access to .kibana* and change their kibana.index to something like .kibana_marketing without having to create custom users/roles at the moment.

@legrego
Copy link
Member Author

legrego commented Jan 7, 2020

@elasticmachine merge upstream

@legrego
Copy link
Member Author

legrego commented Jan 10, 2020

@elasticmachine merge upstream

@legrego legrego merged commit fd06b3d into elastic:master Jan 10, 2020
@legrego legrego deleted the kibana-system-ilm branch January 10, 2020 20:47
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
…c#49451)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@jakelandis jakelandis removed the v8.0.0 label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

need kibana internal user to have read/write access to .kibana* ILM resources
7 participants