Skip to content

Commit 761f9b7

Browse files
Merge branch 'main' into docs/haproxy-spoa-cdn-config
2 parents 348d362 + 9076ed8 commit 761f9b7

File tree

25 files changed

+701
-141
lines changed

25 files changed

+701
-141
lines changed

crowdsec-docs/docs/appsec/intro.md

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@ title: AppSec Component - CrowdSec WAF
44
sidebar_position: 1
55
---
66

7-
## Introduction
7+
## What is CrowdSec?
8+
9+
If you're new to CrowdSec, here's a quick overview:
10+
11+
**CrowdSec** is an open-source, collaborative security solution that:
12+
- Detects and blocks malicious actors threatening your infrastructure and applications
13+
- Provides real-time threat intelligence through a participative community
14+
- Offers both **Infrastructure Protection** (IP reputation, DDoS mitigation) and **Application Security** (WAF capabilities)
15+
16+
:::tip New to CrowdSec?
17+
For a more detailed introduction, check out our [Getting Started Guide](/u/getting_started/intro).
18+
:::
819

9-
<!-- xx : fix crowdsec version -->
20+
## Introduction
1021

1122
Meet the Crowdsec **Application Security Component** (AKA : **AppSec Component**), a new capability for advanced application security turning your CrowdSec install into a full fledged **WAF**.
1223

@@ -23,10 +34,55 @@ This component capitalizes on existing remediation functions in web servers (suc
2334

2435
![appsec-global](/img/appsec-global.svg)
2536

37+
### How it works
38+
2639
1. The Web Server receives the HTTP request
27-
2. The HTTP Request is intercepted and passed to the CrowdSec Security Engine via [the HTTP API](appsec/protocol.md)
28-
3. The Security Engine answers to the Web Server once the Appsec inband rules have been processed.
29-
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
40+
2. The HTTP Request is forwarded to the CrowdSec Security Engine via a local HTTP interface
41+
3. The Security Engine analyzes the request against AppSec rules (inband rules for immediate blocking)
42+
4. Based on the analysis, the Web Server either blocks the HTTP Request or processes it as usual
43+
44+
## Supported Web Servers & Reverse Proxies
45+
46+
The AppSec Component works seamlessly with modern web servers and reverse proxies:
47+
48+
<div style={{display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '20px', marginBottom: '30px'}}>
49+
50+
<div style={{display: 'flex', flexDirection: 'column', gap: '12px', padding: '16px', border: '1px solid #e5e7eb', borderRadius: '8px', alignItems: 'center', textAlign: 'center'}}>
51+
<img src="/img/nginx.svg" alt="Nginx" style={{height: '50px', objectFit: 'contain'}} />
52+
<strong>Nginx</strong>
53+
<a href="/appsec/quickstart/nginxopenresty.mdx">Quick Start Guide →</a>
54+
</div>
55+
56+
<div style={{display: 'flex', flexDirection: 'column', gap: '12px', padding: '16px', border: '1px solid #e5e7eb', borderRadius: '8px', alignItems: 'center', textAlign: 'center'}}>
57+
<img src="/img/openresty.png" alt="OpenResty" style={{height: '50px', objectFit: 'contain'}} />
58+
<strong>OpenResty</strong>
59+
<a href="/appsec/quickstart/nginxopenresty.mdx">Quick Start Guide →</a>
60+
</div>
61+
62+
<div style={{display: 'flex', flexDirection: 'column', gap: '12px', padding: '16px', border: '1px solid #e5e7eb', borderRadius: '8px', alignItems: 'center', textAlign: 'center'}}>
63+
<img src="/img/traefik.logo.png" alt="Traefik" style={{height: '50px', objectFit: 'contain'}} />
64+
<strong>Traefik</strong>
65+
<a href="/appsec/quickstart/traefik.mdx">Quick Start Guide →</a>
66+
</div>
67+
68+
{/* HAProxy support coming soon - uncomment when feature is released */}
69+
{/*
70+
<div style={{display: 'flex', flexDirection: 'column', gap: '12px', padding: '16px', border: '1px solid #e5e7eb', borderRadius: '8px', alignItems: 'center', textAlign: 'center'}}>
71+
<img src="/img/haproxy-logo.png" alt="HAProxy" style={{height: '50px', objectFit: 'contain'}} />
72+
<strong>HAProxy</strong>
73+
<a href="https://hub.crowdsec.net/browse/#remediation-components">Hub Component →</a>
74+
</div>
75+
*/}
76+
77+
<div style={{display: 'flex', flexDirection: 'column', gap: '12px', padding: '16px', border: '1px solid #e5e7eb', borderRadius: '8px', alignItems: 'center', textAlign: 'center'}}>
78+
<img src="/img/WordPress-logotype-wmark.png" alt="WordPress" style={{height: '50px', objectFit: 'contain'}} />
79+
<strong>WordPress</strong>
80+
<a href="/appsec/quickstart/wordpress.mdx">Quick Start Guide →</a>
81+
</div>
82+
83+
</div>
84+
85+
**Looking for other integrations?** Check out the [full list of remediation components](https://hub.crowdsec.net/browse/#remediation-components) on the CrowdSec Hub. We're constantly adding new integrations!
3086

3187
## Inband Rules and Out-Of-Band Rules
3288

@@ -75,4 +131,4 @@ Or consider learning more about the AppSec capabilities:
75131
- **Scenarios**: [How to create scenarios that leverage the AppSec Component events](/appsec/alerts_and_scenarios.md)
76132
- **Hooks**: [To customise behavior of the AppSec at runtime](/appsec/hooks.md)
77133
- **Troubleshoot**: [How to troubleshoot the behavior of the AppSec Component](/appsec/troubleshooting.md)
78-
- **AppSec Protocol**: [if you're maintaining or creating a remedation component and want to add the AppSec capabilities](/appsec/protocol.md)
134+
- **AppSec Technical Details**: [For developers integrating with the AppSec Component](/appsec/protocol.md)

crowdsec-docs/docs/appsec/rules_syntax.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ The target allows to specify which part of the requests needs to be inspected. Y
6767
- `ARGS_NAMES`: Name of the query string parameters
6868
- `BODY_ARGS`: Body args
6969
- `BODY_ARGS_NAMES`: Name of the body args
70+
- `COOKIES`: Cookies sent in the request
71+
- `COOKIES_NAMES`: Names of the cookies sent in the request
7072
- `HEADERS`: HTTP headers sent in the request
7173
- `HEADERS_NAMES`: Name of the HTTP headers sent in the request
7274
- `METHOD`: HTTP method of the request
@@ -75,6 +77,7 @@ The target allows to specify which part of the requests needs to be inspected. Y
7577
- `URI_FULL`: The full URL of the request including the query string
7678
- `RAW_BODY`: The entire body of the request
7779
- `FILENAMES`: The name of the files sent in the request
80+
- `FILES_TOTAL_SIZE`: Total size of the uploaded files in the request,
7881
- _(optional)_ `variables` containing one or more variable names to restrict the matching operation to (only relevant for `ARGS`, `BODY_ARGS` and `HEADERS`)
7982

8083
```yaml
@@ -94,11 +97,12 @@ The target allows to specify which part of the requests needs to be inspected. Y
9497
:::info
9598

9699
The default config `crowdsecurity/base-config` enables specific decoders when the following content-types are set:
97-
- **application/x-www-form-urlencoded**
98-
- **multipart/form-data**
99-
- **application/xml**
100-
- **application/json** : when used, all the variable names are prefixed with `json.`
101-
- **text/xml**
100+
101+
- **application/x-www-form-urlencoded**
102+
- **multipart/form-data**
103+
- **application/xml**
104+
- **application/json** : when used, all the variable names are prefixed with `json.`
105+
- **text/xml**
102106

103107
:::
104108

@@ -157,7 +161,6 @@ Match provides the pattern to match the target against, including optional trans
157161
value: BLAH
158162
```
159163

160-
161164
### Seclang Support
162165

163166
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).
@@ -177,7 +180,6 @@ The default paths for the data directory per OS:
177180
- Freebsd: `/var/db/crowdsec/data`
178181
- Windows: `C:\programdata\crowdsec\data`
179182

180-
181183
> Example
182184

183185
```yaml

crowdsec-docs/docs/expr/strings_helpers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ Parses an URI into a map of string list.
5454

5555
`QueryEscape` escapes the string so it can be safely placed inside a URL query.
5656

57+
### `ExtractQueryParam(query string, param string) []string`
58+
59+
`ExtractQueryParam` extract the `param` parameter value from the URL query `query` and returns the list of values.
60+
61+
> `any(ExtractQueryParam("/foo?id=1&b=2", "id"), { # == "1" })` returns true if at least one of the `id` parameter value is equal to `1`
62+
5763
### `Sprintf(format string, a ...interface{}) string`
5864

5965
[Official doc](https://pkg.go.dev/fmt#Sprintf) : Sprintf formats according to a format specifier and returns the resulting string.

crowdsec-docs/docusaurus.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,24 +107,34 @@ const NAVBAR_ITEMS: NavbarItem[] = [
107107
position: "left",
108108
label: "FAQ/Troubleshooting",
109109
},
110+
{
111+
href: "https://roadmap.crowdsec.net",
112+
position: "right",
113+
title: "Features Roadmap",
114+
className: "header-roadmap-link header-icon-link invert dark:invert-0",
115+
},
110116
{
111117
href: "https://github.com/crowdsecurity/crowdsec",
112118
position: "right",
119+
title: "GitHub CrowdSecurity",
113120
className: "header-github-link header-icon-link invert dark:invert-0",
114121
},
115122
{
116123
href: "https://discord.gg/wGN7ShmEE8",
117124
position: "right",
125+
title: "Discord Community",
118126
className: "header-discord-link invert dark:invert-0",
119127
},
120128
{
121129
href: "https://discourse.crowdsec.net",
122130
position: "right",
131+
title: "Discourse Community",
123132
className: "header-discourse-link invert dark:invert-0",
124133
},
125134
{
126135
href: "https://hub.crowdsec.net/",
127136
position: "right",
137+
title: "CrowdSec Hub",
128138
className: "header-hub-link dark:invert",
129139
},
130140
];

crowdsec-docs/src/css/navbar.css

Lines changed: 14 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crowdsec-docs/src/pages/index.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,31 @@ const HomePageHeader = (): React.JSX.Element => {
1919
infrastructure and application security.
2020
</p>
2121
</div>
22-
<img alt="CrowdSec Logo" src="/img/crowdsec_logo.png" className="h-20 w-28 md:h-24 md:w-auto" />
22+
<img alt="CrowdSec Logo" src="/img/crowdsec_logo.png" className="h-20 w-28 md:h-24 md:w-auto flex-shrink-0" />
2323
</div>
24-
<div className="flex flex-col md:flex-row items-start gap-2">
24+
<div className="flex flex-col md:flex-row items-start gap-2 flex-wrap">
2525
<Link to="/u/getting_started/intro" className="w-full md:w-auto">
26-
<Button color="primary" className="w-full md:w-auto">
27-
Get started
26+
<Button size="lg" color="primary" className="w-full md:w-auto">
27+
🚀 Quick Guides
2828
</Button>
2929
</Link>
3030
<div className="flex flex-row gap-2 w-full md:w-auto">
31-
<Link to="https://app.crowdsec.net/" className="flex-1 md:flex-none">
32-
<Button variant="secondary" className="w-full md:w-auto">
33-
Explore the Console
31+
<Link to="https://app.crowdsec.net/" className="flex-1 min-w-0">
32+
<Button size="lg" variant="secondary" className="w-full">
33+
👨‍💻 Explore the Console
3434
</Button>
3535
</Link>
36-
<Link to="https://killercoda.com/iiamloz/scenario/crowdsec-setup" className="flex-1 md:flex-none">
37-
<Button variant="secondary" className="w-full md:w-auto">
38-
Online Sandbox
36+
<Link to="https://killercoda.com/iiamloz/scenario/crowdsec-setup" className="flex-1 min-w-0">
37+
<Button size="lg" variant="secondary" className="w-full">
38+
🛠️ Online Sandbox
3939
</Button>
4040
</Link>
4141
</div>
42+
<Link to="https://start.crowdsec.net/" className="w-full md:w-auto">
43+
<Button size="lg" variant="secondary" className="w-full md:w-auto">
44+
💡 Not sure where to start?
45+
</Button>
46+
</Link>
4247
</div>
4348
</div>
4449

32.2 KB
Loading
17.5 KB
Loading

crowdsec-docs/static/img/nginx.svg

Lines changed: 2 additions & 0 deletions
Loading
15.8 KB
Loading

0 commit comments

Comments
 (0)