You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the yet prototyped but functional [NGINX NJS version](https://github.com/crowdsecurity/cs-nginx-njs-bouncer/pull/1/files) (doesn’t have appsec capabilities yet)
32
+
And a more recent and soon finalized [Node JS bouncer](https://github.com/crowdsecurity/nodejs-cs-bouncer) (for a different implementation, to be used in code)
32
33
33
34
⚠️ **Your bouncer must always delete/clean it’s resources on shutdown**
34
35
@@ -121,7 +122,7 @@ Allows to pull all decisions from LAPI and then periodically get a delta
121
122
* Have the code be able to handle 100k to be safe for the nominal case
122
123
* Storing in memory is ideal, we recommend to convert IPs to integers
123
124
* The decisions format is the following:
124
-
* See [decisions example in appendix](#appendix)
125
+
* See [decisions example in appendix](#decision-example)
125
126
* There can be multiple decisions per IP
126
127
* Store each decisions independently as they have their own remediation action and TTL
127
128
* Ranges are stored too
@@ -162,7 +163,7 @@ If a remediation is found and for the LAPI timeout fallback here are the remedia
162
163
* Remediation priority
163
164
* There is a priority in the remediation to take in account if an IP has multiple
164
165
* Default priority order **Ban** then **Captcha**
165
-
* Metrics (TBD)
166
+
* Metrics see below and in the [detailed metrics specs](/contributing/specs/bouncer_metrics_specs)
166
167
167
168
### Logging
168
169
@@ -189,7 +190,7 @@ Each push must reset the internal counter for the metrics (i.e., we have only se
189
190
Each metric about blocked requests must have an `origin` label whose value is the origin of the decision and a `remediation_type` label whose value is the type of remediation that was applied (e.g., `ban` or `captcha`).
190
191
A `processed` metric must also be present that counts the number of requests that were processed by the RC (regardless of whether they were blocked or not). This metric has no label.
191
192
192
-
A full sample payload can be found in the appendix.
193
+
A full sample payload can be found in the [appendix](#metrics-payload).
193
194
194
195
## AppSec Capability (request forwarding)
195
196
@@ -485,7 +486,7 @@ You can refer to the AppSec documentation to test request forwarding.
485
486
486
487
More details about metrics in [Metrics specs](/contributing/specs/bouncer_metrics_specs/)
Copy file name to clipboardExpand all lines: crowdsec-docs/docs/contributing/specs/bouncer_metrics_specs.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -365,4 +365,5 @@ catch Exception as e:
365
365
Remediation metrics have already been implemented in various languages and frameworks. You can use it as inspiration for your own implementation:
366
366
367
367
- The [LUA library](https://github.com/crowdsecurity/lua-cs-bouncer/) used by the [NGINX remediation component](https://docs.crowdsec.net/u/bouncers/nginx/)
368
-
- The [PHP library](https://github.com/crowdsecurity/php-remediation-engine) used by the [WordPress remediation component](https://docs.crowdsec.net/u/bouncers/wordpress).
368
+
- The [PHP library](https://github.com/crowdsecurity/php-remediation-engine) used by the [WordPress remediation component](https://docs.crowdsec.net/u/bouncers/wordpress).
369
+
- The [Firewall Bouncer](https://github.com/crowdsecurity/cs-firewall-bouncer) written in Go. Used for nftables/iptables.
0 commit comments