-
Notifications
You must be signed in to change notification settings - Fork 458
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
appsec: rework actions system #2044
Merged
Merged
+616
−363
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
87f0054
to
df1db14
Compare
BenchmarksBenchmark execution time: 2023-07-06 08:39:29 Comparing candidate commit 267b872 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics. |
df1db14
to
f44f50f
Compare
f44f50f
to
2be9cb8
Compare
1d9bf75
to
338b5b5
Compare
921e82c
to
5eff9d2
Compare
5eff9d2
to
8c5b7e5
Compare
085accc
to
f4efdcb
Compare
8bfcda9
to
5bbe6af
Compare
Julio-Guerra
reviewed
Jul 5, 2023
Julio-Guerra
reviewed
Jul 5, 2023
Julio-Guerra
approved these changes
Jul 6, 2023
Julio-Guerra
approved these changes
Jul 6, 2023
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.
What does this PR do?
The goal is to centralize the action system and get rid of duplication in httpsec/grpcesec, especially when it comes
to the action handler (which is not a thing anymore with this change).
This change introduces 2 new methods to the operation interface:
The main use case of this API is to pass actions around between the WAF and our instrumentation points.
Another use case is to emit errors, which is especially usefull for our SDK instrumentations (userID, http parsed body)
which usually get called while in the request handler and are hence error based.
Motivation
This is a step in our effort to cleanup the code base and make it less intricate. While this adds more code that it deletes,
it gets rid of annoying side effects and weird mechanisms that were introduced in operations in order to transport actions
and errors.
The action system still remains quite complex due to the SDK instrumentation points that remain, as well as the
duality between grpc/http, and other intricacies due to other frameworks (such as echo).
Describe how to test/QA your changes
Reviewer's Checklist