-
Notifications
You must be signed in to change notification settings - Fork 435
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
internal/appsec: implement WAF actions for http/grpc #1533
Merged
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
Base automatically changed from
francois.mazeau/http-client-ip-rework
to
main
October 24, 2022 19:17
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
from
October 25, 2022 07:53
f6cb235
to
24bd90f
Compare
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
from
October 26, 2022 13:50
24bd90f
to
a36fc28
Compare
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
5 times, most recently
from
November 3, 2022 11:11
e859163
to
aa4e477
Compare
Hellzy
changed the title
[WIP] internal/appsec: block requests based on client ip
[WIP] internal/appsec: implement WAF actions for http/grpc
Nov 3, 2022
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
from
November 10, 2022 09:35
2325312
to
1c68d45
Compare
ASM now instanciates an action handler that will perform various actions commanded by the WAF after a match is performed. The "block_request" action type is the only kind of action currently supported, allowing to block an HTTP request.
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
from
November 10, 2022 13:48
1c68d45
to
566a6c5
Compare
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
from
November 17, 2022 14:09
464759f
to
e6f2902
Compare
Hellzy
changed the title
[WIP] internal/appsec: implement WAF actions for http/grpc
internal/appsec: implement WAF actions for http/grpc
Nov 21, 2022
Julio-Guerra
requested changes
Nov 22, 2022
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
2 times, most recently
from
December 6, 2022 15:57
83b510b
to
8d590ce
Compare
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
from
December 7, 2022 13:34
772a9ea
to
ca98bff
Compare
knusbaum
previously approved these changes
Dec 8, 2022
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.
All good from trace side.
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
from
December 9, 2022 19:18
1d99f66
to
5b350a9
Compare
Hellzy
force-pushed
the
francois.mazeau/ip-blocking
branch
from
December 9, 2022 19:19
5b350a9
to
7281ec4
Compare
Julio-Guerra
approved these changes
Dec 12, 2022
ajgajg1134
approved these changes
Dec 12, 2022
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.
👍 for APM
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?
Add a system of "actions", which are basically callbacks that are executed after the WAF matches specific rules.
Also add a default action - both for grpc and http - that will block a before its execution if said action is called.
Motivation
This change allows the libraries to react proactively when a rule gets matched by the WAF. The primary example is when
blocking a user depending on their IP. If a blocked IP issues a request, the WAF will match a rule that links to an action that will block the request before it gets a chance of being executed.
Describe how to test/QA your changes
Reviewer's Checklist
Triage
milestone is set.