Bug 1835539

Summary: HTTP proxy password got reset to empty string after editing can cause 407 "Proxy Authentication Required" error
Product: Red Hat Satellite Reporter: Hao Chang Yu <hyu>
Component: NetworkingAssignee: Avi Sharvit <asharvit>
Status: CLOSED ERRATA QA Contact: Radovan Drazny <rdrazny>
Severity: high Docs Contact:
Priority: high    
Version: 6.7.0CC: asharvit, egolov, saydas, swadeley, vijsingh
Target Milestone: 6.9.0Keywords: Triaged, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-2.3.0-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:14:53 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:
Bug Depends On:    
Bug Blocks: 1774324    

Description Hao Chang Yu 2020-05-14 01:58:46 UTC
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: "">]>


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

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

Comment 1 Stephen Wadeley 2020-08-10 19:10:45 UTC
Hello

issue still exists in 6.8 snap 11

Its confusing because there are some grey stars in that field so you do not realise you have lost your password.

Comment 2 Stephen Wadeley 2020-08-11 11:44:47 UTC
*** Bug 1777322 has been marked as a duplicate of this bug. ***

Comment 3 Avi Sharvit 2020-08-24 10:02:51 UTC
Upstream issue created: https://projects.theforeman.org/issues/30684

Comment 4 Bryan Kearney 2020-08-24 12:05:10 UTC
Upstream bug assigned to asharvit

Comment 5 Bryan Kearney 2020-08-24 12:05:13 UTC
Upstream bug assigned to asharvit

Comment 6 Bryan Kearney 2020-08-31 08:05:12 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30684 has been resolved.

Comment 7 Radovan Drazny 2021-02-12 15:55:24 UTC
Tested on Satellite 6.9.0 Snap 12 using the reproducer from the original report. Creating a HTTP proxy, and resubmitting it later without any changes doesn't reset the password anymore, Satellite is still able to authenticate with the proxy correctly.
There is still a minor issue submitted as BZ1928194, but that one is minor.

Comment 10 errata-xmlrpc 2021-04-21 13:14:53 UTC
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 (Moderate: Satellite 6.9 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1313