-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
6.16.0
Description of problem:
When I login as an LDAP user but their group can't be found in the LDAP, I get past the login form but then get the "Ooops" message in WebUI and this traceback:
2024-04-23T09:24:18 [I|app|caeda973] Started POST "/users/login" for <IP> at 2024-04-23 09:24:18 -0400
2024-04-23T09:24:18 [I|app|caeda973] Processing by UsersController#login as HTML
2024-04-23T09:24:18 [I|app|caeda973] Parameters: {"login"=>
, "authenticity_token"=>"<TOKEN>"}
2024-04-23T09:24:18 [I|app|caeda973] ForemanWebhooks::EventSubscriber: user_updated.event.foreman event received
2024-04-23T09:24:18 [W|app|caeda973] undefined method `each' for nil:NilClass
2024-04-23T09:24:18 [I|app|caeda973] Backtrace for 'undefined method `each' for nil:NilClass' error (NoMethodError): undefined method `each' for nil:NilClass
caeda973 | /usr/share/gems/gems/ldap_fluff-0.6.0/lib/ldap_fluff/posix_member_service.rb:20:in `find_user_groups'
caeda973 | /usr/share/gems/gems/ldap_fluff-0.6.0/lib/ldap_fluff/generic.rb:38:in `groups_for_uid'
caeda973 | /usr/share/gems/gems/ldap_fluff-0.6.0/lib/ldap_fluff/ldap_fluff.rb:48:in `block in group_list'
caeda973 | /usr/share/gems/gems/ldap_fluff-0.6.0/lib/ldap_fluff/ldap_fluff.rb:94:in `block in instrument'
caeda973 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `block in instrument'
...
Version-Release number of selected component (if applicable):
Reproduced on stream but most likely happens everywhere
How reproducible:
Deterministic
Steps to Reproduce:
1. Have a Satellite with an external auth source of type LDAP added, with autocreating users enabled
2. Login as some user in that LDAP (of which the group is not present in LDAP at all)
Actual results:
Failure, tracekback
Expected results:
Perhaps failure to login but a nice error message stating the problem (along the lines of "group not found")