-
Notifications
You must be signed in to change notification settings - Fork 240
Centreon 18.10 regression - LDAP Groups ACLs are not working #7189
Comments
NOTE: the following ticket looks similar, but mentions the issue happens in 2.8, which is NOT the case in our tests This is why I have created a new issue. |
The code I used, from Centreon 2.8.9, is the following:
From what I understand, it lists all the users based on the "member" property in the LDAP group. The code I found in 18.10 is the following:
For a POSIX LDAP server, "userSearchInfo['group']" is empty, so we are running through the "else" block of code. I don't know enough of LDAP to understand the difference and compared benefits of the two methods. I can just see that in our environment, the first works, but not the second. Is there something we should configure differently (like: the group filter?) to make it work with the new code ? |
Hi @littlejawa are you sure that all your LDAP filters are valid? |
Hi, |
The filters used are:
|
I made a change to this function in 18.10, and found this is solving the issue in our environment. Can you look at my commit and confirm this diagnostic? |
Fixed in 18.10.5 |
BUG REPORT INFORMATION
Centreon Web version: 18.10
Centreon Engine version: 18.10
Centreon Broker version: 18.10
OS: Centos 7
Additional environment details (AWS, VirtualBox, physical, etc.):
Virtual environment
The LDAP server is on a separate machine. In our tests, the same LDAP server is used for 2.8 and 18.10
Centreon was installed from the packages
Steps to reproduce the issue:
Describe the results you received:
ACLs for the LDAP groups are not working
Describe the results you expected:
ACLs should be effective
Additional information you think important (e.g. issue happens only occasionally):
This system was put in place by an update from 2.8, but we could replicate the same issue with a clean install of 18.10.
The 2.8 version works perfectly fine.
We found that the information under the table contactgroup_contact_relations is initially populated, but then emptied whenever the centAcl.php script is run (through its cron schedule).
I have added logs to the centAcl.php class and several functions it calls, and found that the function CentreonLDAP.listUserForGroup() is always returning an empty list of users when it is called in this context, causing the script to skip adding the users to the table.
Comparing the file centreonLDAP.class.php file between 2.8 and 18.10, we found that the function in question has been heavily modified.
If we replace this function in 18.10 by the code from 2.8 (leaving everything else the same in the rest of the file), the problem disappears. So it really looks like this function's modification between 2.8 and 18.10 has introduced the regression.
The text was updated successfully, but these errors were encountered: