Bug #35360
closedOnly first certificate from a content credential is considered by katello when updating CDN configuration to use Network Sync
Description
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.