Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Updating Search Detector API to reject all queries other than BoolQuery #288

Merged
merged 3 commits into from
Oct 23, 2020

Conversation

saratvemulapalli
Copy link
Contributor

@saratvemulapalli saratvemulapalli commented Oct 23, 2020

*Issue #195 *

Description of changes:
As count and match detectors is moved to Search Detector Info API, Search Detector API will now filter all queries with backend role filter if enabled.

Also will be making changes to Alerting plugin, where we query Detectors during create Monitor workflow.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Oct 23, 2020

Codecov Report

Merging #288 into master will not change coverage.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #288   +/-   ##
=========================================
  Coverage     71.39%   71.39%           
  Complexity     1871     1871           
=========================================
  Files           195      195           
  Lines          9020     9020           
  Branches        764      764           
=========================================
  Hits           6440     6440           
  Misses         2215     2215           
  Partials        365      365           
Flag Coverage Δ Complexity Δ
#cli 79.27% <ø> (ø) 0.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...est/handler/IndexAnomalyDetectorActionHandler.java 48.77% <ø> (ø) 32.00 <0.00> (ø)
...ransport/SearchAnomalyDetectorTransportAction.java 35.71% <0.00%> (ø) 4.00 <0.00> (ø)
...rch/ad/transport/IndexAnomalyDetectorResponse.java 75.00% <85.71%> (ø) 4.00 <1.00> (ø)

Copy link
Contributor

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, confirmed in AD plugin this shouldn't break any existing queries as well.

@yizheliu-amazon
Copy link
Contributor

I will merge this PR on behalf of Sarat since he is out today, and it has 2 approvals now.

@yizheliu-amazon yizheliu-amazon merged commit 9a86253 into master Oct 23, 2020
@saratvemulapalli
Copy link
Contributor Author

Thanks guys!

@saratvemulapalli saratvemulapalli deleted the fgac-secure-search-detector-api branch October 23, 2020 20:21
@ohltyler ohltyler added the enhancement New feature or request label Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants