@ -2189,20 +2189,23 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
<sect2 id="ssl-client-certificates">
<sect2 id="ssl-client-certificates">
<title>Using Client Certificates</title>
<title>Using Client Certificates</title>
<para>
<para>
To require the client to supply a trusted certificate, place
To require the client to supply a trusted certificate, place
certificates of the certificate authorities (<acronym>CA</acronym>s)
certificates of the certificate authorities (<acronym>CA</acronym>s)
you trust in the file <filename>root.crt</filename> in the data
you trust in the file <filename>root.crt</filename> in the data
directory, set the parameter <xref linkend="guc-ssl-ca-file"> in
directory, set the parameter <xref linkend="guc-ssl-ca-file"> in
<filename>postgresql.conf</filename> to <literal>root.crt</literal>,
<filename>postgresql.conf</filename> to <literal>root.crt</literal>,
and set the <literal>clientcert</literal> parameter
and add the authentication option <literal>clientcert=1</literal> to the
to 1 on the appropriate <literal>hostssl</> line(s) in
appropriate <literal>hostssl</> line(s) in <filename>pg_hba.conf</>.
<filename>pg_hba.conf</>.
A certificate will then be requested from the client during
A certificate will then be requested from the client during
SSL connection startup. (See <xref linkend="libpq-ssl"> for a
SSL connection startup. (See <xref linkend="libpq-ssl"> for a
description of how to set up certificates on the client.) 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
verify that the client's certificate is signed by one of the trusted
certificate authorities. If intermediate <acronym>CA</>s appear in
certificate authorities.
</para>
<para>
If intermediate <acronym>CA</>s appear in
<filename>root.crt</filename>, the file must also contain certificate
<filename>root.crt</filename>, the file must also contain certificate
chains to their root <acronym>CA</>s. Certificate Revocation List
chains to their root <acronym>CA</>s. Certificate Revocation List
(CRL) entries
(CRL) entries
@ -2214,12 +2217,12 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
</para>
</para>
<para>
<para>
The <literal>clientcert</literal> option in <filename>pg_hba.conf</> is
The <literal>clientcert</literal> authentication option is available for
available for all authentication methods, but only for rows specified a s
all authentication methods, but only in <filename>pg_hba.conf</> line s
<literal>hostssl</>. When <literal>clientcert</literal> is not specified
specified as <literal>hostssl</>. When <literal>clientcert</literal> is
or is set to 0, the server will still verify presented client
not specified or is set to 0, the server will still verify any presented
certificates against its CA list, if one is configured,
client certificates against its CA file, if one is configured — but
— but it will not insist that a client certificate be presented.
it will not insist that a client certificate be presented.
</para>
</para>
<para>
<para>
@ -2234,7 +2237,9 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
If you are setting up client certificates, you may wish to use
If you are setting up client certificates, you may wish to use
the <literal>cert</> authentication method, so that the certificates
the <literal>cert</> authentication method, so that the certificates
control user authentication as well as providing connection security.
control user authentication as well as providing connection security.
See <xref linkend="auth-cert"> for details.
See <xref linkend="auth-cert"> for details. (It is not necessary to
specify <literal>clientcert=1</literal> explicitly when using
the <literal>cert</> authentication method.)
</para>
</para>
</sect2>
</sect2>