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

POC: Require user to define server and client certificates #951

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,17 @@
String $vhost_priority = $foreman::params::vhost_priority,
Stdlib::Port $server_port = $foreman::params::server_port,
Stdlib::Port $server_ssl_port = $foreman::params::server_ssl_port,
Stdlib::Absolutepath $server_ssl_ca = $foreman::params::server_ssl_ca,
Stdlib::Absolutepath $server_ssl_chain = $foreman::params::server_ssl_chain,
Stdlib::Absolutepath $server_ssl_cert = $foreman::params::server_ssl_cert,
Variant[Enum[''], Stdlib::Absolutepath] $server_ssl_certs_dir = $foreman::params::server_ssl_certs_dir,
Stdlib::Absolutepath $server_ssl_key = $foreman::params::server_ssl_key,
Variant[Enum[''], Stdlib::Absolutepath] $server_ssl_crl = $foreman::params::server_ssl_crl,
Stdlib::Absolutepath $server_ssl_ca = undef,
Stdlib::Absolutepath $server_ssl_chain = undef,
Stdlib::Absolutepath $server_ssl_cert = undef,
Variant[Enum[''], Stdlib::Absolutepath] $server_ssl_certs_dir = '',
Stdlib::Absolutepath $server_ssl_key = undef,
Variant[Enum[''], Stdlib::Absolutepath] '',
Optional[String] $server_ssl_protocol = $foreman::params::server_ssl_protocol,
Enum['none','optional','require','optional_no_ca'] $server_ssl_verify_client = $foreman::params::server_ssl_verify_client,
Stdlib::Absolutepath $client_ssl_ca = $foreman::params::client_ssl_ca,
Stdlib::Absolutepath $client_ssl_cert = $foreman::params::client_ssl_cert,
Stdlib::Absolutepath $client_ssl_key = $foreman::params::client_ssl_key,
Stdlib::Absolutepath $client_ssl_ca = undef,
Stdlib::Absolutepath $client_ssl_cert = undef,
Stdlib::Absolutepath $client_ssl_key = undef,
Boolean $oauth_active = $foreman::params::oauth_active,
Boolean $oauth_map_users = $foreman::params::oauth_map_users,
String $oauth_consumer_key = $foreman::params::oauth_consumer_key,
Expand Down
18 changes: 0 additions & 18 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -119,27 +119,9 @@
}
}

if fact('aio_agent_version') =~ String[1] {
$puppet_ssldir = '/etc/puppetlabs/puppet/ssl'
} else {
$puppet_ssldir = '/var/lib/puppet/ssl'
}

# If CA is specified, remote Foreman host will be verified in reports/ENC scripts
$client_ssl_ca = "${puppet_ssldir}/certs/ca.pem"
# Used to authenticate to Foreman, required if require_ssl_puppetmasters is enabled
$client_ssl_cert = "${puppet_ssldir}/certs/${lower_fqdn}.pem"
$client_ssl_key = "${puppet_ssldir}/private_keys/${lower_fqdn}.pem"

$vhost_priority = '05'

# Set these values if you want Apache to serve a CA-provided cert instead of puppet's
$server_ssl_ca = "${puppet_ssldir}/certs/ca.pem"
$server_ssl_chain = "${puppet_ssldir}/certs/ca.pem"
$server_ssl_cert = "${puppet_ssldir}/certs/${lower_fqdn}.pem"
$server_ssl_certs_dir = '' # lint:ignore:empty_string_assignment - this must be empty since we override a default
$server_ssl_key = "${puppet_ssldir}/private_keys/${lower_fqdn}.pem"
$server_ssl_crl = "${puppet_ssldir}/crl.pem"
$server_ssl_protocol = undef
$server_ssl_verify_client = 'optional'

Expand Down