Issue #766 has been reported by Adam Fate.

----------------------------------------
Bug #766: Executable plugin broken when using binaryAttribute as pivot
http://tools.lsc-project.org/issues/766

Author: Adam Fate
Status: New
Priority: Normal
Assigned to: 
Category: 
Target version: 
Problem in version: 


I am using the executable plugin as a destination service and am syncing from 
active directory. I am trying to use objectGUID as the pivot attribute. For 
example, on a particular LDAP entry, an LDAP search of active directory returns:

objectGUID:: awOS8elHDEiszxWm8l1aPA==

But, when I run LSC, the following is sent to my script:

objectguid:: awPvv73vv73vv71HDEjvv73vv70V77+977+9XVo8

I was able to fix the issue by modifying AbstractExecutableLdifService.java and 
changing the toLdif method. I changed the following line:

LdifLayout.printAttributeToStringBuffer(sb, attributeName, 
Collections.singletonList((Object)attributes.getStringValueAttribute(attributeName)));

to:

LdifLayout.printAttributeToStringBuffer(sb, attributeName, new 
ArrayList<Object>(attributes.getDatasets().values()));

I am fairly new to LDAP and LSC, so I am not sure if this breaks other things, 
but the proper string is now passed to my script...

Here is my connection information:

        <ldapConnection>
            <name>ldap-src-conn</name>
            <url>ldap://%LDAP_HOST%:%LDAP_PORT%/%LDAP_BASE_DN%</url>
            <username>%LDAP_USERNAME%</username>
            <password>%LDAP_PASSWORD%</password>
            <authentication>SIMPLE</authentication>
            <referral>IGNORE</referral>
            <derefAliases>NEVER</derefAliases>
            <version>VERSION_3</version>
            <pageSize>-1</pageSize>
            <factory>com.sun.jndi.ldap.LdapCtxFactory</factory>
            <tlsActivated>false</tlsActivated>
            <binaryAttributes>
                <string>objectguid</string>
            </binaryAttributes>
        </ldapConnection>

        <pluginConnection>
            <name>executable</name>
            <url>fake</url>
            <username>fake</username>
            <password>fake</password>
            <binaryAttributes>
                <string>objectguid</string>
            </binaryAttributes>
        </pluginConnection>
    </connections>


Here is my ldap source service:

            <ldapSourceService>
                <name>groups-source-service</name>
                <connection reference="ldap-src-conn" />
                <baseDn>%LDAP_BASE_DN%</baseDn>
                <pivotAttributes>
                    <string>objectguid</string>
                </pivotAttributes>
                <fetchedAttributes>
                    <!--<string>objectGUID</string>-->
                    <string>name</string>
                </fetchedAttributes>
                <getAllFilter>(&amp;(objectClass=group))</getAllFilter>
                
<getOneFilter>(&amp;(objectClass=group)(objectGUID={objectGUID}))</getOneFilter>
                
<cleanFilter>(&amp;(objectClass=group)(objectGUID={objectGUID}))</cleanFilter>
            </ldapSourceService>




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

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

Reply via email to