Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purpose of clientcert = 1 mean in postgresql configuration

Tags:

postgresql

What is the purpose of appending clientcert = 1 in the pg_hba.conf file in postgresql?

For example:


      hostssl all all 0.0.0.0/0 cert clientcert=1

like image 829
newbie Avatar asked Apr 29 '16 01:04

newbie


People also ask

What is SSL mode in PostgreSQL?

Amazon RDS supports Secure Socket Layer (SSL) encryption for PostgreSQL DB instances. Using SSL, you can encrypt a PostgreSQL connection between your applications and your PostgreSQL DB instances. By default, RDS for PostgreSQL uses and expects all clients to connect using SSL/TLS, but you can also require it.

What is postgres CRT root?

A root. crt file is used to validate a TLS (a.k.a. SSL) certificate presented by the other end of a connection. It is usually the public certificate of the Certificate Authority (CA) that signed the presented certificate, and is used to validate that signature.

What is Sslrootcert?

sslrootcert. This parameter specifies the name of a file containing SSL certificate authority ( CA ) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities.


1 Answers

You must add clientcert=1 to hostssl options for checking the client certificates, otherwise everyone will be granted access in your setup.

When clientcert is not specified or is set to 0, the server will still verify presented client certificates against its CA list, if one is configured, — but it will not insist that a client certificate be presented.

Source: Using Client Certificates from Postgres Docs

like image 103
Vaibhav Mule Avatar answered Nov 15 '22 09:11

Vaibhav Mule