Rule field validation during IndexRule Action#80
Merged
sbcd90 merged 18 commits intoopensearch-project:mainfrom Nov 3, 2022
Merged
Rule field validation during IndexRule Action#80sbcd90 merged 18 commits intoopensearch-project:mainfrom
sbcd90 merged 18 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #80 +/- ##
============================================
- Coverage 43.20% 42.95% -0.25%
- Complexity 858 859 +1
============================================
Files 167 167
Lines 5826 5862 +36
Branches 734 736 +2
============================================
+ Hits 2517 2518 +1
- Misses 3076 3112 +36
+ Partials 233 232 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
getsaurabh02
requested changes
Oct 29, 2022
| Rule ruleDoc = new Rule(NO_ID, NO_VERSION, parsedRule, category, queries.stream().map(Object::toString).collect(Collectors.toList()), rule); | ||
| indexRule(ruleDoc); | ||
| //verify rule | ||
| verifyRule(backend.getQueryFields().keySet(), DetectorMonitorConfig.getRuleIndex(category), new ActionListener<>() { |
Member
There was a problem hiding this comment.
What if the custom rule is created using the fields not part of the rule alias mapping, but using some additional fields from the Source Index. That still is a valid use case.
Should we revisit the approach, where the fields in rule could also be present in the source index mapping?
Member
|
Hi @petardz are we on it with the plan as we discussed ? |
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
getsaurabh02
previously approved these changes
Nov 2, 2022
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
…into customrule-field-validation
eirsep
approved these changes
Nov 3, 2022
sbcd90
approved these changes
Nov 3, 2022
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Nov 3, 2022
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com> (cherry picked from commit bfb2b23)
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Nov 3, 2022
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com> (cherry picked from commit bfb2b23)
eirsep
pushed a commit
that referenced
this pull request
Nov 3, 2022
eirsep
pushed a commit
that referenced
this pull request
Nov 3, 2022
phaseshiftg
pushed a commit
to phaseshiftg/security-analytics
that referenced
this pull request
Nov 5, 2022
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
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.
Description
Added new API ValidateRules which, for a given indexName and list of ruleIds, will return list of non-applicable ruleIds to given index
Issues Resolved
#90
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.