Skip to content

Commit 9249f98

Browse files
bot-manager-lite-new-page (#1667)
* bot-manager-lite-new-page * Update src/content/docs/en/pages/guides/marketplace/integrations/bot-manager-lite.mdx Co-authored-by: LuizaVSantos <[email protected]> * amends-to-bot-manager-lite --------- Co-authored-by: LuizaVSantos <[email protected]>
1 parent c14b4d5 commit 9249f98

File tree

6 files changed

+259
-168
lines changed

6 files changed

+259
-168
lines changed

src/content/docs/en/pages/guides/marketplace/integrations/bot-manager-lite.mdx

Lines changed: 6 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace: docs_guide_bot_manager_lite
88
permalink: /documentation/products/guides/bot-manager-lite/
99
---
1010

11-
11+
import LinkButton from 'azion-webkit/linkbutton';
1212

1313
Azion **Bot Manager Lite** is a *serverless* integration available at Azion **Marketplace**. It was built on top of an edge function on **Edge Firewall** that analyzes incoming requests and gives them a score based on a group of rules and behaviors. If the score is equal to or greater than the predetermined threshold, the integration executes the defined action. Otherwise, the request is processed (*allow*, as default action). Available actions for Bot Manager Lite: *allow*, *deny*, *drop*, *redirect*, *custom HTML*, *random delay*, and *hold the connection*.
1414

@@ -85,25 +85,14 @@ Even when `threshold` and `action` are mandatory variables to be defined, you ca
8585
}
8686
```
8787

88-
Where:
89-
90-
| Variable | Type | Required | Description |
91-
|---|---|---|---|
92-
| `action` | String | Yes | The action to be taken by the function whenever the request's score is greater or equals the defined threshold. Possible values: `allow`, `deny`, `redirect`, `custom_html`, `drop`, `random_delay`, and `hold_connection`. Read more about [configuring actions](#configuring-actions) |
93-
| `threshold` | Number | Yes | The maximum score that the request can reach before the function takes an action. If it has no value, the function won't take action |
94-
| `disabled_rules` | Array of numbers | No | The rules to be disabled. If a rule is disabled, it won't be processed nor increment the request score |
95-
| `internal_logs` | String | No | The *Logging Class* that the function will use. Possible values:<br/>`0`: write logs if the request score is greater than 0.<br/>`1`: only write logs if the request score is greater than 0, or if the request is classified as "Good Bot".<br/>`2`: always write logs.<br/>`3`: never write logs.<br/>Default value: `0`. When this field has no value or has an invalid value, the function will use the default value |
96-
| `log_headers` | Array of strings | No | Defines which request headers should be included in the function's report log. For security reasons, the following headers are forbidden: <br> `authorization`, `cookie`, `proxy-authorization`, `set-cookie`, `x-csrf-token`, `x-api-key`, `x-amz-security-token`. </br> **Note**: the headers' values are going to be stored with base64 encode |
97-
| `log_tag` | String | No | A tag to identify the function instance that generated the request in the logs. It's recommended to use customized and unique tags |
98-
| `session_signature_key` | String | No | This string is used to sign, as encrypted data, the signed bot session cookie. This validation protects against cookie tampering. If this field has no value or an invalid value, the function will use the default value `az` |
99-
| `should_write_warning_logs` | Boolean | No | Defines whether the function will write warning logs to Real-Time Events. Default value: `false`|
100-
10188
5. When you're done, click the **Save** button.
10289

10390
:::tip
10491
To learn how to get the logs of Azion **Bot Manager Lite**, go to the [Viewing logs](#viewing-logs) section.
10592
:::
10693

94+
For more information and details about the arguments, visit the [Azion Bot Manager Lite documentation](/en/documentation/products/guides/bot-manager-lite/#setting-up-the-function).
95+
10796
### Setting up the Rules Engine
10897

10998
To finish, you have to set up a **Rules Engine** to configure the *behavior* and the *criteria* to run the integration.
@@ -134,78 +123,11 @@ Done. You now have your domains protected against bot attacks by using Azion **B
134123

135124
---
136125

137-
## Configuring actions
138-
139-
Azion **Bot Manager Lite** can execute **7 different actions** whenever the request's score equals or exceeds the defined threshold. Read more about each one below:
140-
141-
1. `allow`: allows the continuation of the request. To enable this action, you must declare it as follows:
142-
143-
```json
144-
"action": "allow"
145-
```
146-
147-
This action doesn't require any additional arguments.
148-
149-
If the score is less than the predetermined threshold, the request is processed, being *allow* the default action.
150-
151-
2. `deny`: delivers a standard *Status Code 403* response. To enable this action, you must declare it as follows:
152-
153-
```json
154-
"action": "deny"
155-
```
156-
157-
This action doesn't require any additional arguments.
158-
159-
3. `drop`: terminates the request without a response to the user. To enable this action, you must declare it as follows:
160-
161-
```json
162-
"action": "drop"
163-
```
164-
165-
This action doesn't require any additional arguments.
166-
167-
4. `redirect`: allows the request to be redirected to a new URL/location when the security threshold is reached. To enable this action, you must declare the variables as in the example:
126+
**Configuring actions**:
168127

169-
```json
170-
"action": "redirect",
171-
"redirect_to": "http://xxxxxxxxxx.map.azionedge.net/"
172-
```
173-
174-
Where `redirect_to`: defines the new URL/location to redirect the requests. If this field isn't filled or filled with a value that isn't a *string*, the function will behave as if the `allow` action was enabled.
175-
176-
5. `custom_html`: allows customized HTML content to be delivered to the user in case of a threshold violation. To enable this action, you must declare the variables as in the example:
177-
178-
```json
179-
"action": "custom_html",
180-
"custom_html": "This should be the custom HTML content",
181-
"custom_status_code": 418,
182-
```
183-
184-
Where `custom_html` defines the HTML content to be delivered and `custom_status_code` is the status code to be delivered.
185-
186-
- If `custom_html` isn't filled or it's filled with a value that isn't a *string*, the function will behave as would happen with the `allow` action enabled.
187-
- If `custom_status_code` isn't filled or it's filled with a value that isn't a *number*, the default value will be a *Status Code 200*.
188-
189-
6. `random_delay`: makes the function wait for a random period between *1* and *10* seconds before allowing the request to proceed. To enable this action, you must declare it as follows:
190-
191-
```json
192-
"action": "random_delay"
193-
```
194-
195-
This action doesn't require any additional arguments.
196-
197-
7. `hold_connection`: holds the request, keeping the connection open for *1 minute* before dropping it. To enable this action, you must declare it as follows:
198-
199-
```json
200-
"action": "hold_connection"
201-
```
202-
203-
This action doesn't require any additional arguments.
204-
205-
:::note
206-
By using any value different from `allow`, `deny`, `redirect`, `custom_html`, `drop`, `random_delay`, or `hold_connection` for the `action` variable, the function will execute the default action, which is `allow`.
207-
:::
128+
Azion Bot Manager Lite can execute a set of different actions whenever the request's score equals or exceeds the defined threshold
208129

130+
For more information, visit the [Azion Bot Manager Lite documentation](/en/documentation/products/guides/bot-manager-lite/#configuring-actions).
209131
---
210132

211133
## Viewing logs
@@ -267,8 +189,6 @@ To find this file:
267189

268190
Tune **Azion Bot Manager Lite** according to the necessities of your business.
269191

270-
import LinkButton from 'azion-webkit/linkbutton';
271-
272192
<LinkButton link="/en/documentation/products/guides/secure/manage-bots/" label="Go to the Manage Bots Guide" outlined />
273193

274194
---
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
title: Azion Bot Manager Lite
3+
description: >-
4+
Protect your applications against automated attacks such as bad bot signatures
5+
or scripted bots with a simplified version of the Bot Manager.
6+
meta_tags: 'bot, protection, cybersecurity, edge computing'
7+
namespace: docs_bot_manager__lite_reference
8+
permalink: /documentation/products/secure/edge-firewall/bot-manager-lite/
9+
---
10+
11+
import LinkButton from 'azion-webkit/linkbutton';
12+
13+
# Overview
14+
Azion Bot Manager Lite v0.1.9 is a serverless integration available on the Azion Marketplace, built with an edge function in the Edge Firewall. It analyzes requests and assigns a score, declining or canceling requests that exceed a pre-set limit, or allowing them by default. Available actions include allow, deny, drop, redirect, custom HTML, random delay, and hold the connection. The integration detects suspicious traffic and malicious bots such as web scraping and brute force attacks.
15+
16+
## Solution Details
17+
18+
This edge function evaluates requests and assigns a score based on a set of predefined rules. The action taken is configured by the customer and can be allow, deny, drop, redirect, custom HTML, random delay, or hold the connection if the score exceeds a limit defined in the JSON Args. Otherwise, the Edge Firewall rules continue to execute as normal.
19+
20+
## Rules
21+
22+
Currently, Bot Manager Lite features a rules system, with each rule incrementing the request score based on different conditions, such as specific HTTP headers or bot behavior patterns.
23+
24+
## Edge Function Details
25+
26+
The edge function is implemented in JavaScript and integrates into the Edge Firewall. Key configurable parameters include the action taken, the score threshold to trigger actions, and detailed logs transmitted via Data Stream/Real-Time Events.
27+
28+
## Logs and Integration
29+
30+
The log records can be configured to capture a wide range of request data, excluding sensitive headers listed below. The solution also validates IP addresses using reputation lists defined in the JSON Args, increasing the threat score of the request.
31+
32+
### Setting up the function
33+
34+
The function accepts the following arguments:
35+
36+
| Variable | Type | Required | Description |
37+
|---|---|---|---|
38+
| `action` | String | Yes | The action to be taken by the function whenever the request's score is greater or equals the defined threshold. Possible values: `allow`, `deny`, `redirect`, `custom_html`, `drop`, `random_delay`, and `hold_connection`. Read more about [configuring actions](#configuring-actions) |
39+
| `threshold` | Number | Yes | The maximum score that the request can reach before the function takes an action. If it has no value, the function won't take action |
40+
| `disabled_rules` | Array of numbers | No | The rules to be disabled. If a rule is disabled, it won't be processed nor increment the request score |
41+
| `internal_logs` | String | No | The *Logging Class* that the function will use. Possible values:<br/>`0`: write logs if the request score is greater than 0.<br/>`1`: only write logs if the request score is greater than 0, or if the request is classified as "Good Bot".<br/>`2`: always write logs.<br/>`3`: never write logs.<br/>Default value: `0`. When this field has no value or has an invalid value, the function will use the default value |
42+
| `log_headers` | Array of strings | No | Defines which request headers should be included in the function's report log. For security reasons, the following headers are forbidden: <br> `authorization`, `cookie`, `proxy-authorization`, `set-cookie`, `x-csrf-token`, `x-api-key`, `x-amz-security-token`. </br> **Note**: the headers' values are going to be stored with base64 encode |
43+
| `log_tag` | String | No | A tag to identify the function instance that generated the request in the logs. It's recommended to use customized and unique tags |
44+
| `session_signature_key` | String | No | This string is used to sign, as encrypted data, the signed bot session cookie. This validation protects against cookie tampering. If this field has no value or an invalid value, the function will use the default value `az` |
45+
| `should_write_warning_logs` | Boolean | No | Defines whether the function will write warning logs to Real-Time Events. Default value: `false`|
46+
47+
### Configuring actions
48+
49+
Azion **Bot Manager Lite** can execute **7 different actions** whenever the request's score equals or exceeds the defined threshold. Read more about each one below:
50+
51+
1. `allow`: allows the continuation of the request. To enable this action, you must declare it as follows:
52+
53+
```json
54+
"action": "allow"
55+
```
56+
57+
This action doesn't require any additional arguments.
58+
59+
If the score is less than the predetermined threshold, the request is processed, being *allow* the default action.
60+
61+
2. `deny`: delivers a standard *Status Code 403* response. To enable this action, you must declare it as follows:
62+
63+
```json
64+
"action": "deny"
65+
```
66+
67+
This action doesn't require any additional arguments.
68+
69+
3. `drop`: terminates the request without a response to the user. To enable this action, you must declare it as follows:
70+
71+
```json
72+
"action": "drop"
73+
```
74+
75+
This action doesn't require any additional arguments.
76+
77+
4. `redirect`: allows the request to be redirected to a new URL/location when the security threshold is reached. To enable this action, you must declare the variables as in the example:
78+
79+
```json
80+
"action": "redirect",
81+
"redirect_to": "http://xxxxxxxxxx.map.azionedge.net/"
82+
```
83+
84+
Where `redirect_to`: defines the new URL/location to redirect the requests. If this field isn't filled or filled with a value that isn't a *string*, the function will behave as if the `allow` action was enabled.
85+
86+
5. `custom_html`: allows customized HTML content to be delivered to the user in case of a threshold violation. To enable this action, you must declare the variables as in the example:
87+
88+
```json
89+
"action": "custom_html",
90+
"custom_html": "This should be the custom HTML content",
91+
"custom_status_code": 418,
92+
```
93+
94+
Where `custom_html` defines the HTML content to be delivered and `custom_status_code` is the status code to be delivered.
95+
96+
- If `custom_html` isn't filled or it's filled with a value that isn't a *string*, the function will behave as would happen with the `allow` action enabled.
97+
- If `custom_status_code` isn't filled or it's filled with a value that isn't a *number*, the default value will be a *Status Code 200*.
98+
99+
6. `random_delay`: makes the function wait for a random period between *1* and *10* seconds before allowing the request to proceed. To enable this action, you must declare it as follows:
100+
101+
```json
102+
"action": "random_delay"
103+
```
104+
105+
This action doesn't require any additional arguments.
106+
107+
7. `hold_connection`: holds the request, keeping the connection open for *1 minute* before dropping it. To enable this action, you must declare it as follows:
108+
109+
```json
110+
"action": "hold_connection"
111+
```
112+
113+
This action doesn't require any additional arguments.
114+
115+
:::note
116+
By using any value different from `allow`, `deny`, `redirect`, `custom_html`, `drop`, `random_delay`, or `hold_connection` for the `action` variable, the function will execute the default action, which is `allow`.
117+
:::
118+
119+
<LinkButton link="/en/documentation/products/guides/bot-manager-lite/" label="Go to How to install Azion Bot Manager Lite from Azion Marketplace guide" severity="secondary" />
120+
121+
<LinkButton link="/en/documentation/products/guides/bot-manager-lite-starter-kit/" label="Go to the How to test Bot Manager Lite using a template guide" severity="secondary" />
122+
123+
<LinkButton link="/en/documentation/products/guides/bot-manager-lite-integration-kit/" label="Go to the How to add Bot Manager Lite to an existent edge firewall with a template guide" severity="secondary" />

0 commit comments

Comments
 (0)