Apache LDAP with local groups
- by Greg Ogle
I have a server that currently uses htpasswd to authenticate users. I'm migrating to using LDAP, but my LDAP server is only for user authentication, not allowing me to add groups.
I still need to use groups as they are used for access control via the Apache Directory tags in my configuration. The alternative is to revisit the access control altogether, using php or something of the sort to limit access.
this works for 'basic' authentication
<Directory /misc/www/html/site>
#LDAP & other config stuff irrelevant to issue
Require ldap-group cn=<service>,ou=Groups,dc=<service>,dc=<org>,dc=com
</Directory>
attempted
<Directory /misc/www/html/site>
#LDAP & other config stuff irrelevant to issue
#groups file from previous configuration using htpasswd
#tried to tweak to match new user format, but I don't think it looks up in here
AuthGroupFile /misc/www/htpasswd/groups
#added the group, which is how it works when using htpasswd
Require ldap-group cn=<service>,ou=Groups,dc=<service>,dc=<org>,dc=com group xyz
</Directory>