Skip to main content

AWS Web Application Firewall

AWS WAF API Security

Why AWS WAF API Security?

The AWS WAF API Security managed rule group is part of the overall solution enabling you to discover every API behind Amazon API Gateway, Application Load Balancers, and Amazon CloudFront across your AWS Organization and protect them using AWS WAF.

Discovery is available through the new API Gateway API Portal, which identifies the APIs automatically from traffic logs and service configuration records, with no agents to deploy or logs to forward. The API Portal classifies the APIs it finds, identifies zombie and shadow APIs, evaluates each API’s security posture, and reports findings, including the ones that are missing WAF protections. For unprotected APIs, customers can enable protection using WAF.

Protection is available through the new AWS WAF API Security managed rule group, which protects your APIs against the most exploited API attack categories: Broken Object Level Authorization (BOLA), where the attackers change record IDs in requests to read other users' data, Broken Authentication and Credential Stuffing, where the attackers forge tokens or try stolen passwords at scale, and API Reconnaissance and Enumeration, where the attackers map an API by guessing hidden routes and probing for exposed docs. The events detected by WAF are consolidated into the API Portal findings to provide a complete security picture of your APIs. You can use API Security alongside other AWS Managed Rules or your own custom rules to protect your applications.

Together, API Portal and API Security provide you a complete solution from discovery of all APIs in your AWS environment to protecting them, without having to write any custom rules.

Benefits of AWS WAF API Security

    Enable API Security by adding the AWS WAF API Security managed rule group to a web ACL - no agent, no sensor, no SDK, no DNS change, and no traffic redirect. The rule group runs inline where your requests arrive, making it easy to add protection to APIs already behind AWS WAF.

    Deterministic rules evaluate each request independently and take effect immediately, with no learning period. Behavioral detections add what a single request cannot show: they establish a baseline from your traffic and score each caller's activity across your endpoints to surface attacks that only appear as a pattern over many requests.

    Every detection adds a label that appears in your AWS WAF logs, Amazon CloudWatch metrics, and sampled requests - so API Security findings show up alongside your existing WAF telemetry, not in a separate console. Each finding identifies what was detected and includes a confidence level that reflects how many benign explanations were ruled out.

    API Security works with no additional configuration out of the box, and is customizable where you need it. You can override the action on any rule, scope down which endpoints are evaluated, pin a version, and write your own rules against the labels the rule group adds.

    Most WAF protections evaluate one request at a time. When API Security identifies a caller as abusive, it can carry that determination forward to the caller's subsequent requests across every endpoint you protect — so your rules can respond to the attacker, not just to a single request.

Use cases

    API Security identifies security issues with JWT tokens like unsigned tokens, empty signatures, embedded keys or certificate chains, remote key URLs, and path traversal or injection in key identifiers. With mitigation rules, these are stopped before the request reaches your API. API Security reads tokens from the Authorization header and inspects their structure; signature validation remains with your application.

    A caller working through object identifiers one at a time, or trying one credential after another, looks unremarkable in any single request. API Security scores each caller's activity across your endpoints over time, making broken object level authorization (BOLA) attacks and credential stuffing against the Authorization header visible as patterns you can block. For credentials sent in a request body, use AWS WAF Fraud Control - Account Takeover Prevention (ATP).

    Attackers map an API before they exploit it - requesting documentation paths, guessing routes and URL parameters that were never published, and sweeping endpoints to learn the attack surface. API Security is designed to detect this activity as reconnaissance, giving you early warning while a caller is still probing rather than after it has found something to exploit.

    Many deployments expose APIs through more than one entry point, each with its own logs, limits, and configuration. Because API Security runs in AWS WAF, a single rule group covers the APIs behind supported resources you associate with your web ACL — one set of detections, labels, and actions instead of a separate security posture for each.