-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(SIMP-2448) Updated pki scheme (#26)
(SIMP-2448) Updated pki scheme * Pki quickfix * Application certs now in x509 SIMP-2448 #close
- Loading branch information
1 parent
a158872
commit 6095591
Showing
6 changed files
with
51 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
* Tue Jan 10 2017 Nick Markowski <[email protected]> - 5.0.1-0 | ||
- Updated the pki scheme | ||
- Application certs now managed in /etc/pki/simp_apps/postfix/x509 | ||
|
||
* Wed Jan 04 2017 Nick Miller <[email protected]> - 5.0.1-0 | ||
- Strong type module | ||
- Use simp_options catalyst lookups and parameter names | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,15 +35,37 @@ | |
# If true, include haveged to assist with entropy generation. | ||
# | ||
# @param pki | ||
# If simp, include SIMP's ::pki module and use pki::copy to manage certs | ||
# If true, don't include SIMP's ::pki module, but still use pki::copy | ||
# If false, don't include SIMP's ::pki module, and don't use pki::copy | ||
# * If 'simp', include SIMP's pki module and use pki::copy to manage | ||
# application certs in /etc/pki/simp_apps/postfix/x509 | ||
# * If true, do *not* include SIMP's pki module, but still use pki::copy | ||
# to manage certs in /etc/pki/simp_apps/postfix/x509 | ||
# * If false, do not include SIMP's pki module and do not use pki::copy | ||
# to manage certs. You will need to appropriately assign a subset of: | ||
# * app_pki_dir | ||
# * app_pki_key | ||
# * app_pki_cert | ||
# * app_pki_ca | ||
# * app_pki_ca_dir | ||
# | ||
# @param app_pki_external_source | ||
# Where to copy certs from for TLS. | ||
# * If pki = 'simp' or true, this is the directory from which certs will be | ||
# copied, via pki::copy. Defaults to /etc/pki/simp/x509. | ||
# | ||
# * If pki = false, this variable has no effect. | ||
# | ||
# @param app_pki_dir | ||
# Where to copy certs to for TLS. | ||
# This variable controls the basepath of $app_pki_key, $app_pki_cert, | ||
# $app_pki_ca, $app_pki_ca_dir, and $app_pki_crl. | ||
# It defaults to /etc/pki/simp_apps/postfix/pki. | ||
# | ||
# @param app_pki_key | ||
# Path and name of the private SSL key file | ||
# | ||
# @param app_pki_cert | ||
# Path and name of the public SSL certificate | ||
# | ||
# @param app_pki_ca_dir | ||
# Path to the CA. | ||
# | ||
# @author Trevor Vaughan <[email protected]> | ||
# | ||
|
@@ -56,12 +78,12 @@ | |
Boolean $enforce_tls = true, | ||
Postfix::ManCiphers $mandatory_ciphers = 'high', | ||
Boolean $haveged = simplib::lookup('simp_options::haveged', { 'default_value' => false }), | ||
Stdlib::Absolutepath $app_pki_dir = '/etc/postfix', | ||
Stdlib::Absolutepath $app_pki_external_source = simplib::lookup('simp_options::pki::source', { 'default_value' => '/etc/simp/pki' }), | ||
Stdlib::Absolutepath $app_pki_key = "${app_pki_dir}/pki/private/${facts['fqdn']}.pem", | ||
Stdlib::Absolutepath $app_pki_cert = "${app_pki_dir}/pki/public/${facts['fqdn']}.pub", | ||
Stdlib::Absolutepath $app_pki_ca_dir = "${app_pki_dir}/pki/cacerts", | ||
Variant[Enum['simp'],Boolean] $pki = simplib::lookup('simp_options::pki', { 'default_value' => false }) | ||
Variant[Enum['simp'],Boolean] $pki = simplib::lookup('simp_options::pki', { 'default_value' => false }), | ||
Stdlib::Absolutepath $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/postfix/x509', | ||
Stdlib::Absolutepath $app_pki_key = "${app_pki_dir}/private/${facts['fqdn']}.pem", | ||
Stdlib::Absolutepath $app_pki_cert = "${app_pki_dir}/public/${facts['fqdn']}.pub", | ||
Stdlib::Absolutepath $app_pki_ca_dir = "${app_pki_dir}/cacerts" | ||
) { | ||
validate_net_list($trusted_nets) | ||
|
||
|
@@ -111,22 +133,13 @@ | |
} | ||
|
||
if $pki { | ||
pki::copy { $app_pki_dir: | ||
pki::copy { 'postfix': | ||
pki => $pki, | ||
source => $app_pki_external_source, | ||
group => 'postfix', | ||
notify => Service['postfix'] | ||
} | ||
} | ||
else { | ||
file { "${app_pki_dir}/pki": | ||
ensure => 'directory', | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0640', | ||
source => $app_pki_external_source | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters