Apache LDAP with local groups

Posted by Greg Ogle on Server Fault See other posts from Server Fault or by Greg Ogle
Published on 2012-12-14T20:52:37Z Indexed on 2012/12/14 23:07 UTC
Read the original article Hit count: 223

Filed under:
|

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>

© Server Fault or respective owner

Related posts about apache2

Related posts about ldap