Bot-scoring perimeter for authentication flows
Score the login, signup, and checkout requests with Bot Manager from Firewall rules, and let each score pass, challenge, or deny the request.
Fraud and security teams use this design to protect sensitive transactions on login, signup, and checkout. Credential stuffing, fake account creation, and card testing arrive on those three paths, before the identity system or the payment flow.
Firewall rules hand only those paths to Bot Manager, and each score decides whether the request passes, is challenged, or is denied. WAF scores the same paths for attack payloads, and Data Stream sends the Bot Manager decisions to the tools of the fraud team.
This design is the architecture of the use case Block account takeover on login and checkout flows.
Architecture diagram
Solid arrows carry the request, dotted arrows carry the response, and thick arrows carry the report lines, which run apart from any request. Each label starts with the number of the dataflow step it belongs to.
Dataflow
- A request to a domain of a Workload reaches the Firewall that the Workload’s deployment sets. The first rule runs ALTCHA, a challenge Function from Azion Marketplace. ALTCHA validates the session cookie of a client that already solved a challenge.
- On
/login,/signup, and/checkout, a rule applies the WAF rule set. WAF scores the request for attack payloads, such as an injection in a form field. In Blocking, a request whose score reaches the threshold of a threat family receives400. - On
/loginand/signup, theauth-login-challengeinstance of Bot Manager scores the request for automation. At or above its threshold, the instance redirects the client. The redirected request returns to the Firewall, where ALTCHA answers with the challenge page. - On
/checkout, theauth-checkout-denyinstance scores the request and answers403at or above its threshold. A script that tests cards has no person behind it to solve a challenge, so this instance denies instead of redirecting. - A request under the threshold, or on any other path, reaches the Application, which sends it to the identity system or the payment flow. The response returns through the Application.
- Each Bot Manager instance writes a report line that names the request, its score, the rules it matched, and the action taken. Real-Time Events holds the line, and Data Stream sends it to the tools of the fraud team and to its SIEM.
ALTCHA and WAF act before the paths split. A Firewall runs its rules in order, and no rule acts on a request that an earlier rule stopped. One instance holds one threshold and one action, so login and checkout take an instance each. Requests to every other path reach the Application with no Bot Manager score.
A refusal, a redirect, and a challenge page each leave from the Firewall rule that gives them and go straight to the client. The Application never receives those requests.
Components
- Firewall: holds the rules scoped by path. Each kind of path has its own rule and its own Bot Manager instance. The criteria of the rule decide which requests the instance scores at all. The rules run in order, so the rule that runs ALTCHA sits above the Bot Manager rules.
- Bot Manager: scores each request for automation and runs the action of its Function Instance once the score reaches the threshold. The Run Function behavior of a rule runs the instance, in either edition: Bot Manager, or Bot Manager Lite from Azion Marketplace. This design uses two of the seven actions,
redirectanddeny, and Arguments describes the other five. - WAF: scores the same three paths for attack payloads, such as an injection in a login or checkout form. Bot Manager does not inspect a request for application vulnerabilities, so WAF covers that part of each request on these paths.
- Functions: runs ALTCHA, a challenge from Azion Marketplace, as a Function on the Firewall. It also runs any risk check the team writes for the
firewallexecution environment, on the same paths. - Data Stream: sends the Functions data source, which carries the Bot Manager report lines, to the endpoint that the fraud team reads.
- SIEM: the integration where the fraud team correlates the Bot Manager decisions with its own signals.
- Real-Time Events: keeps each report line for 7 days, with its score and the rules it matched, so an analyst can read one decision there.
Implementation
- Block account takeover on login and checkout flows - builds this design end to end: the observation window, the two instances and their thresholds, the WAF rule set, and the checks for each.
- Run Bot Manager on selected paths - runs one instance per path, such as a login or a checkout, each with its own threshold, action, and log tag.
- Run Bot Manager in observation mode - creates an instance with
actionset toallow, so every request is scored and none is refused while the thresholds are set. - Protect a route with an ALTCHA challenge - runs ALTCHA as a Function on the Firewall, with the rule that serves its challenge page.
- Install Bot Manager Lite - installs the Azion Marketplace edition of Bot Manager, with its Function Instance and the rule that runs it.
- Create and apply a WAF rule set - creates a rule set with all eight threat families at
mediumand applies it with Set WAF. - Apply a rule set to selected paths in Logging - applies the rule set to the login and checkout paths in Logging, before it refuses anything.
- Check or change the WAF mode - moves the WAF rule to Blocking.
- Read the report log for one instance - queries the report lines of one instance and reads the score of one request.
- Debug functions with Data Stream - streams the log messages of your Functions, the Bot Manager report lines among them, to an endpoint.