Smart Proxy 5.0.1 serves only the leaf certificate from a full-chain PEM on port 8443 — WEBrick SSLExtraChainCert not configured

Summary

A remote content-enabled Smart Proxy deployed with foremanctl serves only the leaf certificate on HTTPS port 8443, even when its configured server certificate PEM contains both the leaf and issuing intermediate.

The full-chain file is correctly mounted inside the running container. The Smart Proxy launcher appears to load only the first certificate and does not pass the remaining certificates to WEBrick through its supported SSLExtraChainCert option.

Is there a supported configuration for the server intermediate chain that I have missed, or does this require a Smart Proxy code change?

Environment

Component Version
Host OS Rocky Linux 9.7
Foremanctl 3.3.3-1.el9
python3.12-obsah 1.11.0-1.el9
Podman 5.8.2
Smart Proxy package foreman-proxy-5.0.1-1.el10.noarch
Smart Proxy image tag quay.io/foreman/foreman-proxy:5.0
WEBrick 1.9.2
Container OpenSSL 3.5.8
Deployment flavor foreman-proxy-content

Running image repository digest:

quay.io/foreman/foreman-proxy@sha256:73d966f3477e623dbec4c68a789fcbc65809ae856262dc55971507e5c58b2a81

The container uses EL10 packages; the VM host remains Rocky Linux 9.7.

Configuration

  • The public Proxy service FQDN differs from the internal Linux hostname.
  • A publicly trusted wildcard certificate covers the public service FQDN.
  • The public server certificate and internal client-authentication certificate are separate.
  • The server certificate PEM contains:
    1. Server leaf certificate.
    2. Issuing intermediate certificate.
  • No root certificate is included in the server PEM.

Example public service name used below:

proxy.stage.example.com

Expected behavior

The Smart Proxy HTTPS listener should present the leaf and issuing intermediate certificates when configured with a full-chain PEM.

Client-certificate verification and its existing CA trust configuration should remain unchanged.

Actual behavior

  • Apache HTTPS on port 443 passes normal certificate verification.
  • Smart Proxy HTTPS on port 8443 presents only the leaf certificate.
  • Ordinary verification of port 8443 fails:
curl: (60) SSL certificate problem: unable to get local issuer certificate
  • Providing the issuing CA chain explicitly to curl allows the request to succeed with TLS and hostname verification enabled.

The Proxy deployment, registration into Foreman, and initial content synchronization completed successfully.

Reproduction and verification

1. Verify the full-chain PEM is mounted inside the container

podman exec foreman-proxy \
  grep -c -- '-----BEGIN CERTIFICATE-----' \
  /etc/foreman-proxy/ssl_cert.pem

Result:

2

The SHA-256 checksum of the mounted certificate file matches the prepared host full-chain file.

The certificate secret was replaced using:

podman secret create --replace \
  foreman-proxy-ssl-cert \
  /path/to/server-fullchain.pem

The Smart Proxy service was then restarted:

systemctl restart foreman-proxy

After restart, the mounted file still contains both certificates, but the listener serves only the leaf.

2. Test normal HTTPS verification

curl --silent --show-error \
  --connect-timeout 15 --max-time 30 \
  --output /dev/null \
  --write-out 'HTTP status: %{http_code}\n' \
  https://proxy.stage.example.com:8443/features

Result:

curl: (60) SSL certificate problem: unable to get local issuer certificate
HTTP status: 000

3. Inspect the certificates presented by the listener

openssl s_client \
  -connect proxy.stage.example.com:8443 \
  -servername proxy.stage.example.com \
  -showcerts </dev/null 2>/dev/null \
  | awk '/-----BEGIN CERTIFICATE-----/{p=1} p{print} /-----END CERTIFICATE-----/{p=0}' \
  | openssl crl2pkcs7 -nocrl -certfile /dev/stdin \
  | openssl pkcs7 -print_certs -noout

Only the wildcard leaf is shown:

subject=CN=*.stage.example.com
issuer=C=US, O=DigiCert Inc, OU=www.digicert.com, CN=RapidSSL TLS RSA CA G1

The issuing intermediate is absent.

4. Test with the issuing CA chain supplied explicitly

curl --silent --show-error \
  --cacert /path/to/server-ca-chain.pem \
  --connect-timeout 15 --max-time 30 \
  --output /dev/null \
  --write-out 'HTTP status: %{http_code}\n' \
  https://proxy.stage.example.com:8443/features

Result:

HTTP status: 200

No --insecure/-k option is used.

Relevant Smart Proxy implementation

In /usr/share/foreman-proxy/lib/launcher.rb, the HTTPS configuration includes:

:SSLVerifyClient => OpenSSL::SSL::VERIFY_PEER,
:SSLPrivateKey => load_ssl_private_key(settings.ssl_private_key),
:SSLCertificate => load_ssl_certificate(settings.ssl_certificate),
:SSLCACertificateFile => settings.ssl_ca_file,

The certificate loader is:

def load_ssl_certificate(path)
  OpenSSL::X509::Certificate.new(File.read(path))
rescue Exception => e
  logger.error "Unable to load SSL certificate. Are the values correct in settings.yml and do permissions allow reading?", e
  raise e
end

This appears to parse only the first certificate from the PEM file.

WEBrick supports an explicit intermediate chain

In the installed WEBrick implementation:

/usr/share/gems/gems/webrick-1.9.2/lib/webrick/ssl.rb

The configuration includes:

:SSLExtraChainCert => nil,

The SSL context construction includes:

ctx.cert = config[:SSLCertificate]
ctx.extra_chain_cert = config[:SSLExtraChainCert]
ctx.ca_file = config[:SSLCACertificateFile]

Ruby OpenSSL also confirms support:

podman exec foreman-proxy ruby -e '
  require "openssl"
  context = OpenSSL::SSL::SSLContext.new
  puts "extra_chain_cert= supported: #{context.respond_to?(:extra_chain_cert=)}"
'

Result:

extra_chain_cert= supported: true

Possible correction

If no supported setting already exists, could the launcher:

  1. Load the first PEM certificate as the server leaf.
  2. Parse the remaining PEM certificates.
  3. Pass those certificates through WEBrick’s SSLExtraChainCert option?

This would allow a leaf-plus-intermediate PEM to supply the served chain without changing ssl_ca_file or client-certificate verification.

No launcher workaround has been applied yet.

Impact

Clients using normal system trust cannot verify the Proxy’s 8443 HTTPS endpoint unless the missing intermediate is available through their local verification configuration.

A client registration attempt also failed, and that client independently reproduces this 8443 TLS error. However, I have not yet confirmed that this was the precise failing request in the registration command.

Content synchronization through the separate Pulpcore endpoint on port 443 succeeded.

Questions

  1. Is there an existing supported setting for the server intermediate chain?
  2. Is this a known issue or already fixed in a newer release?
  3. Is a full-chain PEM the recommended custom server certificate input for this deployment?
  4. If a code change is needed, is the Smart Proxy launcher the appropriate place to handle the extra chain?

I have not disabled TLS verification, changed the client-authentication CA configuration, or altered client trust stores to work around the issue.

This deployment already separates public server certificates from internal client-authentication certificates. The reported issue concerns presentation of the server’s intermediate chain, not client certificate CN authorization.

Not at the moment, but it is being worked on in SAT-52472 - Supply full certificate chains for custom server certificates by ofedoren · Pull Request #941 · theforeman/foremanctl · GitHub and Fixes #36755 - Send full certificate chain to clients by ofedoren · Pull Request #962 · theforeman/smart-proxy · GitHub .

Thanks. Looking forward for this.

With Foremanctl 3.3.3, Core uses certificates_source=custom_server. We want a remote content Proxy to use its internal FQDN and server/client certificates generated by Foremanctl’s existing internal CA.

auth-bundle requires custom server certificate/key inputs because it inherits Core’s certificate mode. Passing certificates_source: default through -e does not satisfy CLI constraint validation.

What is the supported command or configuration for generating an internal-server Proxy bundle without changing Core’s custom-server configuration or regenerating its CA?

Also another questions,

How does Foremanctl 3.3.3 generate an internally issued Proxy server bundle when Core is configured for a custom public server certificate?