pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Configuring only SSL in postgres docker image
2+ messages / 2 participants
[nested] [flat]

* Configuring only SSL in postgres docker image
@ 2020-08-03 20:01  Shankar Bhaskaran <mailshankarb@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Shankar Bhaskaran @ 2020-08-03 20:01 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hi ,

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 also added the following entry in the pg_hba.conf after commenting all
other host entries
"hostssl   all  all   all md5".

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

My observation is the command only updates the postmaster.opts file and not
the postgres.conf file .

Could I get some help

Regards,
Shankar

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Configuring only SSL in postgres docker image
@ 2020-08-04 05:32  Paul Förster <paul.foerster@gmail.com>
  parent: Shankar Bhaskaran <mailshankarb@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Paul Förster @ 2020-08-04 05:32 UTC (permalink / raw)
  To: Shankar Bhaskaran <mailshankarb@gmail.com>; +Cc: pgsql-general@lists.postgresql.org

Hi Shankar,

> On 03. Aug, 2020, at 22:01, Shankar Bhaskaran <mailshankarb@gmail.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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-08-04 05:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 20:01 Configuring only SSL in postgres docker image Shankar Bhaskaran <mailshankarb@gmail.com>
2020-08-04 05:32 ` Paul Förster <paul.foerster@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox