# /etc/haproxy/crowdsec.cfg # SPOE configuration for CrowdSec HAProxy bouncer # Used for both standard and upstream proxy deployments # IP extraction is handled by HAProxy ACLs (see haproxy-upstreamproxy.cfg for upstream proxy setup) [crowdsec] spoe-agent crowdsec-agent messages crowdsec-tcp groups crowdsec-http-body crowdsec-http-no-body option var-prefix crowdsec option set-on-error error timeout hello 200ms timeout idle 55s timeout processing 500ms use-backend crowdsec-spoa log global ## TCP/IP level check - runs early to check IP remediation ## Uses event directive to trigger on each new client session (not sent as a group) spoe-message crowdsec-tcp args id=unique-id src-ip=src src-port=src_port event on-client-session ## HTTP message with body - used when body size is within limit for AppSec ## Note: Host and captcha cookie are extracted from headers=req.hdrs, no need to send separately spoe-message crowdsec-http-body args remediation=var(txn.crowdsec.remediation) id=unique-id method=method path=path query=query version=req.ver headers=req.hdrs body=req.body url=url ssl=ssl_fc src-ip=src src-port=src_port ## HTTP message without body - used when body is too large or not needed ## Note: Host and captcha cookie are extracted from headers=req.hdrs, no need to send separately spoe-message crowdsec-http-no-body args remediation=var(txn.crowdsec.remediation) id=unique-id method=method path=path query=query version=req.ver headers=req.hdrs url=url ssl=ssl_fc src-ip=src src-port=src_port ## Group for HTTP message with body - used when body size is within limit for AppSec spoe-group crowdsec-http-body messages crowdsec-http-body ## Group for HTTP message without body - used when body is too large or not needed spoe-group crowdsec-http-no-body messages crowdsec-http-no-body