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

Re: (ITS#3628) overlay to expand url during search



sebastien.georget@sophia.inria.fr wrote:

>Full_Name: Sebastien Georget
>Version: 2.2.20
>OS: RHEL 3
>URL: http://www-sop.inria.fr/dream/personnel/Sebastien.Georget/contribs/expandUrl-0.2.c
>Submission from: (NULL) (138.96.66.17)
>
>
>This small overlay follow URL attributes during a search operation. It was
>written to define (merge) groups this way :
>
>   dn: cn=test,ou=Group,dc=test
>   memberURL: ldap:///cn=test,ou=Group,o=org1,dc=test
>   memberURL: ldap:///cn=test,ou=Group,o=org2,dc=test
> 
>   dn: cn=test,ou=Group,o=org1,dc=test
>   memberUid: bob
> 
>   dn: cn=test,ou=Group,o=org2,dc=test
>   memberUid: alice
>
>
>The overlay is configured with the following directives in slapd.conf :
>   moduleload expandUrl
>   overlay expandUrl
>   expandUrl dn attr1 attr2
>
>The 3 parameters are :
>  - dn : the overlay will only operate on this dn
>  - attr1 : the overlay will look for URIs in this attribute
>            only the dn part of the uri is used
>  - attr2 : if target URIs contain this attribute the
>            values are merged in dn
>
>Once configured the result of ldapsearch -x -b "ou=Group,dc=test" is :
> dn: cn=test,ou=Group,dc=test
> memberURL: ldap:///cn=test,ou=Group,o=org1,dc=test
> memberURL: ldap:///cn=test,ou=Group,o=org2,dc=test
> memberUid: bob
> memberUid: alice 
>  
>
We developed a similar implementation at SysNet, initially based on a 
customer's request, which seems to be a bit more general, since it 
determines if some emtry's URL-valued attributes should be expanded 
based on the objectClass of the entry, and honors stuff like the 
intersection of the attribute list in the URL with the requested 
attributes, and applies to compare as well.  I'll check out if I get 
permission to post it to the ITS, in case anyone finds it useful.

Ciao, p.


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