Decode objectGUID when it is imported as a group attribute

Closes #45917

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
This commit is contained in:
Stefan Guilhen
2026-02-04 12:17:32 -03:00
committed by Pedro Igor
parent 569f86ffeb
commit dd0edc24c2
@@ -483,8 +483,14 @@ public class LDAPIdentityStore implements IdentityStore {
Object val = enumm.next();
if (val instanceof byte[]) { // byte[]
String attrVal = Base64.getEncoder().encodeToString((byte[]) val);
attrValues.add(attrVal);
if (ldapAttributeName.equalsIgnoreCase(getConfig().getUuidLDAPAttributeName())) {
// UUID was fetched as a binary attribute, we decode it here - this is the path that's used for objectGUID in Active Directory
String attrVal = this.operationManager.decodeEntryUUID(val);
attrValues.add(attrVal);
} else {
String attrVal = Base64.getEncoder().encodeToString((byte[]) val);
attrValues.add(attrVal);
}
} else { // String
String attrVal = val.toString().trim();
attrValues.add(attrVal);