cloudfoundry / java-buildpack

Cloud Foundry buildpack for running Java applications
Apache License 2.0
437 stars 2.58k forks source link

Issue while upgrading application from Stack2 to Stack3 #971

Closed Manu2516789 closed 1 year ago

Manu2516789 commented 1 year ago

Hi all,

We are trying to upgrade Java applications from Stack2 to Stack3 in our cloud foundry environment The app uses buildpack version 4.16.1 in both stacks for now. We have a user provided service connected to the app which is AWS MySQL RDS (5.7.mysql_aurora.2.09.2) version.

This app on stack2 works fine without issues while connected to the user provided service. But when changing the app from stack2 to 3 with same buildpack gives the error as below while connecting to the RDS :

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) 2022-09-02T14:17:26.11+0200 [APP/PROC/WEB/0] OUT at sun.security.ssl.HandshakeContext.(HandshakeContext.java:171) ~[?:1.8.0_312] 2022-09-02T14:17:26.11+0200 [APP/PROC/WEB/0] OUT at sun.security.ssl.ClientHandshakeContext.(ClientHandshakeContext.java:103) ~[?:1.8.0_312

What changes are done for the same buildpack version but in different stacks which is causing this issue?

When I update the user provided service with the jdbc url with useSSL=false it works in stack 3.

What change can be done in the app and where so tht it can connect to the RDS in stack 3 over TLSv1.2?

We tried:  (-Dhttps.protocols=TLSv1.2 -Dhttps.cipherSuites=TLS_RSA_WITH_AES_256_CBC_SHA256 -Ddeployment.security.TLSv1.2=true ) but without success. Tried with some spring parameters(server.ssl.enabled-protocols=TLSv1.2, server.ssl.enabled=false, server.ssl.enabled=true) but did not work.

Please let us know what could be the cause and solution for the issue?

The sample app is spring-music which we are using now for testing and trial.

Manu2516789 commented 1 year ago

Hi all, Any update on the above issue?

dmikusa commented 1 year ago

Closing. Please see https://github.com/cloudfoundry-samples/spring-music/issues/106#issuecomment-1272617471