Test Bot Manager Lite with the Starter Kit
Deploy the Bot Manager Lite Starter Kit template to get a sandbox that scores the requests you send from its test page.
You see Bot Manager Lite score a request you send yourself by deploying the Bot Manager Lite Starter Kit template from Azion Console.
The template deploys a sandbox: an application, a function that serves a test page, a firewall carrying a Bot Manager Lite function instance, and a domain that reaches them from a browser. It creates the firewall itself, so the deployment asks for no object you already run.
To add Bot Manager Lite to a firewall you already run, refer to Add Bot Manager Lite to a Firewall.
Prerequisites
- Bot Manager Lite installed from Marketplace. For more information, refer to Install Bot Manager Lite.
- Access to Azion Console. To sign in, refer to How to access Azion Console.
- The instance runs as a Functions instance, which can generate usage costs. For the metrics Bot Manager is billed on, refer to Pricing.
The template checks that Bot Manager Lite is installed before it creates anything. When it is not, the deployment fails and writes a log line naming the reason.
Deploy the template
To deploy the template in Azion Console:
Go to the Bot Manager Lite Starter Kit template.
In Applications Name, enter a name. The template gives the same name to the firewall instance it creates. A field marked with an asterisk is mandatory.
In Sample Function Name, enter a name for the function that serves the test page.
The deployment shows its log as it runs. When it finishes, the account carries the application, the function, the firewall, and the domain.
The domain takes a few minutes to propagate across Azion’s distributed infrastructure. Until it answers, the test page does not open in a browser.
What the template configures
The template creates four objects:
- An application with the Functions module turned on, which runs the sample function.
- A function that serves the test page and its request buttons.
- A firewall carrying a Bot Manager Lite function instance and a Rules Engine rule that runs it.
- A workload, which answers on a domain in the format
<id>.map.azionedge.net.
The instance is listed under the firewall’s Functions Instances tab, and the rule that runs it under the Rules Engine tab. The instance carries action set to deny, so a request that scores at or above the threshold receives a 403 response carrying Azion’s default error page. It also writes a report log line for every request it scores, which is what internal_logs controls.
Read and change that object in the instance’s Arguments section. The installed function publishes no argument schema, so the editor has no form to build from one and the object is written as raw JSON. Nothing validates it either: every key an instance carries is stored and read back exactly as it was sent, including a key the function never reads. For every argument an instance accepts, refer to Arguments.
The application serves the sample function rather than an origin you own, so the configuration is a demonstration rather than a running site. To reach the sandbox on a domain you own, add that domain to the workload the template created.
Send a good and a bad request
To score a request you send yourself:
In a browser, go to the domain the template created.
Select Send Request for the good request. The page renders a success message.
Select Send Request for the bad request. The page renders the 403 response the deny action returns.
Each request the page sends produces one report log line, whatever it scored.
To send a refused request to a location you choose instead of the default error page, set action to redirect and give redirect_to the destination. For more information, refer to Arguments.
Read what the instance scored
Read the report log lines in Real-Time Events, or forward them to a destination you own with Data Stream. For the fields a line carries, refer to Logs.
The scores the test page produces come from requests the sandbox shaped, not from traffic of your own. Set threshold and action from the scores your own traffic produces before an instance refuses anything in front of an application you run. For more information, refer to Monitor and calibrate Bot Manager.