Azure database for Postgresql - SSL enabling

Ramkumar Sarva Radhakrishnan 1 Reputation point
2021-03-12T18:21:39.033+00:00

Hi,
We are using Azure database for Postgresql and application is hosted in Azure private cloud. By default Postgresql enforces SSL to be enabled, so have used so in the connection string have used sslmode=require.

https://learn.microsoft.com/en-us/azure/postgresql/concepts-certificate-rotation

I have checked the above url, based on that downloaded the BaltimoreCyberTrustRoot.crt.pem file which have converted into a .jks file and referred in the yaml file of the microservice as below;

server.ssl.key-store: /opt/lib/configs/azure-postgredb-keystore.jks

whether the above changes are sufficient so that https is enabled between the application and the azure database for postgres.?

Regards
Ram

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 13,996 Reputation points MVP
    2021-03-13T03:10:52.423+00:00

    Hi @Ramkumar Sarva Radhakrishnan

    To configure postgreSQL using SSL connection follow the below steps.

    1. Configure TLS connectivity in Azure Database for PostgreSQL - Single Server
    2. How do I know if I'm using SSL/TLS with root certificate verification

    Connect using psql
    If you created your flexible server with Private access (VNet Integration), you will need to connect to your server from a resource within the same VNet as your server. You can create a virtual machine and add it to the VNet created with your flexible server.

    If you created your flexible server with Public access (allowed IP addresses), you can add your local IP address to the list of firewall rules on your server.

    psql "sslmode=verify-full sslrootcert=c:\ssl\DigiCertGlobalRootCA.crt.pem host=mydemoserver.postgres.database.azure.com dbname=postgres user=myadmin"  
    

    Please don’t forget to Accept the answer and up-vote wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments