Skip to content

Commit 0434384

Browse files
committed
ingress-nginx: add appsec config options
1 parent 0c58e83 commit 0434384

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

crowdsec-docs/unversioned/bouncers/ingress-nginx.mdx

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@ controller:
7979
value: /etc/nginx/lua/plugins/crowdsec/templates/ban.html
8080
- name: CAPTCHA_TEMPLATE_PATH
8181
value: /etc/nginx/lua/plugins/crowdsec/templates/captcha.html
82+
## Appsec configuration, optional.
83+
## Remove this section if not using appsec
84+
- name: APPSEC_URL
85+
value: "http://appsec-service.crowdsec.svc.cluster.local:7422" # if using our helm chart, and running the appsec in the "crowdsec" namespace
86+
- name: APPSEC_FAILURE_ACTION
87+
value: passthrough # What to do if the appsec is down, optional
88+
- name: APPSEC_CONNECT_TIMEOUT # connection timeout to the appsec, in ms, optionial
89+
value: 100
90+
- name: APPSEC_SEND_TIMEOUT # write timeout to the appsec, in ms, optional
91+
value: 100
92+
- name: APPSEC_PROCESS_TIMEOUT # max processing duration of the request, in ms, optional
93+
value: 1000
94+
- name: ALWAYS_SEND_TO_APPSEC
95+
value: false # always send requests to the appsec, even if there's a decision against the IP, optional
8296
command: ['sh', '-c', "sh /docker_start.sh; mkdir -p /lua_plugins/crowdsec/; cp -R /crowdsec/* /lua_plugins/crowdsec/"]
8397
volumeMounts:
8498
- name: crowdsec-bouncer-plugin
@@ -345,3 +359,69 @@ CAPTCHA_EXPIRATION=3600
345359
```
346360

347361
The time for which the captcha will be validated. After this duration, if the decision is still present in CrowdSec local API, the IPs address will get a captcha again.
362+
363+
### `APPSEC_URL`
364+
> string
365+
366+
```bash
367+
APPSEC_URL=http://<ip>:<port>
368+
```
369+
370+
If set, enable appsec mode and forward the request to this endpoint for analysis.
371+
372+
Use `http://appsec-service.crowdsec.svc.cluster.local:7422` if you are using our helm chart to deploy crowdsec in the `crowdsec` namespace
373+
374+
### `APPSEC_FAILURE_ACTION`
375+
> passthrough | deny
376+
377+
```bash
378+
APPSEC_FAILURE_ACTION=passthrough # default
379+
```
380+
381+
Behavior when the AppSec Component return a 500. Can let the request passthrough or deny it.
382+
383+
### `ALWAYS_SEND_TO_APPSEC`
384+
> boolean
385+
386+
```bash
387+
ALWAYS_SEND_TO_APPSEC=false # default
388+
```
389+
390+
Send the request to the AppSec Component even if there is a decision for the IP.
391+
392+
### `SSL_VERIFY`
393+
> boolean
394+
395+
```bash
396+
SSL_VERIFY=false # default
397+
```
398+
399+
Verify the AppSec Component SSL certificate validity.
400+
401+
### `APPSEC_CONNECT_TIMEOUT`
402+
> int (milliseconds)
403+
404+
```bash
405+
APPSEC_CONNECT_TIMEOUT=100 # default
406+
```
407+
408+
The timeout of the connection between the Remediation Component and AppSec Component.
409+
410+
411+
### `APPSEC_SEND_TIMEOUT`
412+
> int (milliseconds)
413+
414+
```bash
415+
APPSEC_SEND_TIMEOUT=100 # default
416+
```
417+
418+
The timeout to send data from the Remediation Component to the AppSec Component.
419+
420+
### `APPSEC_PROCESS_TIMEOUT`
421+
> int (milliseconds)
422+
423+
```bash
424+
APPSEC_PROCESS_TIMEOUT=500 # default
425+
```
426+
427+
The timeout to process the request from the Remediation Component to the AppSec Component.

0 commit comments

Comments
 (0)