vscode-postgres
vscode-postgres copied to clipboard
how can i set my ssl certificate file and key file
I want to connect to my postgesql database with ssl mode, i have a .crt file and .key file, but i don't konw how to put these two files in the settings. Could someone help please?
I have found that there are two ways of connecting to servers securely - and both are considered SSL.
- Connecting to a postgres server over ssl - works similar to a browser on https, you just have to tell the connection to be secure (this method is currently supported).
- Using Certificates for authentication - best guess also happens over ssl, and I originally tried to implement this, but it only ended up working like method 1. Probably due to a misunderstanding trying to figure out the node-postgres docs on SSL/TLS. (this method is not currently supported - the limited form I tried was removed in v1.1.9)
I have the same problem. Its impossible to me to connect to my server because i must have valid certificate.
I enter the connection's parameters, and when I press enter in step 6, i have this message... It would be nice if we could add .crt and .key files
Has anyone been able to solve the issue displayed on @Dionyzos73 issue screenshot?
Same problem, would be nice to be able to point to your certificates
Looks like certPath
is a possible property of the connection configuration. See here:
https://github.com/Borvik/vscode-postgres/blob/master/src/common/database.ts#L76
Thanks, for Azure Postgres Servers I needed to specify an ssl certificate (MS Docs)
{
"label": "myLabel",
"host": "some.postgres.database.azure.com",
"user": "admin@some",
"port": 5432,
"ssl": true,
"certPath": "/the/path/to/BaltimoreCyberTrustRoot.crt.pem",
"database": "",
"password": "mostSecurePlainTextPassword"
}
The SQLTools extension has the ability to specify the ca, key, and cert when setting up a database connection, however unless I missed it, I don't see a way to do that here.