After updating to the latest Java Buildpack, your apps are failing with SSLHandshakeException errors.
The full error message may be sightly different for different applications, but it should show an SSLHandshakeException. The following is an example:
Cause: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake___Message:com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
Java Buildpack v4.88.0 and higher
The recommended solution is to enable stronger ciphers on the server your app is trying to connect to. If this is not possible you may try one of the following workarounds
NOTE: Both workarounds will enable the weak TLS_RSA ciphers again. This is not recommended long term. Use at your own risk
If you need to use the latest buildpack, you can supply a custom java.security file which enables the TLS_RSA ciphers again. This requires a code change to each application
networkaddress.cache.ttl=0
networkaddress.cache.negative.ttl=0
security.provider.1=SUN
security.provider.2=org.cloudfoundry.security.CloudFoundryContainerProvider
security.provider.3=SunRsaSign
security.provider.4=SunEC
security.provider.5=SunJSSE
security.provider.6=SunJCE
security.provider.7=SunJGSS
security.provider.8=SunSASL
security.provider.9=XMLDSig
security.provider.10=SunPCSC
security.provider.11=JdkLDAP
security.provider.12=JdkSASL
security.provider.13=SunPKCS11
jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, DTLSv1.0, RC4, DES, \
MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
ECDH, \
include jdk.disabled.namedCurves---
applications:
- name: demo
memory: 768mb
buildpack: java_buildpack_offline
path: ./target/demo-0.0.1-SNAPSHOT.jar
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ } }'
JAVA_OPTS: '-Djava.security.properties=/home/vcap/app/BOOT-INF/classes/java.security'