I'm writing a utility (in Perl) that needs access to attribute olcPPolicyDefault
that defines the DN of the default password policy in OpenLDAP.
As the utility should not use the Admin or cn=config
account to bind to the OpenLDAP server (2.4.41 of SLES12, BTW), I defined a separate account uid=PP-Checker,...
for access.
As I did not want to code the exact context (olcOverlay={2}ppolicy,olcDatabase={1}hdb,cn=config
) into the ACL, I had tried a filter:
...
olcAccess: {2}to filter=(&(objectClass=olcPPolicyConfig)(olcPPolicyDefault=*))
attrs=olcPPolicyDefault by dn.exact="uid=PP-Checker,..." read by * break
However that did not allow access. So I tried to add access to the parent context like this:
...
olcAccess: {1}to dn.subtree="cn=config" by dn.exact="uid=PP-Checker,..." search by * break
olcAccess: {2}to filter=(&(objectClass=olcPPolicyConfig)(olcPPolicyDefault=*))
attrs=olcPPolicyDefault by dn.exact="uid=PP-Checker,..." read by * break
So the obvious questons are:
- Is the ACL correct, and if not: How to do it correctly?
- If the ACL is correct, is it defined in the correct context (
olcDatabase={0}config,cn=config
)