You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-acquisition config that is going to load your test AppSec config
112
-
- appsec config to load the test rule
113
-
- the test rule itself
110
+
Create a minimal test environment with:
111
+
- An acquisition config that loads your test AppSec config
112
+
- An AppSec config that loads the test rule
113
+
- The test rule itself
114
114
115
115
> /etc/crowdsec/acquis.d/test_appsec.yaml
116
116
```bash
@@ -170,13 +170,13 @@ time="2023-12-20 13:39:29" level=info msg="Appsec Runner ready to process event"
170
170
171
171
## Interacting with the AppSec Component
172
172
173
-
To test that the AppSec Component is working correctly, you can send requests directly to it. A few things to know:
174
-
- To query the AppSec Component, you need to have a valid remediation component API Key
175
-
- The AppSec Component expects to receive some of the elements in specific headers
173
+
To test that the AppSec Component is working, send requests directly to it. Keep in mind:
174
+
- You need a valid remediation component API key
175
+
- The AppSec Component expects specific values in headers
176
176
177
177
178
-
We are going to test that the AppSec Component detects correctly CVE-2023-42793, which is part of the [virtual patching collection](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching), that should be installed for this to work (see `cscli appsec-rules list`).
179
-
[This rule](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-CVE-2023-42793)is pretty straightforward and detects requests to an URI ending with `/rpc2`:
178
+
This example tests detection for CVE-2023-42793, part of the [virtual patching collection](https://app.crowdsec.net/hub/author/crowdsecurity/collections/appsec-virtual-patching). Make sure the collection is installed (`cscli appsec-rules list`).
179
+
[This rule](https://app.crowdsec.net/hub/author/crowdsecurity/appsec-rules/vpatch-CVE-2023-42793) detects requests to a URI ending with `/rpc2`:
We can now query our AppSec Component (we're assuming here that it runs on the default `127.0.0.1:7422`, see the `listen_addr`parameter of the acquisition config):
213
+
You can now query the AppSec Component (assuming the default `127.0.0.1:7422`; see the `listen_addr`setting in your acquisition config):
Copy file name to clipboardExpand all lines: crowdsec-docs/docs/local_api/allowlists.md
+24-18Lines changed: 24 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,16 @@ sidebar_position: 7
6
6
7
7
# AllowLists
8
8
9
-
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.
9
+
The AllowLists feature in CrowdSec lets you manage IP-based allowlists at the LAPI level. It affects both local decisions and blocklist pulls, giving you more flexibility to trust specific IPs while keeping CrowdSecsecurity controls in place.
The AllowLists affect local decision and blocklist pulls in different ways:
13
+
Premium users can manage AllowLists directly from the [CrowdSec Console](/u/console/allowlists), enabling centralized management across multiple Security Engines and Integrations. Console-managed allowlists require subscribing entities (Security Engines, Integrations, or Organizations) after creation.
14
+
15
+
:::
16
+
17
+
18
+
AllowLists affect local decisions and blocklist pulls in different ways:
13
19
14
20
| Area | Action | Real Time |
15
21
|-------|------|------|
@@ -19,35 +25,35 @@ The AllowLists affect local decision and blocklist pulls in different ways:
19
25
| cscli | Decision is blocked unless special flag is provided | ✅ |
20
26
21
27
22
-
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.
28
+
AllowLists are limited to IP/range-based rules. If you need rules based on log elements (such as URLs), [Parser Whitelists](/log_processor/whitelist/introduction.md) or [Profile Rules](/local_api/profiles/format.md) might be more relevant.
23
29
24
30
25
-
###Creating an allowlist
31
+
## Creating an allowlist
26
32
27
-
Allowlists creation is done with `cscli allowlists create`, for example: `cscli allowlists create my_allowlistd -d safe_ips`.
33
+
Create an allowlist with `cscli allowlists create`, for example: `cscli allowlists create my_allowlist -d safe_ips`.
28
34
29
-
The `-d`parameter is mandatory, it's a description for the allowlist for future reference:
35
+
The `-d`flag is mandatory. It sets a description for future reference:
Copy file name to clipboardExpand all lines: crowdsec-docs/docs/log_processor/whitelist/capi_based_whitelist.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,29 +6,29 @@ title: CAPI
6
6
:::warning
7
7
8
8
This option is deprecated.
9
-
You should use [centralized allowlists](local_api/allowlists.md) instead.
9
+
You should use [centralized allowlists](/local_api/allowlists.md) instead.
10
10
11
11
:::
12
12
13
13
## Whitelists from CAPI (Central API) community blocklist or third party blocklist
14
14
15
-
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 thirdparty blocklist. You will have to specify a path to the file within `config.yaml`as by default there is no file specified.
15
+
From version 1.5.0, you can define IPs or IP ranges to whitelist from the community blocklist or third-party blocklists. Set the whitelist file path in `config.yaml`(no default path is set).
- Windows `c:/programdata/crowdsec/config/capi-whitelists.yaml`
28
28
29
-
*These files **DO NOT** exist and you **MUST** create them manually and configure the above settings*
29
+
*These files **DO NOT** exist by default. You **MUST** create them manually and set the path above.*
30
30
31
-
The following snippet should be used as a guide
31
+
Example file content:
32
32
33
33
```yaml
34
34
ips:
@@ -44,8 +44,8 @@ sudo systemctl reload crowdsec
44
44
45
45
:::warning
46
46
47
-
The whitelist only applies when crowdsec pulls the blocklist from CAPI. This means that any IPs already in your local database will not get whitelisted.
47
+
The whitelist applies only when CrowdSec pulls blocklists from CAPI. IPs already in your local database are not retroactively whitelisted.
48
48
49
-
You can either manually delete the decisions for the IPs you want to whitelist with `cscli decisions delete`, or delete all alerts and active decisions from the database with `cscli alerts delete --all` and restart crowdsec.
49
+
You can either delete decisions for specific IPs with `cscli decisions delete`, or delete all alerts and active decisions with `cscli alerts delete --all` and then restart CrowdSec.
You can see what data is available from the `s01-parse` stage. Look for fields in `evt.Parsed.*` and `evt.Meta.*` that you can use in your whitelist expression.
287
+
This output shows what data is available from the `s01-parse` stage. Look for fields in `evt.Parsed.*` and `evt.Meta.*` that you can use in your whitelist expression.
288
288
289
289
</details>
290
290
@@ -324,7 +324,7 @@ whitelist:
324
324
325
325
:::tip
326
326
327
-
Keep whitelist expressions as narrow as possible (path + verb + maybe user-agent) to avoid hiding real attacks.
327
+
Keep whitelist expressions as narrow as possible (path + verb + optional user-agent) to avoid hiding real attacks.
0 commit comments