Let's say the services are in a closed network due to which the database is not having a DNS to be configured, the TLS verification can be skipped by amending the following attributes to the Artifactory Database connection string.
The hostname verification would be disabled after amending these attributes and the database doesn't verify the trust against the server [Artifactory].
Please note, when TLS encryption is intended by the Database, it is advised to have a secure connection established against the server by configuring the DNS for the database connection as well as using the appropriate certificates in both the client and the server.
url: "jdbc:postgresql://<DATABASE_URL>/<ARTIFACTORY_DATABASE_NAME>"?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=allow
The hostname verification would be disabled after amending these attributes and the database doesn't verify the trust against the server [Artifactory].
Please note, when TLS encryption is intended by the Database, it is advised to have a secure connection established against the server by configuring the DNS for the database connection as well as using the appropriate certificates in both the client and the server.