Drupal is a registered trademark of Dries Buytaert
Release: Module Filter 6.0.0 Major update available for module module_filter (6.0.0). Release: User Restrictions 2.1.1 Minor update available for module user_restrictions (2.1.1). Release: Opensolr Search 4.2.2 Minor update available for module opensolr_search (4.2.2). Release: Media Entity Calameo 2.0.0 Major update available for module media_entity_calameo (2.0.0). Release: Monster Menus 9.5.2 Minor update available for module monster_menus (9.5.2). Release: Monolog Datadog 3.0.2 Minor update available for module monolog_datadog (3.0.2). Release: Migrate Cron Scheduler 2.1.0 Minor update available for module migrate_cs (2.1.0). Release: Webform Ban 1.2.5 Minor update available for module webform_ban (1.2.5). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs. Module Revived: Disable Login Page 1.1.4 Module disable_login updated after 8 months of inactivity (1.1.4).

WAF helper

No security coverage
View on drupal.org

This module helps prevent Web Application Firewalls from incorrectly blocking legitimate Drupal administrative actions. It issues a secure, encrypted cookie to authorized users, which can then be used by the WAF to selectively relax its security rules for those users on specific paths.

WAF Helper sets a secure, HMAC-based cookie for authorized users so that ModSecurity (or any other WAF) can selectively relax rules on endpoints that trigger false positives — such as admin forms, layout builders, or content-editing routes — without weakening protection for the rest of the site.

The problem

Web Application Firewalls like ModSecurity with the OWASP Core Rule Set are essential for production sites, but their strict rules often flag legitimate Drupal admin actions (rich-text editing, layout building, REST API calls) as attacks. The common workaround — blanket rule exclusions — leaves the entire application exposed.

What this module does

  1. Issues a per-user HMAC cookie (HMAC-SHA256 of the user's UUID + a configurable salt, keyed with Drupal's private key) to users who hold the "Bypass ModSecurity WAF" permission.
  2. Validates the cookie on every request using a timing-safe comparison and automatically removes invalid or tampered cookies.
  3. Lets your WAF rules inspect the cookie to selectively lower the paranoia level or disable specific rules only for trusted sessions on targeted paths.

The module itself does not modify any WAF rules — it provides the trusted signal your WAF configuration can act on.

Features

  • Configurable cookie name, salt, and lifetime.
  • Secure defaults: HttpOnly, Secure, SameSite=Strict.
  • Extensible via hook_waf_helper_cookie_value_alter().

Requirements

  • Drupal 10 or 11
  • A WAF (e.g. ModSecurity + OWASP CRS) with the ability to inspect cookies in rule conditions

Activity

Tracked releases
1
Tracked since
Apr 2026
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.x-dev Dev Apr 13, 2026