如何实现 ACL spring 安全性以在不在 ACL_Entry table 中创建许多条目的情况下在用户组之间共享对象
How to implement ACL spring security to share an object among group of users without creating many entries in ACL_Entry table
类似下面提到的问题
How to implement ACL at a group level? E.g. only teachers in school A can update school A's calendar
我正在尝试使用 acl spring security
解决以下情况
我们有一个场景,可以将学生的成绩分享给 teachers.In 组 这个场景,当老师登录时,只有当老师对结果有读取权限时,他才能看到结果 object.If 我们需要分享对于组中有 10 名成员且具有读取权限的教师组的结果,我们需要在 ACL_Entry table 中给出 10 个整数。这会很复杂,因为条目会随着组成员的增加而增加,并且 permissions.Is 有任何其他方式,如果我将结果共享到组中,将只有一个 acl 条目,其中组具有对结果对象的读取权限,教师应该自动获得读取 object.Can 的权限,你也解释了例如,模式将如何。
请帮忙
可能重复:
如果你查看这个问题,你会发现这个可能的解决方案:
I am using user groups with ACL mechanism. Basically I make sure that when ACL is created for an object the owner is set. Then when another user tries to access this object the owner's groups are checked to see if there is a match.
This of course means that when user changes his groups then the object 'goes with him'.
If you don't want this behavior you can have group object's ACL as a parent acl for a secure object. Then when a user changes groups you should set the correct entries for group object ACL. This way the secure object is tied to the user group not the user himself.
这些实际上是另外两种与您链接的问题中描述的不同的可能性。
我链接的问题的评论中也有一段简短的对话,所以如果您感兴趣,请务必阅读它。
为了解决上述问题,我使用了以下方法。
我的 schema.I m 中有用户和 user_role table 在安全上下文中使用 db 作为身份验证管理器。
SchoolA 已经是我的应用程序的用户。
每当将教师添加到 schoolA 组时。我将 schoolA 作为角色添加到教师以及用户 role.while 共享结果对象到具有读取权限的 schoolA 组。我将 schoolA 视为 GrantedAuthoritySid 而不是 PrincpalSid。因此,ACL_SID table.Whenever 中的 SchoolA sid 的 principal 列将为 false 教师在获取结果时登录,我们检查教师是否具有结果 object.but 的读取权限,因为教师具有 schoolA 角色和 schoolA角色具有读取权限。 teacher登录时可以获取result对象,这样就解决了我上面的问题
类似下面提到的问题 How to implement ACL at a group level? E.g. only teachers in school A can update school A's calendar
我正在尝试使用 acl spring security
解决以下情况我们有一个场景,可以将学生的成绩分享给 teachers.In 组 这个场景,当老师登录时,只有当老师对结果有读取权限时,他才能看到结果 object.If 我们需要分享对于组中有 10 名成员且具有读取权限的教师组的结果,我们需要在 ACL_Entry table 中给出 10 个整数。这会很复杂,因为条目会随着组成员的增加而增加,并且 permissions.Is 有任何其他方式,如果我将结果共享到组中,将只有一个 acl 条目,其中组具有对结果对象的读取权限,教师应该自动获得读取 object.Can 的权限,你也解释了例如,模式将如何。
请帮忙
可能重复:
如果你查看这个问题,你会发现这个可能的解决方案:
I am using user groups with ACL mechanism. Basically I make sure that when ACL is created for an object the owner is set. Then when another user tries to access this object the owner's groups are checked to see if there is a match.
This of course means that when user changes his groups then the object 'goes with him'.
If you don't want this behavior you can have group object's ACL as a parent acl for a secure object. Then when a user changes groups you should set the correct entries for group object ACL. This way the secure object is tied to the user group not the user himself.
这些实际上是另外两种与您链接的问题中描述的不同的可能性。
我链接的问题的评论中也有一段简短的对话,所以如果您感兴趣,请务必阅读它。
为了解决上述问题,我使用了以下方法。 我的 schema.I m 中有用户和 user_role table 在安全上下文中使用 db 作为身份验证管理器。
SchoolA 已经是我的应用程序的用户。 每当将教师添加到 schoolA 组时。我将 schoolA 作为角色添加到教师以及用户 role.while 共享结果对象到具有读取权限的 schoolA 组。我将 schoolA 视为 GrantedAuthoritySid 而不是 PrincpalSid。因此,ACL_SID table.Whenever 中的 SchoolA sid 的 principal 列将为 false 教师在获取结果时登录,我们检查教师是否具有结果 object.but 的读取权限,因为教师具有 schoolA 角色和 schoolA角色具有读取权限。 teacher登录时可以获取result对象,这样就解决了我上面的问题