DefaultSyncContext#syncMembership() compares external ids case-sensitively.
Fixed.
@@ -522,7 +522,7 @@ public class DefaultSyncContext implements SyncContext {
while (grpIter.hasNext()) {
Group grp = grpIter.next();
if (isSameIDP(grp)) {
- declaredExternalGroups.put(grp.getID(), grp);
+ declaredExternalGroups.put(grp.getID().toLowerCase(), grp);
}
}
timer.mark("reading");
@@ -546,21 +546,21 @@ public class DefaultSyncContext implements SyncContext {
log.debug("- idp returned '{}'", extGroup.getId());
// mark group as processed
- Group grp = declaredExternalGroups.remove(extGroup.getId());
+ Group grp = declaredExternalGroups.remove(extGroup.getId().toLowerCase());
boolean exists = grp != null;
if (!exists) {
Authorizable a = userManager.getAuthorizable(extGroup.getId());
if (a == null) {
grp = createGroup(extGroup);
- log.debug("- created new group");
+ log.debug("- created new group '{}'", grp.getID());
} else if (a.isGroup() && isSameIDP(a)) {
grp = (Group) a;
} else {
log.warn("Existing authorizable '{}' is not a group from this IDP '{}'.", extGroup.getId(), idp.getName());
continue;
}
- log.debug("- user manager returned '{}'", grp);
+ log.debug("- user manager returned '{}'", grp.getID());
}
syncGroup(extGroup, grp);
@@ -568,7 +568,7 @@ public class DefaultSyncContext implements SyncContext {
if (!exists) {
// ensure membership
grp.addMember(auth);
- log.debug("- added '{}' as member to '{}'", auth, grp);
+ log.debug("- added '{}' as member to '{}'", auth, grp.getID());
}
// recursively apply further membership
