Install
Works with Drupal: ^11.3 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
This release comes after a concerted effort to clear the issue backlog.
New features
Per-route credentials
Each protected route can now use its own username and password instead of only the site-wide pair. Leave the custom credentials off to use the site-wide credentials as before.
Key module integration
If the Key module is installed, you can supply the password from a password key (environment variable, file outside the web root, etc) instead of typing it into a field. When a key is selected the password field is hidden and any previously stored password value is removed from configuration. This works for both the site-wide credentials and per-route credentials. Key is optional but strongly recommended.
Settings UI for protected routes
Routes are now added, removed, and configured directly on the settings page, shown as a compact table with a checkbox per HTTP method.
Previously routes could only be defined by editing the configuration file. Editing configuration directly is still possible, but note that the format changed in this release: protected routes are now a list instead of a keyed mapping, flood_protection_enabled is a boolean instead of an integer, and credentials gained a password_key field. Existing configuration is converted automatically when you run database updates. The new format is documented in the README.
Compatibility
Supported core is now ^11.3 || ^12. Drupal 12 compatibility was added (Rector pass over the codebase), and support for Drupal 10 and for 11.x below 11.3 was dropped. Sites on those versions should stay on the 2.0.x line which will continue to recieve security coverage until Drupal 10 support lapses for core.
Bug fixes
Fixed a fatal error when a request path looked like an external URL (for example /tel:..., /mailto:..., /https://...). These paths no longer throw from Url::fromUserInput().
Warnings
Passwords without Key are stored in plain text. Without the Key module, every password lives in the site configuration, which means it is in the database, in every configuration export, and in every backup, readable by anyone with access to them. Install Key and use password keys if that matters to you.
Flood protection and reverse proxies. Flood protection reuses core's user.flood IP limit (50 failed attempts per hour per IP by default) and only counts requests that actually carry credentials. Behind a reverse proxy or load balancer, set Drupal's reverse proxy settings in settings.php so the real client IP is used. Otherwise every visitor shares the proxy's IP and one flooding client can lock everyone out.
Why beta
This release reworks the authentication internals: credential extraction, validation, resolution, and flood handling are now separate services, and the response subscriber was rewritten around them. On top of that it adds a new configuration UI, the per-route credentials model, Key integration, and a settings-format update path.
The beta exists so the reworked pipeline, the new configuration surface, and the upgrade path can be exercised on real sites before a stable 2.1.0. Test on a copy before running it in production.
Contributors (4)
darvanen, fmitchell, orlando.thoeny
Changelog
Issues: 11 issues resolved.
Changes since 2.0.0 (compare):
Bug
- fix: #3603890 Fatal InvalidArgumentException from Url::fromUserInput() when request path looks external (e.g. /tel:..., /mailto:..., /https://...)
Feature
- feat: #3480674 Add per-route credentials option and key module integration
Task
- task: #3026903: Make protected routes configurable within settings page
- task: #3026253 Create unit tests
- task: #3612285 Adjust supported core versions
- task: #3457987 Increase PHPStan level
- task: #3612479 Rector updates for Drupal 12
- task: #3026257 Create browser tests
This release contains work that was assisted by AI.