Sample Header Ad - 728x90

Postgres SSL client certificate - database server CA failed to start

0 votes
1 answer
2536 views
I want to configure SSL so that clients can only require certificate signed by root CA
.crt
, then every client must use their issued e.g. cert **postgresql.crt**, key **postgresql.key** and **password** to connect to database server. Hereby allowing the database server to verify each client certificate on authentication. Postgres v14 server configs: **postgresql.conf**
...
ssl = on
ssl_ca_file = ca.crt   # root CA or (root+intermediate CA bundle) that signed client cert.
#ssl_cert_file =
#ssl_key_file =
...
**pg_hba.conf**
...
hostssl  all  all  all  md5  clientcert=verify-ca
...
Starting database server failed with this error.
...
FATAL: could not load server certificate file "server.crt": No such file or directory
...
Why does it fail, I've no need for **server.crt** and **server.key** because server should be doing the client verification using
.crt
not the client? Reading postgres document doesn't help me. Thanks in advance.
Asked by themsay (1 rep)
Oct 4, 2022, 12:43 PM
Last activity: Oct 4, 2022, 01:23 PM