You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding an acl before another with identical 'what' doesn't update olcaccess 'to', and results in duplicate acl's
Example (openldap::server::acces_wrapper)
Altering
ldapserver::access:
- to attrs=ugentPostalAddress:
- by * read
to
- to filter=(objectClass=ugentEntitlement):
- by * read
- to attrs=ugentPostalAddress:
- by * read
What are you seeing
puppet logs
Notice: /Stage[main]/Ldapserver/Openldap::Server::Access_wrapper[dc=UGent,dc=be]/Openldap::Server::Iterate_access[0 on dc=UGent,dc=be]/Openldap::Server::Access[0 on dc=UGent,dc=be]/Openldap_access[0 on dc=UGent,dc=be]/what: what changed 'attrs=ugentPostalAddress' to 'filter=(objectClass=ugentEntitlement)'
Notice: /Stage[main]/Ldapserver/Openldap::Server::Access_wrapper[dc=UGent,dc=be]/Openldap::Server::Iterate_access[1 on dc=UGent,dc=be]/Openldap::Server::Access[1 on dc=UGent,dc=be]/Openldap_access[1 on dc=UGent,dc=be]/ensure: created
Notice: Applied catalog in 0.55 seconds
slapcat
createTimestamp: 20240502203156Z
olcAccess: {0}to attrs=ugentPostalAddress by * read
olcAccess: {1}to attrs=ugentPostalAddress by * read
entryCSN: 20240503143152.471790Z#000000#000#000000
modifiersName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
modifyTimestamp: 20240503143152Z
Any additional information you'd like to impart
As far as I understand, this behaviour is caused by the @property_flush variabele only being set by the access method, which doesn't happen when the access directive is identical with the existing acl on that position.
I've noticed this while setting up a new ldap server for a database with 100+ acl's, where not all acl's with identical access directives (by * read f.i.) are defined in a single olcaccess directive.
The text was updated successfully, but these errors were encountered:
WimRooseUG
changed the title
acl's with identical access definitions are not implemented correctly
acls with identical access definitions are not implemented correctly
May 6, 2024
Flushes happen every time a resource changes, whether it is creation,
destroy or modify. Ensure we do not needlesly copy-paste the ldapmodify
code in those three separate instances.
This also ensures that if a new property is ever added, we do not need
create a separate setter.
This commit thus also fixes a bug where if a `what` of an
openldap_access resource changed, it would not trigger an update.
The setter for that property was lost in the refactor of commit
91e9723. -> Fixesvoxpupuli#420.
How to reproduce (e.g Puppet code you use)
Adding an acl before another with identical 'what' doesn't update olcaccess 'to', and results in duplicate acl's
Example (openldap::server::acces_wrapper)
Altering
to
What are you seeing
puppet logs
slapcat
Any additional information you'd like to impart
As far as I understand, this behaviour is caused by the @property_flush variabele only being set by the access method, which doesn't happen when the access directive is identical with the existing acl on that position.
I've noticed this while setting up a new ldap server for a database with 100+ acl's, where not all acl's with identical access directives (by * read f.i.) are defined in a single olcaccess directive.
The text was updated successfully, but these errors were encountered: