I'm dealing with a legacy system that uses Apache with mod_auth_basic and mod_authnz_ldap for authentication and authorization in given directories and those directories with an .htaccess file. The authenticated user is then provided to various CGI scripts.
I would like to force all usernames to lowercase within the Apache httpd.conf config file, if possible. This would allow me to skip updating tens of old CGI files to force the username to lowercase (where it is eventually used), by updating one configuration file and restarting the server.
The directory full of CGI scripts that I want to provide a lowercase username to is already protected by AuthType Basic
followed by AuthBasicProvider ldap
followed by an AuthLDAPURL
specific to my case. This authentication works.
I initially tried using mod_rewrite, not realizing until later that mod_rewrite is primarily for rewriting URLs.
Is this possible to do? Am I missing something that would allow me to force the username to lowercase via mod_auth_basic or mod_authnz_ldap?