How to connect PostgresDB with SSL in Artifactory version 7.x?

How to connect PostgresDB with SSL in Artifactory version 7.x?

AuthorFullName__c
Muhammed Kashif
articleNumber
000004960
ft:sourceType
Salesforce
FirstPublishedDate
2020-12-13T18:12:06Z
lastModifiedDate
2020-12-13
VersionNumber
4

The PostgresDB with SSL can be connected to Artifactory, however, there is a chance that the Metadata service fails to connect to the DB and fails with the below error,

2020-11-06T09:41:54.819Z [jfmd ] [PANIC] [7186a0ccd963de28] [database_bearer.go:80         ] [main                ] - Could not initialize database (db config: {postgresql jdbc:postgresql://postgres_url:5567/artifactory?ssl=true&sslfactory=org.postgresql.ssl.jdbc4.LibPQFactory&sslmode=verify-full&sslrootcert=/root/.postgresql/root.crt}): x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0
error connecting to database. giving up
jfrog.com/metadata/services/common/db.(*databaseBearer).init
	/src/jfrog.com/metadata/services/common/db/database_bearer.go:126
jfrog.com/metadata/services/common/db.NewDatabaseBearer
	/src/jfrog.com/metadata/services/common/db/database_bearer.go:78
main.main
	/src/jfrog.com/metadata/metadata.go:38
To overcome this issue, pass on the PostgresDB connection string with SSL information in the system.yaml file as below,
metadata:
    database:
      type: postgresql
      url: postgresql://postgres_url:5567/artifactory?sslmode=verify-ca&sslrootcert=/root/.postgresql/root.crt
      username: <username>
      password: <password>