【问题标题】:ForgeRock OpenIDM sync for custom user object自定义用户对象的 ForgeRock OpenIDM 同步
【发布时间】:2015-11-06 07:03:55
【问题描述】:

我在 ForgeRock openIDM 中创建了一个自定义用户对象。在 openIDM 中创建用户时,它会在 openDJ 中同步。但是当我更新时,用户数据没有得到同步。

当我删除 openIDM 和 openDJ 的映射并创建新映射时,同步可以正常工作一段时间,然后停止工作。我必须再次删除旧映射并创建新映射。有没有办法解决这个问题?如果有人知道修复方法,请帮助我。

我在 openIDM 中托管/用户到系统/ldap/帐户的 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"
                }
            ]
        }

【问题讨论】:

  • 您使用的是什么版本的 OpenIDM?当托管用户中的更新未触发 LDAP 中的任何更新时,您能否检查 audit/recon.csv 文件中是否记录了任何条目(可以帮助我们了解是否触发了同步但由于某种原因失败......)?
  • 我正在使用 openIDM3.1.0
  • 我正在使用 openIDM3.1.0。当删除现有的 recon.csv 文件时,它甚至不会再次创建。

标签: opendj openidm


【解决方案1】:

尝试在您的脚本中添加“onUpdate”,它应该如下所示:

"onUpdate" : {
            "source" : "target.dn='uid='+source.loginId+','+source.ou",
            "type" : "text/javascript"
        },

在 idm 文档中,他们声明 onCreate 仅在创建新对象时被调用。

【讨论】:

    猜你喜欢
    • 2022-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多