-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add ILM policy PUT and GET for remote_monitoring_agent built-in role #57963
Add ILM policy PUT and GET for remote_monitoring_agent built-in role #57963
Conversation
Pinging @elastic/es-security (:Security/Authorization) |
@@ -73,6 +73,7 @@ | |||
"cluster:monitor/xpack/watcher/watch/get", | |||
"cluster:admin/xpack/watcher/watch/put", | |||
"cluster:admin/xpack/watcher/watch/delete", | |||
GetLifecycleAction.NAME, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's preferable, if possible, to use privilege names, such as read_ilm
in this case, instead of explicit action names. This offers us the maximum of flexibility, as we don't have to worry about BWC when changing action names.
Is it a specific ILM policy that Metricbeat requires access to (I think so, but want to make sure)? |
Yes, it is a specific policy, governed by this setting: https://www.elastic.co/guide/en/beats/metricbeat/current/ilm.html#setup-ilm-policy_name-option. By default the name of the policy is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ycombinator
LGTM, but I have two questions please:
- can you clarify what/who PUTs the policy in the first place (and maintains/updates)? Is it the
kibana_system
user, or something that ships with ES from Add default composable templates for new indexing strategy #57629 . - is this breaking Metricbeat in 7.7 ?
@ycombinator I think more than just read_ilm cluster privileges are required since when I tested this on 7.6.2, I subsequently got this message:
I had to either give my user the |
Thanks @albertzaharovits and @lcawl for your comments.
Yes, and in prior versions as well.
Users who use Metricbeat for Stack Monitoring can be divided into two classes:
So I think the options become:
Option 1 makes the "getting started" user experience a bit messier but option 2 makes the built-in Any opinions on one over the other, @albertzaharovits or @lcawl? |
Thanks for the explanation @ycombinator ! I think we should go with option 2
My thinking is that the But I don't think we should ship such a change in a patch release. From ES perspective this is an "enhancement" not a "bug". It's a bug from a use case perspective. Not even all ES bug fixes are ported to patch releases, if they change behaviour. I don't feel strongly about it, but I feel it's not my decision to make. If you feel otherwise can you please rope in someone that's more involved in the release process, maybe a tech lead. |
@ycombinator We discussed this inside the team this morning, and they've changed my mind. I feel discomfort whenever we have to grant such a liberal privilege for built-in roles, especially since it's required only during the initial setup, but this is simply our only option atm. I was reluctant to force this upon users upgrading the patch version, but @jkakavas convinced me that this sounds like a bug for users and we must find reasons NOT to backport bugs to patches, not the other way around. |
@ycombinator I have taken the liberty to push to your PR branch in order to make up for the lost time with these discussions. I have modified the role to explicitly grant privs for PUT and GET ILM policy actions (instead of the |
@elasticmachine update branch |
…57963) Without this fix, users who try to use Metricbeat for Stack Monitoring today see the following error repeatedly in their Metricbeat log. Due to this error Metricbeat is unwilling to proceed further and, thus, no Stack Monitoring data is indexed into the Elasticsearch cluster. Co-authored-by: Albert Zaharovits <[email protected]>
…lastic#57963) Without this fix, users who try to use Metricbeat for Stack Monitoring today see the following error repeatedly in their Metricbeat log. Due to this error Metricbeat is unwilling to proceed further and, thus, no Stack Monitoring data is indexed into the Elasticsearch cluster. Co-authored-by: Albert Zaharovits <[email protected]>
…57963) Without this fix, users who try to use Metricbeat for Stack Monitoring today see the following error repeatedly in their Metricbeat log. Due to this error Metricbeat is unwilling to proceed further and, thus, no Stack Monitoring data is indexed into the Elasticsearch cluster. Co-authored-by: Shaunak Kashyap <[email protected]>
…57963) Without this fix, users who try to use Metricbeat for Stack Monitoring today see the following error repeatedly in their Metricbeat log. Due to this error Metricbeat is unwilling to proceed further and, thus, no Stack Monitoring data is indexed into the Elasticsearch cluster. Co-authored-by: Shaunak Kashyap <[email protected]>
Sorry @albertzaharovits, got caught up in other things on Friday and then came the weekend. Thanks for making updates to this PR and merging it <3. |
What does this PR do?
This PR adds the
cluster:admin/ilm/get
andcluster:admin/ilm/put
privilege to theremote_monitoring_agent
built-in role.Why is this change necessary?
The
remote_monitoring_agent
built-in role is intended for users who wish to monitor their Elastic Stack with Metricbeat. One of the checks that Metricbeat does upon start up is for the existence of an ILM policy. As such, this role should allow this check to happen.Without this fix, users who try to use Metricbeat for Stack Monitoring today see the following error repeatedly in their Metricbeat log. Due to this error Metricbeat is unwilling to proceed further and, thus, no Stack Monitoring data is indexed into the Elasticsearch cluster.