Re: Configuring only SSL in postgres docker image

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: Shankar Bhaskaran <mailshankarb(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Configuring only SSL in postgres docker image
Date: 2020-08-04 05:32:40
Message-ID: D642CCDB-DA71-443E-BB2B-D99C40255F25@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Shankar,

> On 03. Aug, 2020, at 22:01, Shankar Bhaskaran <mailshankarb(at)gmail(dot)com> wrote:
> I am trying to enable ssl on postgres docker image . The postgres image should only support SSL . I did configure the command:" -c ssl=on -c ssl_key_file=/opt/postgresql/server.key -c ssl_cert_file=/opt/postgresql/server.crt" in the docker compose file.

I don't know anything about Docker at all, so I can't say anything here.

> I also added the following entry in the pg_hba.conf after commenting all other host entries
> "hostssl all all all md5".

are there any "host" entries in the pg_hba.conf file? If so, comment them out so that only the "hostssl" entries are enabled.

> But I am able to make ssl as well as non ssl connections to the postgres image.

see above.

> My observation is the command only updates the postmaster.opts file and not the postgres.conf file .
>
> Could I get some help

the postgresql.conf file should have ssl=on and of course the key & certificate file settings. Maybe you should put them there.

Cheers,
Paul

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stelios Sfakianakis 2020-08-04 05:54:14 Re: Keeping state in a foreign data wrapper
Previous Message Ian Lawrence Barwick 2020-08-04 03:25:51 Re: Keeping state in a foreign data wrapper