[9.0] [Security Solution] Stop showing ML rule installation and upgrade errors on Basic license (#224676)#226357
Merged
nikitaindik merged 4 commits intoelastic:9.0from Jul 4, 2025
Conversation
…ors on Basic license (elastic#224676) **Resolves: elastic#197246 **Resolves: elastic#190753 **Flaky test runner**: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8483 ## Summary This PR addresses an issue where users with Basic or Essentials licenses encountered errors when attempting to install ML rules. This problem arose because Basic and Essentials licenses do not permit the installation or upgrading of ML rules. The PR resolves this by excluding ML rules from the installation and upgrade `_review` endpoint responses for users with insufficient license. ## Changes - `installation/_review` and `upgrade/_review` don't return ML rules for users on Basic/Essentials. - `prebuilt_rules/status` does not include ML rules in the count of rules to install or upgrade. - `installation/_perform` and `upgrade/_perform` now skip ML rules when called with `ALL_RULES` mode if the license is insufficient. - Added API integration tests for installing and upgrading prebuilt rules on Basic and Essentials, as well as for checking their status. - Now, installation and upgrade errors are displayed in a separate "red" toast if any rules fail to install or upgrade. - Added tests for toasts as well. ## Screenshots and screen recordings ### Installing all prebuilt rules <details> <summary>Click to see screen recordings</summary> <b>Before</b> https://github.com/user-attachments/assets/4e68d4c8-5523-495f-9157-41a5f037d261 <b>After</b> https://github.com/user-attachments/assets/465a2bc0-fd89-49cc-9bdb-78d45a6545ea </details> ### Upgrading all prebuilt rules <details> <summary>Click to see screen recordings</summary> <b>Before</b> https://github.com/user-attachments/assets/6e7e4299-2348-43b3-b5f6-ed31cf350a69 <b>After</b> https://github.com/user-attachments/assets/84303135-2ed0-4014-a677-d182f2a105c9 </details> ### Errors during installation (unrelated to ML rules) <details> <summary>Click to see screenshots</summary> **Before: a green toast with combined success and error text** <img width="2561" alt="installation_toast_before" src="https://github.com/user-attachments/assets/35d4134b-643b-4e91-8971-de8d63a4c885" /> **After: two toasts – one for success, one for errors** <img width="2561" alt="installation_toast_after_1" src="https://github.com/user-attachments/assets/cc967445-e8fc-4508-a39d-a13116c4087b" /> <img width="2561" alt="installation_toast_after_2" src="https://github.com/user-attachments/assets/0c2fcbae-484f-4458-8151-29de2a09e243" /> </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Contributor
⏳ Build in-progress, with failures
Failed CI StepsTest Failures
History
|
maximpn
approved these changes
Jul 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.0:Questions ?
Please refer to the Backport tool documentation