OpenLDAP:MemberOf &爪哇
我使用 OpenLDAP 2.4 进行用户身份验证。为了分配角色,我使用成员属性将用户添加到组中。因为某些应用程序需要memberOf信息,所以我启用了memberOf覆盖(它按预期工作)。
因此,实际上我可以使用 ldapsearch 获取 memberOf 属性,但问题是应用程序无法检索此信息,因为 memberOf 属性不是真正的属性。此应用程序使用 java 函数:
- search (javax.naming.directory.dircontext)
- getAttribute (javax.naming.directory.searchresult)
所以我的问题是是否有办法使此 memberOf 属性作为真实属性“可见”,或者如果还有另一个 java 函数可以检索此 memberOf 属性。
非常感谢! :)
I'm using OpenLDAP 2.4 for user authentication. To assign roles I added users to groups using the member attribute. Because some applications need a memberOf information I enabled the memberOf overlay (which is working as expected).
So in fact I can get the memberOf property using ldapsearch but the problem is that an application can't retrieve this information because the memberOf property is no real attribute. This application is using the java functions:
- search (javax.naming.directory.dircontext)
- getAttribute (javax.naming.directory.searchresult)
So my question is if there's a way to make this memberOf property "visible" as an real attribute or if there's an other java function which can retrieve this memberOf property.
Many thanks! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目录服务器信息模型没有特性,它有属性。
memberOf
属性必须是请求的,也就是说,它必须包含在作为搜索请求一部分的请求属性列表中。有关搜索请求和 ldapsearch 的详细信息,请参阅“使用 ldapsearch”。The directory server information model does not have properties, it has attributes. The
memberOf
attribute must be requested, that is, it must be included in the requested attribute list that is part of the search request. For more information about search requests and ldapsearch see "Using ldapsearch".