AI Model Serving & Inference OptimizationPlaybook3 min readUpdated September 2026

Tuning a Cloud WAF Without Blocking Real Traffic

Turning on a cloud provider's managed WAF ruleset takes minutes and covers the obvious attack signatures everyone already knows about. It also stops there: it has no idea what your application's actual API looks like, which means it's either missing rules that matter to you or blocking traffic that was never a threat.

The gap between "the WAF is on" and "the WAF's rules match what my app actually receives" is where most of the real hardening work happens.

Vendors Covered in this Article

Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.

A managed ruleset is a floor, not a finished job

Vendor-managed rulesets, the OWASP-style sets most cloud WAFs ship with, catch the broad, well-known patterns: SQL injection strings, path traversal attempts, common exploit payloads. That coverage is worth having on by default, but it's generic by design, written to apply across every application the vendor's customers run, not yours specifically.

Treat it as the floor you build on, not the ceiling. The custom rules you add on top of it are what actually reflect the paths, parameters, and payload shapes your application receives, and that's the part a generic ruleset can't do for you.

Write rules from what your app receives

Start from your own API surface: which paths exist, what type each parameter should be, what a legitimate payload looks like for the endpoints that matter most. Rules built from that shape catch things a generic signature misses and are far less likely to flag something legitimate as malicious.

This is also where attack surface scanning earns its keep. Attack surface scanning like Tenable's can tell you which endpoints are actually exposed to the internet, which is the starting point for deciding where WAF rules matter most, since it's common for a team to be surprised by an endpoint they forgot was public.

Test in log-only mode before you block

Every new custom rule should run in count or log-only mode first, recording what it would have matched without actually rejecting anything. Review a representative window of that log before flipping the rule to block, a few days at minimum, long enough to cover your actual traffic patterns rather than a quiet afternoon.

Skipping this step is how a well-intentioned rule turns into a support ticket queue, a legitimate field containing something that happens to look like a SQL keyword, a normal user agent that matches a pattern meant for a bot. Log-only mode catches that before a real user does.

A safe path for each new custom rule looks like this:

  1. Write the rule from your own API surface: the paths that exist, the expected type of each parameter, and what a legitimate payload looks like.
  2. Deploy it in count or log-only mode so it records what it would have matched without rejecting any traffic.
  3. Review a representative window of that log, a few days at minimum, long enough to cover your real traffic patterns rather than a quiet afternoon.
  4. Look for legitimate requests the rule would have blocked, and adjust the rule until those no longer match.
  5. Switch the rule to block only once the log looks clean, and keep watching for false positives after the change.

Rate-based rules for the traffic a signature can't catch

Credential stuffing and scraping don't look malicious in a single request, they look wrong in volume: the same endpoint hit far more often than a real user would, from a spread of IPs that doesn't match normal traffic. No signature rule catches that pattern, because no single request in it looks different from a legitimate one.

Pair your signature-based rules with rate-based rules scoped to the endpoints most worth protecting, login, password reset, checkout, and tune the threshold against your actual traffic rather than an arbitrary round number. Too low and you'll block real bursts of legitimate use; too high and the rule never fires.

Say a login endpoint normally sees a handful of attempts per IP in an hour from real users retrying a mistyped password. A rate rule set well above that baseline still catches a credential-stuffing run trying hundreds of password guesses against different accounts from the same source, without ever touching a legitimate user's retry.

What a WAF doesn't protect you from

A WAF is a perimeter layer, not a substitute for input validation, authorization checks, or actually patching a known vulnerability in your application. A WAF rule can shield a known issue while you work through your own patch timeline, but it isn't a fix, and federal patch guidance treats a known, exploited vulnerability as something to remediate in days, not quarters1.

Endpoint-level protection is a related but different layer worth reviewing separately, see a comparison of major endpoint platforms if you haven't settled on one. A WAF stops what reaches your application over HTTP; it does nothing for what happens on the machines running it.

Executive Capability Standard

What Good Looks Like

Good WAF configuration means rules are shaped around what your application actually receives, tested in log-only mode before they block anything, and reviewed whenever the app's shape changes, not left on default settings indefinitely.

Building The Capability (5-Stage Skill Ladder)

1. Learn:Read through your WAF provider's managed rule documentation next to your own application's actual API surface, so you know where the two don't line up.
2. Do Manually:Turn on log-only mode for any new custom rule and manually review a representative window of matches before switching it to block.
3. Delegate:Assign someone to own WAF rule review as part of the release process for any endpoint that changes the shape of expected requests.
4. Automate:Pair signature-based managed rules with automated rate-based rules so credential stuffing and scraping get caught even when no single request looks malicious.
5. Buy:Add attack surface scanning to find internet-exposed endpoints you didn't know were exposed, which tells you where WAF coverage matters most.

How to Get Started

Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.

Tenable

Attack surface scanning like Tenable's shows which endpoints are actually reachable from the internet, which is the starting point for deciding where WAF rules matter most.

Visit Tenable→

Frequently Asked Questions

Do I still need a WAF if I already validate input server side?

Yes. Server-side validation and a WAF cover overlapping but different ground, and defense in depth means a mistake in one layer doesn't leave you fully exposed. A WAF also catches volumetric and bot patterns that input validation alone was never designed to address.

What's the difference between a WAF and a regular firewall?

A traditional network firewall filters traffic by IP address and port. A WAF inspects HTTP-level application traffic, the actual request paths, headers, and payloads, which is where most application-layer attacks actually happen.

How often should I review WAF rules?

Whenever you ship an endpoint or a change that alters the shape of expected traffic, and on a regular cadence beyond that to review the blocked-request log for both missed attacks and false positives that crept in unnoticed.

Sources

Where we quote a benchmark, we show its source. Other figures in this guide are estimates or general guidance, so check them against your own numbers.

  1. Security patch remediation SLAs (CISA federal mandates, used as industry norm). CISA Binding Operational Directives 19-02 and 22-01 (CISA briefing hosted at NIST CSRC), 2022.

Related Guides