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

Rely on the generated CA certificate location when deploying the CA cert #492

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

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Mar 1, 2025

The /etc/pki/katello location for the CA certificate is needed by the Apache service and not as a general purpose location for the CA certificate. Other services that have certificates can rely on the CA from the ssl-build directory when deploying rather than an intermediate step that has it deployed to the Apache needed location. This should give a bit better separation of concerns.

Requires - #487

@ehelms ehelms force-pushed the use-ca-from-ssl-build branch from 06d407a to a49f416 Compare March 4, 2025 13:06
@ehelms ehelms marked this pull request as ready for review March 4, 2025 13:11
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the direction, but CI doesn't like you.

@ehelms
Copy link
Member Author

ehelms commented Mar 4, 2025

See #488 (comment) about the failure

@ehelms ehelms force-pushed the use-ca-from-ssl-build branch 2 times, most recently from e81090e to 414176d Compare March 5, 2025 01:38
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I merged my PR and created a merge conflict.

@@ -15,7 +15,7 @@
String $org_unit = 'PUPPET',
String $expiration = $certs::expiration,
Stdlib::Absolutepath $ca_key_password_file = $certs::ca_key_password_file,
Stdlib::Absolutepath $server_ca = $certs::katello_server_ca_cert,
Stdlib::Absolutepath $server_ca = $certs::ca::server_ca_path,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue is that you can't be sure this is set. We can with $certs::* because this class inherits from certs.

I'd be tempted to define server_ca_path (and default_ca_path in $certs and then simply use $certs::server_ca_path in certs::ca.

@ehelms ehelms force-pushed the use-ca-from-ssl-build branch from 353bd52 to cd1b917 Compare March 5, 2025 21:57
mode => '0440',
require => File[$server_ca],
ensure => file,
source => pick($server_ca, $certs::ca::server_ca_path),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekohl Thoughts on this approach? With the undef optional parameter in the class?

I could just drop the class parameter all together - I don't think it really gets any value or will be used at this point. The server_ca_path is tied to the certs::ca class as that is what generates / defines it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants