Bug #30684
closedHTTP proxy password got reset to empty string after editing can cause 407 "Proxy Authentication Required" error
Description
Description
Cloned from: https://bugzilla.redhat.com/show_bug.cgi?id=1835539
Description of problem:
HTTP proxy password will reset to empty string after editing the existing HTTP proxy in the Web UI.
Before:
#<ActiveRecord::Relation [#<HttpProxy id: 5, name: "test_proxy", url: "http://xx.xx.xx.xx:xxxx", username: "myname", password: "encrypted-blah blah blah">]>
After:
#<ActiveRecord::Relation [#<HttpProxy id: 5, name: "test_proxy", url: "http://xx.xx.xx.xx:xxxx", username: "myname", password: "">]>
Steps to Reproduce:
1. Create a http proxy with username and password
2. Add it as the global content proxy.
3. Ensure it is working by enabling a repository or doing cdn scans.
4. Edit the http proxy you just created, don't do anything just click save button.
5. Try to enable a repository again using hammer
Actual results:
hammer repository-set enable --name "Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (RPMs)" --organization redhat
Could not enable repository:
407 "Proxy Authentication Required"
Cdn scan in Web UI -> Red Hat Repositories gets the following error:
No repositories available error.
Expected results:
Able list available repositories
Able enable repository successfully