enable the challenge bot feature - #210
Merged
Merged
Conversation
Author
|
hi @kdwils, An update on this. We released the bot detection feature as a release candidate (final release will come soon). This will be a bit easier to test, and you can still find the documentation (until merged) at https://pr-1099.d1to60jd2gb6y6.amplifyapp.com/docs/next/appsec/bot_detection/intro. We are still available to answer any questions around this. Regards, |
Owner
|
hey @sabban this looks good, only issue is the merge conflict. I'm going to merge this into a feature branch so ci checks can run Do you know when the feature will be released? |
This file contains hidden or 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
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.
add the bot detection feature to the CrowdSec Envoy bouncer
This PR adds bot-detection/challenge-mode support to the Envoy bouncer, built on top of the CrowdSec AppSec challenge feature, and is ready for review.
The bouncer now parses structured AppSec JSON responses:
actionhttp_statususer_body_contentuser_cookiesuser_headersWhen AppSec returns
challenge, the bouncer writes the provided status, headers, cookies, and body back to the client through Envoy’s ext_authz denied response. This lets CrowdSec servethe challenge HTML, set the
__crowdsec_challengecookie, and expose the browser-side fingerprint/proof-of-work flow through Envoy.Legacy behavior is preserved: existing
allow,ban,captcha, anderrorpaths keep their previous handling. Challenge responses are only special-cased so AppSec-rendered content canpass through verbatim, including multiple
Set-Cookieheaders.For challenge mode, the Envoy side does not need a new bouncer option. It needs WAF/AppSec enabled, and the challenge protocol paths must be routed through the same ext_authz/bouncer path
as the protected application route.
The challenge mode has to be enabled CrowdSec side, though. Documentation is not published yet, but the WIP documentation is available at:
Note that the hub items usable for this are still in:
It is possible to use CrowdSec with a
cscli.hub_branchconfiguration item pinned totest-waf-challenge-mode-scenarios:https://docs.crowdsec.net/docs/next/configuration/crowdsec_configuration/#configuration-directives
This PR also adds:
challengerequest metricschallenge_requiredwebhook eventsThis was tested with envoy with minikube:
crowdsec values:
envoy gateway:
service and bouncer: