Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use client certificates for Candlepin events #11327

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Feb 28, 2025

What are the changes introduced in this pull request?

This relies upon first getting in theforeman/puppet-certs#490

The Candlepin events use the Foreman client certificates but the default CA since Candlepin runs using localhost certificates generated by the default CA. This means that it can't use the /etc/foreman/proxy_ca.pem certificate in it's current form as it represents the server CA. In the dependent PR, this would move to using a bundle CA combining the default and server CA into the single file allowing it to be used.

In production, the candlepin_events get configured in katello.yaml as:

  :candlepin_events:
    :ssl_cert_file: /etc/foreman/client_cert.pem
    :ssl_key_file: /etc/foreman/client_key.pem
    :ssl_ca_file: /etc/pki/katello/certs/katello-default-ca.crt

If this change goes forward, we would remove this section entirely, and rely upon Foreman core to handle configuration of certificates and reduce the configuration surface area of Katello. It would then follow that we can drop this parameter as well:

  :candlepin:
    :ca_cert_file: /etc/pki/katello/certs/katello-default-ca.crt

Which the code is already prepared to handle (https://github.com/Katello/katello/blob/master/app/services/cert/certs.rb#L31-L33).

What are the testing steps for this pull request?

  1. The Packit PR from this change needs to be installed.
  2. Install fresh or update install with custom certificates (this can be helpful).
  3. The installer PR is needed (Bundle default and server CA certificate and use for Foreman client CA theforeman/puppet-certs#490)

This can either be installed via Forklift, or wait for it to land in the installer before testing this.

@ehelms ehelms force-pushed the use-client-certs-candlepin-events branch from 4f2ab3f to a0de29d Compare February 28, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant