postgres icon indicating copy to clipboard operation
postgres copied to clipboard

ssl connection

Open asbrodova opened this issue 2 years ago • 3 comments

How to establish ssl connection

In the documentation of GORM Postrges driver there is only variant with sslmode=disabled explained. Google search does not help as well. In my case I have a GCP Postgres and need to connect to the db via ssl connection. Could you advice the proper way to do this.

asbrodova avatar Sep 12 '23 08:09 asbrodova

@jinzhu Could you please help regarding this?

thevibhu avatar Oct 18 '23 20:10 thevibhu

@asbrodova @thevibhu I am in the similar situation as yours. Did you find any solution?

maknahar avatar Apr 10 '24 05:04 maknahar

I guess the connector uses the basic Postgres arguments, so according to the Postgress documentation , the available options are :

sslmode Eavesdropping protection MITM protection Statement
disable No No I don't care about security, and I don't want to pay the overhead of encryption.
allow Maybe No I don't care about security, but I will pay the overhead of encryption if the server insists on it.
prefer Maybe No I don't care about encryption, but I wish to pay the overhead of encryption if the server supports it.
require Yes No I want my data to be encrypted, and I accept the overhead. I trust that the network will make sure I always connect to the server I want.
verify-ca Yes Depends on CA policy I want my data encrypted, and I accept the overhead. I want to be sure that I connect to a server that I trust.
verify-full Yes Yes I want my data encrypted, and I accept the overhead. I want to be sure that I connect to a server I trust, and that it's the one I specify.

dragonis41 avatar May 22 '24 12:05 dragonis41