-
Notifications
You must be signed in to change notification settings - Fork 48
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
Drop certs and ensure ownership of keys #351
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,31 +21,38 @@ | |
Boolean $use_pulp_2_for_docker = false, | ||
Boolean $use_pulp_2_for_yum = false, | ||
Stdlib::Absolutepath $repo_export_dir = '/var/lib/pulp/katello-export', | ||
Stdlib::Absolutepath $pulp_client_ca_cert = '/etc/foreman-pki/certs/ca/ca.crt', | ||
Stdlib::Absolutepath $pulp_client_cert = '/etc/foreman-pki/certs/foreman/foreman-to-pulp.crt', | ||
Stdlib::Absolutepath $pulp_client_key = '/etc/foreman-pki/certs/foreman/foreman-to-pulp.key', | ||
Stdlib::Absolutepath $candlepin_ca_cert = '/etc/foreman-pki/certs/ca/ca.crt', | ||
Stdlib::Absolutepath $candlepin_events_ssl_cert = '/etc/foreman-pki/certs/foreman/foreman-to-candlepin.crt', | ||
Stdlib::Absolutepath $candlepin_events_ssl_key = '/etc/foreman-pki/certs/foreman/foreman-to-candlepin.key', | ||
Stdlib::Absolutepath $crane_ca_cert = '/etc/foreman-pki/certs/ca/ca.crt', | ||
) { | ||
include foreman | ||
include certs | ||
include certs::apache | ||
include certs::candlepin | ||
include certs::foreman | ||
include certs::pulp_client | ||
include katello::params | ||
include foreman::plugin::tasks | ||
|
||
foreman_config_entry { 'pulp_client_cert': | ||
value => $certs::pulp_client::client_cert, | ||
ignore_missing => false, | ||
require => [Class['certs::pulp_client'], Foreman::Rake['db:seed']], | ||
file { $candlepin_events_ssl_key: | ||
group => $foreman::group, | ||
mode => '0640', | ||
} | ||
|
||
file { $pulp_client_key: | ||
group => $foreman::group, | ||
mode => '0640', | ||
} ~> | ||
foreman_config_entry { 'pulp_client_cert': | ||
value => $pulp_client_cert, | ||
ignore_missing => false, | ||
require => Foreman::Rake['db:seed'], | ||
} ~> | ||
foreman_config_entry { 'pulp_client_key': | ||
value => $certs::pulp_client::client_key, | ||
value => $pulp_client_key, | ||
ignore_missing => false, | ||
require => [Class['certs::pulp_client'], Foreman::Rake['db:seed']], | ||
require => Foreman::Rake['db:seed'], | ||
} | ||
Comment on lines
+41
to
54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a thought: can we configure Pulp 3 to use the internal CA for client auth just like we do with Foreman? That way we can use the same Foreman setting to connect to Smart Proxies and simplifies the application overall. Perhaps @jlsherrill can share his thoughts as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Pulp client certificates use a CN of In the newer certificate setup, I have simplified a lot of this down to really just setting CN since the rest of the attributes are largely arbitrary crap we were putting in there. So I think this could work, if Pulp/Django will allow a "hostname" for a user. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we only allow a single user ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We only create one user in our implementation of it. I think what you describe is what we do today via: https://github.com/theforeman/puppet-pulpcore/blob/master/templates/settings.py.erb#L28 |
||
|
||
include foreman::plugin::tasks | ||
|
||
Class['certs', 'certs::ca', 'certs::apache'] ~> Class['apache::service'] | ||
|
||
# Used in katello.yaml.erb | ||
$enable_ostree = $katello::params::enable_ostree | ||
$enable_yum = $katello::params::enable_yum | ||
|
@@ -54,15 +61,12 @@ | |
$enable_docker = $katello::params::enable_docker | ||
$enable_deb = $katello::params::enable_deb | ||
$pulp_url = $katello::params::pulp_url | ||
$pulp_ca_cert = $certs::katello_server_ca_cert # TODO: certs::apache::... | ||
|
||
$candlepin_url = $katello::params::candlepin_url | ||
$candlepin_oauth_key = $katello::params::candlepin_oauth_key | ||
$candlepin_oauth_secret = $katello::params::candlepin_oauth_secret | ||
$candlepin_ca_cert = $certs::ca_cert | ||
$candlepin_events_ssl_cert = $certs::candlepin::client_cert | ||
$candlepin_events_ssl_key = $certs::candlepin::client_key | ||
|
||
$crane_url = $katello::params::crane_url | ||
$crane_ca_cert = $certs::katello_server_ca_cert | ||
$postgresql_evr_package = $katello::params::postgresql_evr_package | ||
$manage_db = $foreman::db_manage | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also reuse the Foreman client cert, at least by default? Perhaps it needs application changes, but it makes the application easier.