Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Fix LDAP sync deleting users from groups, closes #7142 #7964

Closed
wants to merge 1 commit into from

Conversation

sbraz
Copy link
Contributor

@sbraz sbraz commented Oct 11, 2019

When group membership is defined at group level, there were two issues with the syncWithLdap() function that is called periodically, specifically within listUserForGroup():

  • groups were searched in the the user base DN
  • the group member attribute was not respected (a hardcoded value of
    member was used)

This patch addresses both issues. The first one is already fixed in 19.04.x (centreon/centreon@849b826) but the second one is still present in master. I'll let you guys patch it there too.

The code that is used when a user first logs in makes use of the proper base DN and group member attribute. Because this, users were added to the right groups on their first login, only to be later removed from them.

When group membership is defined at group level, there were two issues with
the syncWithLdap() function that is called periodically, specifically
within listUserForGroup():
* groups were searched in the the user base DN
* the group member attribute was not respected (a hardcoded value of
  "member" was used)

This patch addresses both issues.

The code that is used when a user first logs in makes use of the proper
base DN and group member attribute. Because of this, users were added to the
right groups on their first login, only to be later removed from them.
@sbraz
Copy link
Contributor Author

sbraz commented Jan 23, 2020

@kduret @sc979 is there any chance you guys could merge this?

@lpinsivy
Copy link
Contributor

@sbraz I will check this today

@cgagnaire cgagnaire added area/ldap pr/external PR made by the contributors status/needs-attention The PR is on-hold. The reasons are specified in the PR labels Feb 5, 2020
@cgagnaire
Copy link

@cgagnaire cgagnaire closed this Mar 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/ldap pr/external PR made by the contributors status/needs-attention The PR is on-hold. The reasons are specified in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants