This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2087907 - HTTP Proxy "test connection" ignores passwords
Summary: HTTP Proxy "test connection" ignores passwords
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Settings
Version: 6.10.5
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-18 14:17 UTC by Pavel Moravec
Modified: 2024-09-13 16:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 12:22:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   SAT-21767 0 None Migrated None 2024-09-13 16:16:41 UTC
Red Hat Knowledge Base (Solution) 6958891 0 None None None 2022-05-18 17:55:45 UTC

Description Pavel Moravec 2022-05-18 14:17:18 UTC
Description of problem:
"Test connection" for a HTTP Proxy ignores proxy password when sending CONNECT request over the wire. This raises false alarms about the proxy setup.

Gladly, syncing a repository via such a HTTP Proxy works fine, it is just a matter of test_connection feature/method.

Checking tcpdump from a communication, an empty password is send, like when testing connection via WebUI:

Hypertext Transfer Protocol
    CONNECT aws.amazon.com:443 HTTP/1.1\r\n
    Host: aws.amazon.com:443\r\n
    <Host: aws.amazon.com:443\r\n>
    Proxy-Authorization: Basic cHJveHk6\r\n
        Credentials: proxy:                      <----- see here empty password
    <Proxy-Authorization: Basic cHJveHk6\r\n>
    \r\n
    [Full request URI: aws.amazon.com:443]
    <Request: True>
    [HTTP request 1/1]
    [Response in frame: 10]

foreman-rake itself does work well, though:

irb(main):002:0> HttpProxy.first.password
=> "password"
irb(main):003:0> HttpProxy.first.test_connection("https://aws.amazon.com")
=> <RestClient::Response 200 "">


Version-Release number of selected component (if applicable):
Sat 6.10.4 and also .5


How reproducible:
100%


Steps to Reproduce:
1. Have a HTTP Proxy requiring credentials
2. Configure such HTTP Proxy in Satellite
3. Test connection (ideally while running tcpdump to see what's happening on wire)


Actual results:
3. Fails with 407 "Proxy Authentication Required" error.
   tcpdump shows empty password is sent in credentials


Expected results:
3. Test connection to work (again, we *feel* 6.10.3 worked well but we dont have a proof)
  tcpdump showing password is sent to the proxy for auth


Additional info:

Comment 1 Pavel Moravec 2022-05-18 14:28:04 UTC
Hint to developers: password parameter does not reach some class, as

/usr/share/foreman/app/controllers/concerns/foreman/controller/parameters/http_proxy.rb :

  def http_proxy_params

method is used by WebUI, but adding a debug log there like:

Rails.logger.info("PavelM: http_proxy_params: params=#{params},..")

I see:

2022-05-18T16:17:40 [I|app|c0a94ae5] Processing by HttpProxiesController#test_connection as */*
2022-05-18T16:17:40 [I|app|c0a94ae5]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"..", "http_proxy"=>{"name"=>"proxy_03221494", "url"=>"..", "username"=>"proxy", "location_ids"=>["", "2"], "organization_ids"=>["", "1"]}, "fakepassword"=>"[FILTERED]", "test_url"=>"https://aws.amazon.com"}

PavelM: http_proxy_params: params={"utf8"=>"✓", "_method"=>"patch", "authenticity_token"=>"...", "http_proxy"=>{"name"=>"proxy_03221494", "url"=>"..", "username"=>"proxy", "location_ids"=>["", "2"], "organization_ids"=>["", "1"]}, "fakepassword"=>"", "test_url"=>"https://aws.amazon.com", "controller"=>"http_proxies", "action"=>"test_connection", "locale"=>nil}

BUT no "password" parameter there.


So I guess the HttpProxiesController#test_connection method filtered out the "password" parameter completely?

Comment 2 Eric Helms 2024-06-06 12:22:41 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.