Join our Newsletter — 33% off our NHI Course
Home› Guides› Imperva Cloud WAF Configuration Guide: Origin Lockdown, Rules…
Guide Application Security

Imperva Cloud WAF Configuration Guide: Origin Lockdown, Rules and API Security

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 28 November 2026 13 min read
On this page

A cloud WAF protects an application only when every request has to pass through it, and an origin server that still answers direct traffic lets an attacker step around the whole service. This guide covers the customer-side configuration of Imperva Cloud WAF: locking the origin to Imperva, encrypting and authenticating the Imperva-to-origin leg, setting WAF rule actions and exceptions, using account-level policies, enabling API Security, and controlling the API credentials and console users that manage it all. It is for application security and platform engineers onboarding sites or reviewing an existing account. Setting names follow Imperva's Terraform provider documentation, which mirrors the Cloud Security Console and API; some features depend on your plan.

This is an independent guide from NHI Mgmt Group, based on Imperva's public documentation as of November 2026. It is not sponsored or reviewed by Imperva. Product features change, so confirm settings against Imperva's current documentation.

Key takeaways

  • Lock the origin first. Imperva's own best-practice guidance is to accept origin traffic only from Imperva's network, and to change the origin IP after onboarding so historic DNS records stop pointing at it.
  • Authenticate the back leg. Imperva-to-origin mutual TLS gives the origin cryptographic proof that a request came through Imperva; a shared origin secret header is weaker and does not stop network-level access.
  • Know each rule's action. Review the action for SQL injection, cross-site scripting, remote file inclusion, backdoor, bot and DDoS rules on every site rather than assuming the defaults suit you.
  • Keep exceptions narrow. Allowlisted IPs are not inspected, so every allowlist entry and rule exception needs an owner, a reason and a review date.
  • Treat API IDs and keys as privileged. They can change WAF policy across sites: give them expiry dates, store them in a secrets manager and restrict console users by approved IPs.

How Imperva Cloud WAF sits in front of the application

Sites are onboarded by pointing DNS (typically a CNAME to an Imperva-provided hostname) at Imperva's network of points of presence (PoPs). Imperva inspects requests and forwards allowed traffic to your origin. Imperva notes that for HTTPS sites both legs, client to PoP and PoP to origin, must be encrypted. For the general model and what a WAF can and cannot stop, see the Web Application Firewall Guide.

LayerWhere it is configuredWhat it controls
Site security rulesPer site (WAF settings; provider resource incapsula_waf_security_rule)Actions for built-in threat rules, bot access control and DDoS behaviour
Account policiesParent account (incapsula_policy), assigned to sub-accounts and sitesReusable ACL, allowlist (WHITELIST), file upload and WAF rules policies
Rule exceptionsPer site and rule (incapsula_security_rule_exception)Exclusions by IP, URL, country, continent, client application, user agent or parameter
Custom rulesPer site (incapsula_incap_rule)Filter expressions with actions such as alert, block request, block user, block IP and header rewrite or delete
API SecurityPer site and per API (incapsula_api_security_site_config, incapsula_api_security_api_config)Positive security model from uploaded OpenAPI specifications
Certificates and TLSPer site and accountInbound TLS versions and ciphers, HSTS, and mutual TLS to the origin

Origin lockdown: closing the bypass

Imperva's community best-practice post is direct: there is no reason for the origin to accept traffic from anywhere but Imperva's network. It also explains how origin addresses leak: through DNS settings, through TLS certificates that scanners index, and through DNS history services that record the address used before onboarding. An Imperva staff reply in March 2026 adds that an origin secret header is acceptable only if the risk is understood, because it does not stop network-level access, and that Imperva-to-origin mTLS is the option for high-security needs.

ControlWhat it provesStrengthOperational cost
Network allowlist of Imperva IP ranges at the origin firewall, security group or load balancerThe connection came from Imperva's networkStrong against direct access; does not distinguish your account from other Imperva customersRanges must be kept current
Imperva-to-origin mutual TLSThe client presenting the certificate holds your uploaded keyStrongest; ties traffic to your configurationCertificate lifecycle and origin TLS configuration
Origin secret header (added by a header rewrite rule, checked at the origin)The request carries a shared valueWeaker; leaks if logged and does not stop network accessLow; rotate the value
New origin IP after onboardingOld DNS history no longer points at the live originRemoves a common discovery pathOne-off change; no need to change hosting provider
  1. Find exposure: check whether the origin answers on its public IP for the site hostname, review the certificate on the origin for names that reveal it, and check what DNS history shows for the domain.
  2. Move the origin: after the site is onboarded, assign a new origin IP that has never been published in DNS.
  3. Allowlist Imperva only: at the origin firewall or cloud security group, allow HTTP and HTTPS only from Imperva's published IP ranges, and track changes to that list.
  4. Add mTLS to the origin: upload a client certificate and key as an Imperva-to-origin mTLS certificate (supported formats include PEM, DER, PFX and P12), associate it with the site, and configure the origin to require a client certificate from your CA.
  5. Test and roll back: confirm direct requests to the origin fail and requests through Imperva succeed. If the site breaks, roll back the origin firewall rule first, then the mTLS requirement, in that order.

For the origin certificate side, see the mTLS Guide; for CDN-fronted origins in general, see the CDN Security Guide.

WAF security rules and actions

The site security rules documented in Imperva's provider cover SQL injection, cross-site scripting, remote file inclusion, backdoor, bot access control and DDoS. Account-level WAF rules policies cover remote file inclusion, illegal resource access, cross-site scripting and SQL injection, with response data leak available on plans that include it.

RuleDocumented optionsConfiguration notes
SQL injection, cross-site scripting, remote file inclusion, illegal resource accessPolicy actions BLOCK, ALLOW, ALERT, BLOCK_USER, BLOCK_IP, IGNOREImperva's 2019 best-practice post says rules block by default except cross-site scripting, which starts as alert only. Check the current action on each site and move XSS to a blocking action once tuned.
BackdoorQuarantine URL (documented default), alert, disabledKeep quarantine on; investigate any hit as a possible compromise of the origin.
Bot access controlBlock bad bots (default true), challenge suspected bots (default true)Allow good bots you rely on; Imperva notes Cloud WAF sees requests before its separate bot protection module. See the Bot Management Guide.
DDoSActivation mode off, auto, on, adaptive; threshold 10 to 5,000 requests per second; unknown client challenge none, cookies (default), JavaScript, CAPTCHAThe best-practice post recommends automatic mode and a threshold that matches real traffic; adaptive mode adjusts thresholds daily. See the DDoS Protection Guide.
  • Block user versus block IP: Imperva tracks blocked users with a per-user cookie, and blocks cookieless sessions by IP for 10 minutes. Prefer block user where many clients share an IP (corporate proxies, mobile carriers).
  • Custom rules: use filter expressions for application-specific controls, for example blocking admin paths from outside approved ranges, and start new rules with the alert action.
  • Response data leak: where your plan includes it, add it to the WAF rules policy to catch sensitive data in responses.

Exceptions, allowlists and account policies

Exceptions are the most common way a well-configured WAF is weakened over time. Imperva states that allowlisted IPs are not inspected and recommends regular allowlist reviews.

  • Prefer narrow exceptions: an exception scoped to one rule, one URL and one parameter is far safer than an IP allowlist entry that skips inspection entirely.
  • Use account policies for consistency: policies are created at the parent account and assigned to sub-accounts and sites, so a single ACL or WAF rules policy can set a baseline everywhere. Policy exceptions can be scoped by geography, IP, URL, client ID or site ID.
  • Record ownership: put the owner, ticket and expiry in the policy or exception description, and review monthly.
  • Scanner traffic: if authorised scanners need to bypass the WAF, scope the exception to the scanner's addresses and the test window, and remove it afterwards.

API Security: positive security for documented APIs

API Security lets you upload an OpenAPI specification (OAS2 or OAS3) and enforce it. Requests are checked for invalid URLs, invalid methods, missing parameters and invalid parameter values, each with its own action: ALERT_ONLY, BLOCK_REQUEST, BLOCK_USER, BLOCK_IP or IGNORE. At site level the documented default for these violation actions is ALERT_ONLY.

  1. Upload specifications per API: set the base path where it differs from the specification, and add a description that identifies the owning team.
  2. Run in alert first: keep ALERT_ONLY while you compare violations with real traffic; specifications are often out of date.
  3. Enforce by violation type: move invalid URL and invalid method to blocking actions first (they rarely hit legitimate clients), then missing parameters, then invalid values.
  4. Consider API-only mode carefully: setting a site as API-only applies the positive model to all its traffic, and Imperva warns this may cause undesired blocking. It then requires an action for non-API traffic.
  5. Note documented limits: the provider documentation states the invalid parameter name action is not currently supported, so do not depend on it.

Positive security catches requests outside the contract but not authorisation flaws inside it. See the OWASP API Top 10 API1 Broken Object Level Authorization Guide.

Where identity fits: API clients and console users

Every automation that manages Imperva, including Terraform pipelines, authenticates with an API ID and API key. Those credentials can change WAF actions, exceptions and origin settings across sites, so they deserve the controls of any privileged machine identity.

  • Consent gate: an account administrator must enable API Client Creation Consent before API clients can be created this way; keep it limited to the team that manages automation.
  • Expiry and rotation: API clients take an expiration date, and changing it regenerates the key secret. Set expiries that match your rotation standard and rotate through the pipeline, not by hand.
  • Disabled until needed: the documented default for a new API client's enabled flag is false; enable only when the consumer is ready.
  • Secret handling: the provider reads credentials from INCAPSULA_API_ID and INCAPSULA_API_KEY; inject them from a secrets manager at run time, never commit them, and remember Terraform state can hold sensitive values. See How to find secrets in Terraform state.
  • Least privilege for people: create custom account roles from the permission list rather than giving everyone administrator rights, and set approved IPs so users can reach the Cloud Security Console UI and API only from known networks.
  • Audit trail: send the AUDIT producer (AUDIT_TRAIL dataset) to your SIEM so policy, exception and user changes are reviewable.

For the wider discipline, see the API Key Management Guide.

Rollout and change sequence

  1. Inventory: list sites, origins, current rule actions, policies, exceptions, API clients and console users.
  2. Secure management access: custom roles, approved IPs, expiring API clients stored in a secrets manager.
  3. Onboard in alert where unsure: new sites start with blocking for well-understood rules and alert for rules you need to tune.
  4. Lock the origin: new origin IP, Imperva-only allowlist, then mTLS.
  5. Tune and enforce: review Security Events, add narrow exceptions, then switch tuned rules to blocking actions.
  6. Add API Security: upload specifications in alert mode, then enforce by violation type.
  7. Manage as code: keep policies and rule actions in version control so every change is reviewed and can be reverted by re-applying the previous version.

Decision guidance

  • IP allowlist versus mTLS: do both where you can. If the origin cannot hold a firewall allowlist (some managed platforms), mTLS becomes the main control; an origin secret header alone is a documented, accepted-risk fallback.
  • Block user versus block IP: consumer apps behind shared IPs suit block user; APIs called by a known set of servers can use block IP.
  • Small estates: configure per site, focus on origin lockdown and rule actions, and use one or two account policies.
  • Large or multi-account estates: build baseline account policies, manage everything through Terraform with peer review, and report exception counts per site.

Detection and measurement

  • Logs: Imperva states it does not keep access logs for customers, so a SIEM log subscription is needed to pull or push logs into your own repository. Configure security event and audit trail feeds.
  • Origin monitoring: watch origin access logs for any request whose source is not an Imperva range, which indicates a bypass path.

Metrics:

  1. Percentage of sites whose origin rejects non-Imperva traffic (tested, not assumed).
  2. Percentage of sites using Imperva-to-origin mTLS.
  3. Number of rules in alert-only mode per site, and their age.
  4. Count of IP allowlist entries and exceptions without an owner or past their review date.
  5. Percentage of API endpoints covered by an enforced specification.
  6. API clients without an expiration date or unused for 90 days.

Framework mapping

Imperva controlNIST CSF 2.0NIST SP 800-53 Rev. 5Threats addressed
WAF rules and API SecurityPR.IR-01SC-7 Boundary Protection; SI-10 Information Input ValidationATT&CK T1190 Exploit Public-Facing Application; CAPEC-66 SQL Injection; CAPEC-63 Cross-Site Scripting
DDoS settingsPR.IR-01SC-5 Denial-of-service ProtectionT1498 Network Denial of Service; T1499 Endpoint Denial of Service
Origin lockdown and mTLSPR.DS-02SC-7; SC-8 Transmission Confidentiality and IntegrityT1596 Search Open Technical Databases (origin discovery via certificate and DNS records)
Roles, approved IPs, expiring API clientsPR.AA-05AC-6 Least Privilege; IA-5 Authenticator ManagementT1078.004 Cloud Accounts
Policy as code, SIEM and audit trailPR.PS-01; DE.AE-02CM-6 Configuration Settings; AU-6 Audit Record ReviewUnreviewed configuration drift

Common failure patterns

  • Reachable origin: the WAF is live but the origin still answers on its old, publicly recorded IP.
  • Origin secret as the only control: a shared header that appears in logs and leaves the network path open.
  • Alert mode forever: rules left in alert after onboarding because tuning never finished.
  • Broad allowlists: partner or office IP ranges allowlisted so their traffic is never inspected.
  • Specification drift: API Security enforced on an old OpenAPI file, causing blocks that lead teams to switch it off.
  • Long-lived automation keys: API clients with no expiry, held in pipeline variables or Terraform state without protection.

Practitioner checklist

  • Test every site's origin for direct reachability and move origins to unpublished IPs.
  • Restrict origin ingress to Imperva ranges and keep the list current.
  • Enable Imperva-to-origin mTLS on sensitive sites and require client certificates at the origin.
  • Review every site's rule actions, including XSS, backdoor, bot and DDoS settings.
  • Replace broad IP allowlists with narrow rule exceptions that have an owner and expiry.
  • Upload OpenAPI specifications and move API Security from alert to enforcement by violation type.
  • Give API clients expiry dates, store them in a secrets manager and rotate through the pipeline.
  • Use custom roles and approved IPs for console users.
  • Stream security events and the audit trail to your SIEM.

Standards and references

Related NHI Mgmt Group resources: Web Application Firewall Guide · Securing the web application firewall (WAF) itself · Web application firewall (WAF) health check · mTLS Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.