-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Security Solution] Disable legacy rules on upgrade to 8.x #121442
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1ab12e2
Disable legacy rule and notify user to upgrade
madirey fb3655a
Ensure rules are disabled on upgrade
madirey 4766e64
Merge branch 'main' of github.com:elastic/kibana into disable-legacy-…
madirey 021ec0f
Fix dupe detection on upgrade
madirey c5853fc
Revert "Fix dupe detection on upgrade"
madirey 6b7851a
Merge branch 'main' of github.com:elastic/kibana into disable-legacy-…
madirey e0079e0
Merge branch 'main' of github.com:elastic/kibana into disable-legacy-…
madirey feaa923
Add legacy notification
madirey 4896404
Merge branch 'main' into disable-legacy-rule
kibanamachine 5ba6fbe
Merge branch 'main' of github.com:elastic/kibana into disable-legacy-…
madirey 1a27a72
Merge branch 'disable-legacy-rule' of github.com:madirey/kibana into …
madirey 5d07f79
Merge branch 'main' of github.com:elastic/kibana into disable-legacy-…
madirey 7d326d6
Add tests for 8.0 security_solution rule migration
madirey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
@elastic/kibana-alerting-services is this sufficient for disabling a rule during migration. Or because the task still exists, the rule runs regardless?
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.
As of 8.1, we have this logic in place to skip running rules when they are disabled: #119239
That hasn't been backported to 8.0 though, so maybe it needs to be to support this PR
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.
Even if we backported the above-mentioned PR, I'm wondering if 2 tasks will run when the rule does get enabled. Since we're just setting
enabledtofalsehere but the scheduled task still exists, a new task document will get created when the rule gets enabled and then both tasks will runThere 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.
As part of this PR, we also delete the code that registered the old rule type so the old task still exists but it doesn't get picked up by task manager to actually execute since it can't find the executor logic.
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.
Gotcha! Verified that this all works as expected. It will just leave an API key that is never invalidated. Is that a big deal @mikecote ?
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.
From a platform perspective, it is ok, it will not cause any harm leaving API keys behind. If folks in the security solution are ok with this caveat, we should be ok.