diff --git a/src/content/docs/en/pages/guides/marketplace/integrations/bot-manager-lite.mdx b/src/content/docs/en/pages/guides/marketplace/integrations/bot-manager-lite.mdx index 547f9fb03a..9b9b1629e6 100644 --- a/src/content/docs/en/pages/guides/marketplace/integrations/bot-manager-lite.mdx +++ b/src/content/docs/en/pages/guides/marketplace/integrations/bot-manager-lite.mdx @@ -10,9 +10,9 @@ permalink: /documentation/products/guides/bot-manager-lite/ import LinkButton from 'azion-webkit/linkbutton'; -Azion **Bot Manager Lite** is a *serverless* integration available in the Azion **Marketplace**. It was built on top of an **function** on **Firewall**, which analyzes incoming requests and assigns them a score based on a set 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*. +Azion **Bot Manager Lite** is a *serverless* integration available in the Azion **Marketplace**. It was built on top of a **function** on **Firewall**, which analyzes incoming requests and assigns them a score based on a set of predefined rules. If the score is equal to or greater than the predetermined threshold, the integration executes the defined action. Otherwise, the request is processed (`allow` is the default action). Available actions for Bot Manager Lite: `allow`, `deny`, `drop`, `redirect`, `custom_html`, `random_delay`, and `hold_connection`. -This integration enables the detection of suspicious traffic and bad bots, facilitating the implementation of preventive measures against malicious activities such as credential stuffing, vulnerability scanning, and site scraping. Bot Manager Lite leverages machine learning and *Reputation Intelligence* to analyze the behavior of incoming data. +This integration enables the detection of suspicious traffic and bad bots, facilitating the implementation of preventive measures against malicious activities such as credential stuffing, vulnerability scanning, and site scraping. Bot Manager Lite uses a set of predefined rules and *Reputation Intelligence* to analyze the behavior of incoming data. :::note This integration is a lite version of [Azion Bot Manager](https://www.azion.com/en/products/bot-manager/), a comprehensive solution for bot management. @@ -46,7 +46,7 @@ You can search for any integration by browsing through the cards, using the filt 2. Click the **+ Firewall** button. 3. Give an easy-to-remember name to your new firewall. 4. Enable the **Functions** switch in the **Modules** section. -5. Optionally, enable the **Debug Rules** switch to log which Rules Engine rules execute for each request. This is useful during tuning. See [Using Debug Rules](#using-debug-rules-to-trace-firewall-rule-execution) for details. +5. (Optional) Enable the **Debug Rules** switch to log which Rules Engine rules execute for each request. This is useful during tuning. See [Using Debug Rules](#using-debug-rules-to-trace-firewall-rule-execution) for details. 6. Click the **Save** button. Done. Now you've configured your firewall and it has access to Functions. @@ -73,17 +73,21 @@ The **Arguments** code box is where you'll pass your variables. } ``` -Even when `threshold` and `action` are mandatory variables to be defined, you can add and define more variables, according to your needs, as shown in the example below: +Even when `threshold` and `action` are mandatory variables to be defined, you can add and define more variables according to your needs, as shown in the example below: ```json { "threshold": 10, "action": "deny", "disabled_rules": [], - "log_tag": "my_custom_tag" + "log_tag": "my_custom_tag", + "reputation_network_lists": [], + "internal_logs": "0" } ``` +For a complete list of available arguments and their descriptions, see the [Bot Manager Lite reference](/en/documentation/products/secure/firewall/bot-manager-lite/#setting-up-the-function). + 5. When you're done, click the **Save** button. :::tip @@ -92,7 +96,7 @@ To learn how to get the logs of Azion **Bot Manager Lite**, go to the [Viewing l ### Setting up the Rules Engine -To finish, you have to set up a **Rules Engine** to configure the *behavior* and the *criteria* to run the integration. +To finish, set up a **Rules Engine** rule to configure the *behavior* and the *criteria* to run the integration. Still in the **Firewall** page: @@ -100,11 +104,11 @@ Still in the **Firewall** page: 2. Click the **+ Rules Engine** button. 3. Give an easy-to-remember name to the rule. - You can add a description, but it's an optional step. -4. Select a *criteria* to run and catch the domains that you want to run the integration on. +4. Select a **criterion** to run and catch the domains that you want to run the integration on. - Use this rule: `if Request URI does not match "\.(png|jpg|css|js|jpeg|gif|ico|ttf|svg|woff|woff2|ashx|asmx|svc|swf|otf|eot)(\?.*)?$"` - - This rule is strongly recommended to exclude all static data on your application to be processed by the function. You can customize this rule if needed. -5. You have to create additional *criteria* for this integration to work: `if Request URI does not match /.well-know/` - - This rule is highly recommended to create a list of allowed IPs that don't impact automation or scripts to WEB API. + - This rule excludes static assets from being processed by the function. Customize it as needed. +5. Create an additional **criterion**: `if Request URI does not match /.well-known/` + - This rule excludes the `/.well-known/` path, preventing the function from interfering with automation or web API scripts that use this path. 6. Below, select **Run Function** *behavior*. 7. Select the adequate function according to the name you gave it during the instantiation step. 8. Click the **Save** button. @@ -120,9 +124,11 @@ Done. You now have your domains protected against bot attacks by using Azion **B --- -**Configuring actions**: +## Configuring actions + +Azion Bot Manager Lite can execute 7 different actions whenever the request's score equals or exceeds the defined [threshold](#adjusting-the-threshold): `allow`, `deny`, `drop`, `redirect`, `custom_html`, `random_delay`, and `hold_connection`. -Azion Bot Manager Lite can execute a set of different actions whenever the request's score equals or exceeds the defined [threshold](#adjusting-the-threshold). + --- @@ -246,7 +252,7 @@ If specific rule IDs appear consistently in `matched_rules` for legitimate traff ``` :::caution[Warning] -Disabling rules reduces detection coverage. Only disable rules after confirming — through log analysis — that they consistently match legitimate traffic patterns. +Disabling rules reduces detection coverage. Only disable rules after confirming through log analysis that they consistently match legitimate traffic patterns. ::: ### Tracking multiple instances with log tags @@ -270,7 +276,7 @@ Use `internal_logs` to control which requests are logged: | Value | Behavior | |---|---| | `"0"` | Logs requests with a score greater than `0` (default). | -| `"1"` | Logs requests with a score greater than `0`, or classified as Good Bot. | +| `"1"` | Logs requests with a score greater than `0`, or classified as a Good Bot. | | `"2"` | Logs all requests, regardless of score. Recommended for observation and tuning. | | `"3"` | Disables logging entirely. | diff --git a/src/content/docs/en/pages/guides/marketplace/templates/bot-starter-kit.mdx b/src/content/docs/en/pages/guides/marketplace/templates/bot-starter-kit.mdx index f0d81cac41..bc482f8a31 100644 --- a/src/content/docs/en/pages/guides/marketplace/templates/bot-starter-kit.mdx +++ b/src/content/docs/en/pages/guides/marketplace/templates/bot-starter-kit.mdx @@ -7,14 +7,15 @@ permalink: /documentation/products/guides/bot-manager-lite-starter-kit/ --- import Tag from 'primevue/tag'; +import LinkButton from 'azion-webkit/linkbutton'; Preview -The **Bot Manager Lite Starter Kit** template deploys an entirely new edge stack to enable customers to see the Bot Manager Lite in action. +The **Bot Manager Lite Starter Kit** template deploys a complete edge configuration to enable customers to see Bot Manager Lite in action. -The deployment automatically creates an application, an function, an Firewall, and a domain to access and test the features of Bot Manager Lite. This template is ideal to understand how this integration works and how it can help you secure your applications and digital assets. +The deployment automatically creates an application, a function, a Firewall, and a domain to access and test the features of Bot Manager Lite. This template is ideal to understand how this integration works and how it can help you secure your applications and digital assets. :::note Bot Manager Lite integration is a [lite version](/en/documentation/products/guides/bot-manager-lite/) available in the Marketplace. @@ -38,7 +39,7 @@ Before deploying this template, you must: ## Deploying the template -You can obtain and configure your template through the Azion Console. To easily deploy it at the edge, click the button below. +You can obtain and configure your template through Azion Console. To easily deploy it at the edge, click the button below. - +
- - - + --- ## Managing the template -Being a testing template, the initial configuration is mostly demonstrative. However, you can use it as a base for creating an actual functional application. You can [configure a new origin](/en/documentation/products/build/applications/origins/) for the application and use it as *Default Origin*. You can also modify the JSON Args of your **Bot Manager Lite** instance for a more customized configuration. +This template is designed for testing, so the initial configuration is demonstrative. However, you can use it as a base for creating an actual functional application. You can [configure a new origin](/en/documentation/products/build/applications/origins/) for the application and use it as *Default Origin*. You can also modify the JSON Args of your **Bot Manager Lite** instance for a more customized configuration. To manage and edit your application's settings, proceed as follows: @@ -129,10 +127,4 @@ Read the documentation about [managing applications](/en/documentation/products/ The application created during the deployment has an assigned Azion Workload domain to make it accessible through the browser. The domain has the following format: `xxxxxxxxxx.map.azionedge.net/`. However, you can add a custom domain for users to access your application through it. -import LinkButton from 'azion-webkit/linkbutton'; - - - - - - + diff --git a/src/content/docs/en/pages/guides/marketplace/templates/bot-with-firewall.mdx b/src/content/docs/en/pages/guides/marketplace/templates/bot-with-firewall.mdx index abf4ecd30a..a890df436d 100644 --- a/src/content/docs/en/pages/guides/marketplace/templates/bot-with-firewall.mdx +++ b/src/content/docs/en/pages/guides/marketplace/templates/bot-with-firewall.mdx @@ -2,7 +2,7 @@ title: "Add Bot Manager Lite to a Firewall" description: >- This template provides an easy way to integrate the Bot Manager Lite function in an - existent Firewall on Azion. + existing Firewall on Azion. meta_tags: 'templates, guides, Azion Marketplace, security, Firewall' namespace: docs_guides_templates_bot_manager_integration_kit permalink: /documentation/products/guides/bot-manager-lite-integration-kit/ @@ -14,7 +14,7 @@ import Tag from 'primevue/tag'; Preview -The **Bot Manager Lite Integration Kit** template provides an easy way to integrate the Bot Manager Lite function in an existent Firewall on Azion. This template automatically creates a new function instance for Bot Manager Lite and a Rules Engine rule to run it in the selected Firewall. +The **Bot Manager Lite Integration Kit** template provides an easy way to integrate the Bot Manager Lite function in an existing Firewall on Azion. This template automatically creates a new function instance for Bot Manager Lite and a Rules Engine rule to execute it in the selected Firewall. :::note Bot Manager Lite integration is a [lite version](/en/documentation/products/guides/bot-manager-lite/) available in the Marketplace. @@ -28,10 +28,10 @@ Azion provides the Bot Manager add-on, a comprehensive solution for bot manageme Before deploying this template, you must: -- Have an [Firewall](/en/documentation/products/secure/firewall/) created in your account. - - During the setup of the template, you must inform the ID of your existing Firewall to add the Bot Manager Lite instance. If the ID doesn't exist, the execution will fail. Check [how to configure and edit an Firewall](/en/documentation/products/secure/secure-application/#step-1-configure-main-settings). +- Have a [Firewall](/en/documentation/products/secure/firewall/) created in your account. + - During the setup of the template, you must inform the ID of your existing Firewall to add the Bot Manager Lite instance. If the ID doesn't exist, the execution will fail. Check [how to configure and edit a Firewall](/en/documentation/products/secure/secure-application/#step-1-configure-main-settings). - Launch the latest version of the **Bot Manager Lite** integration. - - Go to [Azion Marketplace](https://console.azion.com/marketplace) to install this integration by clicking the **Install* button. Check the [How to install Azion Bot Manager Lite](/en/documentation/products/guides/bot-manager-lite/) guide for more details. + - Go to [Azion Marketplace](https://console.azion.com/marketplace) to install this integration by clicking the **Install** button. Check the [How to install Azion Bot Manager Lite](/en/documentation/products/guides/bot-manager-lite/) guide for more details. - If you didn't install the Bot Manager Lite function before deploying this template, the execution will fail and a log explaining the reason will be printed. - This template uses [Functions](/en/documentation/products/build/applications/functions/) and it may generate usage-related costs. Check the [pricing page](https://www.azion.com/en/pricing/) for more information. @@ -40,7 +40,7 @@ Before deploying this template, you must: ## Deploying the template -You can obtain and configure your template through the Azion Console. To easily deploy it at the edge, click the button below. +You can obtain and configure your template through Azion Console. To easily deploy it at the edge, click the button below. + diff --git a/src/content/docs/en/pages/main-menu/reference/secure/edge-firewall/azion-bot-manager-lite.mdx b/src/content/docs/en/pages/main-menu/reference/secure/edge-firewall/azion-bot-manager-lite.mdx index b584d6d960..f71c3ed1cd 100644 --- a/src/content/docs/en/pages/main-menu/reference/secure/edge-firewall/azion-bot-manager-lite.mdx +++ b/src/content/docs/en/pages/main-menu/reference/secure/edge-firewall/azion-bot-manager-lite.mdx @@ -11,23 +11,50 @@ permalink: /documentation/products/secure/firewall/bot-manager-lite/ import LinkButton from 'azion-webkit/linkbutton'; # Overview -Azion Bot Manager Lite v0.1.9 is a serverless integration available on the Azion Marketplace, built with an function in the 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. + +Azion Bot Manager Lite v0.1.9 is a serverless integration available on Azion Marketplace, built with a function in the Firewall. It analyzes incoming requests and assigns each one a score based on a set of predefined rules. When the score reaches or exceeds the configured threshold, the function executes the defined action. If the score stays below the threshold, the request proceeds normally (`allow` is the default action). Available actions: `allow`, `deny`, `drop`, `redirect`, `custom_html`, `random_delay`, and `hold_connection`. The integration detects suspicious traffic and malicious bots, including web scraping and brute force attacks. ## Solution Details -This 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 Firewall rules continue to execute as normal. +The function evaluates each request and assigns a score based on predefined rules. You configure the action and threshold in the JSON Args. If the score reaches or exceeds the threshold, the function executes the configured action. Otherwise, the Firewall Rules Engine continues to execute normally. ## Rules -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. +Bot Manager Lite evaluates each request against 17 rules. Each matched rule increments the request score by a fixed amount. When the cumulative score reaches or exceeds the configured `threshold`, the function executes the configured `action`. + +| Rule ID | Description | Score Increment | Class | +|---|---|---|---| +| 1 | `${http_user_agent}` is empty | 8 | Bad bot signatures | +| 2 | `${http_content_type}` is empty AND `${request_body}` is not empty | 8 | Bad bot signatures | +| 3 | `${http_referer}` is empty AND `${request_method}` is POST, PUT, PATCH, or DELETE | 6 | Malicious intent | +| 4 | `${http_user_agent}` contains the string `Dalvik` | 4 | Bad bot signatures | +| 5 | `${http_user_agent}` contains the string `Trident` | 6 | Bad bot signatures | +| 6 | `${http_user_agent}` contains the string `Headless` | 6 | Bad bot signatures | +| 7 | `${http_user_agent}` is longer than 200 characters or shorter than 10 characters | 4 | Bad bot signatures | +| 8 | `${http_user_agent}` matches a known bad bot user agent | 8 | Scripted bots | +| 9 | `${http_accept}` is empty | 8 | Bad bot signatures | +| 10 | `${http_accept_language}` is empty | 8 | Bad bot signatures | +| 11 | `${http_range}` is empty | 6 | Malicious intent | +| 12 | `${request_method}` is `TRACE` | 8 | Malicious intent | +| 13 | `${http_content_length}` is empty AND `${request_method}` is POST, PUT, or PATCH | 8 | Bad bot signatures | +| 14 | Client IP is found in a configured reputation Network List | 6 | Reputation Intelligence | +| 15 | `${request_method}` is POST, PUT, or PATCH AND `${cookie_az_botm}` is absent | 8 | Malicious browser behavior | +| 16 | `${request_method}` is POST, PUT, or PATCH AND `${cookie_az_asm}` is absent | 8 | Malicious browser behavior | +| 17 | Session cookie integrity violation | 16 | Malicious browser behavior | + +:::note +Rules 15, 16, and 17 rely on the built-in signed cookie validation system. On the first request from a browser, Bot Manager Lite sets two session cookies: `az_botm` (a unique request identifier) and `az_asm` (an HMAC-signed version of the same value). On subsequent requests, the function verifies that the two cookies are still consistent. A mismatch triggers rule 17. +::: + +You can disable specific rules using the `disabled_rules` argument. See [Setting up the function](#setting-up-the-function) for details. ## Function Details -The function is implemented in JavaScript and integrates into the Firewall. Key configurable parameters include the action taken, the score threshold to trigger actions, and detailed logs transmitted via Data Stream/Real-Time Events. +The function is implemented in JavaScript and runs inside the Firewall. You configure its behavior through JSON Args. Logs are transmitted via Data Stream and Real-Time Events. ## Logs and Integration -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. +You can configure the log records to capture a wide range of request data, excluding sensitive headers listed in the `log_headers` argument description. The solution also validates IP addresses using reputation Network Lists defined in the `reputation_network_lists` argument, increasing the threat score of matching requests. ### Setting up the function @@ -37,28 +64,29 @@ The function accepts the following arguments: |---|---|---|---| | `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) | | `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 | -| `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 | -| `internal_logs` | String | No | The *Logging Class* that the function will use. Possible values:
`0`: write logs if the request score is greater than 0.
`1`: only write logs if the request score is greater than 0, or if the request is classified as "Good Bot".
`2`: always write logs.
`3`: never write logs.
Default value: `0`. When this field has no value or has an invalid value, the function will use the default value | -| `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:
`authorization`, `cookie`, `proxy-authorization`, `set-cookie`, `x-csrf-token`, `x-api-key`, `x-amz-security-token`.
**Note**: the headers' values are going to be stored with base64 encode | -| `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 | -| `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` | -| `should_write_warning_logs` | Boolean | No | Defines whether the function will write warning logs to Real-Time Events. Default value: `false`| +| `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 | +| `internal_logs` | String | No | The logging class the function will use. Possible values:
`"0"`: write logs if the request score is greater than 0 (default).
`"1"`: write logs if the request score is greater than 0, or if the request is classified as a Good Bot.
`"2"`: always write logs.
`"3"`: never write logs.
When this field has no value or an invalid value, the function uses the default value `"0"` | +| `log_headers` | Array of strings | No | Defines which request headers to include in the report log. The following headers are forbidden for security reasons: `authorization`, `cookie`, `proxy-authorization`, `set-cookie`, `x-csrf-token`, `x-api-key`, `x-amz-security-token`. **Note**: header values are stored with base64 encoding | +| `log_tag` | String | No | A tag to identify the function instance that generated the request in the logs. Use unique tags when running multiple instances | +| `reputation_network_lists` | Array of numbers | No | Network List IDs used to validate the client IP. If the IP is found in any list, the request score increases by 6 points per matched list. Default: empty list | +| `session_signature_key` | String | No | Signs the `az_asm` session cookie using HMAC to protect against cookie tampering. If this field has no value or an invalid value, the function uses the default value `az` | +| `should_write_warning_logs` | Boolean | No | Defines whether the function writes warning logs to Real-Time Events. Default value: `false` | ### Configuring actions -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: +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: -1. `allow`: allows the continuation of the request. To enable this action, you must declare it as follows: +1. `allow`: allows the continuation of the request. To enable this action, declare it as follows: ```json "action": "allow" ``` -This action doesn't require any additional arguments. +This action doesn't require any additional arguments. -If the score is less than the predetermined threshold, the request is processed, being *allow* the default action. +If the score is less than the predetermined threshold, the request is processed — `allow` is the default action. -2. `deny`: delivers a standard *Status Code 403* response. To enable this action, you must declare it as follows: +2. `deny`: delivers a standard *Status Code 403* response. To enable this action, declare it as follows: ```json "action": "deny" @@ -66,7 +94,7 @@ If the score is less than the predetermined threshold, the request is processed, This action doesn't require any additional arguments. -3. `drop`: terminates the request without a response to the user. To enable this action, you must declare it as follows: +3. `drop`: terminates the request without a response to the user. To enable this action, declare it as follows: ```json "action": "drop" @@ -74,29 +102,29 @@ This action doesn't require any additional arguments. This action doesn't require any additional arguments. -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: +4. `redirect`: redirects the request to a new URL when the security threshold is reached. To enable this action, declare the variables as in the example: ```json "action": "redirect", "redirect_to": "http://xxxxxxxxxx.map.azionedge.net/" ``` -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. +Where `redirect_to` defines the new URL to redirect the request. If this field isn't filled or is filled with a value that isn't a string, the function behaves as if the `allow` action was enabled. -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: +5. `custom_html`: delivers customized HTML content to the user when the threshold is violated. To enable this action, declare the variables as in the example: ```json "action": "custom_html", "custom_html": "This should be the custom HTML content", - "custom_status_code": 418, + "custom_status_code": 418 ``` -Where `custom_html` defines the HTML content to be delivered and `custom_status_code` is the status code to be delivered. +Where `custom_html` defines the HTML content to be delivered and `custom_status_code` is the HTTP status code to return. -- 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. -- 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*. +- If `custom_html` isn't filled or is filled with a value that isn't a string, the function behaves as if the `allow` action was enabled. +- If `custom_status_code` isn't filled or is filled with a value that isn't a number, the default value is *Status Code 200*. -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: +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, declare it as follows: ```json "action": "random_delay" @@ -104,7 +132,7 @@ Where `custom_html` defines the HTML content to be delivered and `custom_status_ This action doesn't require any additional arguments. -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: +7. `hold_connection`: holds the request, keeping the connection open for 1 minute before dropping it. To enable this action, declare it as follows: ```json "action": "hold_connection" @@ -113,11 +141,11 @@ This action doesn't require any additional arguments. This action doesn't require any additional arguments. :::note -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`. +Using any value other than `allow`, `deny`, `redirect`, `custom_html`, `drop`, `random_delay`, or `hold_connection` for the `action` variable causes the function to execute the default action: `allow`. ::: - + - + - + diff --git a/src/content/docs/pt-br/pages/guias/marketplace/integrations/bot-manager-lite.mdx b/src/content/docs/pt-br/pages/guias/marketplace/integrations/bot-manager-lite.mdx index c8c0e649ce..3bad1bd27d 100644 --- a/src/content/docs/pt-br/pages/guias/marketplace/integrations/bot-manager-lite.mdx +++ b/src/content/docs/pt-br/pages/guias/marketplace/integrations/bot-manager-lite.mdx @@ -9,9 +9,11 @@ namespace: docs_guide_bot_manager_lite permalink: /documentacao/produtos/guias/bot-manager-lite/ --- -Azion **Bot Manager Lite** é uma integração *serverless* disponível no **Marketplace** da Azion. Esta integração foi construída com base em uma function no **Firewall** que analisa as requisições recebidas e atribui um score com base em regras e comportamentos. Se a pontuação é igual o excede o limite predeterminado, a integração declina ou cancela a requisição. Caso contrário, a requisição é processada (*allow*, como ação padrão). As ações disponíveis para Bot Manager Lite são: *allow*, *deny*, *drop*, *redirect*, *custom HTML*, *random delay* e *hold the connection*. +import LinkButton from 'azion-webkit/linkbutton'; + +Azion **Bot Manager Lite** é uma integração *serverless* disponível no **Marketplace** da Azion. Esta integração foi construída com base em uma function no **Firewall** que analisa as requisições recebidas e atribui um score com base em um conjunto de regras predefinidas. Se a pontuação é igual ou excede o limite predeterminado, a integração executa a ação definida. Caso contrário, a requisição é processada (`allow` é a ação padrão). As ações disponíveis para Bot Manager Lite são: `allow`, `deny`, `drop`, `redirect`, `custom_html`, `random_delay` e `hold_connection`. -Essa integração permite a detecção de tráfego suspeito e bots maliciosos, facilitando a implementação de medidas preventivas contra atividades maliciosas, como preenchimento de credenciais, varredura de vulnerabilidades e raspagem de sites (*web scrapping*). O Bot Manager Lite utiliza aprendizado de máquina e *Reputation Intelligence* para analisar o comportamento dos dados recebidos. +Essa integração permite a detecção de tráfego suspeito e bots maliciosos, facilitando a implementação de medidas preventivas contra atividades maliciosas, como preenchimento de credenciais, varredura de vulnerabilidades e raspagem de sites (*web scrapping*). O Bot Manager Lite usa um conjunto de regras predefinidas e *Reputation Intelligence* para analisar o comportamento dos dados recebidos. :::note Bot Manager Lite é uma [integração com uma versão lite](/pt-br/documentacao/produtos/guias/bot-manager-lite/) disponível no Marketplace. @@ -47,7 +49,7 @@ Para instanciar a integração Azion **Bot Manager Lite**, siga estes passos: 2. Clique no botão **+ Firewall**. 3. Dê um nome fácil de lembrar ao seu novo firewall. 4. Habilite o switch **Functions** na seção **Modules**. -5. Opcionalmente, habilite o switch **Debug Rules** para registrar quais regras do Rules Engine são executadas para cada requisição. Isso é útil durante o ajuste da integração. Consulte [Uso do Debug Rules](#uso-do-debug-rules-para-rastrear-a-execucao-de-regras-do-firewall) para mais detalhes. +5. (Opcional) Habilite o switch **Debug Rules** para registrar quais regras do Rules Engine são executadas para cada requisição. Isso é útil durante o ajuste da integração. Consulte [Uso do Debug Rules](#uso-do-debug-rules-para-rastrear-a-execucao-de-regras-do-firewall) para mais detalhes. 6. Clique no botão **Save**. Pronto. Você criou uma instância no Firewall para sua função e habilitou o uso de Functions nele. @@ -81,10 +83,14 @@ Mesmo quando `threshold` e `action` são as variáveis obrigatórias, você pode "threshold": 10, "action": "deny", "disabled_rules": [], - "log_tag": "my_custom_tag" + "log_tag": "my_custom_tag", + "reputation_network_lists": [], + "internal_logs": "0" } ``` +Para uma lista completa dos argumentos disponíveis e suas descrições, consulte a [referência do Bot Manager Lite](/pt-br/documentacao/produtos/secure/firewall/bot-manager-lite/#configure-a-funcao). + 5. Quando estiver pronto, clique no botão **Save** para salvar suas configurações. :::tip @@ -95,7 +101,7 @@ Para saber mais informações e detalhes sobre os argumentos, visite a documenta ### Configure o Rules Engine -Para concluir, você precisa configurar o **Rules Engine** e nele configurar o *behavior* (comportamento) e os *criteria* (critérios) para executar a integração. +Para concluir, configure o **Rules Engine** para definir o *behavior* (comportamento) e os *criteria* (critérios) que executarão a integração. Ainda na página **Firewall**: @@ -103,11 +109,11 @@ Ainda na página **Firewall**: 2. Clique no botão **+ Rules Engine**. 3. Dê um nome fácil de lembrar à sua nova regra. - Você pode adicionar uma descrição, mas é um passo opcional. -4. Selecione um *criteria* (critério) para executar a integração: +4. Selecione um **critério** para executar a integração: - Use esta regra: `if Request URI does not match "\.(png|jpg|css|js|jpeg|gif|ico|ttf|svg|woff|woff2|ashx|asmx|svc|swf|otf|eot)(\?.*)?$"` - - Essa regra é recomendada para excluir todos os dados estáticos da sua aplicação a serem processados pela função. Você pode personalizar esta regra, se necessário. -5. Você precisa criar outro critério para que esta integração funcione: `if Request URI does not match /.well-know/` - - Essa regra é recomendada para criar uma lista de permissões de IP que não impacte a automação ou scripts da WEB API. + - Essa regra exclui ativos estáticos de serem processados pela função. Personalize conforme necessário. +5. Crie um **critério** adicional: `if Request URI does not match /.well-known/` + - Essa regra exclui o caminho `/.well-known/`, evitando que a função interfira em scripts de automação ou APIs web que utilizam esse caminho. 6. Abaixo, selecione o *behavior* (comportamento) **Run Function**. 7. Selecione a função de acordo com o nome que você deu no passo 3. 8. Clique no botão **Save**. @@ -123,12 +129,13 @@ Pronto. Agora você tem seus domínios protegidos contra ataques de bot usando a --- -### Configuração de actions +## Configuração de actions -Azion Bot Manager Lite pode executar um conjunto de diferentes ações sempre que a pontuação da requisição for igual ou superior ao limite definido. +Azion Bot Manager Lite pode executar 7 ações diferentes sempre que a pontuação da requisição for igual ou superior ao limite definido: `allow`, `deny`, `drop`, `redirect`, `custom_html`, `random_delay` e `hold_connection`. -Para saber mais, visite a documentação do [Azion Bot Manager Lite](/pt-br/documentacao/produtos/secure/firewall/bot-manager-lite/#configuracao-de-actions). -—-- + + +--- ## Consulte os logs @@ -303,8 +310,6 @@ Isso confirma que a `Bot Manager Lite Rule` foi executada antes do conjunto de r Consulte o guia [Como fazer debug de regras criadas com o Rules Engine](/pt-br/documentacao/produtos/guias/debug-rules/) para instruções detalhadas sobre como consultar o `traceback` via Data Stream, Real-Time Events e GraphQL API. ::: -import LinkButton from 'azion-webkit/linkbutton'; - --- diff --git a/src/content/docs/pt-br/pages/guias/marketplace/templates/bot-starter-kit.mdx b/src/content/docs/pt-br/pages/guias/marketplace/templates/bot-starter-kit.mdx index df43fd3841..82f42d8463 100644 --- a/src/content/docs/pt-br/pages/guias/marketplace/templates/bot-starter-kit.mdx +++ b/src/content/docs/pt-br/pages/guias/marketplace/templates/bot-starter-kit.mdx @@ -7,14 +7,15 @@ permalink: /documentacao/produtos/guias/bot-manager-lite-starter-kit/ --- import Tag from 'primevue/tag'; +import LinkButton from 'azion-webkit/linkbutton'; Preview -O template **Bot Manager Lite Starter Kit** cria um novo stack edge para permitir que os clientes vejam o Bot Manager Lite em ação. +O template **Bot Manager Lite Starter Kit** implanta uma configuração edge completa para permitir que os clientes vejam o Bot Manager Lite em ação. -A implantação cria automaticamente uma application, uma function, um firewall e um domínio para acessar e testar os recursos do Bot Manager Lite. Este template é ideal para entender como funciona essa integração e como ela pode ajudá-lo a proteger suas aplicações e ativos digitais. +A implantação cria automaticamente uma application, uma function, um Firewall e um domínio para acessar e testar os recursos do Bot Manager Lite. Este template é ideal para entender como funciona essa integração e como ela pode ajudá-lo a proteger suas aplicações e ativos digitais. :::note Bot Manager Lite é uma [integração com uma versão lite](/pt-br/documentacao/produtos/guias/bot-manager-lite/) disponível no Marketplace. @@ -67,16 +68,16 @@ Se você não instalou o Bot Manager Lite antes de implantar este template, a ex Durante a implantação, você poderá acompanhar o processo através de uma janela mostrando os logs. Quando estiver concluída, a página mostra informações sobre a aplicação e algumas opções para continuar sua jornada. :::note -O link para sua application permite que você veja como ela fica no navegador. No entanto, leva um certo tempo para propagar e configurá-la nas edge locations da Azion. Pode ser necessário aguardar alguns minutos para que a URL seja ativada e para que a página da aplicação seja efetivamente exibida no navegador. +O link para sua application permite que você veja como ela fica no navegador. No entanto, leva um certo tempo para propagar e configurá-la nos data centers da Azion. Pode ser necessário aguardar alguns minutos para que a URL seja ativada e para que a página da aplicação seja efetivamente exibida no navegador. ::: ### Principais configurações -Este template implanta um stack edge totalmente novo, incluindo: +Este template implanta uma configuração edge completa, incluindo: - **Uma nova application**, com o módulo Functions habilitado, para instanciar sua função recém-criada. A aplicação receberá as requisições que acionam a função. - **Um novo domínio**, para acessar sua aplicação e testar o Bot Manager Lite. -- **Um novo firewall**, incluindo a instância da versão mais recente da integração do Bot Manager Lite e uma regra do Rules Engine para acionar sua execução. +- **Um novo Firewall**, incluindo a instância da versão mais recente da integração do Bot Manager Lite e uma regra do Rules Engine para acionar sua execução. - **Uma nova function**, fornecendo uma aplicação com uma interface básica que pode ser usada para testar o Bot Manager Lite. --- @@ -87,9 +88,9 @@ Após executar o template, você poderá acessar o Azion Workload Domain, com o A página de teste renderizará a resposta à requisição: -- Quando uma requisição *boa* é enviada, ela renderiza uma mensagem de sucesso. -- Quando uma requisição *maliciosa* é enviada, ela renderizará uma resposta `HTTP 403 response status code` padrão, porque a ação do Bot Manager Lite está definida para executar um *deny*. - - Você pode modificar os JSON Args da função para redirecionar a requisição *maliciosa* para um domínio customizado. +- Quando uma requisição "boa" é enviada, ela renderiza uma mensagem de sucesso. +- Quando uma requisição "maliciosa" é enviada, ela renderizará uma resposta `HTTP 403 response status code` padrão, porque a ação do Bot Manager Lite está definida para executar a ação `deny`. + - Você pode modificar os JSON Args da função para redirecionar a requisição "maliciosa" para um domínio customizado. --- @@ -97,19 +98,16 @@ A página de teste renderizará a resposta à requisição: A instância da função do Bot Manager Lite está configurada para sempre gravar logs. Dessa forma, sempre que você clicar em qualquer um dos botões para "enviar requisição", serão gerados logs que podem ser monitorados em [Real-Time Events](/pt-br/documentacao/produtos/guias/secure/gerenciar-bots/#usar-real-time-events-para-observar-e-calibrar-regras) e [Data Stream](/pt-br/documentacao/produtos/observe/data-stream/). - - +
- - - + --- ## Gerencie o template -Sendo um template de teste, a configuração inicial é principalmente demonstrativa. No entanto, você pode usá-lo como base para criar uma aplicação funcional. Você pode [configurar uma nova origem](/pt-br/documentacao/produtos/build/applications/origins/) para a aplicação e usá-la como *Default Origin*. Você também pode modificar os argumentos JSON da sua instância do **Bot Manager Lite** para uma configuração mais personalizada. +Este template é projetado para testes, portanto a configuração inicial é demonstrativa. No entanto, você pode usá-lo como base para criar uma aplicação funcional. Você pode [configurar uma nova origem](/pt-br/documentacao/produtos/build/applications/origins/) para a aplicação e usá-la como *Default Origin*. Você também pode modificar os argumentos JSON da sua instância do **Bot Manager Lite** para uma configuração mais personalizada. Para gerenciar e editar as configurações da sua aplicação, siga estas etapas: @@ -128,9 +126,4 @@ Leia a documentação sobre o [gerenciamento de applications](/pt-br/documentaca A application criada tem um Azion Workload Domain atribuído para torná-la acessível através do navegador. O domínio tem o seguinte formato: `xxxxxxxxxx.map.azionedge.net/`. No entanto, você pode adicionar um domínio personalizado para que os usuários acessem sua aplicação por meio dele. -import LinkButton from 'azion-webkit/linkbutton'; - - - ---- - + diff --git a/src/content/docs/pt-br/pages/guias/marketplace/templates/bot-with-firewall.mdx b/src/content/docs/pt-br/pages/guias/marketplace/templates/bot-with-firewall.mdx index 90ce09c281..e4bd568d00 100644 --- a/src/content/docs/pt-br/pages/guias/marketplace/templates/bot-with-firewall.mdx +++ b/src/content/docs/pt-br/pages/guias/marketplace/templates/bot-with-firewall.mdx @@ -2,7 +2,7 @@ title: "Adicione o Bot Manager Lite a um firewall" description: >- Este template fornece uma maneira fácil de integrar a função Bot Manager Lite em um - firewall existente na Azion. + Firewall existente na Azion. meta_tags: 'templates, guides, Azion Marketplace, security, firewall' namespace: docs_guides_templates_bot_manager_integration_kit permalink: /documentacao/produtos/guias/bot-manager-lite-integration-kit/ @@ -56,16 +56,11 @@ No formulário de configuração, você deve fornecer as informações para conf Os campos identificados com asterisco são obrigatórios. -- **Firewall ID** *: o ID do seu firewall existente para adicionar a instância do Bot Manager Lite. - - Para obter o ID, você pode acessar a [página do Firewall](https://console.azion.com/edge-firewall), selecionar aquele que deseja usar e copiar o ID na URL. Você também pode obtê-lo por meio da [API Azion](https://api.azion.com/#015cb4a3-8fa2-4625-9792-2cc271e184eb). - - Este campo é obrigatório. +- **Firewall ID** *: o ID do seu Firewall existente para adicionar a instância do Bot Manager Lite. + - Para obter o ID, acesse a [página do Firewall](https://console.azion.com/edge-firewall), selecione aquele que deseja usar e copie o ID da URL. Você também pode obtê-lo por meio da [API Azion](https://api.azion.com/#015cb4a3-8fa2-4625-9792-2cc271e184eb). Depois de preencher todas as informações, clique no botão **Deploy**, localizado no canto inferior direito. Isso iniciará o processo de deployment. -:::note -Caso não cumpra algum dos requisitos, a execução falhará e será mostrado um log explicando o motivo. -::: - Durante a implantação, você poderá acompanhar o processo através de uma janela mostrando os logs. Quando estiver concluída, a página mostra informações sobre a aplicação e algumas opções para continuar sua jornada. :::note @@ -86,15 +81,15 @@ A instância da função possui os seguintes JSON Args: { "threshold": 10, "action": "allow", - "internal_logs": 2 + "internal_logs": "2" } ``` Onde: -- `threshold`: a pontuação máxima que a requisição pode atingir antes que a função execute uma ação. Se não tiver valor, a função não executará ação nenhuma. *Valor padrão: 10*. -- `action`: a ação a ser tomada pela função sempre que a pontuação da requisição for maior ou igual ao limite definido. Valores possíveis: allow, custom_html, deny, drop, hold_connection, random_delay e redirect. *Valor padrão: allow*. -- `internal_logs`: toda execução do Bot Manager Lite grava logs de relatório, independentemente da pontuação da requisição. +- `threshold`: a pontuação máxima que a requisição pode atingir antes que a função execute uma ação. Se não tiver valor, a função não executará ação nenhuma. *Este template define um valor padrão de 10.* +- `action`: a ação a ser tomada pela função sempre que a pontuação da requisição for maior ou igual ao limite definido. Valores possíveis: `allow`, `custom_html`, `deny`, `drop`, `hold_connection`, `random_delay` e `redirect`. *Este template usa `allow` por padrão (modo de observação — as requisições não são bloqueadas).* +- `internal_logs`: controla quais requisições são registradas. O valor `"2"` registra todas as requisições independentemente da pontuação, o que é recomendado durante a fase inicial de observação. Você pode calibrar e editar os argumentos para ajustar melhor a integração às suas necessidades. Leia mais sobre [Como gerenciar bots](/pt-br/documentacao/produtos/guias/secure/gerenciar-bots/). diff --git a/src/content/docs/pt-br/pages/menu-principal/referencia/secure/edge-firewall/azion-bot-manager-lite.mdx b/src/content/docs/pt-br/pages/menu-principal/referencia/secure/edge-firewall/azion-bot-manager-lite.mdx index ed86384269..8967d6cc32 100644 --- a/src/content/docs/pt-br/pages/menu-principal/referencia/secure/edge-firewall/azion-bot-manager-lite.mdx +++ b/src/content/docs/pt-br/pages/menu-principal/referencia/secure/edge-firewall/azion-bot-manager-lite.mdx @@ -12,23 +12,49 @@ import LinkButton from 'azion-webkit/linkbutton'; # Visão Geral -Azion Bot Manager Lite v0.1.9 é uma integração serverless disponível no Marketplace da Azion, construída com uma function no Firewall. Ela analisa requisições e atribui um score, declinando ou cancelando requisições que excedem um limite predeterminado, ou permitindo-as por padrão. As ações disponíveis incluem allow, deny, drop, redirect, custom HTML, random delay e hold the connection. A integração detecta tráfego suspeito e bots maliciosos como web scraping e brute force. +Azion Bot Manager Lite v0.1.9 é uma integração serverless disponível no Marketplace da Azion, construída com uma function no Firewall. Ela analisa as requisições recebidas e atribui a cada uma uma pontuação com base em um conjunto de regras predefinidas. Quando a pontuação atinge ou excede o limite configurado, a função executa a ação definida. Se a pontuação ficar abaixo do limite, a requisição prossegue normalmente (`allow` é a ação padrão). Ações disponíveis: `allow`, `deny`, `drop`, `redirect`, `custom_html`, `random_delay` e `hold_connection`. A integração detecta tráfego suspeito e bots maliciosos, incluindo web scraping e ataques de força bruta. ## Detalhes da solução -Esta function avalia requisições e atribui uma pontuação com base em um conjunto de regras predefinidas. A ação tomada é configurada pelo cliente, podendo ser allow, deny, drop, redirect, custom HTML, random delay e hold the connection a requisição se a pontuação exceder um limite definido no JSON Args. Caso contrário, as regras do Firewall continuam a ser executadas normalmente. +A função avalia cada requisição e atribui uma pontuação com base em regras predefinidas. Você configura a ação e o limite nos JSON Args. Se a pontuação atingir ou exceder o limite, a função executa a ação configurada. Caso contrário, o Rules Engine do Firewall continua a ser executado normalmente. -## Regras +## Regras -O Bot Manager Lite conta atualmente com um sistema de regras, cada uma incrementando a pontuação da requisição dependendo de diferentes condições, como cabeçalhos HTTP específicos ou padrões de comportamento de bots. +O Bot Manager Lite avalia cada requisição com base em 17 regras. Cada regra correspondida incrementa a pontuação da requisição por um valor fixo. Quando a pontuação acumulada atinge ou excede o `threshold` configurado, a função executa a `action` configurada. + +| ID da Regra | Descrição | Incremento | Classe | +|---|---|---|---| +| 1 | `${http_user_agent}` está vazio | 8 | Assinaturas de bots maliciosos | +| 2 | `${http_content_type}` está vazio E `${request_body}` não está vazio | 8 | Assinaturas de bots maliciosos | +| 3 | `${http_referer}` está vazio E `${request_method}` é POST, PUT, PATCH ou DELETE | 6 | Intenção maliciosa | +| 4 | `${http_user_agent}` contém a string `Dalvik` | 4 | Assinaturas de bots maliciosos | +| 5 | `${http_user_agent}` contém a string `Trident` | 6 | Assinaturas de bots maliciosos | +| 6 | `${http_user_agent}` contém a string `Headless` | 6 | Assinaturas de bots maliciosos | +| 7 | `${http_user_agent}` tem mais de 200 ou menos de 10 caracteres | 4 | Assinaturas de bots maliciosos | +| 8 | `${http_user_agent}` corresponde a um user agent de bot malicioso conhecido | 8 | Bots scriptados | +| 9 | `${http_accept}` está vazio | 8 | Assinaturas de bots maliciosos | +| 10 | `${http_accept_language}` está vazio | 8 | Assinaturas de bots maliciosos | +| 11 | `${http_range}` está vazio | 6 | Intenção maliciosa | +| 12 | `${request_method}` é `TRACE` | 8 | Intenção maliciosa | +| 13 | `${http_content_length}` está vazio E `${request_method}` é POST, PUT ou PATCH | 8 | Assinaturas de bots maliciosos | +| 14 | O IP do cliente está em uma Network List de reputação configurada | 6 | Inteligência de Reputação | +| 15 | `${request_method}` é POST, PUT ou PATCH E `${cookie_az_botm}` está ausente | 8 | Comportamento malicioso de navegador | +| 16 | `${request_method}` é POST, PUT ou PATCH E `${cookie_az_asm}` está ausente | 8 | Comportamento malicioso de navegador | +| 17 | Violação de integridade dos cookies de sessão | 16 | Comportamento malicioso de navegador | + +:::note +As regras 15, 16 e 17 dependem do sistema de validação de cookies assinados integrado. Na primeira requisição de um navegador, o Bot Manager Lite define dois cookies de sessão: `az_botm` (um identificador único da requisição) e `az_asm` (uma versão assinada com HMAC do mesmo valor). Nas requisições seguintes, a função verifica se os dois cookies ainda são consistentes. Uma incompatibilidade aciona a regra 17. +::: + +Você pode desabilitar regras específicas usando o argumento `disabled_rules`. Consulte [Configure a função](#configure-a-funcao) para mais detalhes. ## Detalhes da function -A function é implementada em JavaScript e integra-se no Firewall. Os parâmetros configuráveis incluem a ação tomada, o limite de pontuação para acionar ações e logs detalhados transmitidos via Data Stream/Real-Time Events. +A função é implementada em JavaScript e é executada dentro do Firewall. Você configura seu comportamento por meio dos JSON Args. Os logs são transmitidos via Data Stream e Real-Time Events. ## Logs e integração -Os registros de log podem ser configurados para capturar uma ampla gama de dados de requisição, excluindo cabeçalhos sensíveis listados abaixo. A solução também valida endereços IP usando listas de reputação definidas nos JSON Args, aumentando a pontuação de ameaça da requisição. +Você pode configurar os registros de log para capturar uma ampla gama de dados de requisição, excluindo cabeçalhos sensíveis listados na descrição do argumento `log_headers`. A solução também valida endereços IP usando Network Lists de reputação definidas no argumento `reputation_network_lists`, aumentando a pontuação de ameaça das requisições correspondentes. ### Configure a função @@ -39,17 +65,18 @@ A função aceita os seguintes argumentos: | `action` | String | Sim | A ação a ser tomada pela função sempre que a pontuação da requisição for igual ou maior ao limite definido. Valores possíveis: `allow`, `deny`, `redirect`, `custom_html`, `drop`, `random_delay` e `hold_connection`. Saiba mais sobre a [configuração de actions](#configuracao-de-actions) | | `threshold` | Número | Sim | A pontuação máxima que a requisição pode atingir antes que a função execute uma ação. Se não tiver valor, a função não agirá | | `disabled_rules` | Array de números | Não | As regras a serem desativadas. Se uma regra estiver desabilitada, ela não será processada nem aumentará a pontuação da requisição | -| `internal_logs` | String | Não | A *Logging Class* que a função usará. Valores possíveis:
`0`: escrever logs se a pontuação da requisição for maior que 0.
`1`: escrever logs apenas se a pontuação da requisição for maior que 0, ou se a requisição for classificada como "Good Bot".
`2`: sempre escrever logs.
`3`: nunca escrever logs.
Valor padrão: `0`. Quando este campo não tiver valor ou tiver um valor inválido, a função usará o valor padrão. | -| `log_headers` | Array de strings | Não | Define quais cabeçalhos de requisição devem ser incluídos no log de relatórios da função. Por razões de segurança, os seguintes cabeçalhos são proibidos:
`authorization`, `cookie`, `proxy-authorization`, `set-cookie`, `x-csrf-token`, `x-api-key`, `x-amz-security-token`.
**Nota**: os valores dos cabeçalhos serão armazenados com codificação base64 | -| `log_tag` | String | Não | Uma tag para identificar nos logs a instância da função que gerou a requisição. É recomendado usar tags personalizadas e únicas | -| `session_signature_key` | String | Não | Essa string é usada para assinar, como dados criptografados, o cookie de sessão do bot assinado. Essa validação fornece proteção contra a manipulação do cookie. Se este campo não tiver valor ou tiver um valor inválido, a função usará o valor padrão `az` | -| `should_write_warning_logs` | Boolean | Não | Define se a função registrará logs de aviso no Real-Time Events. Valor padrão: `false`. | +| `internal_logs` | String | Não | A classe de logging que a função usará. Valores possíveis:
`"0"`: escrever logs se a pontuação da requisição for maior que 0 (padrão).
`"1"`: escrever logs apenas se a pontuação da requisição for maior que 0, ou se a requisição for classificada como Good Bot.
`"2"`: sempre escrever logs.
`"3"`: nunca escrever logs.
Quando este campo não tiver valor ou tiver um valor inválido, a função usará o valor padrão `"0"` | +| `log_headers` | Array de strings | Não | Define quais cabeçalhos de requisição devem ser incluídos no log de relatórios da função. Por razões de segurança, os seguintes cabeçalhos são proibidos: `authorization`, `cookie`, `proxy-authorization`, `set-cookie`, `x-csrf-token`, `x-api-key`, `x-amz-security-token`. **Nota**: os valores dos cabeçalhos serão armazenados com codificação base64 | +| `log_tag` | String | Não | Uma tag para identificar nos logs a instância da função que gerou a requisição. Use tags únicas ao executar múltiplas instâncias | +| `reputation_network_lists` | Array de números | Não | IDs de Network Lists usadas para validar o IP do cliente. Se o IP for encontrado em alguma lista, a pontuação da requisição aumenta 6 pontos por lista correspondida. Padrão: lista vazia | +| `session_signature_key` | String | Não | Assina o cookie de sessão `az_asm` usando HMAC para proteger contra adulteração de cookies. Se este campo não tiver valor ou tiver um valor inválido, a função usará o valor padrão `az` | +| `should_write_warning_logs` | Boolean | Não | Define se a função registrará logs de aviso no Real-Time Events. Valor padrão: `false` | ### Configuração de actions -Azion **Bot Manager Lite** é capaz de executar **7 ações diferentes** sempre que a pontuação da requisição for maior ou igual ao limite (threshold) definido. Saiba mais sobre cada action a seguir: +Azion Bot Manager Lite pode executar 7 ações diferentes sempre que a pontuação da requisição for maior ou igual ao limite (threshold) definido. Saiba mais sobre cada action a seguir: -1. `allow`: permite a continuação da requisição. Para habilitar esta ação, você deve declará-la da seguinte forma: +1. `allow`: permite a continuação da requisição. Para habilitar esta ação, declare-a da seguinte forma: ```json "action": "allow" @@ -57,9 +84,9 @@ Azion **Bot Manager Lite** é capaz de executar **7 ações diferentes** sempre Essa ação não requer argumentos adicionais. -Se o score for menor que o limiar predeterminado, a requisição será processada, sendo *allow* a ação default. +Se o score for menor que o limiar predeterminado, a requisição será processada — `allow` é a ação padrão. -2. `deny`: entrega uma resposta padrão com *Status Code 403*. Para habilitar esta ação, você deve declará-la da seguinte forma: +2. `deny`: entrega uma resposta padrão com *Status Code 403*. Para habilitar esta ação, declare-a da seguinte forma: ```json "action": "deny" @@ -67,7 +94,7 @@ Se o score for menor que o limiar predeterminado, a requisição será processad Essa ação não requer argumentos adicionais. -3. `drop`: encerra a requisição sem uma resposta ao usuário. Para habilitar esta ação, você deve declará-la da seguinte forma: +3. `drop`: encerra a requisição sem uma resposta ao usuário. Para habilitar esta ação, declare-a da seguinte forma: ```json "action": "drop" @@ -75,29 +102,29 @@ Essa ação não requer argumentos adicionais. Essa ação não requer argumentos adicionais. -4. `redirect`: permite que a requisição seja redirecionada para uma nova URL/localização quando o limite de segurança é atingido. Para habilitar esta ação, você deve declarar as variáveis como no exemplo: +4. `redirect`: redireciona a requisição para uma nova URL quando o limite de segurança é atingido. Para habilitar esta ação, declare as variáveis como no exemplo: ```json "action": "redirect", "redirect_to": "http://xxxxxxxxxx.map.azionedge.net/" ``` -Onde `redirect_to` define a nova URL/localização para redirecionar as requisições. Se este campo não estiver preenchido ou estiver preenchido com um valor que não seja uma string, a função se comportará como aconteceria com a ação `allow` habilitada. +Onde `redirect_to` define a nova URL para redirecionar a requisição. Se este campo não estiver preenchido ou estiver preenchido com um valor que não seja uma string, a função se comportará como se a ação `allow` estivesse habilitada. -5. `custom_html`: permite a entrega de conteúdo HTML personalizado ao usuário em caso de violação do limite. Para habilitar esta ação, você deve declarar as variáveis como no exemplo: +5. `custom_html`: entrega conteúdo HTML personalizado ao usuário em caso de violação do limite. Para habilitar esta ação, declare as variáveis como no exemplo: ```json "action": "custom_html", "custom_html": "This should be the custom HTML content", - "custom_status_code": 418, + "custom_status_code": 418 ``` -Onde `custom_html` define o conteúdo HTML a ser entregue e `custom_status_code` define o status code a ser entregue. +Onde `custom_html` define o conteúdo HTML a ser entregue e `custom_status_code` define o status code HTTP a ser retornado. -- Se `custom_html` não estiver preenchido ou estiver preenchido com um valor que não seja uma string, a função se comportará como aconteceria com a ação `allow` habilitada. -- Se `custom_status_code` não estiver preenchido ou estiver preenchido com um valor que não seja um número, o valor padrão será um *Status Code 200*. +- Se `custom_html` não estiver preenchido ou estiver preenchido com um valor que não seja uma string, a função se comportará como se a ação `allow` estivesse habilitada. +- Se `custom_status_code` não estiver preenchido ou estiver preenchido com um valor que não seja um número, o valor padrão será *Status Code 200*. -6. `random_delay`: faz com que a função espere por um período aleatório entre `1` e `10` segundos antes de permitir que a requisição prossiga. Para habilitar esta ação, você deve declará-la da seguinte forma: +6. `random_delay`: faz com que a função aguarde um período aleatório entre 1 e 10 segundos antes de permitir que a requisição prossiga. Para habilitar esta ação, declare-a da seguinte forma: ```json "action": "random_delay" @@ -105,7 +132,7 @@ Onde `custom_html` define o conteúdo HTML a ser entregue e `custom_status_code` Essa ação não requer argumentos adicionais. -7. `hold_connection`: retém a requisição, mantendo a conexão aberta por *1 minuto* antes de encerrá-la. Para habilitar esta ação, você deve declará-la da seguinte forma: +7. `hold_connection`: retém a requisição, mantendo a conexão aberta por 1 minuto antes de encerrá-la. Para habilitar esta ação, declare-a da seguinte forma: ```json "action": "hold_connection" @@ -114,11 +141,11 @@ Essa ação não requer argumentos adicionais. Essa ação não requer argumentos adicionais. :::note -Usando qualquer valor diferente de `allow`, `deny`, `redirect`, `custom_html`, `drop`, `random_delay` ou `hold_connection` para a variável `action`, a função executará a ação padrão, que é `allow`. +Usar qualquer valor diferente de `allow`, `deny`, `redirect`, `custom_html`, `drop`, `random_delay` ou `hold_connection` para a variável `action` faz com que a função execute a ação padrão: `allow`. ::: - + - + - +