-
Notifications
You must be signed in to change notification settings - Fork 75
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
Fixes detectorType incompatibility with detector rules #524
Conversation
Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
Codecov Report
@@ Coverage Diff @@
## main #524 +/- ##
============================================
- Coverage 28.20% 28.15% -0.06%
+ Complexity 941 937 -4
============================================
Files 236 236
Lines 9864 9864
Branches 1118 1118
============================================
- Hits 2782 2777 -5
- Misses 6841 6844 +3
- Partials 241 243 +2
|
src/main/java/org/opensearch/securityanalytics/transport/TransportIndexDetectorAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: jowg-amazon <jowg@amazon.com>
src/test/java/org/opensearch/securityanalytics/resthandler/DetectorRestApiIT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
} catch (ResponseException ex) { | ||
Assert.assertEquals(400, ex.getResponse().getStatusLine().getStatusCode()); | ||
assertTrue(ex.getMessage().contains("Detector cannot be created as no compatible rules were provided")); | ||
} |
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.
NIT: if the request doesn't fail the test will not recognize that.
can you ådd a fail() inside the try block to validate that behaviour.
Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com> (cherry picked from commit b88f3db)
…oject#524) Signed-off-by: jowg-amazon <jowg@amazon.com>
* Change ruleId if it exists Signed-off-by: Ashish Agrawal <ashish81394@gmail.com> * Fixes detectorType incompatibility with detector rules (#524) Signed-off-by: jowg-amazon <jowg@amazon.com>
* Correlation engine ux (opensearch-project#524) * wip Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * completed rules page; added placeholder for findings flyout tabs Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * reverted change to show empty table Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * updated rule type Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * updated create correlation rule page Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * correlation page wip Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * Correlation store and API services Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> * Correlation store and API services Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> * Correlation store and API services Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> * Correlation store and API services Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> * Correlation store and API services Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> * updated correlations page Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * updated store interfaces Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * fixed correlation store Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * added api for all correlations Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * added filter support for correlations Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * using apis; added validation Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * Implemented logic to populate correlations tables data. Signed-off-by: AWSHurneyt <hurneyt@amazon.com> * restricted to AND Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * log type clearable Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * code cleanup Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> * fixed API issue Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * updated snapshots Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * ux improvements Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * code cleanup Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> * removed redundant code Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * removed unwanted param Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * connected refresh Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> --------- Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> Signed-off-by: AWSHurneyt <hurneyt@amazon.com> Co-authored-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com> Co-authored-by: AWSHurneyt <hurneyt@amazon.com> (cherry picked from commit f565a923c6bfec1b8a69128d21e5d823a50cb142) * Removed duplicate import for EuiSpacer (opensearch-project#538) (opensearch-project#540) * removed duplicate import * updated snapshots --------- Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * Pinned babel traverse and core (opensearch-project#539) (opensearch-project#544) * pinned babel traverse and core * removed cyclic dependency * added types for vis * refactored code --------- Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> --------- Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> Co-authored-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.7 2.7
# Navigate to the new working tree
cd .worktrees/backport-2.7
# Create a new branch
git switch --create backport/backport-524-to-2.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b88f3dbbffd3e348b55e27273e6e3bca8c3f9471
# Push it to GitHub
git push --set-upstream origin backport/backport-524-to-2.7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.7 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.5 2.5
# Navigate to the new working tree
cd .worktrees/backport-2.5
# Create a new branch
git switch --create backport/backport-524-to-2.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b88f3dbbffd3e348b55e27273e6e3bca8c3f9471
# Push it to GitHub
git push --set-upstream origin backport/backport-524-to-2.5
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.5 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.7 2.7
# Navigate to the new working tree
cd .worktrees/backport-2.7
# Create a new branch
git switch --create backport/backport-524-to-2.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b88f3dbbffd3e348b55e27273e6e3bca8c3f9471
# Push it to GitHub
git push --set-upstream origin backport/backport-524-to-2.7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.7 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.5 2.5
# Navigate to the new working tree
cd .worktrees/backport-2.5
# Create a new branch
git switch --create backport/backport-524-to-2.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b88f3dbbffd3e348b55e27273e6e3bca8c3f9471
# Push it to GitHub
git push --set-upstream origin backport/backport-524-to-2.5
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.5 Then, create a pull request where the |
Description
Fixes detectors that have incompatible detector types with detector rules.
Issues Resolved
#518
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.