我在 ForgeRock openIDM 中创建了一个自定义用户对象。在 openIDM 中创建用户时,它会在 openDJ 中同步。但是当我更新时,用户数据没有同步。
当我删除 openIDM 和 openDJ 的映射并创建新映射时,同步可以正常工作一段时间,然后它会停止工作。我必须再次删除旧映射并创建新映射。有没有办法解决这个问题?如果有人知道解决方法,请帮助我。
我在 openIDM 中托管/用户到 system/ldap/account 的 Sync.json 映射如下所示,
{
"enableSync" : true,
"source" : "managed/user",
"onCreate" : {
"source" : "target.dn='uid='+source.loginId+','+source.ou",
"type" : "text/javascript"
},
"name" : "managedUser_sourceLdapAccount",
"target" : "system/ldap/account",
"properties" : [
{
"source" : "givenName",
"target" : "givenName"
},
{
"source" : "description",
"target" : "description"
},
{
"source" : "familyName",
"target" : "familyName"
},
{
"source" : "gender",
"target" : "gender"
},
{
"source" : "mobilePhone",
"target" : "mobilePhone"
},
{
"source" : "emailAddress",
"target" : "mail"
},
{
"source" : "homePhone",
"target" : "homePhone"
},
{
"source" : "workPhone",
"target" : "workPhone"
},
{
"source" : "_id",
"target" : "userUUID"
},
{
"source" : "middleName",
"target" : "sn"
},
{
"source" : "birthDay",
"target" : "birthDay"
},
{
"source" : "country",
"target" : "pcountry"
},
{
"target" : "cn",
"source" : "",
"transform" : {
"source" : "source.displayName||(source.givenName+' '+source.familyName)",
"type" : "text/javascript"
}
},
{
"target" : "userPassword",
"transform" : {
"source" : "openidm.decrypt(source)",
"type" : "text/javascript"
},
"source" : "password",
"condition" : {
"source" : "object.password!=null",
"type" : "text/javascript"
}
},
{
"source" : "displayName",
"target" : "displayName"
}
],
"policies" : [
{
"action" : "CREATE",
"situation" : "ABSENT"
},
{
"action" : "IGNORE",
"situation" : "ALL_GONE"
},
{
"action" : "EXCEPTION",
"situation" : "AMBIGUOUS"
},
{
"action" : "UPDATE",
"situation" : "CONFIRMED"
},
{
"action" : "UPDATE",
"situation" : "FOUND"
},
{
"action" : "EXCEPTION",
"situation" : "FOUND_ALREADY_LINKED"
},
{
"action" : "EXCEPTION",
"situation" : "LINK_ONLY"
},
{
"action" : "UNLINK",
"situation" : "MISSING"
},
{
"action" : "IGNORE",
"situation" : "SOURCE_IGNORED"
},
{
"action" : "EXCEPTION",
"situation" : "SOURCE_MISSING"
},
{
"action" : "IGNORE",
"situation" : "TARGET_IGNORED"
},
{
"action" : "EXCEPTION",
"situation" : "UNASSIGNED"
},
{
"action" : "DELETE",
"situation" : "UNQUALIFIED"
}
]
}