[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: OpenLDAP as a Caching Proxy server



Am Wed, 14 Oct 2015 06:51:22 +0200
schrieb Dieter Klünter <dieter@dkluenter.de>:

> Am Tue, 13 Oct 2015 11:26:02 -0400
> schrieb Christian Tardif <christian.tardif@servinfo.ca>:
> 
> >  
> > 
> > Hi, 
> > 
> > I've been trying to setup a caching proxy server with OpenLDAP for
> > quite a long time, and it seems, from what I can see right now, that
> > the proxy stuff is working (I can log on on a server that points to
> > the proxy as its LDAP server), but the caching stuff doesn't seem to
> > work at all. EVERY request I'm doing is transferred to the AD (the
> > real LDAP server) behind the proxy LDAP. 
> > 
> > Here's how my pcache module is set. Not too sure though, how to
> > setup pcacheTemplates. Maybe that my error. One thing to note is
> > that no database is even created in /var/tmp/cache directory, as I
> > would expect.
> > 
> > 
> > moduleload pcache.la 
> > 
> > overlay pcache
> > pcache bdb 100000 3 1000 60
> > directory /var/tmp/cache
> > cachesize 150
> > index objectClass eq
> > index sAMAccountName eq
> > pcacheMaxQueries 100
> > pcacheAttrset 0 objectClass name objectSid
> > pcacheAttrset 1 objectClass sAMAccountName
> > pcacheAttrset 2 *
> > pcacheTemplate (&(member=)(objectClass=)(name=)) 0 60
> > pcacheTemplate (objectClass=) 0 60
> > pcacheTemplate (&(objectSid=)(objectClass=)(name=)) 0 60
> > pcacheTemplate
> > (&(?sAMAccountName=)(?objectClass=)(sAMAccountName=)(objectSid=)) 2
> > 60 pcacheTemplate (sAMAccountName=) 2 60
> > pcachePersist true  
> 
> The pcache Template has to match the search filter and only the
> referenced attribute set is cached.

Additional info: you may run slapd in debugging mode pcache.

-Dieter

-- 
Dieter Klünter | Systemberatung
http://sys4.de
GPG Key ID: E9ED159B
53°37'09,95"N
10°08'02,42"E