Skip to content

webserver_auth-7.x-2026.03

Choose a tag to compare

@bahusafoo bahusafoo released this 10 Jan 11:57
· 7 commits to main since this release

Webserver Authentication Module - Release Notes

Version 7.x-2026.01

Overview

This release brings critical bug fixes and new compatibility features for the Webserver Authentication module, addressing issues from the drupal.org issue queue that were closed due to Drupal 7 EOL.


Bug Fixes

Admin Lockout Fix (drupal.org/node/2859747)

Problem: Administrators and existing users were locked out immediately after enabling the module. The "Match external names to existing Drupal users" option (enabled by default) had no effect.

Cause: The check for webserver_auth_create_user (disabled by default) returned early in _webserver_auth_route() before the existing user matching logic could execute.

Fix: Moved the create_user check to after the existing user matching logic, allowing the two options to work independently as intended.

Watchdog Placeholder Bug

Problem: Usernames were not displaying in log messages.

Cause: Incorrect array syntax in watchdog() calls - used comma instead of => for placeholder arrays: array('@authname', $authname) instead of array('@authname' => $authname).

Fix: Corrected placeholder syntax in all affected watchdog() calls.


New Features

mod_auth_gssapi / Kerberos Compatibility (drupal.org/node/2859664)

Problem: The module was incompatible with Apache mod_auth_gssapi (Kerberos/SPNEGO authentication) because it logged users out whenever REMOTE_USER was empty. With GSSAPI, REMOTE_USER may only be set on certain paths, causing users to be logged out on AJAX requests or when navigating between protected and unprotected pages.

Solution: Added new configuration option "Logout the current user if the authname is empty" with smart defaults:

Server Environment Default Value Behavior
IIS Windows Auth TRUE (secure) Original behavior - logout on empty REMOTE_USER
Apache Basic Auth TRUE (secure) Original behavior - logout on empty REMOTE_USER
GSSAPI/Kerberos FALSE (auto-detected) Don't logout on empty REMOTE_USER

Auto-detection: During module installation, the following indicators trigger GSSAPI mode:

  • $_SERVER['GSS_NAME'] is set
  • $_SERVER['KRB5CCNAME'] is set
  • $_SERVER['AUTH_TYPE'] equals "NEGOTIATE"

Location: Admin → Configuration → People → Webserver authentication → Advanced settings


Cleanup

  • Removed duplicate packaging script entries from .info file
  • Updated version to 7.x-2026.01 format for Drupal 7 LTSR compatibility

Security Notes

This module has been reviewed for security. All database operations use Drupal's safe APIs, and XSS/CSRF protections are in place.

Note: The "User account modification" field (Advanced settings) allows arbitrary PHP execution. This is an intentional feature for customizing user creation, but should be left empty unless specifically needed. Only users with "administer site configuration" permission can modify this setting.


Upgrade Path

This is a drop-in replacement for version 7.x-1.6. No database updates required.

For existing installations: The new webserver_auth_logout_empty_remote_user variable will default to TRUE (secure behavior) if not explicitly set. This matches the original module behavior for IIS and standard Apache authentication setups.


Credits

Bug fixes backported from drupal.org issue queue:

  • #2859747 - Existing users are never matched unless creating new users is enabled (rkalinec)
  • #2859664 - When used with mod_auth_gssapi, the module may not be usable (rkalinec)