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

[RAM] Can not view the rule created in ML in rule stack management #173573

Closed
XavierM opened this issue Dec 18, 2023 · 3 comments
Closed

[RAM] Can not view the rule created in ML in rule stack management #173573

XavierM opened this issue Dec 18, 2023 · 3 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience :ml Team:ML Team label for ML (also use :ml) Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.11.4 v8.12.1 v8.13.0

Comments

@XavierM
Copy link
Contributor

XavierM commented Dec 18, 2023

If users only have the ML privileges and not stackRules privileges. Then, user can create an anomaly rule in the jobs table but won't be able to view/edit/delete this rule in stack management.

image image
@XavierM XavierM added bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.12.0 v8.11.4 labels Dec 18, 2023
@elasticmachine
Copy link
Contributor

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

@XavierM XavierM added :ml Team:ML Team label for ML (also use :ml) labels Dec 18, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@umbopepato
Copy link
Member

In this case the Management > Stack rules permission is not granted and therefore the management.insightsAndAlerting.triggersActions capability, responsible for showing the Management > Rules page, is off:

image

Should the ML permission also automatically grant the triggersActions capability then?

Detecting an "override" in rules capabilities in specific pages (perhaps checking the ml.canCreateMlAlerts capability?) shouldn't be a problem, but the activation logic for the management sections is tightly coupled to their respective capabilities so detecting an override there would be more complicated:

start({ capabilities }: SectionsServiceStartDeps) {
this.getAllSections().forEach((section) => {
if (capabilities.management.hasOwnProperty(section.id)) {
const sectionCapabilities = capabilities.management[section.id];
section.apps.forEach((app) => {
const capabilitiesId = app.capabilitiesId || app.id;
if (
sectionCapabilities.hasOwnProperty(capabilitiesId) &&
sectionCapabilities[capabilitiesId] !== true
) {
app.disable();
}
});
}
});

@XavierM XavierM added the v8.13.0 label Jan 9, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jan 16, 2024
kibanamachine referenced this issue Jan 16, 2024
…174791) (#174940)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[RAM] Stack management rules available with only ml feature
(#174791)](#174791)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Xavier
Mouligneau","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-16T16:13:02Z","message":"[RAM]
Stack management rules available with only ml feature (#174791)\n\n##
Summary\r\n\r\nFix =>
https://github.com/elastic/kibana/issues/173573","sha":"5d5f0d10739647ea7a963327c72dcda5b845ade1","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","Team:ML","v8.12.1","v8.13.0"],"title":"[RAM]
Stack management rules available with only ml
feature","number":174791,"url":"https://github.com/elastic/kibana/pull/174791","mergeCommit":{"message":"[RAM]
Stack management rules available with only ml feature (#174791)\n\n##
Summary\r\n\r\nFix =>
https://github.com/elastic/kibana/issues/173573","sha":"5d5f0d10739647ea7a963327c72dcda5b845ade1"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/174791","number":174791,"mergeCommit":{"message":"[RAM]
Stack management rules available with only ml feature (#174791)\n\n##
Summary\r\n\r\nFix =>
https://github.com/elastic/kibana/issues/173573","sha":"5d5f0d10739647ea7a963327c72dcda5b845ade1"}}]}]
BACKPORT-->

Co-authored-by: Xavier Mouligneau <[email protected]>
@XavierM XavierM closed this as completed Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience :ml Team:ML Team label for ML (also use :ml) Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.11.4 v8.12.1 v8.13.0
Projects
No open projects
Development

No branches or pull requests

4 participants