首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >自定义用户对象的ForgeRock OpenIDM同步

自定义用户对象的ForgeRock OpenIDM同步
EN

Stack Overflow用户
提问于 2015-11-06 15:03:55
回答 1查看 1.2K关注 0票数 0

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

当我删除openIDM和openDJ的映射并创建新的映射时,同步在一段时间内工作得很好,后来它停止工作。同样,我必须删除旧的映射并创建新的映射。有没有办法解决这个问题?如果有人知道解决办法,请帮帮我。

我在openIDM中从托管/用户到系统/ldap/帐户的Sync.json映射如下所示:

代码语言:javascript
复制
{
            "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"
                }
            ]
        }
EN

回答 1

Stack Overflow用户

发布于 2020-06-17 17:30:07

尝试在脚本中添加"onUpdate",它应该如下所示:

代码语言:javascript
复制
"onUpdate" : {
            "source" : "target.dn='uid='+source.loginId+','+source.ou",
            "type" : "text/javascript"
        },

在idm文档中,他们声明只有在创建新对象时才会调用onCreate。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33561245

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档