mirror of
https://github.com/keycloak/keycloak.git
synced 2026-07-25 18:26:11 +00:00
When an LDAP group mapper uses the LOAD_GROUPS_BY_MEMBER_ATTRIBUTE_RECURSIVELY retrieve strategy, a user's group memberships - and therefore the role mappings granted through those groups - are resolved transitively through nested groups. Listing the members of a group, however, only returned its direct members, so a user that belonged to a group solely through a nested sub group was invisible on that group's members endpoint, even though it effectively belonged to it. This left role evaluation and member listing inconsistent. GroupLDAPStorageMapper.getGroupMembers now resolves members recursively when the recursive strategy is selected: it walks the transitive closure of the group's nested sub groups via the 'member' attribute and returns the de-duplicated union of all their members, with pagination applied to the combined result. Closes #26699 Signed-off-by: kvfi <khalid@ouafi.net>