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.

Bug 1835349

Summary: Enabling repo on satellite 6.7 fails with " 407 Proxy Auth Required " in spite of having correct proxy details set on satellite
Product: Red Hat Satellite Reporter: soham <smajumda>
Component: NetworkingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: hyu, lstejska, mjia, nalfassi
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-20 11:31:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description soham 2020-05-13 16:40:35 UTC
Description of problem:
Enabling repo on satellite 6.7 fails with " 407 Proxy Auth Required " in spite of having correct proxy details set on satellite.

Manifest refresh, insights, repo sync works fine but enabling a repo fails.


In the file /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.14.0.20/app/lib/katello/resources/cdn.rb

        def net_http_class
          if (proxy = ::HttpProxy.default_global_content_proxy)
            uri = URI(proxy.url) #Net::HTTP::Proxy ignores port as part of the url
            Net::HTTP::Proxy("#{uri.host}#{uri.path}", uri.port, proxy.username, proxy.password)
          else
            Net::HTTP
          end
        end

proxy.username here returns empty '', instead of nil which is causing the issue for the customer.

 [17:45:44] mjia: proxy = ::HttpProxy.default_global_content_proxy
[17:45:44] mjia: => #<HttpProxy id: 2, name: "Local CNTLM instance", url: "https://10.10.10.10", username: "", password: "">
[17:45:44] mjia: irb(main):002:0> proxy.username
[17:45:44] mjia: => ""

This seems like a regression as 6.6 seems like using nil for proxy.username.


Below workaround fixed the issue:

# foreman-rake console

proxy = ::HttpProxy.default_global_content_proxy

proxy.update_attributes!(username: nil, password: nil)

exit


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 5 Leos Stejskal 2023-06-20 11:31:10 UTC
Hi, I'm closing the BZ since the 6.7 version is past its support,
if you are able to reproduce the issue on the latest version (6.13)
please reopen the BZ with updated steps to reproduce and debug logs.

Comment 6 Red Hat Bugzilla 2024-01-06 04:29:11 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days