I am trying to connect to oracle rds of AWS. It has certificate rds-ca-2019 for which I have generated clientkeystore.jks and using connection wallet it is able to make the connection when I run it from an EC2 VM.
However when I run it from a docker container it does not work.
It throws an error:
SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]
So to have it worked I referred: https://aws.amazon.com/blogs/opensource/tls-1-0-1-1-changes-in-openjdk-and-amazon-corretto/
Docker content:
FROM ubuntu:21.04
RUN apt-get update && apt-get install openjdk-8-jre -y
COPY myjar-with-dependencies.jar /usr/app/app.jar
RUN mkdir -p /myfile/wallet
COPY cwallet.sso /myfile/wallet/cwallet.sso
RUN mkdir -p /myfile/certificates/
COPY clientkeystore.jks /myfile/certificates/clientkeystore.jks
RUN mkdir -p /myfile/tns
COPY *.ora /myfile/tns/
RUN mkdir -p /myfile/security
COPY custom.java.security /myfile/security
CMD java -jar /usr/app/app.jar \
-Doracle.net.tns_admin=/myfile/tns \
-Doracle.net.wallet_location="(SOURCE=(METHOD=file)(METHOD_DATA=(DIRECTORY=/myfile/wallet)))" \
-Doracle.net.ssl_server_dn_match=true \
-Doracle.net.SSL_CIPHER_SUITES="(SSL_RSA_WITH_AES_256_CBC_SHA)" \
-Doracle.net.SSL_CLIENT_AUTHENTICATION=false \
-Djava.security.properties=/myfile/security/custom.java.security
``
Do you have suggestions to make it work?