Hi David,

I agree with Clément, LSC is not handling such synchronization rule
automatically and you will have to write your own piece of Javascript code
or call a Java object.

Regards,

-- 
Sebastien BAHLOUL
IAM / Security specialist
Ldap Synchronization Connector : http://lsc-project.org
Blog : http://sbahloul.wordpress.com/



2012/4/26 Clément OUDOT <[email protected]>

> Le 26 avril 2012 16:10, David Coutadeur <[email protected]> a
> écrit :
> >
> > Hi everybody,
> >
> > I am facing a problem while adapting a specific rule of synchronization
> > to LSC configuration.
> > If anybody has already experienced such a configuration, help will be
> > much appreciated !
> >
> >
> > The goal is to make a dependance between an attribute value in the
> > destination and an attribute value in the source.
> >
> > Here is an example of such a rule:
> > "If attribute1 equals value1 in any source ldap entry, then put value2
> > in attribute2 in the corresponding destination entry".
> >
> > This rule means that:
> >
> > a. When adding "attribute1" with value "value1" in a source ldap entry,
> > attribute2 appears with value2 in the corresponding destination entry"
> > b. When deleting "attribute1" with value "value1" in a source ldap
> > entry, attribute2 with value "value2" is deleted in the corresponding
> > destination entry"
> >
> > Here is an example of what I found to best correspond to this rule:
> >
> > <dataset>
> >  <name>objectClass</name>
> >  <policy>MERGE</policy>
> >  <defaultValues></defaultValues>
> >  <forceValues>
> >  <string>
> >  <![CDATA[
> >   js: var attribute1 = srcBean.getDatasetFirstValueById("attribute1");
> >   if(attribute1 == "value1")
> >   {
> >    "objectClass1";
> >   }
> >   else
> >   {
> >    "objectClass2";
> >   }
> >  ]]>
> >  </string>
> >  </forceValues>
> >  <createValues></createValues>
> >  <delimiter>,</delimiter>
> > </dataset>
> >
> >
> > In this case :
> > attribute1 = attribute1
> > value1 = value1
> > attribute2 = objectClass
> > value2 = objecClass1
> >
> > I have specially chosen objectClass as second attribute to show that LSC
> > must not touch to any other objectClass values.
> >
> >
> > However this example does not work for deletion. (my point a.) It works
> > perfectly for adding.
> > I would like to know :
> > 1. if somebody has already tried something like that ?
> > 2. if this is even possible ?
> > 3. if somebody has already done this, how did he do ? And particularly
> > what are the policy and {create,force,default}Values best adapted for
> this ?
> >
>
> Hi David,
>
> maybe you can try to get existing destination values with dstBean, and
> use a FORCE policy. In your js script, you will do "by hand" the merge
> between existing values and forced values.
>
> Clément.
> _______________________________________________________________
> Ldap Synchronization Connector (LSC) - http://lsc-project.org
>
> lsc-users mailing list
> [email protected]
> http://lists.lsc-project.org/listinfo/lsc-users
>
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to