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

Allow empty field name for supporting timeframe and keywords when validating rule during creation/update #823

Merged

Conversation

amsiglan
Copy link
Collaborator

@amsiglan amsiglan commented Dec 5, 2023

Description

Allow empty field name for supporting timeframe and keywords when validating rule during creation/update

Check List

  • 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.

Copy link
Collaborator

@AWSHurneyt AWSHurneyt left a comment

Choose a reason for hiding this comment

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

LGTM. Approving assuming tests pass.

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8c636bd) 31.01% compared to head (5e568b0) 31.01%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #823   +/-   ##
=======================================
  Coverage   31.01%   31.01%           
=======================================
  Files         151      151           
  Lines        5101     5101           
  Branches      890      890           
=======================================
  Hits         1582     1582           
  Misses       3329     3329           
  Partials      190      190           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Amardeepsingh Siglani <[email protected]>
@amsiglan amsiglan merged commit 9fcb845 into opensearch-project:main Dec 5, 2023
9 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

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.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-823-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9fcb8452097a12bfada797076d8cbd9f1e4d9dae
# Push it to GitHub
git push --set-upstream origin backport/backport-823-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-823-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.9 failed:

The process '/usr/bin/git' failed with exit code 1

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.9 2.9
# Navigate to the new working tree
cd .worktrees/backport-2.9
# Create a new branch
git switch --create backport/backport-823-to-2.9
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9fcb8452097a12bfada797076d8cbd9f1e4d9dae
# Push it to GitHub
git push --set-upstream origin backport/backport-823-to-2.9
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.9

Then, create a pull request where the base branch is 2.9 and the compare/head branch is backport/backport-823-to-2.9.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.10 failed:

The process '/usr/bin/git' failed with exit code 1

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.10 2.10
# Navigate to the new working tree
cd .worktrees/backport-2.10
# Create a new branch
git switch --create backport/backport-823-to-2.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9fcb8452097a12bfada797076d8cbd9f1e4d9dae
# Push it to GitHub
git push --set-upstream origin backport/backport-823-to-2.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.10

Then, create a pull request where the base branch is 2.10 and the compare/head branch is backport/backport-823-to-2.10.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 5, 2023
…idating rule during creation/update (#823)

* allow empty field name for supporting timeframe and keywords

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

* fixed cypress test

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

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 9fcb845)
AWSHurneyt pushed a commit that referenced this pull request Dec 5, 2023
…idating rule during creation/update (#823) (#825)

* allow empty field name for supporting timeframe and keywords

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

* fixed cypress test

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

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 9fcb845)

Co-authored-by: Amardeepsingh Siglani <[email protected]>
amsiglan added a commit to amsiglan/security-analytics-dashboards-plugin that referenced this pull request Dec 6, 2023
…idating rule during creation/update (opensearch-project#823)

* allow empty field name for supporting timeframe and keywords

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

* fixed cypress test

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

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
amsiglan added a commit to amsiglan/security-analytics-dashboards-plugin that referenced this pull request Dec 6, 2023
…idating rule during creation/update (opensearch-project#823)

* allow empty field name for supporting timeframe and keywords

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

* fixed cypress test

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

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
amsiglan added a commit that referenced this pull request Dec 7, 2023
…idating rule during creation/update (#823) (#831)

* allow empty field name for supporting timeframe and keywords



* fixed cypress test



---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
amsiglan added a commit that referenced this pull request Dec 7, 2023
…idating rule during creation/update (#823) (#830)

* allow empty field name for supporting timeframe and keywords



* fixed cypress test



---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
amsiglan added a commit to amsiglan/security-analytics-dashboards-plugin that referenced this pull request Feb 14, 2024
…idating rule during creation/update (opensearch-project#823)

* allow empty field name for supporting timeframe and keywords

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

* fixed cypress test

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

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
@amsiglan amsiglan mentioned this pull request Feb 14, 2024
1 task
amsiglan added a commit that referenced this pull request Feb 14, 2024
* Make notifications optional (#796)

* Make notifications optional 2.11 (#770)

* Threat intel feed support for detector creation (#762)

* added threat intel feed support for detector creation

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

* updated cypress workflow file

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

* updated alerts; findings UX

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

* refactored alert condition panel; update detector for intel feeds

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

* updated snapshots, mocks

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

* updated workflow

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

* updated tests

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

* updated snapshot

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

* updated UI; tests

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

---------

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

* fixed tests; make notification optional

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

---------

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

* revert notification change

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

---------

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

* supporting array of key/value under selection (#803)

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

* Correlation rules field matching and time window support (#804)

* added ux for group by field and time window

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

* improved validation

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

* check for null values

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

* addressed PR comments

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

---------

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

* validate fields only when group by enabled; update default window to 5 min (#810)

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

* do not send fields if empty (#817)

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

* Allow empty field name for supporting timeframe and keywords when validating rule during creation/update (#823)

* allow empty field name for supporting timeframe and keywords

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

* fixed cypress test

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

---------

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

* fixed update payload (#838)

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

* add already mapped log index fields to list of options (#845)

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

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
amsiglan added a commit to amsiglan/security-analytics-dashboards-plugin that referenced this pull request Feb 14, 2024
…idating rule during creation/update (opensearch-project#823)

* allow empty field name for supporting timeframe and keywords

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

* fixed cypress test

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

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
@amsiglan amsiglan mentioned this pull request Feb 14, 2024
1 task
amsiglan added a commit that referenced this pull request Feb 14, 2024
* Make notifications optional (#796)

* Make notifications optional 2.11 (#770)

* Threat intel feed support for detector creation (#762)

* added threat intel feed support for detector creation

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

* updated cypress workflow file

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

* updated alerts; findings UX

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

* refactored alert condition panel; update detector for intel feeds

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

* updated snapshots, mocks

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

* updated workflow

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

* updated tests

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

* updated snapshot

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

* updated UI; tests

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

---------

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

* fixed tests; make notification optional

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

---------

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

* revert notification change

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

---------

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

* supporting array of key/value under selection (#803)

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

* Correlation rules field matching and time window support (#804)

* added ux for group by field and time window

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

* improved validation

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

* check for null values

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

* addressed PR comments

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

---------

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

* validate fields only when group by enabled; update default window to 5 min (#810)

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

* do not send fields if empty (#817)

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

* Allow empty field name for supporting timeframe and keywords when validating rule during creation/update (#823)

* allow empty field name for supporting timeframe and keywords

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

* fixed cypress test

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

---------

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

* fixed update payload (#838)

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants