-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[v15] Add initial condition parser for access monitoring rules #42087
Merged
Conversation
This file contains 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
* Add initial condition parser for access monitoring rules * Update integrations/access/accessrequest/app.go Co-authored-by: Zac Bergquist <[email protected]> * Check previously unchecked error and minor refactor of AMR * Simplify check for applicable access monitoring rules * Refactor access monitoring rules plugin integration * Fix formating and move lock aquisition * Add methods for listing access monitoring rules with a filter * Add contains_any predicate expression func * Add in is_empty func to predicate expression * Lock AMR cache in plugins while getting initial rules * Add in check for access monitoring rule version * Update integrations/access/accessrequest/app.go Co-authored-by: Roman Tkachenko <[email protected]> * Update integrations/access/accessrequest/app.go Co-authored-by: Roman Tkachenko <[email protected]> * Move lock so it doesnt persist over api calls * Remove unused constant and add more context to logs * Appease linter * Update access monitoring rules tests to pass rule validation * Add in missing access monitoring rules list with filter code * Appease linter * Add back validation code for AMRs * Fix test plugin role and rename listaccessmonitoringrulewithfilter * Fix local test for AMR crud operations * Fix end range for listing rules * Fix unwrapping of resource153 event for monitoring rules * Refactor AMR cache init into helper function in plugin app * Add seperate response type for listAccessMonitoringRulesWithfilter * Add context to log for plugins failing to fetch recipients * Grab access monitoring rules cache under lock all at once * Add clarification for which fields are optional in listAMRfilter req * Update integrations/access/accessrequest/app.go Co-authored-by: Zac Bergquist <[email protected]> * Update integrations/access/accessrequest/app.go Co-authored-by: Zac Bergquist <[email protected]> * Add forEach to common recipient set * Move type check to after AMR event op switch * Move turn some default parser spec methods to funcs * Make some predicate func usable as methods as well * Add len func to common recipient sets * Add integration test for access monitoring rule and slack plugin * Fix error types and messages when handling AMRs * Use generic list resource with filter for AMR * Add test for generic listResourceWithFilter * Update listResourceWithFilter to use revision instead of id * Update generic tests to use revision instead of id * Fix linting --------- Co-authored-by: Zac Bergquist <[email protected]> Co-authored-by: Roman Tkachenko <[email protected]>
9fe43f5
to
2f002f1
Compare
r0mant
approved these changes
May 29, 2024
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.
@EdwardDowling @kimlisa Please test the feature off of backport branch before merging.
@EdwardDowling could you go through these and check them off? (i'll go through it on my cloud staging, but i won't be marking it here)
|
kimlisa
approved these changes
May 30, 2024
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.
backport of #40659
depends on #42092
Adds parser for AMR conditions and enables additive recipients via the AMRs (Access monitoring rules)
Changelog: Added access monitoring rule routing for slack access plugin