LDAP 中的 memberOf 与 groupMembership (Liferay)
在 Liferay 的 LDAP 身份验证设置中使用时,b/n memberOf 属性和 groupMembership 属性有什么区别?
用户导入成功。 这些组也已成功导入。
但用户不会自动分配到组。当我将组变量从“groupMembership”更改为“memberOf”时,一些用户无法登录 Liferay。
memberOf 和 groupMembership 变量到底是什么?
What is the difference b/n memberOf attribute and groupMembership attribute when used in LDAP Authentication settings in Liferay?
The users are imported successfully.
The groups are also imported successfully.
But the users are not assigned to the groups automatically. And when I changed the group variable from 'groupMembership' to 'memberOf', several users are not able to login to Liferay.
What exactly are memberOf and groupMembership variables?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
memberOf
不是一个“变量”,它是一个属性,或者更准确地说,它是一个虚拟属性,或者是由某些目录服务器(但不是全部)动态生成的动态属性。有些使用memberOf
在搜索过滤器或搜索请求的属性列表中使用,有些使用isMemberOf
达到相同目的,有些支持两者或都不支持,并且可能有其他我不知道的习语。一般来说,要确定组成员身份,请向目录服务器发出搜索请求,并指定要在属性列表中返回的
memberOf
或isMemberOf
。以下是使用现代ldapsearch
命令行工具的示例:此搜索响应表明
user.0
是列出的组的成员。要反转查询的含义,即确定哪些条目是组的成员,请在过滤器中使用
isMemberOf
或memberOf
以及断言搜索请求:此搜索响应表明该组中有多个成员,其可分辨名称为
cn=persons,ou=groups,dc=example,dc=com
。虽然不是特定于 LifeRay,但上面是处理组成员身份的一种方法的一般解释以及反向处理的方法从 LDAP 角度来看组成员资格。
memberOf
is not a "variable", it is an attribute, or more accurately, it is a virtual attribute, or a dynamic attribute generated on the fly by some directory servers, but not all. Some usememberOf
to use in search filters or in the attribute list of a search request, some useisMemberOf
for the same purpose, some support both or neither, and there are probably other idioms of which I am not aware.Generally speaking, to determine group membership, issue a search request to the directory server and specify
memberOf
orisMemberOf
to be returned in the attribute list. Here is an example using a modernldapsearch
command line tool:This search response indicated that
user.0
is a member of the listed groups.To reverse the sense of the query, that is, to determine which entries are the member of a group, use the
isMemberOf
ormemberOf
with an assertion in the filter used in the search request:This search response indicates that there are several member of the group whose distinguished name is
cn=persons,ou=groups,dc=example,dc=com
.While not specific to LifeRay, the above is a general explanation of one way to deal with group membership and also of reverse group membership from an LDAP perspective.