-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from EncoreTechnologies/bugfix/duplicate-nsswit…
…ch-rhel8-ciphers Fixing duplicate nsswitch. Added RHEL/CentOS 8 ciphers support
- Loading branch information
Showing
8 changed files
with
216 additions
and
82 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 |
---|---|---|
|
@@ -163,6 +163,64 @@ If true, then the parameter '--no-ui-redirect' is passed to the IPA server insta | |
#### `realm` | ||
The name of the IPA realm to create or join (UPPERCASE). | ||
|
||
### Cipher hardening on CentOS/RHEL 8 | ||
|
||
**NOTE:** These settings are automatically applied inside of `ipa::params`, | ||
they are documented here as a reference. | ||
|
||
```puppet | ||
# IPA on RHEL/CentOS 8 switched to mod_ssl, away from mod_nss | ||
# mod_ssl in RHEL/CentOS 8 uses the "system" cryto policy for its ciphers and protocols | ||
# see: | ||
# https://www.redhat.com/en/blog/how-customize-crypto-policies-rhel-82 | ||
# https://access.redhat.com/articles/3642912 | ||
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening | ||
$nss_ssl_ciphers = [] | ||
$nss_ssl_protocols = [] | ||
$ds_ssl_ciphers = [ | ||
# TLS 1.2 | ||
'+TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256', | ||
'+TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384', | ||
'+TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256', | ||
'+TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', | ||
# TLS 1.3 | ||
'+TLS_AES_128_GCM_SHA256', | ||
'+TLS_AES_256_GCM_SHA384', | ||
'+TLS_CHACHA20_POLY1305_SHA256', | ||
] | ||
$ds_ssl_min_version = 'TLS1.2' | ||
# Dogtag PKI Tomcat | ||
# you _must_ set both the TLS 1.2 and 1.3 ciphers here though, otherwise you'll get an error | ||
# when registering your clients: | ||
# Joining realm failed: HTTP POST to URL 'https://freeipa.maludy.home:443/ipa/xml' failed. libcurl failed even to execute the HTTP transaction, explaining: SSL certificate problem: EE certificate key too weak | ||
$pki_ssl_ciphers = [ | ||
# TLS 1.2 | ||
'+TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256', | ||
'+TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384', | ||
'+TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256', | ||
'+TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', | ||
# TLS 1.3 | ||
'+TLS_AES_128_GCM_SHA256', | ||
'+TLS_AES_256_GCM_SHA384', | ||
'+TLS_CHACHA20_POLY1305_SHA256', | ||
] | ||
# PKI Tomcat doesn't, yet, support tls1_3 protocol, so leave it to 1.2 | ||
# if you try to set it to tls1_2:tls1_3 [email protected] service will fail to start | ||
$pki_ssl_protocol_range = 'tls1_2:tls1_2' | ||
class { 'ipa': | ||
ipa_role => 'master', | ||
# nss ciphers and protocols not used in CentOS 8 | ||
nss_ssl_ciphers => $nss_ssl_ciphers, | ||
nss_ssl_protocols => $nss_ssl_protocols, | ||
ds_ssl_ciphers => $ds_ssl_ciphers, | ||
ds_ssl_min_version => $ds_ssl_min_version, | ||
pki_ssl_ciphers => $pki_ssl_ciphers, | ||
pki_ssl_protocol_range => $pki_ssl_protocol_range, | ||
} | ||
``` | ||
|
||
## Limitations | ||
|
||
|
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
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 |
---|---|---|
|
@@ -11,16 +11,92 @@ | |
$autofs_service = 'autofs' | ||
$sssd_service = 'sssd' | ||
|
||
$ds_ssl_min_version_tls12 = 'TLS1.2' | ||
$ds_ssl_ciphers_tls12 = [ | ||
'+TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256', | ||
'+TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384', | ||
'+TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256', | ||
'+TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', | ||
] | ||
$ds_ssl_ciphers_tls13 = [ | ||
'+TLS_AES_128_GCM_SHA256', | ||
'+TLS_AES_256_GCM_SHA384', | ||
'+TLS_CHACHA20_POLY1305_SHA256', | ||
] | ||
$pki_ssl_ciphers_tls12 = $ds_ssl_ciphers_tls12 | ||
$pki_ssl_ciphers_tls13 = $ds_ssl_ciphers_tls13 | ||
$pki_ssl_protocol_range_tls12 = 'tls1_2:tls1_2' | ||
|
||
$nss_ssl_ciphers_tls12 = [ | ||
'+ecdhe_ecdsa_aes_128_gcm_sha_256', | ||
'+ecdhe_ecdsa_aes_256_gcm_sha_384', | ||
'+ecdhe_ecdsa_chacha20_poly1305_sha_256', | ||
'+ecdhe_rsa_aes_128_gcm_sha_256', | ||
'+ecdhe_rsa_aes_256_gcm_sha_384', | ||
'+ecdhe_rsa_chacha20_poly1305_sha_256', | ||
] | ||
$nss_ssl_protocols_tls12 = ['TLSv1.2'] | ||
|
||
case $facts['os']['family'] { | ||
'RedHat': { | ||
case $facts['os']['release']['major'] { | ||
/(7)/, /(8)/: { | ||
$service_stop_epp = 'systemctl stop <%= $service %>' | ||
$service_restart_epp = 'systemctl restart <%= $service %>' | ||
} | ||
/(6)/: { | ||
$service_stop_epp = 'service <%= $service %> stop' | ||
$service_restart_epp = 'service <%= $service %> restart' | ||
|
||
$ds_ssl_ciphers = undef | ||
$ds_ssl_min_version = undef | ||
$nss_ssl_ciphers = undef | ||
$nss_ssl_protocols = undef | ||
$pki_ssl_ciphers = undef | ||
$pki_ssl_protocol_range = undef | ||
} | ||
/(7)/: { | ||
$service_stop_epp = 'systemctl stop <%= $service %>' | ||
$service_restart_epp = 'systemctl restart <%= $service %>' | ||
|
||
$ds_ssl_ciphers = $ds_ssl_ciphers_tls12 | ||
$ds_ssl_min_version = $ds_ssl_min_version_tls12 | ||
$nss_ssl_ciphers = $nss_ssl_ciphers_tls12 | ||
$nss_ssl_protocols = $nss_ssl_protocols_tls12 | ||
$pki_ssl_ciphers = $pki_ssl_ciphers_tls12 | ||
$pki_ssl_protocol_range = $pki_ssl_protocol_range_tls12 | ||
} | ||
/(8)/: { | ||
$service_stop_epp = 'systemctl stop <%= $service %>' | ||
$service_restart_epp = 'systemctl restart <%= $service %>' | ||
|
||
# dirsrv allows for TLS 1.2 and 1.3 | ||
# note: if you don't have TLS 1.3 enabled, you'll get an SSL error when trying to register clients: | ||
# Joining realm failed: Unable to initialize STARTTLS session | ||
# Connect error: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure | ||
# Failed to bind to server! | ||
# Retrying with pre-4.0 keytab retrieval method... | ||
# Unable to initialize STARTTLS session | ||
# Connect error: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure | ||
# Failed to bind to server! | ||
# Failed to get keytab | ||
# child exited with 9 | ||
$ds_ssl_ciphers = $ds_ssl_ciphers_tls12 + $ds_ssl_ciphers_tls13 | ||
$ds_ssl_min_version = $ds_ssl_min_version_tls12 | ||
|
||
# IPA on RHEL/CentOS 8 switched to mod_ssl, away from mod_nss | ||
# mod_ssl in RHEL/CentOS 8 uses the "system" cryto policy for its ciphers and protocols | ||
# see: | ||
# https://www.redhat.com/en/blog/how-customize-crypto-policies-rhel-82 | ||
# https://access.redhat.com/articles/3642912 | ||
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening | ||
$nss_ssl_ciphers = [] | ||
$nss_ssl_protocols = [] | ||
|
||
# Dogtag PKI Tomcat | ||
# you _must_ set both the TLS 1.2 and 1.3 ciphers here though, otherwise you'll get an error | ||
# when registering your clients: | ||
# Joining realm failed: HTTP POST to URL 'https://freeipa.maludy.home:443/ipa/xml' failed. libcurl failed even to execute the HTTP transaction, explaining: SSL certificate problem: EE certificate key too weak | ||
$pki_ssl_ciphers = $pki_ssl_ciphers_tls12 + $pki_ssl_ciphers_tls13 | ||
# PKI Tomcat doesn't, yet, support tls1_3 protocol, so leave it to 1.2 | ||
# if you try to set it to tls1_2:tls1_3 [email protected] service will fail to start | ||
$pki_ssl_protocol_range = $pki_ssl_protocol_range_tls12 | ||
} | ||
default: { fail("ERROR: Unsupported RHEL version: ${facts['os']['full']}") } | ||
} | ||
|
@@ -33,6 +109,13 @@ | |
/(16.04)/: { | ||
$service_stop_epp = 'systemctl stop <%= $service %>' | ||
$service_restart_epp = 'systemctl restart <%= $service %>' | ||
$ds_ssl_ciphers = undef | ||
$ds_ssl_min_version = undef | ||
$nss_ssl_ciphers = undef | ||
$nss_ssl_protocols = undef | ||
$pki_ssl_ciphers = undef | ||
$pki_ssl_protocol_range = undef | ||
} | ||
default: { fail("ERROR: Unsupported Ubuntu version: ${facts['os']['full']}") } | ||
} | ||
|
Oops, something went wrong.