data-diff
data-diff copied to clipboard
Postgres Server Authenticate through verify-ca
I'm working on integrating data-diff, and I need to authenticate to a Postgres server using a certificate rather than a password. It would be great, if there is a way to authenticate this way. If it is already possible, I think it would be very helpful to include the command or template for the TOML file in order to do this. Thanks
How would you do it using the psycopg2
library directly?
According to this Stackoverflow you would set the sslmode to verify-ca and then just pass in the correct paths for the certificates.
conn = psycopg2.connect(dbname='yourdb', user='dbuser', password='abcd1234', host='server', port='5432', sslmode='verify-ca', sslrootcert='path/to/cert')
Just wanted to mention, I am able to connect with verify-ca using data-diff in python and passing in a dictionary with the correct values.
Sorry, I missed your last comment!
Are you happy with your current solution? Or would you like to know how to specify those values in a URL?
I agree, it could help to add this info somewhere in the readme/docs.
Close due to inactivity.