elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
20.35k stars 8.33k forks source link

[ResponseOps][Alerting] Research of exposing alerting filtering controls #208225

Open cnasikas opened 2 months ago

cnasikas commented 2 months ago

The Alerts page in the stack management page shows controls that users can use to filter the alerts in the alerts table. O11y is interested in using the same controls for their alerts table. Controls use data views. However, our alerting RBAC model and the difference between the security solution and the rest of the solutions regarding RBAC make it difficult to use data views. Therefore, we need to be able to export controls that work with our RBAC model that the solutions can use.

Image

Requeriments

Some of the above requirements may not be feasible, or the complexity of satisfying them is unjustified. For this reason, we should first research the feasibility of the requirements and think about how we want to approach the issues. It is worth mentioning that we can move a lot of the work to the backend, where an API can return to the UI all the needed information related to alerting, for example, authorized indices and fields, and hide all the complexity related to the differences of the RBAC model.

DoD

Related: https://github.com/elastic/kibana/issues/206711

cc @maryam-saeidi

elasticmachine commented 2 months ago

Pinging @elastic/response-ops (Team:ResponseOps)

jasonrhodes commented 1 month ago

Thanks for explaining this, @cnasikas -- just so I'm clear, the problem this would solve is that an observability user might be given access to alerting but, for some reason, not given access to read from .alerts- indices, yes? I am wondering if that's a case we should solve for, as it seems to add a lot of custom auth logic into the app. Worth talking through, probably.

cnasikas commented 1 month ago

Hey, @jasonrhodes. The current RBAC alerting model is that o11y users need to configure only their Kibana privileges and not any ES privileges to use alerting features throughout the o11y application. The alerting controls depend on the Kibana controls, which work with data views and are unaware of our RBAC model. @maryam-saeidi tried to use our component as it is right now, but because the Kibana controls query the alerting indices directly (authorized as the current user), we get permission errors because even if the user has access to o11y, it did not have ES privileges to access the alerting indices. This effort is to figure out ways to bypass this problem and enable solutions to consume our alerting controls component without bothering with all the nuances of the alerting RBAC model.