Hi Phillip, On 01/11/2017 14:44, [email protected] wrote:
I try to sync our Active Directory with ApacheDS or 389-ds. I don't need the Password, just some user information. What I need is the attribute: "thumbnailPhoto" which is saved as binary/octed string in active directory. In the destination directory the attribute is named "imagePath". (I have to use a special scheme).here is my ldapConnection for the AD: <ldapConnection> <name>ad-conn</name> <url>ldap://dc.lklg.net:389/dc=lklg,dc=net</url> <username>******</username> <password>******</password> <authentication>SIMPLE</authentication> <referral>IGNORE</referral> <derefAliases>NEVER</derefAliases> <version>VERSION_3</version> <pageSize>1000</pageSize> <factory>com.sun.jndi.ldap.LdapCtxFactory</factory> <tlsActivated>false</tlsActivated> <binaryAttributes> <string>thumbnailPhoto</string> </binaryAttributes> </ldapConnection> the ldapSourceService: <ldapSourceService> <name>ad-lklg-user-source-service</name> <connection reference="ad-conn" /> <baseDn>ou=lklg-user,dc=lklg,dc=net</baseDn> <pivotAttributes> <string>sAMAccountName</string> </pivotAttributes> <fetchedAttributes> <string>mail</string> <string>employeeID</string> <string>displayName</string> <string>givenName</string> <string>sn</string> <string>title</string> <string>company</string> <string>department</string> <string>physicalDeliveryOfficeName</string> <string>streetAddress</string> <string>postalCode</string> <string>l</string> <string>st</string> <string>c</string> <string>wWWHomePage</string> <string>telephoneNumber</string> <string>homePhone</string> <string>mobile</string> <string>facsimileTelephoneNumber</string> <string>info</string> <string>thumbnailPhoto</string> <string>sAMAccountName</string> </fetchedAttributes> <getAllFilter>(&(mail=*)(objectClass=user))</getAllFilter> <getOneFilter>(&(sAMAccountName={sAMAccountName})(objectClass=user))</getOneFilter> <cleanFilter>(&(sAMAccountName={sAMAccountName})(objectClass=user))</cleanFilter> </ldapSourceService> If I try to map the attribute in the propertiesBasedSyncOptions: <dataset> <name>imagePath</name> <policy>KEEP</policy> <createValues> <string> srcBean.getDatasetFirstValueById("thumbnailPhoto") </string> </createValues> </dataset> The value is read as string (multiple value). Without a mapping (dataset config) the values are read as binary. In the LscBeam doc (_https://lsc-project.org/javadoc/2.1-SNAPSHOT/org/lsc/beans/LscBean.html_) I don't see a possibility to read the values as binary.
Set<Object> getDatasetById(final String id) will allow you to read values in raw format. But getDatasetValuesById and getDatasetFirstValueById will cast values to string.
Is there a way to sync binary values to a mapped attribute?
Unfortunately, LSC only handles string values when mapping two different attributes. I've created an issue in gitlab so we'll look into it (https://github.com/lsc-project/lsc/issues/27) -- Soisik _______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

