mirror of
https://github.com/keycloak/keycloak.git
synced 2026-05-14 20:09:01 -05:00
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:
committed by
Pedro Igor
parent
569f86ffeb
commit
dd0edc24c2
+8
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user