Subchapter 96.7
references/protecting-logins-and-signups-with-fraud-control.mdMarkdown9 KBView on GitHub
Domain expertise for AWS WAF Fraud Control: the Account Takeover Prevention (ATP) managed rule group for login protection and the Account Creation Fraud Prevention (ACFP) managed rule group for signup protection. Covers why rate limiting misses this abuse, the mandatory application integration SDK, the CloudFront-only limitation on response inspection and its workaround, and the Count-first tuning path.
Does not cover generic rate limiting (the rate-based reference) or bot detection (the bot references). Those are separate.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging, observability). Fall back to the AWS CLI otherwise.
To protect logins and signups end to end, follow the procedure exactly. See the Procedure section below.
The procedure covers:
| Threat | Rule group |
|---|---|
| Credential stuffing against a login page | Account Takeover Prevention (ATP) |
| Fake-account creation against a signup page | Account Creation Fraud Prevention (ACFP) |
| Both | Add both rule groups |
Constraints:
Both rule groups rely on session tokens that the application integration SDK issues. Without it the protection is weak.
Constraints:
Response inspection (tracking login success and failure) is available only on web ACLs protecting CloudFront distributions.
Constraints:
VolumetricIpFailedLoginResponseHigh and VolumetricSessionFailedLoginResponseHigh will not fireTurning these rule groups straight to Block risks locking out real users on a busy login page.
Constraints:
Rate limiting misses distributed, low-rate account abuse. Add ATP (Decision: ATP, ACFP, or both).
Response inspection is CloudFront only. Put CloudFront in front of the ALB (Response inspection is CloudFront only).
The SDK is not integrated. Integrate it (The SDK is mandatory).
This procedure adds ATP, ACFP, or both with the SDK, configures inspection, runs in Count, then maps labels to actions, and surfaces the console link.
ATP, ACFP, or both.Constraints for parameter acquisition:
Constraints:
aws sts get-caller-identityConstraints:
You MUST add ATP with the login path, and ACFP with both the registration and creation paths, configuring request inspection for the username, password, and (ACFP) email fields
You MUST configure response inspection only on a CloudFront web ACL
You MUST fetch the current LockToken before update-web-acl and pass the full rule set
You MUST preserve the web ACL’s existing DefaultAction from the get-web-acl response and pass
it back as {default_action}; do not assume Allow={}, since that would silently open all
unmatched traffic on a web ACL whose default action is Block. For example, adding ATP with
request inspection on the login path:
aws wafv2 get-web-acl --name {web_acl_name} --scope {scope} --id {web_acl_id} --region {region}
aws wafv2 update-web-acl --name {web_acl_name} --scope {scope} --id {web_acl_id} \
--lock-token {lock_token} --default-action {default_action} \
--rules '[{"Name":"AWS-ATP","Priority":1,"Statement":{"ManagedRuleGroupStatement":{"VendorName":"AWS","Name":"AWSManagedRulesATPRuleSet","ManagedRuleGroupConfigs":[{"AWSManagedRulesATPRuleSet":{"LoginPath":"{login_path}","RequestInspection":{"PayloadType":"JSON","UsernameField":{"Identifier":"/username"},"PasswordField":{"Identifier":"/password"}}}}]}},"OverrideAction":{"Count":{}},"VisibilityConfig":{"SampledRequestsEnabled":true,"CloudWatchMetricsEnabled":true,"MetricName":"AWS-ATP"}}]' \
--visibility-config SampledRequestsEnabled=true,CloudWatchMetricsEnabled=true,MetricName={web_acl_name} \
--region {region}ACFP uses AWSManagedRulesACFPRuleSet with RegistrationPagePath, CreationPath, and its own
RequestInspection (including the email field); add a ResponseInspection block only on a
CloudFront web ACL
Constraints:
Constraints:
You MUST present the web ACL console link and tell the customer to confirm the Fraud Control rules and their actions:
https://us-east-1.console.aws.amazon.com/wafv2/homev2/web-acls?region={region}{
"web_acl_name": "example-cf-webacl",
"web_acl_id": "abc",
"scope": "CLOUDFRONT",
"rule_groups": ["ATP"],
"login_path": "/api/login"
}Confirmed the SDK is integrated and the resource is CloudFront, so response inspection is available.
Added ATP on /api/login with request and response inspection, in Count.
Reviewed labels, mapped the compromised-credential label to Block, then enforced.
Open the web ACL and confirm the Fraud Control rules:
https://us-east-1.console.aws.amazon.com/wafv2/homev2/web-acls?region=us-east-1Rate limiting misses it. Add ATP (Step 2).
Response inspection is CloudFront only. Front the ALB with CloudFront (Step 1).
This procedure modifies a security control, so misconfiguration directly weakens the application’s defenses.
wafv2: actions a task needs (for example wafv2:GetWebACL and wafv2:UpdateWebACL) rather than wafv2:* or the AWSWAFFullAccess managed policy.aws sts assume-role) rather than long-lived IAM user access keys when running these WAF CLI commands.wafv2 management events and set CloudWatch alarms on critical web ACL configuration changes (such as DeleteWebACL and UpdateWebACL rule removals) and on the web ACL’s BlockedRequests and CountedRequests metrics, so rule changes and sudden spikes in blocked or counted traffic are detected.