Bug #38469
closedHTTP Proxy "test connection" ignores passwords
Description
HTTP Proxy "test connection" ignores passwords
Cloned from 15662930
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):
All versions
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
tcpdump showing password is sent to the proxy for auth
Additional info:
Updated by Ian Ballou 8 months ago
- Category set to HTTP Proxy
- Assignee set to Ian Ballou
- Target version changed from Katello 4.19.0 to Katello 4.18.0
Updated by Ian Ballou 8 months ago
This is not reproducible on the latest code. Checking back to Katello 4.11.
Updated by Ian Ballou 8 months ago
- Status changed from New to Resolved
- Target version deleted (
Katello 4.18.0)
This was fixed some time before Katello 4.11.
Updated by Ian Ballou 7 months ago
Reusing this issue to make it more clear that the password needs to be typed back in to use the test connection button (or at least that's my proposal).
Updated by Ian Ballou 7 months ago
- Project changed from Katello to Foreman
- Category deleted (
HTTP Proxy) - Target version set to 3.16.0
- Triaged changed from Yes to No
Updated by The Foreman Bot 7 months ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/10616 added
Updated by Anonymous 6 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|a15ae0e6dd7be3c73ac7a93a2c5b45546ae376b4.