One of my favorite soapbox issues at work is the complete lack of a central, authoritative database of persons affiliated with Penn State and their statuses. I have worked on literally dozens of projects (some ongoing) that require some form of reliable, electronic method of determining whether an individual is affiliated with PSU and more importantly how they are affiliated. I know that there are dozens if not hundreds or thousands more spread out across the University in small IT shops and across colleges.
The main issue is of course political, but there are also technical hurdles to overcome. LDAP is a good start, but it’s far from authoritative and not always easy to work with. I’m currently trying to figure out how to limit access to a Wiki that’s using WebAccess (Cosign) and an extension that automatically creates user accounts in the Wiki based on the remote_user value. The problem is that WebAccess at PSU is not currently configured to use multi-factor authentication, so I can’t do an LDAP lookup in the same step that WA authenticates. I only need (and can only use) LDAP for authorization, but so far all attempts at using Apache modules to do the lookup after WA returns have blown up.
I tried the mod_authz_ldap module recommended by UMich with their patch for a basic auth. Of course the module wouldn’t build with the version of Apache on Red Hat Enterprise 4.5. I did plug through some of the Make errors, but it wasn’t really worth the time, since it turns out to have some serious flaws. I also tried the plain mod_auth_ldap that shipped with Apache on the RH box. It seemed to work, but then further testing revealed that it wasn’t applying the filters and the directive requiring the specific field I needed from LDAP would blow up – code 500.
The real irony here is that if the Wiki was written in Coldfusion, I could use some code I wrote for Dickinson Law last year and do the LDAP lookup in code. Instead, it’s a nightmare of hacked together PHP. Furthermore, I’m not sure that even with caching there wouldn’t be a performance hit from LDAP lookups on each request. What I’m now contemplating is a scheduled script, maybe CF or Perl or Python, that would query LDAP for the subset of users that I need and create a local file that could be used by the basic auth mechanism of Apache via a “require group” directive.
Even if that works, this is still a tremendous pain in the ass for a function that should be very straightforward. We really need to integrate our authentication and authorization systems, because most of us don’t have time to hack this kind of mess together – and we shouldn’t have to.
Update: Yeah, so I hacked an LDAP call into the auth plugin I’m using. It hits LDAP too much, but it seems to work. Bloody php hacks.
Share
Last modified: August 17, 2007 @ 12:16 pm