From 3c486fbd1c8e8f79902a40ef929c4ed54f122561 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 20 Nov 2008 09:29:36 +0000 Subject: Control client certificate requesting with the pg_hba option "clientcert" instead of just relying on the root certificate file to be present. --- doc/src/sgml/runtime.sgml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index b04de288c3..1a862b5c4b 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,4 +1,4 @@ - + Operating System Environment @@ -1646,13 +1646,17 @@ $ kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid` - + + Using client certificates + To require the client to supply a trusted certificate, place certificates of the certificate authorities (CA) you trust in the file root.crt in the data - directory. A certificate will then be requested from the client during + directory, and set the clientcert parameter + to 1 on the appropriate line(s) in pg_hba.conf. + A certificate will then be requested from the client during SSL connection startup. (See for a - description of how to set up client certificates.) The server will + description of how to set up certificates on the client.) The server will verify that the client's certificate is signed by one of the trusted certificate authorities. Certificate Revocation List (CRL) entries are also checked if the file root.crl exists. @@ -1663,11 +1667,23 @@ $ kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid` - If the root.crt file is not present, client - certificates will not be requested or checked. In this mode, SSL - provides encrypted communication but not authentication. + The clientcert option in pg_hba.conf + is available for all authentication methods, but only for rows + specified as hostssl. Unless specified, the default is + not to verify the client certificate. + + + + PostgreSQL currently does not support authentication + using client certificates, since it cannot differentiate between + different users. As long as the user holds any certificate issued + by a trusted CA it will be accepted, regardless of what account the + user is trying to connect with. + + + SSL Server File Usage The files server.key, server.crt, root.crt, and root.crl @@ -1704,7 +1720,7 @@ $ kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid` root.crt trusted certificate authorities - requests client certificate; checks certificate is + checks that client certificate is signed by a trusted certificate authority @@ -1717,6 +1733,7 @@ $ kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid` + Creating a Self-Signed Certificate -- cgit v1.2.1