Bug #10126
closedExternal Group Refresh Fails
Description
I have a group created in Foreman for testing external groups. I use Active Directory for my authentication and it seems that when I have an empty group the refresh works, but as soon as I put a user in the group the refresh fails. I have tested with users that are already created in Foreman and ones that aren't and the behavior is consistent. I am attaching a screen shot with the traceback.
Files
Updated by Dominic Cleal over 9 years ago
- Category changed from Web Interface to Users, Roles and Permissions
I think this exception happens when it's looking up members of the AD group. It might be helpful to reproduce this if you can attach an ldapsearch output of the group and the user inside it.
Updated by Chris Pisano over 9 years ago
After moving to Foreman 1.8 I now receive an error that the group does not exist. I have since specified a group base dn and have ensured that the group exists within it. Debug logs are below.
Started POST "/usergroups" for 10.10.153.130 at 2015-05-21 13:43:23 -0500
2015-05-21 13:43:23 [I] Processing by UsergroupsController#create as HTML
2015-05-21 13:43:23 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"CfGNMXCJ+5kl2uvYn8CTUUqK4KZsaVJJX0tvEqGcRRE=", "usergroup"=>{"name"=>"server_admins", "usergroup_ids"=>["", "", ""], "user_ids"=>[""], "admin"=>"1", "role_ids"=>[""], "external_usergroups_attributes"=>{"0"=>{"_destroy"=>"false", "name"=>"server_admins", "auth_source_id"=>"5"}, "new_external_usergroups"=>{"_destroy"=>"false", "name"=>"", "auth_source_id"=>"5"}}}, "commit"=>"Submit"}
2015-05-21 13:43:23 [I] Failed to save: Name is not found in the authentication source
2015-05-21 13:43:23 [I] Rendered common/_edit_habtm.html.erb (3.4ms)
2015-05-21 13:43:23 [I] Rendered usergroups/_external.html.erb (2.5ms)
2015-05-21 13:43:23 [I] Rendered usergroups/_external.html.erb (1.8ms)
2015-05-21 13:43:23 [I] Rendered usergroups/_form.html.erb (29.0ms)
2015-05-21 13:43:23 [I] Rendered usergroups/new.html.erb within layouts/application (29.4ms)
2015-05-21 13:43:23 [I] Rendered home/_user_dropdown.html.erb (1.2ms)
2015-05-21 13:43:23 [I] Read fragment views/tabs_and_title_records-33 (0.1ms)
2015-05-21 13:43:23 [I] Rendered home/_topbar.html.erb (3.1ms)
2015-05-21 13:43:23 [I] Rendered layouts/base.html.erb (4.2ms)
2015-05-21 13:43:23 [I] Completed 200 OK in 68ms (Views: 29.7ms | ActiveRecord: 10.1ms)
Updated by Chris Pisano about 9 years ago
Dominic Cleal wrote:
I think this exception happens when it's looking up members of the AD group. It might be helpful to reproduce this if you can attach an ldapsearch output of the group and the user inside it.
This issue can be closed. . . it's on my end since we have commas in the user CN. Dominic sent me the fix in IRC.
Updated by Dominic Cleal about 9 years ago
- Is duplicate of Bug #8840: LDAP Usergroup Refresh fails when User CN contains escaped characters added