I'm working on LDAP authentication for Apache2 HTTPD, and was wondering if it's possible to get Apache to authenticate to LDAP based on groups, but also depending on the URL that is provided. For example, if a user requests the following:
http://www.example.com/<a group name>/
Apache would request credentials and check against an LDAP directory service (OpenLDAP), to ensure that the user belongs to the "<a group name>" group. In essence, the user should be able to request any arbitrary resource, and Apache should be able to take the URL, extract the specific resource being requested, and ensure that the user belongs to a group by that same name.
I couldn't find any relevant information regarding extracting information from a URL request and processing that inside the Apache configuration files. Has anyone done something similiar to this?