将 LDAP 用户关联到 weblogic 服务器本地组
我已经在 Web 逻辑服务器上创建了一个组,现在我想在该组中添加用户(它们是在 LDAP 服务器上配置的)。
我怎样才能达到同样的效果。或者有什么方法可以通过一些java代码获取LDAP用户或组的所有列表。
I have created one group on web-logic server, now i want to add user in that groups(they are configured on LDAP Server).
how can I achieve the same. or is there any way I can get all list of LDAP users or groups through some java code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,你让自己的生活变得比在这里需要的更加困难。
用户的组成员资格应该在与用户本身相同的安全领域中定义 - 您无法从一个地方获取主题的一部分,从另一个地方获取主题的一部分,至少在我不创建自定义安全提供程序的情况下是这样。我知道,这比它的价值更多的努力。
如果用户是在外部 LDAP 服务器中定义的,则还应在此处配置组成员身份。
根据您要保护的内容,可能的替代方案是使用基于角色的安全配置,但即使如此,您仍然需要某些东西来确定角色中的成员身份,并且通常应该是一个组。
安全配置应该始终基于组而不是用户,否则维护将变得非常痛苦。
You're actually making life harder for yourself than it needs to be here.
A user's group memberships should be defined in the same security realm as the user themselves - you can't get part of the subject from one place and part of it from the other, at least not without creating a custom security provider as far as I'm aware, and that's way more effort than its worth.
If the users are defined in an external LDAP server, this is where the group membership should also be configured.
A possible alternative depending on what you're securing would be to use role-based security configuration, but even then you still want something to determine membership in a role, and that should typically be a group.
Security configuration should always be based on groups rather than users, otherwise maintenance will become very painful.