Skip to content

Conversation

@markusokon
Copy link

Currently LDAPMembershipPropagationActions uses the same attribute for writing the result into the propagation data and fetching the preexisting group memberships of the user object in LDAP. This leads to the beforeObj.getAttributeByName() call never returning any groups in the default case and therefore Syncope trying to edit groups it doesn't own/control.

This is fixed in this pull request by separating the attribute name used into one which the connector receives, containing all the group memberships after the execution, and the attribute name which is used to get all current memberships from the LDAP object.

Furthermore I added a performance optimization by searching for the groups managed by Syncope only once and not potentially hundreds of times.

@ilgrosso
Copy link
Member

ilgrosso commented Aug 21, 2025

Hi @markusokon please open an issue on JIRA to illustrate what issue this PR is going to solve.

Also, unless you have already contributed to other ASF projects, please submit your ICLA https://www.apache.org/licenses/contributor-agreements.html#clas

@ilgrosso
Copy link
Member

ilgrosso commented Sep 3, 2025

@markusokon any update?

@markusokon
Copy link
Author

Hi @ilgrosso

it's currently under discussion if this code also requires a CCLA to be signed and I will give you an update ASAP.

@ilgrosso
Copy link
Member

ilgrosso commented Oct 2, 2025

Hi @markusokon it's been about a month since last update: please let us know if there is any news, thanks.

@markusokon
Copy link
Author

Sorry for keeping you waiting, it took a bit longer than expected. I just sent the ICLA and CCLA to [email protected] and requested a JIRA account to open the issue.

@ilgrosso ilgrosso changed the title Separate membership attribute on __ACCOUNT__ and ldapGroups attribute for connector [SYNCOPE-1921] Separate membership attribute on __ACCOUNT__ and ldapGroups attribute for connector Oct 21, 2025
Copy link
Member

@ilgrosso ilgrosso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to perform at least a full build by simple

mvn -T 1C clean install

from the root folder.

@markusokon markusokon requested a review from ilgrosso October 21, 2025 13:57
@ilgrosso
Copy link
Member

@markusokon you have a checkstyle error:

Error: src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java:[97,1] (whitespace) FileTabCharacter: File contains tab characters (this is the first instance).

@ilgrosso
Copy link
Member

ilgrosso commented Oct 21, 2025

@markusokon as you can see, the following integration test is failing:

PropagationTaskITCase.issueSYNCOPE1473:835 expected: <2> but was: <1>

e.g. here: https://github.com/apache/syncope/blob/master/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java#L835

@ilgrosso
Copy link
Member

@markusokon do you have any news to fix the failing integration test?

@ilgrosso
Copy link
Member

ilgrosso commented Nov 7, 2025

@markusokon no feedback for 2 weeks: shall we close this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants