<?xml version="1.0" ?>
<lsc xmlns="http://lsc-project.org/XSD/lsc-core-2.3.xsd" xmlns:nis="http://lsc-project.org/XSD/lsc-nis-plugin-1.0"
	revision="0">
	<connections>
		<ldapConnection>
			<name>ldap-dst-conn</name>
			<url>ldap://localhost:33389/dc=lsc-project,dc=org</url>
			<username>cn=Directory Manager</username>
			<password>secret</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>
		<pluginConnection
			implementationClass="org.lsc.plugins.connectors.nis.generated.NisConnectionType">
			<name>nis-src-conn</name>
			<url>nis://192.168.183.129/lsc-project.org</url>
			<username>unused</username>
			<password>unused</password>
		</pluginConnection>
	</connections>
	<tasks>
		<task>
			<name>passwd</name>
			<bean>org.lsc.beans.SimpleBean</bean>
			<pluginSourceService implementationClass="org.lsc.plugins.connectors.nis.NisSrcService">
				<name>nis-source-service</name>
				<connection reference="nis-src-conn" />
				<nis:nisSourceServiceSettings>
					<name>nis-src-service</name>
					<connection reference="nis-src-conn" />
					<nis:map>passwd.byname</nis:map>
				</nis:nisSourceServiceSettings>
			</pluginSourceService>
			<ldapDestinationService>
				<name>opends-dst-service</name>
				<connection reference="ldap-dst-conn" />
				<baseDn>ou=People,dc=lsc-project,dc=org</baseDn>
				<pivotAttributes>
					<string>uid</string>
				</pivotAttributes>
				<fetchedAttributes>
					<string>description</string>
					<string>cn</string>
					<string>sn</string>
					<string>userPassword</string>
					<string>objectClass</string>
					<string>uid</string>
					<string>mail</string>
				</fetchedAttributes>
				<allEntriesFilter>"(objectClass=inetorgperson)"</allEntriesFilter>
				<oneEntryFilter>"(&amp;(objectClass=inetorgperson)(uid=" + pivotAttributes["uid"] + "))"</oneEntryFilter>
			</ldapDestinationService>
			<propertiesBasedSyncOptions>
				<mainIdentifier>"uid=" + srcBean.getAttributeFirstValueById("uid")
					+ ",ou=People,dc=lsc-project,dc=org"</mainIdentifier>
				<defaultDelimiter>;</defaultDelimiter>
				<defaultPolicy>FORCE</defaultPolicy>
				<dataset>
					<name>mail</name>
					<policy>FORCE</policy>
					<forceValues>
						<string>srcBean.getAttributeFirstValueById("uid") + "@lsc-project.org"</string>
					</forceValues>
				</dataset>
				<dataset>
					<name>userPassword</name>
					<policy>FORCE</policy>
					<forceValues>
						<string>srcBean.getAttributeFirstValueById("userPassword")</string>
					</forceValues>
				</dataset>
				<dataset>
					<name>objectClass</name>
					<policy>FORCE</policy>
					<forceValues>
						<string>"inetOrgPerson"</string>
					</forceValues>
				</dataset>
				<dataset>
					<name>sn</name>
					<policy>FORCE</policy>
					<forceValues>
						<string>srcBean.getAttributeFirstValueById("gecos")</string>
					</forceValues>
				</dataset>
			</propertiesBasedSyncOptions>
		</task>
	</tasks>
</lsc>
