I have set up a SonarQube and configured SSL certificates to make the URL always HTTPS using [CertBot](https://certbot.eff.org). As of now, the PostgreSQL database has a public IP and below are the values changed in *sonar.properties* file:

```sh
sonar.jdbc.username=weakusername
sonar.jdbc.password=strongpassword
sonar.web.host=127.0.0.1
sonar.jdbc.url=jdbc:postgresql://xx.xxx.xxx.xxx/sonarqube

sonar.search.javaOpts=-Xms512m  -Xmx512m

# Change max limits
sysctl -w vm.max_map_count=262144

```

I am using [Cloud SQL PostGres](https://cloud.google.com/sql/docs/postgres/) as the database. I would like to allow Only SSL Only Connections to the database and [here](https://cloud.google.com/sql/docs/postgres/configure-ssl-instance#new-client) the way how to do it, generate client certificate, etc.

After setting "Allow only SSL Connections" to true I understand there is a way to connect to the database using the client certificate described [here](https://cloud.google.com/sql/docs/postgres/connect-admin-ip#connect-ssl).

Below is the command to start the psql client:

```sh
psql "sslmode=verify-ca sslrootcert=server-ca.pem \
      sslcert=client-cert.pem sslkey=client-key.pem \
      hostaddr=[INSTANCE_IP] \
      user=postgres dbname=[DB_NAME]"

```

However, SonarQube is not able to connect to the Database (Not sure how to tell SonarQube to use the client certificates).
What changes are required in the configuration file to make SonarQube use appropriate client certificate and connect to the database using SSL?