LDAP 组访问控制

LDAP 组访问控制

我正在尝试设置我们的 LDAP 服务器,以便 pwmadmins 组的成员可以更改其他人的密码。更具体地说,我们已设置 Tomcat 的 PWM,并尝试让 pwmadmins 通过它更改其他人的密码。但出于某种原因,pwmadmins 组中的人仍然没有更改其他人密码的权限。

这是 olcDatabase={1}hdb.ldif 文件的 ALC 部分现在的样子(我已显示所有内容,尽管我只关心部分 {0}):

olcAccess: {0}to attrs=userPassword,shadowLastChange
 by dn="cn=pwmadmin,dc=cs,dc=school,dc=edu" write
 by group.exact="cn=pwmadmins,ou=groups,dc=cs,dc=school,dc=edu" write
 by anonymous auth
 by self write
 by * none
olcAccess: {1}to attrs=loginShell,gecos
 by dn="cn=admin,dc=cs,dc=school,dc=edu" write
 by self write
 by * read
olcAccess: {2}to attrs=loginShell,gecos
 by dn="cn=pwmadmin,dc=cs,dc=school,dc=edu" write
olcAccess: {3}to dn.base=""
 by * read
olcAccess: {4}to *
 by dn="cn=admin,dc=cs,dc=school,dc=edu" write
 by * read

(为清晰起见添加了新行。)我已使用本网站上其他几个类似问题检查了格式,以确保顺序、间距等都正确无误,但仍然无法正常工作。我已安装 memberOf 过滤器,并确认它在 PWM 上正常工作。当我授予 UID 更改密码的能力时,它正常工作。因此,这显然与组语法有关,但我不确定是什么。任何帮助都非常感谢!

编辑:找到了解决方案-见下文。

答案1

我可以通过将 pwmadmins 变成 groupOfNames 而不是 posixGroup,然后执行以下代码来使其工作:

olcAccess: {0}to attrs=userPassword,shadowLastChange
 by dn="cn=pwmadmin,dc=cs,dc=school,dc=edu" write
 by set="[cn=pwmadmins,ou=groups,dc=cs,dc=school,dc=edu]/member & user" write
 by anonymous auth
 by self write
 by * none
olcAccess: {1}to attrs=loginShell,gecos
 by dn="cn=admin,dc=cs,dc=school,dc=edu" write
 by self write
 by * read
olcAccess: {2}to attrs=loginShell,gecos
 by dn="cn=pwmadmin,dc=cs,dc=school,dc=edu" write
olcAccess: {3}to dn.base=""
 by * read
olcAccess: {4}to *
 by dn="cn=admin,dc=cs,dc=school,dc=edu" write
 by * read

相关内容