Bug 2117382

Summary: Only first certificate from a content credential is considered by katello when updating CDN configuration to use Network Sync
Product: Red Hat Satellite Reporter: Joniel Pasqualetto <jpasqual>
Component: Inter Satellite SyncAssignee: Partha Aji <paji>
Status: CLOSED ERRATA QA Contact: Radek Mynar <rmynar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: alsouza, pcreech, saydas, snarya, vsedmik
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:35:13 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 Joniel Pasqualetto 2022-08-10 20:20:05 UTC
Description of problem:

Having an upstream Satellite using custom certs, which require a CA bundle, when configuring a downstream Satellite, only the first certificate of the bundle is used. 

Therefore, if the first certificate of the bundle is not the Root CA, but an intermediate, the validation against the certificate chain provided by the upstream Satellite fails.

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

Satellite 6.11

How reproducible: always, depending on how the user built their CA bundle. 


Steps to Reproduce:

1. Create a Satellite server to be used as upstream. Configure it with custom certificates signed by an intermediate CA.

RootCA -> Intermediate -> Satellite Certificate

2. Create a Satellite server to be used as downstream. Create a content certificate containing the bundle certificate used to sign the upstream certificates.  The bundle must be create using first the intermediate CA then the root ca.

3. On the downstream satellite, go to Content -> Subscriptions -> manage manifest -> Cdn Configuration -> Network Sync. Point it to the upstream SAtellite and choose the content credential create on step 2.

Actual results:

Fail with an SSL Error:  SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain) (OpenSSL::SSL::SSLError)


Expected results:

Should work, considering that the complete CA bundle was added to the content credential.

Additional info:

Possible workarounds:
- Change the order of the certificates inside the content credential, putting the Root CA first
- Create the content credential ONLY WITH THE ROOT CA.

Comment 2 Bryan Kearney 2022-08-17 20:05:12 UTC
Upstream bug assigned to paji

Comment 3 Bryan Kearney 2022-08-17 20:05:14 UTC
Upstream bug assigned to paji

Comment 4 Partha Aji 2022-09-19 18:52:00 UTC
Fix for this is the same as https://bugzilla.redhat.com/show_bug.cgi?id=2112098

Even though the steps to test are different.

Comment 5 Brad Buckingham 2022-09-20 09:36:02 UTC
Based upon comment 4, moving to POST as bug 2112098 is currently in MODIFIED.

Comment 6 Brad Buckingham 2022-09-23 13:20:04 UTC
Moving to ON_QA as the bug referenced in comment 4 went to ON_QA.

Comment 7 Radek Mynar 2022-10-07 09:45:45 UTC
Multiple certificates can be entered in content-credential. Synchronization using Network Sync and Custom CDN works no matter on certificates order. 

VERIFIED with Satellite 6.12 SNAP13 @RHEL8.6

Comment 11 errata-xmlrpc 2022-11-16 13:35:13 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.12 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-2022:8506