mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 19:48:59 +02:00
Address review feedback on the binary e2e suite: - mocklapi: add an AppSec WAF stand-in (--appsec-addr) that blocks any URI containing "rpc2" — the exact probe from examples/appsec-enabled — and allows the rest. Lets the suite exercise the plugin's AppSec wiring (header forwarding + allow/block enforcement) without the real CRS engine. - new scenarios/appsec: benign request passes, /foo/rpc2 is 403. - custom-ban-page: assert the banned response carries the custom remediation header (remediationHeadersCustomName), per review. - README: drop the "don't open issues / AppSec intentionally absent" framing; describe what the suite actually covers, including AppSec wiring. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
29 lines
701 B
YAML
29 lines
701 B
YAML
http:
|
|
routers:
|
|
r:
|
|
rule: "PathPrefix(`/foo`)"
|
|
entryPoints:
|
|
- web
|
|
service: backend
|
|
middlewares:
|
|
- bouncer
|
|
services:
|
|
backend:
|
|
loadBalancer:
|
|
servers:
|
|
- url: "@@BACKEND_URL@@"
|
|
middlewares:
|
|
bouncer:
|
|
plugin:
|
|
bouncer:
|
|
enabled: "true"
|
|
crowdsecMode: stream
|
|
updateIntervalSeconds: "2"
|
|
crowdsecLapiScheme: http
|
|
crowdsecLapiHost: "@@LAPI_HOST@@"
|
|
crowdsecLapiKey: "@@APIKEY@@"
|
|
forwardedHeadersTrustedIps:
|
|
- "127.0.0.1/32"
|
|
banHtmlFilePath: "@@SCENARIO_DIR@@/ban.html"
|
|
remediationHeadersCustomName: "X-E2E-Remediation"
|