add the bot detection feature to the crowdsec traefik bouncer - #343
Open
sabban wants to merge 3 commits into
Open
add the bot detection feature to the crowdsec traefik bouncer#343sabban wants to merge 3 commits into
sabban wants to merge 3 commits into
Conversation
sabban
marked this pull request as draft
June 23, 2026 14:52
sabban
marked this pull request as ready for review
July 17, 2026 09:19
Author
|
hi @maxlerebourg, 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, |
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 traefik bouncer
This PR adds bot-detection/challenge-mode support to the Traefik bouncer, built on top of the crowdsec feature merged in master, and is ready for review.
The bouncer now parses structured AppSec JSON responses:
actionhttp_statususer_body_contentuser_cookiesuser_headersWhen AppSec returns an action other than
allow, the plugin writes the provided status, headers, cookies, and body back to the client. This lets CrowdSec serve the challenge HTML, set the__crowdsec_challengecookie, and expose the browser-side challenge flow through Traefik.Legacy behavior is preserved: an empty/non-structured AppSec
403still falls back to the existing ban handling.For challenge mode, the Traefik side does not need a new plugin option. It needs AppSec enabled, and the challenge protocol paths must be routed through the same CrowdSec middleware 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 crowdsecurity/crowdsec-docs#1099 and crowdsecurity/crowdsec-docs#1100. Note that the hub items usable for this are still stored crowdsecurity/hub#1826, it's possible to use crowdsec with a
cscli.hub_branchconfiguration item pinned totest-waf-challenge-mode-scenarios(see https://docs.crowdsec.net/docs/next/configuration/crowdsec_configuration/#configuration-directives)My test configuration docker file.
@maxlerebourg I'll happily discuss this PR further about the testing procedure or any other stuff.