Project

General

Profile

Bug #11428

External user groups refresh is not case insensitive

Added by Daniel Lobato Garcia about 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Users, Roles and Permissions
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

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

Related to Foreman - Bug #7355: External groups not updated when user created on the flyNew2014-09-04

Associated revisions

Revision 33d7500a (diff)
Added by Daniel Lobato Garcia about 5 years ago

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.

Revision e5e62175 (diff)
Added by Daniel Lobato Garcia about 5 years ago

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 about 5 years ago

  • Related to Bug #7355: External groups not updated when user created on the fly added

#2 Updated by The Foreman Bot about 5 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 about 5 years ago

  • Legacy Backlogs Release (now unused) set to 72

#4 Updated by Daniel Lobato Garcia about 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Bryan Kearney about 5 years ago

  • Bugzilla link set to 1238442

Also available in: Atom PDF