Bug 1322954

Summary: When using a proxy without authentication with Satellite, it is not possible to sync repositories from sources that require authentication
Product: Red Hat Satellite Reporter: Prakash Ghadge <pghadge>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Perry Gagne <pgagne>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.6CC: bbuckingham, bkearney, bmbouter, cwelton, daviddavis, dkliban, ehelms, ggainey, gpayelka, ipanova, jcallaha, mhrivnak, pcreech, rbarlow, rchan, ttereshc
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 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:

Description Prakash Ghadge 2016-03-31 18:36:15 UTC
Description of problem:
When using a proxy without authentication with Satellite, it is not possible to sync repositories from sources that require authentication

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

When using the default settings in /etc/pulp/server/plugins.conf.d/yum_importer.json as generated by katello_install (containing "proxy_username": ""), the authentication gets stripped of new http(s) requests due to a bug in pulp-nectar. This error does not manifest if there is no "proxy_username" defined in the file.

When proxy_username is empty in the config file, it gets set to an empty unicode string (u'') as opposed when it is not set at all (then it is set to None). In the code there is a workaround for another bug (bugzilla 1021662), but this workaround only gets triggered when the proxy_username is None, not when it is an empty string. Since None and u'' both evaluate to false, it was a one line code change. Note that this problem only gets triggered when proxy_username is unset but present (as per the default Satellite 6.1 install).


How reproducible:
Always

Steps to Reproduce:
1. Configure a proxy server without authentication in Satellite6.
2. then try to synchronise an external non-redhat product that does require authentication (so using http://user:password@repourl.org)
3. the username and password get stripped from the url so the authentication fails.

Actual results:

Fails to download the repository from the source which requires the authentication

Expected results:

Should download the repository from the given source.


Additional info:

Fix proposed by the customer-
https://github.com/pulp/nectar/pull/47

Comment 2 Randy Barlow 2016-04-06 14:42:00 UTC
That commit has not been included in any nectar releases yet:

$ git branch --contains 1cd4eedb82fda41935e2596bd99e2839df0e8a0d
* master

I assume that Satellite has not cherry picked this commit into Nectar either, so the answer is probably no. All we need to do with upstream Pulp is to make a new Nectar release. I filed an upstream ticket to track this issue, and assigned it to Pulp 2.8

https://pulp.plan.io/issues/1820

Comment 4 pulp-infra@redhat.com 2016-04-06 16:13:59 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2016-04-06 16:14:01 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2016-04-26 23:03:56 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2016-05-17 20:00:50 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 8 pulp-infra@redhat.com 2016-05-23 13:30:31 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2016-05-26 20:31:18 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2016-05-31 17:31:05 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2016-06-17 17:31:13 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2016-06-27 17:01:32 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 13 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 14 Bryan Kearney 2016-07-26 15:31:34 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 16 Brad Buckingham 2016-08-03 14:23:50 UTC
The upstream pulp fix is completed; therefore, moving this bug to POST.

Comment 17 Bryan Kearney 2016-10-18 21:38:53 UTC
available in pulp 2.8.5 or later.

Comment 19 Satellite Program 2018-02-21 16:54:37 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, 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-2018:0336