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

Re: dynlist overlay and search filters



Alexandre SIMON wrote:

Hi world!

  I'm testing "dynlist overlay" with openldap-2.3.4.

  This is a great function, but I have some problems with filters when
expanding memberURL. I explain :


*** in slapd.conf I have: overlay dynlist dynlist-oc groupOfURLs dynlist-ad memberURL


*** I push in LDAP tree something like:

dn: cn=zz,ou=groups,ou=db-servusers,dc=ciril,dc=fr
objectClass: groupOfURLs
cn: zz
memberURL:
ldap:///ou=from-servusers,ou=users,ou=db-servusers,dc=ciril,dc=fr?mail?sub?(&(objectClass=person)(mail=*@ciril.fr))




*** when searching :
  /usr/local/openldap/bin/ldapsearch -LLL -b
cn=zz,ou=groups,ou=db-servusers,dc=ciril,dc=fr mail

 the answer is :
dn: cn=zz,ou=groups,ou=db-servusers,dc=ciril,dc=fr
mail: email1@ciril.fr
mail: email2@ciril.fr
mail: email3@ciril.fr
mail: ...

PS: I replace reals emails by [email(n)] just for no spam on our emails ;-)


*** but when searching with a filter :
/usr/local/openldap/bin/ldapsearch -LLL -b
cn=zz,ou=groups,ou=db-servusers,dc=ciril,dc '(mail=email1@=ciril.fr)' mail


or

  /usr/local/openldap/bin/ldapsearch -LLL -b
cn=zz,ou=groups,ou=db-servusers,dc=ciril,dc= '(mail=*)' mail

  I have no answer !

  It seems that filters are not applied after expanding memberURL...
  Do you confirm that ?!
  Will it be change in next versions ?!

  If searching with filters can not applied... dynlist function may be
limited : no ?!


The slapo-dynlist does one simple thing, which is not what you expect. It merges the contents of entries that match the searchFilter by expanding an URL. What you're trying to do is to have dynlist expand URLs and then apply the filter. This is not what it was designed for, and I think this is not something that is wise to design at all, because to make it work like that you should expand __all__ URLs that are defined in the scope for any search because otherwise you likely have no chance to determine if a dynamically generated entry is going to match the searchFilter. On the contrary, slapo-dynlist only expands those URLs that belong to entries matching the filter, and only for the requested attributes.

p.


SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497