SlideShare a Scribd company logo
Synchronize AD and
OpenLDAP with LSC
Clément OUDOT
Table of contents
LDAP Synchronization Connector (LSC)
Active Directory specificities
Synchronize OpenLDAP and AD

2
Resume

3
Clément OUDOT
Engineer since 2003 at LINAGORA company
LinID Dream Team Manager: http://linid.org
Founder of LDAP Tool Box project:
http://ltb-project.org
Leader of LemonLDAP::NG project:
http://lemonldap-ng.org

4
LDAP Synchronization Connector

5
LDAP Synchronization Connector
Free software
BSD license
Written in Java
XML configuration files
http://lsc-project.org
LDAP Synchronization Connector
Synchronization :
– From/To LDAP, SQL, fichiers
– One-shot or continuous

CSV or LDIF exports of what has been
synchronized
Data manipulation engine: Javascript (Rhino),
Groovy
API LDAP for scripts
Main features
Source and destination connectors:
– LDAPv3 Directories
– JDBC compatible data bases
– Flat files
– Plugins: Google Apps, OBM, ...

LDAPv3 advanced support:
– StartTLS, LDAPS
– Paged result
– LDAP Sync (SyncRepl), Persistent search
How it works
Sync phase:
– Read all entries in source, get the pivot attribute
– For each entry, read entry in source and in destination,
using the pivot attribute
– Apply modifications or create the entry in destination

Clean phase:
– Read all entries in destination, get the pivot attribute
– For each entry, read entry in source using the pivot
attribute
– Delete entry in destination if not found in source
Configuration overview
<?xml version="1.0" ?>
<lsc xmlns="http://lsc-project.org/XSD/lsc-core2.0.xsd" revision="1">
<connections></connections>
<tasks></tasks>
</lsc>
LDAP connection

<ldapConnection>
<name>ldap-dst-conn</name>
<url>ldap://HOSTNAME/SUFFIX</url>
<username>DN</username>
<password>PWD</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>
</ldapConnection>
Database connection

<databaseConnection>
<name>jdbc-src-conn</name>
<url>jdbc:JDBC_URL</url>
<username>USER</username>
<password>PWD</password>
<driver>JDBC_DRIVER</driver>
</databaseConnection>
Tasks
Several tasks can be defined in one connector
For each task:
– Source service (using a connection definition)
– Destination service (using a connection
definition)
– Synchronization rules
<task>
<name>agent</name>
<bean>org.lsc.beans.SimpleBean</bean>
<databaseSourceService></databaseSourceService>
<ldapDestinationService></ldapDestinationService>
<propertiesBasedSyncOptions></propertiesBasedSyncOptions>
</task>
Available services
Source services
– databaseSourceService
– ldapSourceService
– asyncLdapSourceService

Destination services
– databaseDestinationService
– ldapDestinationService
Synchronization rules
<mainIdentifier>: how to compute the main
identifier (DN for an LDAP service)
<conditions>: allowed operations in the task
(create, update, delete, changeId)
<dataset>: mapping definition between source
and destination attribute
Examples
<dataset>
<name>objectClass</name>
<policy>KEEP</policy>
<forceValues>
<string>"top"</string>
<string>"person"</string>
<string>"organizationalPerson"</string>
<string>"inetOrgPerson"</string>
</forceValues>
</dataset>
<dataset>
<name>cn</name>
<policy>FORCE</policy>
<forceValues>
<string><[CDATA[
srcBean.getDatasetFirstValueById("FIRSTNAME") +
srcBean.getDatasetFirstValueById("NAME");
]]></string>
</forceValues>
</dataset>
LDAP Query Language
Access to srcLdap (source) and ldap
(destination) connection objects
Special functions:
– attribute(DN, attribute)
– search(base, filter)
– list(base, filter)
– read(base, filter)
– sup(DN, level)
srcLdap.attribute( srcLdap.list( "ou=services",
"uniqueMember=" + srcBean.getDistinguishName() + "" ),
'description').get(0)
Logs
Logback: http://logback.qos.ch/
Output formats:
– Standard : org.lsc.utils.output.LdifLayout
– LDIF: org.lsc.utils.output.LdifLayout
• <onlyLdif>true</onlyLdif>

– CSV: org.lsc.utils.output.CsvLayout
•
•
•
•
•

<logOperations>create,update</logOperations>
<attrs>dn;uid;sn;givenName;description;cn</attrs>
<separator>;</separator>
<outputHeader>true</outputHeader>
<taskNames>MyTask</taskNames>
Active Directory

19
Connection
No anonymous access
SSL required for some operations (password
change)
Paged result to avoid 1000 entries limit
Specific AD configuration to avoir 1500 values
limit (range)

20
Schema
Non standard objectclass user:
– top
• person
– organizationalPerson
» user
» InetOrgPerson

Non standard attributes:
– sAMAccountName
– unicodePwd
– ...

21
Password
Password can be written, cannot be read
Attribute unicodePwd (~ clear text)
Old password remain valid for one hour
Accepted password in the LDAP modify
operation are not always accepted to
authenticate (non ASCII characters...)

22
LSC helpers
aDTimeToUnixTimestamp(long aDTime)
Transform an AD timestamp to a Unix timestamp.
aDTimeToUnixTimestamp(String aDTimeString)
Helper method to automatically parse an AD timestamp from a String before
calling aDTimeToUnixTimestamp(long).
getAccountExpires(String expireDate)
Returns the accountexpires time in Microsoft format
getAccountExpires(String expireDate, String format)
Return the accountexpires time in specified format
getNumberOfWeeksSinceLastLogon(String lastLogonTimestamp)
Return the number of weeks since the last logon
getUnicodePwd(String password)
Encode a password so that it can be updated in Active Directory in the field
unicodePwd.

23
LSC helpers
unixTimestampToADTime(int unixTimestamp)
Transform a Unix timestamp to an AD timestamp.
unixTimestampToADTime(String unixTimestampString)
Helper method to automatically parse a Unix timestamp from a
String before calling unixTimestampToADTime(int).
userAccountControlCheck(int value, String constToCheck)
Check if a bit is set in UserAccountControl
userAccountControlSet(int origValue, String[] constToApply)
Set or unset some bits to a UserAccountControl attribute of an
AD
userAccountControlToggle(int value, String constToApply)
Toggle a bit in UserAccountControl

24
Synchronize OpenLDAP and AD

25
Main configuration
Create a simple LDAP to LDAP connector
Define specific connection parameters for AD
Use SSL to AD if you need to manage password
Define specific attributes needed in AD
Specify the search filters and the pivot attributes
Write datasets for non linear attribute mapping

26
The password problem
Several approaches:
– Use AD as the authentication referential, use
SASL from OpenLDAP to forward the
authentication to AD
– Keep a plain text or symmetric hashed password
in OpenLDAP, to push the password with LSC
– Catch the password when it is changed in AD,
trough SFU (Services For Unix), or with a
password filter DLL (example: PasswdHK)

27
Almost the end...

28
Thanks
Special thanks to:
– LDAPCon !
– Company LINAGORA
– All LiniD developers

Keep in touch:
– Identica: @coudot
– Twitter: @clementoudot @LinID_FOSS
– IRC: KPTN #LinID@freenode
– Web: http://linid.org

29
Thanks!

More Related Content

Similar to Synchronize AD and OpenLDAP with LSC (20)

PPT
LSC - Synchronizing identities @ Loadays 2010
RUDDER
 
ODP
LSC - Synchronizing identities @ Loadays 2010
Jonathan Clarke
 
ODP
Ldap Synchronization Connector @ 2011.RMLL
sbahloul
 
PPTX
Cause 2013: A Flexible Approach to Creating an Enterprise Directory
rwgorrel
 
PDF
RMLL 2014 - LDAP Synchronization Connector
Clément OUDOT
 
PDF
topic_2 computer system design&admin)part 2 A.pdf
francisnwaeze431
 
PDF
Practical-LDAP-and-Linux
Balaji Ravi
 
PDF
Auth2 and OpenID Connect support in LemonLDAP::NG, OW2online, June 2020
OW2
 
PDF
[OW2online 2020] LDAP Synchronization Connector
Worteks
 
PDF
LDAP Synchronization Connector presentation at LDAPCon 2009
Jonathan Clarke
 
PDF
LSC@LDAPCon 2011
sbahloul
 
PPT
UnderstandingLDAP.ppt
Efrizal Zaida
 
PPT
The Ldap Protocol
Glen Plantz
 
PDF
Do The Right Thing! How LDAP servers should help LDAP clients
LDAPCon
 
PDF
Ldap 121020013604-phpapp01
SANE Ibrahima
 
PDF
Ldap introduction (eng)
Anatoliy Okhotnikov
 
PDF
Connections Directory Integration: A Tour Through Best Practices for Directo...
Gabriella Davis
 
ODP
Ldap2010
CYJ
 
PPTX
Itpfldap aug2016
Mark Cairney
 
LSC - Synchronizing identities @ Loadays 2010
RUDDER
 
LSC - Synchronizing identities @ Loadays 2010
Jonathan Clarke
 
Ldap Synchronization Connector @ 2011.RMLL
sbahloul
 
Cause 2013: A Flexible Approach to Creating an Enterprise Directory
rwgorrel
 
RMLL 2014 - LDAP Synchronization Connector
Clément OUDOT
 
topic_2 computer system design&admin)part 2 A.pdf
francisnwaeze431
 
Practical-LDAP-and-Linux
Balaji Ravi
 
Auth2 and OpenID Connect support in LemonLDAP::NG, OW2online, June 2020
OW2
 
[OW2online 2020] LDAP Synchronization Connector
Worteks
 
LDAP Synchronization Connector presentation at LDAPCon 2009
Jonathan Clarke
 
LSC@LDAPCon 2011
sbahloul
 
UnderstandingLDAP.ppt
Efrizal Zaida
 
The Ldap Protocol
Glen Plantz
 
Do The Right Thing! How LDAP servers should help LDAP clients
LDAPCon
 
Ldap 121020013604-phpapp01
SANE Ibrahima
 
Ldap introduction (eng)
Anatoliy Okhotnikov
 
Connections Directory Integration: A Tour Through Best Practices for Directo...
Gabriella Davis
 
Ldap2010
CYJ
 
Itpfldap aug2016
Mark Cairney
 

More from LDAPCon (19)

ODP
Fusiondirectory: your infrastructure manager based on ldap
LDAPCon
 
PDF
Building Open Source Identity Management with FreeIPA
LDAPCon
 
PDF
Benchmarks on LDAP directories
LDAPCon
 
PDF
A Backend to tie them all?
LDAPCon
 
PDF
Update on the OpenDJ project
LDAPCon
 
PDF
Build your LDAP Web Interface with LinID Directory Manager
LDAPCon
 
PDF
LDAP Development Using Spring LDAP
LDAPCon
 
PDF
Distributed Virtual Transaction Directory Server
LDAPCon
 
PDF
What's New in OpenLDAP
LDAPCon
 
PDF
What makes a LDAP server running fast ? An bit of insight about the various b...
LDAPCon
 
PDF
Manage password policy in OpenLDAP
LDAPCon
 
PDF
OpenLDAP configuration brought to Apache Directory Studio
LDAPCon
 
PDF
Making Research "Social" using LDAP
LDAPCon
 
PDF
Bridging the gap: Adding missing client (security) features using OpenLDAP pr...
LDAPCon
 
PDF
Fortress Open Source IAM on LDAPv3
LDAPCon
 
PDF
eSCIMo - User Provisioning over Web
LDAPCon
 
PDF
Give a REST to your LDAP directory services
LDAPCon
 
PDF
How AD has been re-engineered to extend to the cloud
LDAPCon
 
PDF
IAM to IRM: The Shift to Identity Relationship Management
LDAPCon
 
Fusiondirectory: your infrastructure manager based on ldap
LDAPCon
 
Building Open Source Identity Management with FreeIPA
LDAPCon
 
Benchmarks on LDAP directories
LDAPCon
 
A Backend to tie them all?
LDAPCon
 
Update on the OpenDJ project
LDAPCon
 
Build your LDAP Web Interface with LinID Directory Manager
LDAPCon
 
LDAP Development Using Spring LDAP
LDAPCon
 
Distributed Virtual Transaction Directory Server
LDAPCon
 
What's New in OpenLDAP
LDAPCon
 
What makes a LDAP server running fast ? An bit of insight about the various b...
LDAPCon
 
Manage password policy in OpenLDAP
LDAPCon
 
OpenLDAP configuration brought to Apache Directory Studio
LDAPCon
 
Making Research "Social" using LDAP
LDAPCon
 
Bridging the gap: Adding missing client (security) features using OpenLDAP pr...
LDAPCon
 
Fortress Open Source IAM on LDAPv3
LDAPCon
 
eSCIMo - User Provisioning over Web
LDAPCon
 
Give a REST to your LDAP directory services
LDAPCon
 
How AD has been re-engineered to extend to the cloud
LDAPCon
 
IAM to IRM: The Shift to Identity Relationship Management
LDAPCon
 
Ad

Recently uploaded (20)

PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Ad

Synchronize AD and OpenLDAP with LSC