{ "mappings" : [ { "name" : "systemLdapAccounts_managedUser", "source" : "system/ldap/account", "target" : "managed/user", "validTarget" : { "type" : "text/javascript", "source" : "target.employeeType == 'external'" }, "properties" : [ { "source" : "name", "target" : "userName" }, { "source" : "lastname", "target" : "familyName" }, { "source" : "firstname", "target" : "givenName" }, { "source" : "email", "target" : "email" }, { "source" : "description", "target" : "description" }, { "source" : "userPassword", "target" : "password" }, { "default" : "external", "target" : "userType" } ], "onCreate" : { "type" : "text/javascript", "source" : "target.ldapPassword = null;target.adPassword = null;target._id = source.name;" }, "onUpdate" : { "type" : "text/javascript", "source" : "java.lang.System.out.println('Hallo: ' + source.userPassword+target.userPassword)" } }, { "name" : "managedUser_systemAdAccounts", "source" : "managed/user", "target" : "system/ad/account", "correlationQuery" : { "type" : "text/javascript", "file" : "script/name_eq_name_correlationQuery.js" }, "properties" : [ { "source" : "userName", "target" : "name" }, { "source" : "familyName", "target" : "lastname" }, { "source" : "givenName", "target" : "firstname" }, { "source" : "email", "target" : "email" }, { "source" : "password", "target" : "userPassword", "condition" : { "type" : "text/javascript", "file" : "script/ldapPassword_to_ad_condition.js" } }, { "default" : "defaultpwd", "target" : "IGNORE__PASSWORD__" } ], "policies" : [ { "situation" : "ABSENT", "action" : "CREATE" } ], "onCreate" : { "type" : "text/javascript", "source" : "target.userPassword = 'initial_Passw0rd'" } }, { "name" : "managedUser_systemLdapAccounts", "source" : "managed/user", "target" : "system/ldap/account", "links" : "systemLdapAccounts_managedUser", "correlationQuery" : { "type" : "text/javascript", "file" : "script/name_eq_name_correlationQuery.js" }, "validSource" : { "type" : "text/javascript", "source" : "source.adPassword != null" }, "properties" : [ { "source" : "userName", "target" : "name" }, { "source" : "familyName", "target" : "lastname" }, { "source" : "givenName", "target" : "firstname" }, { "source" : "email", "target" : "email" }, { "source" : "password", "target" : "__PASSWORD__", "condition" : { "type" : "text/javascript", "file" : "script/adPassword_to_ldap_condition.js" } } ], "policies" : [ { "situation" : "CONFIRMED", "comment" : "IGNORE during initial reconciles, UPDATE when all initial links in place", "action" : "UPDATE" }, { "situation" : "FOUND", "comment" : "LINK during initial reconciles, UPDATE when all initial links in place", "action" : "UPDATE" }, { "situation" : "ABSENT", "comment" : "IGNORE during initial reconciles", "action" : { "comment" : "CREATE if employee, IGNORE otherwise?", "type" : "text/javascript", "source" : "if (1>0) {'CREATE';} else {'IGNORE';}" } }, { "situation" : "AMBIGUOUS", "action" : "EXCEPTION" }, { "situation" : "MISSING", "action" : "EXCEPTION" }, { "situation" : "SOURCE_MISSING", "action" : "EXCEPTION" }, { "situation" : "UNQUALIFIED", "action" : "UNLINK" }, { "situation" : "UNASSIGNED", "action" : "EXCEPTION" } ] }, { "name" : "systemAdAccount_managedUser", "source" : "system/ad/account", "target" : "managed/user", "links" : "managedUser_systemAdAccounts", "validTarget" : { "type" : "text/javascript", "source" : "target.employeeType == 'internal'" }, "policies" : [ { "situation" : "UNQUALIFIED", "action" : "IGNORE" } ], "properties" : [ { "source" : "name", "target" : "userName" }, { "source" : "lastname", "target" : "familyName" }, { "source" : "firstname", "target" : "givenName" }, { "source" : "email", "target" : "email" } ] } ] }