9c6682effe
We don't need to use a separate CA chain for these certs, instead it is sufficient to just trust the self-signed cert. Moreover, we have been cheating by copying the same certs and keys to various directories for each service, so instead of bothering with keeping separate certs let's just formalize having a single pair. The cert will be used as its own CA and added to the system trusted certificates. The key still needs to be privately readable by certain system users, so we'll still copy that into the ssl directories for each service. Also, since we'll be changing these keys, make sure they are set up to notify the service they're supporting. Additionally, automate the trusting of our self-signed certs on the compute hosts which previously was done manually. The compute hosts need to be able to use encrypted rabbitmq and make API calls to keystone and neutron. Change-Id: Ibeea608e965e58c496a95b2f02a4bf6b13e15f0e
35 lines
751 B
Puppet
35 lines
751 B
Puppet
define infracloud::ssl_key(
|
|
$key_content,
|
|
$key_path = undef,
|
|
) {
|
|
if $key_path == undef {
|
|
$_key_path = "/etc/${name}/ssl/private/${::fqdn}.pem"
|
|
} else {
|
|
$_key_path = $key_path
|
|
}
|
|
|
|
# If the user isn't providing an unexpected path, create the directory
|
|
# structure.
|
|
if $key_path == undef {
|
|
file { "/etc/${name}/ssl":
|
|
ensure => directory,
|
|
owner => $name,
|
|
mode => '0775',
|
|
}
|
|
file { "/etc/${name}/ssl/private":
|
|
ensure => directory,
|
|
owner => $name,
|
|
mode => '0755',
|
|
require => File["/etc/${name}/ssl"],
|
|
before => File[$_key_path]
|
|
}
|
|
}
|
|
|
|
file { $_key_path:
|
|
ensure => present,
|
|
content => $key_content,
|
|
owner => $name,
|
|
mode => '0600',
|
|
}
|
|
}
|