SSL for Java Web App Connection to Azure mySQL

John Jacko 21 Reputation points
2021-11-14T22:09:52.64+00:00

I'm interested in setting up an Azure Web App that connects to an instance of "Azure Database for MySQL server" and I have a few questions that the Documentation isn't answering (or I just haven't found the documentation that does).

I'm planning on having a mySQL Database closed off from the public and accessible only through a private endpoint within my Azure environment. This article explains how to do this. However, it does not really address SSL (only to say that restricting access to private endpoints has no impact on SSL settings) and various other pages strongly recommend keeping the SSL setting to enforced.

With this in mind, Java applications typically require certificates to be available in a trust store. Documentation located here suggests a specific certificate needed to access an SSL-required instance of Azure mySql.

Since I have a Java 11 app instance (with a Spring Boot Java 11 app in mind), would the app already have the required certification included in the Java runtime stack? Or is there an additional step to perform to ensure that the required certificate is available when my app finally launches?

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
986 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,936 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2021-11-23T17:34:54.697+00:00

    Hi @John Jacko ,

    Configure SSL for MySQL is the doc you're looking for. There you will find instructions on how to obtain the cert and to use it in your Java code. I don't believe the blessed images come with cert preconfigured so you can add the certificate to your app service and load it into the app using WEBSITE_LOAD_CERTIFICATES app setting.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.