Hard Worker
Hard Worker

Reputation: 1121

How to create a user authenticated by public/private key in Postgresql and not with password

How Do I create a user authenticated by "public/private key" in Postgresql and not with a password

Upvotes: 3

Views: 3432

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 247865

You should read the documentation that describes that in detail:

  • set up SSL on the server with the ssl, ssl_cert_file and ssl_key_file parameters

  • configure a CA certificate on the server with the ssl_ca_file parameter

  • add a pg_hba.conf entry starting with hostssl with the authentication method cert

  • on the client, use the sslcert and sslkey connection parameters to specify the certificate and private key to use

Upvotes: 4

Related Questions