Re: [ADMIN] Beginning SSL Questions

From: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
To: "[pgADMIN]" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: [ADMIN] Beginning SSL Questions
Date: 2006-09-14 15:15:32
Message-ID: 002c01c6d810$9f514e60$6464a8c0@DonAcer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-admin


Jeanna Geier Wrote:

> - In the docs, it says that when using SSL in Postgres "This requires that
> OpenSSL is installed on both client and server systems and that support in
> PostgreSQL is enabled at build time" - is this correct? Or can we use the
> certificates and keystore file we generated using the Jave keytool
> implementing SSL with Tomcat?

OpenSSL must be installed on the server and enabled at build time.
OpenSSL does not have to be installed on the client.

You are advised to use the OpenSSL tools to create the private/public key pair
for the server as it will then be in the correct format. Assuming you know how
to build/acquire a signed certificate that requires no parse phrase, place the
certificate pair into the root data directory of PostgreSQL. The key pair
should be named server.key and server.crt respectively. Make sure the
permissions on these files are only readable by the postgres user account that
runs the database.

The line ssl=true must appear in the postgresql.conf file.

A restart of the server will be required for ssl to be enabled.

Now for the Java side of things.

If your certificate was signed by a recognised authority you will need a copy
of the public certificate used by the authority that signed your certificate.
Place that public certificate into the Java key store. Most of the well known
ones are already provided in the key store for Sun's VM.

If you self signed the certificate on the server then simply place the public
part of the key pair (server.crt) into your Java key store.

The above will enable clients to connect using ssl.
If you require client authenticaton using ssl then you will need the public key
used to sign your client side certificates. You will need to place the public
key into the root data directory of PostgreSQL and it must be named root.crt.

User the pg_hba.conf file to force clients to use ssl or not.

Hope that helps.
Regards
Donald Fraser

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Donald Fraser 2006-09-14 15:16:50 Re: Beginning SSL Questions
Previous Message Jeanna Geier 2006-09-14 15:11:31 Re: Beginning SSL Questions

Browse pgsql-admin by date

  From Date Subject
Next Message Donald Fraser 2006-09-14 15:16:50 Re: Beginning SSL Questions
Previous Message Jeanna Geier 2006-09-14 15:11:31 Re: Beginning SSL Questions