Bug 1478087
| Summary: | Tomcat is unaware of sslProtocols setting according to catalina logs | ||
|---|---|---|---|
| Product: | [Community] Candlepin (Migrated to Jira) | Reporter: | Chris Snyder <csnyder> |
| Component: | candlepin | Assignee: | Alex Wood <awood> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.0 | CC: | awood, bcourt, katello-qa-list, mirko.schmidt, mirko.schmidt, phess, redakkan, rjerrido, skallesh |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1477666 | Environment: | |
| Last Closed: | 2019-09-24 17:13:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1477666 | ||
|
Description
Chris Snyder
2017-08-03 14:35:39 UTC
Hello,
Yes, the correct settings should read:
root@satellite# grep ssl.*Prot /etc/tomcat/server.xml
sslProtocol="TLSv1.2"
sslEnabledProtocols="TLSv1.2"
Then the change will be picked up:
# /root/testssl.sh https://127.0.0.1:8443
No mapping file found
No engine or GOST support via engine with your /usr/bin/openssl
###########################################################
testssl.sh 2.8 from https://testssl.sh/
(1.582 2017/05/10 19:04:47)
This program is free software. Distribution and
modification under GPLv2 permitted.
USAGE w/o ANY WARRANTY. USE IT AT YOUR OWN RISK!
Please file bugs @ https://testssl.sh/bugs/
###########################################################
Using "OpenSSL 1.0.1e-fips 11 Feb 2013" [~121 ciphers]
on katello:/usr/bin/openssl
(built: "Feb 20 14:38:48 2017", platform: "linux-x86_64")
Start 2017-08-03 16:33:26 -->> 127.0.0.1:8443 (127.0.0.1) <<--
rDNS (127.0.0.1): localhost.
Service detected: HTTP
Testing protocols (via sockets except TLS 1.2, SPDY+HTTP2)
SSLv2 not offered (OK)
SSLv3 not offered (OK)
TLS 1 not offered
TLS 1.1 not offered
TLS 1.2 offered (OK)
Version tolerance downgraded to TLSv1.2 (OK)
SPDY/NPN not offered
HTTP2/ALPN Local problem: /usr/bin/openssl doesn't support HTTP2/ALPN
Best regards.
If you are changing defaults there, you could also set the following by default: # /etc/tomcat/tomcat.conf JAVA_OPTS="-Djdk.tls.ephemeralDHKeySize=2048" This will enable a 2048 bits Diffie Hellman group for the key exchange (instead of the default 1024 bits). Unfortunately java doesn't offer more at the moment. I wanted to add my proposal of the cipher list in the server.xml which will result in the following list of ciphers that are offered by the server:
Result:
=======
Testing all 121 locally available ciphers against the server, ordered by encryption strength
Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits
------------------------------------------------------------------------
xc030 ECDHE-RSA-AES256-GCM-SHA384 ECDH 521 AESGCM 256
xc028 ECDHE-RSA-AES256-SHA384 ECDH 521 AES 256
x9f DHE-RSA-AES256-GCM-SHA384 DH 2048 AESGCM 256
x6b DHE-RSA-AES256-SHA256 DH 2048 AES 256
x9d AES256-GCM-SHA384 RSA AESGCM 256
x3d AES256-SHA256 RSA AES 256
xc02f ECDHE-RSA-AES128-GCM-SHA256 ECDH 521 AESGCM 128
xc027 ECDHE-RSA-AES128-SHA256 ECDH 521 AES 128
x9e DHE-RSA-AES128-GCM-SHA256 DH 2048 AESGCM 128
x67 DHE-RSA-AES128-SHA256 DH 2048 AES 128
x9c AES128-GCM-SHA256 RSA AESGCM 128
x3c AES128-SHA256 RSA AES 128
Perfect forward secrecy is offered with the following ciphers:
Testing robust (perfect) forward secrecy, (P)FS -- omitting Null Authentication/Encryption, 3DES, RC4
PFS is offered (OK) DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES128-SHA256 DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-SHA384
A modern client would choose something like:
Negotiated protocol TLSv1.2
Negotiated cipher ECDHE-RSA-AES256-GCM-SHA384, 521 bit ECDH (limited sense as client will pick)
Changes:
========
You may also want to tighten the security of the server.xml as the keystore password is world readable at the moment (chgrp tomcat /etc/tomcat/server.xml; chmod 640 /etc/tomcat/server.xml):
# ll -ltr /etc/tomcat/server.xml
-rw-r-----. 1 root tomcat 7713 Aug 4 08:52 /etc/tomcat/server.xml
# grep ciphers /etc/tomcat/server.xml
ciphers="TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"
Best regards.
The Tomcat 7 documentation (https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL_Support) is somewhat ambiguous here. There are two supported options, sslEnabledProtocols and sslProtocol. Both options support the JVM constants for SSL/TLS protocol versions (https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#SSLContext) and the documentation notes that the options "overlap." The difference between the two isn't really spelled out although from searching it seems that one option is retained for compatibility reasons. My recommendation would therefore be to set both values to "TLSv1.1,TLSv1.2" to support TLS 1.1 and 1.2. TLSv1 should not be enabled unless there is no other choice due to older clients. No SSL version should ever be enabled due to well known protocol vulnerabilities (e.g. POODLE). If we wanted to enforce TLSv1.2 only the correct setting would be "TLSv1.2". Using 1.2 only is an admirable goal, but client considerations may demand otherwise. This change would need to be implemented in the Satellite installer along with setting the file mode to 660 and the ownership to root.tomcat (the ownership should already be correct). Do note that in the Satellite use case, the server.xml file is configured/managed via puppet. This commit (https://github.com/theforeman/puppet-candlepin/commit/7320f16d2acfab52d7da26e3b4bdee44501244a9) allows the sslProtocols (and sslEnabledProtocols) value to be set via custom-hiera.yml |