Puppet Class: simp_apache::ssl
- Defined in:
- manifests/ssl.pp
Summary
Configures an Apache server with SSL supportOverview
Ensures that the appropriate files are in the appropriate places and have the correct permissions.
@NOTE: Any parameter that comes directly from Apache is not documented here and should be found in the Apache mod_ssl reference documentation.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'manifests/ssl.pp', line 89
class simp_apache::ssl (
Array[Variant[Simplib::Host::Port, Simplib::Port]] $listen = [443],
Simplib::Netlist $trusted_nets = simplib::lookup('simp_options::trusted_nets', { 'default_value' => ['127.0.0.1', '::1'] }),
Array[String] $openssl_cipher_suite = simplib::lookup('simp_options::openssl::cipher_suite', { 'default_value' => ['DEFAULT', '!MEDIUM'] }),
Array[String] $ssl_protocols = ['TLSv1.2'],
Boolean $ssl_honor_cipher_order = true,
String $sslverifyclient = 'require',
Integer $sslverifydepth = 10,
Variant[Boolean,Enum['simp']] $pki = simplib::lookup('simp_options::pki', { 'default_value' => false }),
String $app_pki_external_source = simplib::lookup('simp_options::pki::source', { 'default_value' => '/etc/pki/simp/x509' }),
Stdlib::AbsolutePath $app_pki_dir = '/etc/pki/simp_apps/simp_apache/x509',
Stdlib::AbsolutePath $app_pki_ca_dir = "${app_pki_dir}/cacerts",
Stdlib::AbsolutePath $app_pki_cert = "${app_pki_dir}/public/${facts['networking']['fqdn']}.pub",
Stdlib::AbsolutePath $app_pki_key = "${app_pki_dir}/private/${facts['networking']['fqdn']}.pem",
String $logformat = '%t %h %{SSL_CLIENT_S_DN_CN}x %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b %s',
Boolean $enable_default_vhost = true,
Boolean $firewall = simplib::lookup('simp_options::firewall', { 'default_value' => false, }),
Boolean $haveged = simplib::lookup('simp_options::haveged', { 'default_value' => false })
) {
include 'simp_apache'
if $haveged { include 'haveged' }
file { '/etc/httpd/conf.d/ssl.conf':
ensure => 'file',
owner => pick($simp_apache::conf::user,'root'),
group => pick($simp_apache::conf::group,'apache'),
mode => '0640',
content => template("${module_name}/etc/httpd/conf.d/ssl.conf.erb"),
notify => Class['simp_apache::service']
}
if $firewall {
include 'iptables'
iptables::listen::tcp_stateful { 'allow_https':
order => 11,
trusted_nets => $trusted_nets,
dports => $listen
}
}
if $pki {
pki::copy { 'simp_apache':
source => $app_pki_external_source,
group => pick($simp_apache::conf::group,'apache'),
pki => $pki,
notify => Class['simp_apache::service']
}
}
}
|