Drupal is a registered trademark of Dries Buytaert
Views Bootstrap 5.5.2 Minor update available for module views_bootstrap (5.5.2). oEmbed Providers 3.0.0 Major update available for module oembed_providers (3.0.0). Byte (theme) 1.0.3 Minor update available for theme byte_theme (1.0.3). Token Content Access 3.1.3 Minor update available for module tca (3.1.3). Emulsify 7.2.1 Minor update available for theme emulsify (7.2.1). Opensolr Search 4.1.0 Minor update available for module opensolr_search (4.1.0). AG-UI 1.0.2 Minor update available for module agui (1.0.2). FileGate 1.5.0 Minor update available for module file_gate (1.5.0). oEmbed Providers 2.2.4 Module oembed_providers updated after 7 months of inactivity (2.2.4). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This recipe automates the installation and configuration of essential security modules to harden a Drupal site. It includes features for HTTP security headers, brute-force login prevention, automatic session expiry, strong password policies, disabling PHP execution in the admin UI, rate limiting, and IP banning. Sensible defaults are provided for various environments, with recommendations for post-application steps.

A Drupal recipe that installs and configures a practical baseline of security hardening modules for production sites.

What This Recipe Provides

This recipe automates the setup of essential security modules with sensible defaults:

  • Security Kit (SecKit) – HTTP security headers including Content Security Policy (CSP), X-Frame-Options, HSTS, and CSRF protection
  • Login Security – Brute-force login attack prevention with IP-based lockout
  • Autologout – Automatic idle session expiry for inactive users
  • Password Policy – Enforce strong password requirements (length, character types, username checking)
  • Paranoia – Block PHP code execution via the admin UI
  • Flood Control – Admin UI for managing IP-based rate limiting
  • Ban module(Drupal core) – IP address banning functionality

Safe Defaults for All Environments

The recipe uses conservative defaults that work in development, staging, and production:

  • HSTS is disabled by default – Enable it via Config Split or settings override once you're on HTTPS
  • CSP runs in report-only mode – Review violations at '/report-csp-violation' before enforcing
  • Autologout is disabled by default – Configure per-environment session rules as needed

Post-Apply Steps

  1. Review CSP violation reports and adjust your policy
  2. Enable HSTS in production environments only (via Config Split or settings.php)
  3. Configure autologout rules for your security requirements
  4. Test login lockout behavior to ensure legitimate users aren't blocked

Requirements

  • Drupal 10.3 or Drupal 11
  • All security module dependencies are installed automatically via Composer

Recommended companion project:

Recipes Manager makes recipes much easier to work with in real projects because it brings recipe discovery and management into the Drupal UI. If your team wants a smoother editorial and admin workflow for applying and reviewing recipes, this is the easiest way to get it.

Activity

Total releases
1
First release
Jun 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.x-dev Dev Jun 16, 2026