Bug #11428
External user groups refresh is not case insensitive
Description
group_list in ldap_fluff returns a list of lowercase LDAP GIDs. https://github.com/theforeman/ldap_fluff/blob/master/lib/ldap_fluff/generic_member_service.rb#L56
When foreman tries to run update_usergroups to refresh the external user groups, it will try to match these lowercase gids with external user group names. However, we don't enforce external user group names to be lowercase. If an external user group contains any capital letter, it will not be synced as it will not match the lowercase GID.
Related issues
Associated revisions
Fixes #11428 - External user groups refresh shouldn't be case sensitive
group_list in ldap_fluff returns a list of lowercase LDAP GIDs.
When AuthSourceLdap tries to run update_usergroups to refresh the external
user groups, it will try to match these lowercase gids with external user
group names.
However, we don't enforce external user group names to be lowercase.
If an external user group contains any capital letter, it will not be
synced as it will not match the lowercase GID.
This commit makes sure we search for external groups case insensitive,
so we can match LDAP GIDs with external groups names.
(cherry picked from commit 33d7500a8d3148b6877d630a72f598f4be06b423)
History
#1
Updated by Daniel Lobato Garcia over 7 years ago
- Related to Bug #7355: External groups not updated when user created on the fly added
#2
Updated by The Foreman Bot over 7 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2621 added
- Pull request deleted (
)
#3
Updated by Dominic Cleal over 7 years ago
- Legacy Backlogs Release (now unused) set to 72
#4
Updated by Daniel Lobato Garcia over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 33d7500a8d3148b6877d630a72f598f4be06b423.
#5
Updated by Bryan Kearney over 7 years ago
- Bugzilla link set to 1238442
Fixes #11428 - External user groups refresh shouldn't be case sensitive
group_list in ldap_fluff returns a list of lowercase LDAP GIDs.
When AuthSourceLdap tries to run update_usergroups to refresh the external
user groups, it will try to match these lowercase gids with external user
group names.
However, we don't enforce external user group names to be lowercase.
If an external user group contains any capital letter, it will not be
synced as it will not match the lowercase GID.
This commit makes sure we search for external groups case insensitive,
so we can match LDAP GIDs with external groups names.