Description of problem:
Satellite 6.7 is not accepting the proxy password containing special characters like [ ] @ etc and test connection always fails.
Even if we just mention the password and submit, the password field remains blank.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Configure a squid proxy with the following details.
proxy: password: test]satellite@password+
2. Go to Satellite GUI --> Infrastructure --> HTTP Proxies --> Fill up all the details including the proxy_password, in Test URL mention "https://aws.amazon.com" and then click on "Test Connection".
3. With all options filled up, submit the settings.
4. Now open the newly created proxy and look at the password field.
At Step 2, with test connection, you will get an error pop up saying "bad password component"
At Step 4, we will be able to see that the password is blank
Satellite 6.7 should be able to accept the password with special characters properly and allow it to save\user further from GUI.
If I use the same password from the command line, it will work just fine without escaping anything.
# curl -I --proxy-user proxyuser:test]satellite@password+ --proxy squid.example.com:3128 https://aws.amazon.com
HTTP/1.1 200 Connection established
HTTP/1.1 200 OK
Date: Sun, 07 Jun 2020 14:10:24 GMT
Last-Modified: Thu, 04 Jun 2020 02:51:19 GMT
Set-Cookie: aws-priv=eyJ2IjoxLCJldSI6MCwic3QiOjB9; Version=1; Comment="Anonymous cookie for privacy regulations"; Domain=.amazon.com; Max-Age=94672800; Expires=Thu, 08-Jun-2023 08:10:24 GMT; Path=/
Set-Cookie: aws_lang=en; Domain=.amazon.com; Path=/
X-Cache: Miss from cloudfront
Via: 1.1 e3e9665628588ed211b9d1805feda855.cloudfront.net (CloudFront)
This problem still exists on Red Hat Satellite 6.8-Beta .
TL;DR: There is no workaround, we will need to patch foreman and restclient. Foreman patch will be small, restclient patch was already written by ManageIQ folks and we'll just need to borrow it from them.
There are two issues at play here.
The first is on our side. We try to stuff the user provided strings into an URI object, but that fails because special characters are not allowed there. If we escape the user provided strings first (turn '@' into '%40' and so on), this part should be resolved.
The other issue is restclient (the library we use for making http requests) does not unescape the proxy username and password, so even if we fix the first issue, then the escaped form will be sent to the proxy and the proxy will reject it. There is a PR opened against restclient which fixes this, but last movement there was in October 2018, so I'm afraid we can't wait for this to be fixed there. Unless I'm missing something the only real option we have is to monkey-patch restclient the same way ManageIQ did.
 - https://github.com/rest-client/rest-client/pull/665
 - https://github.com/ManageIQ/manageiq/pull/18105
This item was selected for a z-stream release (6.9.3) - can we petition the Foreman maintainers to review this sooner rather than later?
Fix was merged in upstream
Upstream bug assigned to email@example.com
Upstream bug assigned to firstname.lastname@example.org
- Satellite 6.9.6 snap 1
- Create HTTP Proxy with special characters in password
(Go to Infrastructure > Http Proxies > Click on "New Http Proxy")
- Fill the details related to HTTP Proxy and click on "Test connection" button.
- Go to Administer > Settings > Content. Set "Default HTTP Proxy" setting.
- Refresh manifest.
- Enable and sync repositories.
- "Test connection" button worked as expected.
- Manifest refresh, repository enable/disable and repository sync operation finished successfully.
- Tried following Http proxy password combination:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Satellite 6.9.6 Async Bug Fix Update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.