cbrandtbuffalo has asked for the wisdom of the Perl Monks concerning the following question:

On our web servers, we currently use a basic authentication mechanism and do authorization using DB lookups. We run mod_perl and Apache::DBI which caches DB handles, so this is all very fast.

We are looking at converting our authentication/authorization to LDAP, and in our tests the performance is about equal *if* the LDAP connection is also persistent. Yet in my searches, I can't find a module like Apache::DBI to provide a persistence mechanism for the LDAP connections. The closest I've found are cache and persistence directives for the mod_auth_ldap module for Apache 2. We're still on Apache 1 so that doesn't help me.

Do any of the wise monks out there know of a perl module that implements persistent LDAP connections? Any suggestions about how to do this? Do we need to write our own? Or is this a reason to upgrade to Apache 2.0?

Replies are listed 'Best First'.
Re: Persistent LDAP connections in Apache
by g0n (Priest) on Apr 25, 2005 at 15:39 UTC
      Ahhh, now that looks very promising. Have you used it in a mod_perl environment by any chance? On Solaris?
        (/me blushes) I haven't used it at all, although now I know it's there I will. I went searching for connection pooling & LDAP and found that module. The documentation does contain a detailed example of using it for LDAP connection pooling though.

        g0n, backpropagated monk
Re: Persistent LDAP connections in Apache
by idsfa (Vicar) on Apr 25, 2005 at 17:54 UTC

    auth_ldap is also available for Apache in the 1.x series.


    The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. -- Cyrus H. Gordon
Re: Persistent LDAP connections in Apache
by Kevad (Scribe) on Apr 25, 2005 at 15:36 UTC
      I checked that out and it appears to be a way to get object persistence using LDAP as a backend data store. I don't think it provides LDAP connection pooling.

      Maybe I'm missing something there?