Skip to content

Commit c874d99

Browse files
committed
up
1 parent e699ebd commit c874d99

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

crowdsec-docs/docs/appsec/configuration.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,56 @@ sidebar_position: 6
99
Configuring the AppSec Component usually requires the use of multiple files:
1010

1111
- [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)
12-
- [acquisition configuration](/log_processor/data_sources/appsec.md) indicates which port is the AppSec Component listening on, and which AppSec configuration it will use.
12+
- [Acquisition configuration](/log_processor/data_sources/appsec.md) indicates which port is the AppSec Component listening on, and which AppSec configuration it will use.
1313
- AppSec configuration tells which rules are loaded in in-band (blocking) and out-of-band (non-blocking)
1414
phases. [it as well allows you to tweak the behavior of the component via the powerful expr bindings](/appsec/rules_syntax.md)
1515

16+
## Acquisition configuration
17+
18+
## Default configuration
19+
20+
The Acquisition configuration is usually present directly within `/etc/crowdsec/acquis.d/` or `/etc/crowdsec/acquis.yaml`:
21+
22+
> The default AppSec acquisition configuration
23+
```yaml
24+
appsec_config: crowdsecurity/appsec-default
25+
labels:
26+
type: appsec
27+
listen_addr: 127.0.0.1:7422
28+
source: appsec
29+
```
30+
31+
## Creating custom configuration
32+
33+
:::info
34+
If you want to add some custom rules or hooks, it is suggested to add a custom `appsec_config`.
35+
Modifying existing `appsec_config` will make it *tainted* and will interfere with future updates.
36+
:::
37+
38+
39+
40+
```yaml title="/etc/crowdsec/acquis.d/appsec.yaml"
41+
appsec_configs:
42+
- crowdsecurity/appsec-default
43+
- custom/my_vpatch_rules
44+
labels:
45+
type: appsec
46+
listen_addr: 127.0.0.1:7422
47+
source: appsec
48+
```
49+
50+
```yaml title="/etc/crowdsec/appsec-configs/my_vpatch_rules.yaml"
51+
name: custom/my_vpatch_rules
52+
default_remediation: ban
53+
inband_rules:
54+
- custom/custom-vpatch-*
55+
#on_match:
56+
#...
57+
```
1658

1759
## Appsec configuration
1860

19-
The AppSec configuration is referenced by the acquisition configuration (`appsec_config` or `appsec_config_path`):
61+
The AppSec configuration is referenced by the acquisition configuration (`appsec_config`, `appsec_configs` or `appsec_config_path`):
2062

2163
> An example AppSec configuration
2264
```yaml

0 commit comments

Comments
 (0)