在PicketLink(LDAP)中创建多对多关系是否热门?

在PicketLink(LDAP)中创建多对多关系是否热门?,ldap,picketlink,Ldap,Picketlink,如何配置PicketLink(LDAP)来创建一些基本的多对多关系? 假设: 用户0*角色0*权限 所以用户可以有多个角色,角色可以有多个权限 在PicketLink中,我可以创建一些角色并在其中添加一些用户(甚至自定义类): 但是,我如何才能向相同的角色添加一些权限,或者以其他方式在LDAP\PicketLink中创建这种多对多关系? 因此,我的角色将如下所示: member:user1 memberPermission: permission1 我发现了一些信息: “LDAP配置支持单一类

如何配置PicketLink(LDAP)来创建一些基本的多对多关系? 假设: 用户0*角色0*权限 所以用户可以有多个角色,角色可以有多个权限

在PicketLink中,我可以创建一些角色并在其中添加一些用户(甚至自定义类):

但是,我如何才能向相同的角色添加一些权限,或者以其他方式在LDAP\PicketLink中创建这种多对多关系? 因此,我的角色将如下所示:

member:user1
memberPermission: permission1
我发现了一些信息: “LDAP配置支持单一类型的简单层次结构(父/子)的映射。” 难道LDAP不能这样做吗

我还尝试为一些自定义映射创建一些自定义成员类:

    .mapping(CustomGroup.class)
        .baseDN(CG_DN_SUFFIX)
        .objectClasses(GROUP_OF_NAMES)
        .attribute("name", CN, true)
        .readOnlyAttribute("createdDate", CREATE_TIMESTAMP)
        .parentMembershipAttributeName("member")
        //.parentMembershipAttributeName("usermember")
    .mapping(CustomGroupMembership.class)
        //configure which identity type is the owner of a relationship
        .forMapping(CustomGroup.class)
        .attribute("member", "member")
        .attribute("memberPermission", "memberPermission")
但在运行时,我遇到了一些错误,无法将其添加到我的relationshipmanager中

有没有人见过在LDAP/PicketLink中实现多对多关系的好例子?
或者可能有类似问题的解决方案?

我是LDAP新手,但我也找不到这样做的方法,可能是因为LDAP类似于树/层次结构,而不是数据库。对于粗略的多对多(SystemsUserRoles),我能想到的最佳方案是:

member和roleOccupant都将DifferentizedName作为其上级,因此希望DN作为值。成员属性设置为其他位置的角色条目(例如cn=role,ou=systemRoles,dc=company),roleOccupant设置为用户(例如uid=USERNAME,ou=users,dc=company)

从那以后,我一直把系统放在首位,我希望我的应用程序能够为大家所知,但如果你想找到一个给定用户的系统,那就更难了。如果可能的话,似乎最好避免多对多的关系

    .mapping(CustomGroup.class)
        .baseDN(CG_DN_SUFFIX)
        .objectClasses(GROUP_OF_NAMES)
        .attribute("name", CN, true)
        .readOnlyAttribute("createdDate", CREATE_TIMESTAMP)
        .parentMembershipAttributeName("member")
        //.parentMembershipAttributeName("usermember")
    .mapping(CustomGroupMembership.class)
        //configure which identity type is the owner of a relationship
        .forMapping(CustomGroup.class)
        .attribute("member", "member")
        .attribute("memberPermission", "memberPermission")
organizationalUnit ou=systems
  entries : device cn=system name
    entries : custom object with a member and a roleOccupant