Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When the LDAP Group base DN is set, it may happen that there is no group associated with the user, or the DN might be set wrong and the result is same -> no associated group found. This is correct and expected behavior, but, satellite doesn't react properly in a sense, that it generates error 500 with source back trace.
Version-Release number of selected component (if applicable):
6.2
How reproducible:
Add LDAP authentication and set Group base DN to something semantically incorrect, save, and try to login with some LDAP user.
Actual results:
Back trace with Error 500
Expected results:
1) **DISPUTABLE** Allow login when there is no User group associated - aka behave the same way like the Group base DN have had been empty.
2) Block all login attempts with proper message that no group was found. Perhaps with additional information in the logs what filter was used without a need of turning on LDAP debug mode.
Additional info:
The actual error is in ldap fluff module where there is not being check if the search result is not nil
NoMethodError
undefined method `each' for nil:NilClass
/opt/theforeman/tfm/root/usr/share/gems/gems/ldap_fluff-0.4.5/lib/ldap_fluff/posix_member_service.rb:22:in `find_user_groups'
.
.
.
~~~
21: @ldap.search(:filter => Net::LDAP::Filter.eq('memberuid', uid),
22: :base => @group_base).each do |entry|
~~~
Comment 3Daniel Lobato Garcia
2017-06-21 08:33:35 UTC
I will take this as "validate BaseDN" before allowing to save it. The 500 is ugly for sure, but yeah it's an unexpected error. Cloning to Redmine...
Comment 4Daniel Lobato Garcia
2017-06-21 08:35:26 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Rich Jerrido or Bryan Kearney or your account team. If we do not hear from you, we will close this bug out. Thank you.
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Rich Jerrido or Bryan Kearney. Thank you.
Description of problem: When the LDAP Group base DN is set, it may happen that there is no group associated with the user, or the DN might be set wrong and the result is same -> no associated group found. This is correct and expected behavior, but, satellite doesn't react properly in a sense, that it generates error 500 with source back trace. Version-Release number of selected component (if applicable): 6.2 How reproducible: Add LDAP authentication and set Group base DN to something semantically incorrect, save, and try to login with some LDAP user. Actual results: Back trace with Error 500 Expected results: 1) **DISPUTABLE** Allow login when there is no User group associated - aka behave the same way like the Group base DN have had been empty. 2) Block all login attempts with proper message that no group was found. Perhaps with additional information in the logs what filter was used without a need of turning on LDAP debug mode. Additional info: The actual error is in ldap fluff module where there is not being check if the search result is not nil NoMethodError undefined method `each' for nil:NilClass /opt/theforeman/tfm/root/usr/share/gems/gems/ldap_fluff-0.4.5/lib/ldap_fluff/posix_member_service.rb:22:in `find_user_groups' . . . ~~~ 21: @ldap.search(:filter => Net::LDAP::Filter.eq('memberuid', uid), 22: :base => @group_base).each do |entry| ~~~