Hello FU JIE ZHAO,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are having issue affecting Azure SQL Database and Azure Database for MySQL, especially in Java applications deployed on AKS using a CentOS-based Docker image.
The core issue stems from Azure’s announcement to rotate root certificates starting September 1, 2025, requiring applications to trust three specific CAs: DigiCert Global Root G2, Microsoft ECC Root Certificate Authority 2017, and Microsoft RSA Root Certificate Authority 2017 – https://learn.microsoft.com/en-us/azure/azure-sql/updates/ssl-root-certificate-expiring and https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-root-certificate-rotation
Your Java application behavior results from AKS nodes running Ubuntu Linux, which may provide system-level certificates accessible to containers. Java, depending on its configuration, can fall back to system CA stores, especially in OpenJDK-based environments. To confirm this, you should inspect the certificate chain using openssl from bash command via your Azure CLI:
openssl s_client -connect <your-db-host>:<port> -starttls mysql
This will reveal whether the required Microsoft root certificates are being sourced from the host OS rather than the container’s Java trust store.
To ensure long-term compliance and secure connectivity, you must explicitly add the Microsoft ECC and RSA root certificates to the Java trust store within the Docker image. This can be done using the keytool utility:
keytool -import -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts \
-storepass changeit -noprompt -alias ms-ecc-root \
-file Microsoft_ECC_Root_Certificate_Authority_2017.crt
keytool -import -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts \
-storepass changeit -noprompt -alias ms-rsa-root \
-file Microsoft_RSA_Root_Certificate_Authority_2017.crt
Certificate files can be downloaded from Microsoft’s official repository:
Once the certificates are added, re-enable strict certificate validation in the connection strings:
For Azure SQL: encrypt=true;trustServerCertificate=false
For Azure MySQL: useSSL=true&requireSSL=true&verifyServerCertificate=true
Finally, the Docker image should be rebuilt and redeployed to AKS, ensuring the updated trust store is used. Monitoring should be implemented to detect SSL handshake failures and validate the certificate chain periodically. The original issue, any unexpected behavior will be resolved by the above and prepare your application for future enforcement of Azure’s certificate policies.
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.