Custom coraza/crs rules per host/ingress
Hello all!
I'm using Crowdsec with traefik in kubernetes. Very simply, is a way to apply different appsec/coraza rules per ingress?
For instance in my current setup, if I hit test.example.com it routes through traefik, which uses a traefik middleware plugin to pass the traffik to coraza. That coraza middleware contains custom rules for that specific ingress. It looks like this:
With Crowdsec, I see how I could use a pre_eval filter to remove Coraza rules by host, something like this:
However, I don't see how to define more complicated coraza rules, e.g. using an apply action to point to specific inband_rules, such as these:
I tried creating a custom config and ruleset (including mapping it in as a configmap into the right location). The custom config works fine, but again, I don't see a way to apply the example custom rules per ingress.
This is the final blocker for me to move from Coraza to Crowdsec, I would really appreciate any advice on how to accomplish this. Thanks!
1 Reply
Important Information
Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command
/resolve or press the green resolve button below.Log Files
If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.
Guide Followed (CrowdSec Official)
If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.
Screenshots
Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.
© Created By WhyAydan for CrowdSec ❤️