Bug 2088559

Summary: [RFE] Prevent repositories that are protected by client certificates from appearing in the list of available repositories at /pulp/content.
Product: Red Hat Satellite Reporter: Gourav Padholia <gpadholi>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: high Docs Contact:
Priority: high    
Version: 6.10.6CC: ahumbe, dalley, dkliban, egolov, ehelms, ggainey, gtalreja, hyu, lzap, mhulan, pcreech, rchan, vijsingh
Target Milestone: 6.14.0Keywords: FutureFeature, PrioBumpGSS, Regression, Security, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python39-pulpcore-3.22, foreman-installer-3.7.0-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:17:47 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:

Description Gourav Padholia 2022-05-19 16:53:57 UTC
Description of problem:
Repository/RPMs can be accessed, browse and downloaded from the browser without even downloading the client certificate on the browser. 

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

How reproducible:
100 %

Steps to Reproduce: 

1. Access the URL https://<satellite.example.com>/pulp/content/ or https://<capsule.example.com>/pulp/content/ in any browser. 

2. We can see all the repos synced to the Satellite or capsule without downloading the client certificate. We can even download the packages as well. 

3. We don't even require to login on the Satellite web UI for accessing these URL. 

Actual results:
RPMs synced to the Satellite/capsule can be accessed or downloaded without client certificate on the browser.  

Expected results:
This should give the error "Service Unavailable" the same as 6.9. Even with the client certificate on browser, it should also be required to login on the Satellite serve.

Additional info:

Comment 1 Eric Helms 2022-05-24 14:09:06 UTC
Created redmine issue https://projects.theforeman.org/issues/34950 from this bug

Comment 2 Eric Helms 2022-05-24 14:19:28 UTC
*** Bug 2075752 has been marked as a duplicate of this bug. ***

Comment 3 Eric Helms 2022-05-24 15:07:19 UTC
With the change from Pulp 2 to Pulp 3 there was a change in behavior in how protection of repositories is handled. It is true that in the current implementation the list of repositories is viewable but the repository itself and the content within it are both not browsable or downloadable without a valid client certificate. 

We are examining further whether viewing the list of available repositories is something we can gate.

Comment 4 Eric Helms 2022-07-01 19:25:20 UTC
Given Pulp 3 handles cert guard differently than Pulp 2 did, this particular bug would need to be an RFE, something akin to "Prevent repositories that are protected by client certificates from appearing in the list of available repositories at /pulp/content". If that is something you would like to see, please do update this to an RFE and the text. Any additional context or use case information to help the guide the team would also be appreciated.

Comment 5 Bryan Kearney 2022-07-01 20:04:34 UTC
Upstream bug assigned to ehelms

Comment 19 Robin Chan 2023-06-20 12:06:23 UTC
Requesting needsinfo from upstream developer dkliban, ggainey because the 'FailedQA' flag is set.

Comment 20 Evgeni Golov 2023-06-20 12:53:18 UTC
Dropped the Pulp-related NEEDINFOs as the remaining changes are NOT in the pulp realm (but in the installer) and the Pulp bits have been verified to be working as expected.

Comment 21 Evgeni Golov 2023-06-21 08:43:31 UTC
foreman-installer 3.7.0 now defaults to HIDE_GUARDED_DISTRIBUTIONS=True (but overrideable by the user), so this should be the last missing bit.

Moving to POST.

Comment 22 Evgeni Golov 2023-06-30 07:03:16 UTC
@pcreech why was this manually moved to ON_DEV? the fix is in foreman-installer-3.7.0-1 while we still only ship foreman-installer-3.7.0-0.4.rc3 in snap 5.

additionally, foreman-proxy and foreman-selinux packages weren't updated to their respective GA versions either.

Comment 24 Robin Chan 2023-06-30 09:05:16 UTC
Requesting needsinfo from upstream developer dkliban, ggainey because the 'FailedQA' flag is set.

Comment 27 Jameer Pathan 2023-07-18 12:31:27 UTC
Verified:

Verified with:
- foreman-installer-3.7.0.1-1.el8sat.noarch
- Satellite 6.14.0 snap 7

Test steps:
- satellite-installer --scenario satellite --full-help |grep foreman-proxy-content-pulpcore-hide-guarded-distributions
- Go to https://satellite.example.com/pulp/content/

Observations:
- foreman-proxy-content-pulpcore-hide-guarded-distributions installer option is present and is enabled by default.
- No content listed/downloadable on https://satellite.example.com/pulp/content/
- "403: [('PEM routines', 'get_name', 'no start line')]" when the setting is disabled.


Additional info:
# satellite-installer --full-help | grep foreman-proxy-content-pulpcore-hide-guarded-distributions
    --foreman-proxy-content-pulpcore-hide-guarded-distributions                  Hide distributions that are protected by a content guard from the default listing (current: true)
    --reset-foreman-proxy-content-pulpcore-hide-guarded-distributions            Reset pulpcore_hide_guarded_distributions to the default value (true)

Comment 30 errata-xmlrpc 2023-11-08 14:17:47 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 (Important: Satellite 6.14 security and 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.

https://access.redhat.com/errata/RHSA-2023:6818

Comment 31 Red Hat Bugzilla 2024-03-08 04:25:10 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days