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

Feature/191 detector types breaking change #216

Conversation

stevanbz
Copy link
Contributor

@stevanbz stevanbz commented Dec 31, 2022

Description

Added multiple detector types as part of DetectorInput. Extended detector with new field: docLevelMonitorPerCategory used for storing the doc level category:monitorId pairs (used when detector is being updated in order to determine which monitors should be deleted and which query indices should be removed).

In order to support multiple detector types, detectorInput has been extended with List detectorTypes property. To keep the possibility of getting all alerts and findings per detector type and per detector id AlertsService and FindingsService has been extended to use the groupedListener and then they are joining/merging the search alert/finding results.

When updating the detector, if one of the doc level monitor has been deleted by deselecting rules, and the whole rule category has been removed, query index will also be deleted.

Issues Resolved

[191]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

GetFinding supporting multiple detector types

GetAlerts supporting multiple detector types

Added multiple detector types in request model

Signed-off-by: Stevan Buzejic <[email protected]>
Signed-off-by: Stevan Buzejic <[email protected]>
Signed-off-by: Stevan Buzejic <[email protected]>
…dded collection of detector types in input field

Refactored tests and updated constructor from a Detector not to consider detector type property

Signed-off-by: Stevan Buzejic <[email protected]>
@stevanbz stevanbz force-pushed the feature/191-detector-types-breaking-change branch from 5695a9a to d23de7c Compare January 1, 2023 09:23
@codecov-commenter
Copy link

codecov-commenter commented Jan 1, 2023

Codecov Report

Merging #216 (1d6da46) into main (1770873) will decrease coverage by 0.38%.
The diff coverage is 22.29%.

@@             Coverage Diff              @@
##               main     #216      +/-   ##
============================================
- Coverage     38.97%   38.58%   -0.39%     
- Complexity      892      897       +5     
============================================
  Files           176      176              
  Lines          6746     6894     +148     
  Branches        823      844      +21     
============================================
+ Hits           2629     2660      +31     
- Misses         3876     3988     +112     
- Partials        241      246       +5     
Impacted Files Coverage Δ
.../securityanalytics/action/GetDetectorResponse.java 20.00% <ø> (+0.55%) ⬆️
...ecurityanalytics/action/IndexDetectorResponse.java 60.60% <ø> (+1.78%) ⬆️
...ytics/transport/TransportDeleteDetectorAction.java 0.00% <0.00%> (ø)
...yanalytics/transport/TransportGetAlertsAction.java 0.00% <ø> (ø)
...nalytics/transport/TransportGetFindingsAction.java 0.00% <ø> (ø)
...lytics/transport/TransportIndexDetectorAction.java 0.00% <0.00%> (ø)
...earch/securityanalytics/util/RuleTopicIndices.java 0.00% <0.00%> (ø)
...alytics/config/monitors/DetectorMonitorConfig.java 52.43% <25.00%> (-1.41%) ⬇️
...g/opensearch/securityanalytics/model/Detector.java 66.11% <25.45%> (-4.47%) ⬇️
...search/securityanalytics/alerts/AlertsService.java 25.92% <48.78%> (+4.02%) ⬆️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@stevanbz stevanbz force-pushed the feature/191-detector-types-breaking-change branch 2 times, most recently from 216e8ce to a59b0cd Compare January 3, 2023 17:00
…or detector with multiple detector types

Signed-off-by: Stevan Buzejic <[email protected]>

Extended alert and finding services to consider multiple detector types

Added integration tests

Signed-off-by: Stevan Buzejic <[email protected]>
@stevanbz stevanbz force-pushed the feature/191-detector-types-breaking-change branch from 5dbd986 to f43553c Compare January 3, 2023 17:53
Signed-off-by: Stevan Buzejic <[email protected]>
@stevanbz stevanbz mentioned this pull request Jan 4, 2023
5 tasks
@stevanbz stevanbz closed this Jan 5, 2023
@stevanbz
Copy link
Contributor Author

stevanbz commented Jan 5, 2023

Closing the PR in favor of:
#227

riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this pull request Feb 20, 2024
…lyout UI polish (opensearch-project#216)

* refactored finding flyout

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated cypress test

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* show surrounding documents when index-pattern available

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* fixed search filter for log source

Signed-off-by: Amardeepsingh Siglani <[email protected]>

Signed-off-by: Amardeepsingh Siglani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants