Page History
...
Remove or comment out all other Connectors in /etc/tomcat9/server.xml
, then add the two Connectors as per below, replacing keystorePass
with the PKCS#12 keystore password generated earlier:
Note |
---|
If you still need to support clients that can only speak TLS 1.0 or TLS 1.1 you will have to amend the |
Code Block | ||
---|---|---|
| ||
<!-- Localhost-only connector for IDP command line tools --> <Connector address="127.0.0.1" port="80" /> <!-- https://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html --> <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" maxPostSize="100000" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.3" keystoreType="pkcs12" keystoreFile="/etc/tomcat9/webserver.p12" keystorePass="see above" />> <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> </Connector> |
Start Start Tomcat, check for listening ports, and access https://webserver-fqdn/foo
which should result in an HTTP Status 404
error (since /foo won't exist) but allows you to confirm a hopefully valid TLS/SSL webserver configuration:
...
No Format |
---|
openssl s_client -CApath /etc/ssl/certs/ -connect webserver-fqdn:443 </dev/null |
Look for "Certificate chain" in the output from that command, e.g.
...
and verify that it looks something like the "Certificate chain" presented below. The Subject of cert 0 will obviously differ, and depending on your choice of CA or certificate product ("SSL Plus", "Unified Communications", "EV" etc.) the CA may also be different. A correct chain (and therfore PKCS#12 keystore) for TLS usage should contain all the certificates up until but excluding the root CA certificate. I.e, in the example below the certificate with CN=DigiCert Assured ID Root CA
is USERTrust RSA Certification Authority
is not included in the chain sent from the server (but must be known by the web browser):
No Format |
---|
Certificate chain 0 s:/C =AT/ST=Vienna/L=Wien/O=ACOnet/CN=webserver-fqdn i:/C=NL/ST=Noord-Holland/L=Amsterdam/O=TERENA/CN=TERENA SSL CA 3 AT, postalCode = 1010, ST = Wien, L = Wien, street = Universitaetsstrasse 7, O = ACOnet, CN = idp.aco.net i:C = NL, O = GEANT Vereniging, CN = GEANT OV RSA CA 4 1 s:/C =NL/ST=Noord-Holland/L=Amsterdam/O=TERENA/CN=TERENA SSL CA 3 NL, O = GEANT Vereniging, CN = GEANT OV RSA CA 4 i:/C =US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Assured ID Root CA US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority |
In case of errors check the output of "journalctl -u tomcat9 -ef".
...