pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Log the incoming old SSL certs by pid or any way
2+ messages / 2 participants
[nested] [flat]

* Log the incoming old SSL certs by pid or any way
@ 2020-06-25 07:34  Durumdara <durumdara@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Durumdara @ 2020-06-25 07:34 UTC (permalink / raw)
  To: pgsql-general

Hello!

PGSQL 9.6, Linux, SSL.
We want to change certs to new, but somehow we need to detect which old
cert is in use before the expiration.
So now they could connect with old and new too. We want to warn the clients
with old certs to update, before they will be denied.

Do we have chance to log somewhere the connected client's certificate, or
some info about it?

As I know the CRL can block unwanted certs - they will be denied.

Is there any, similar list where we can registrate the cert and when it
used we can log it?

Do you know about any mechanism for this? I hope you understand what we
need.

Thank you for it!
   dd

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

* Re: Log the incoming old SSL certs by pid or any way
@ 2020-06-25 10:24  Christoph Moench-Tegeder <cmt@burggraben.net>
  parent: Durumdara <durumdara@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Christoph Moench-Tegeder @ 2020-06-25 10:24 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

## Durumdara (durumdara@gmail.com):

> Do we have chance to log somewhere the connected client's certificate, or
> some info about it?

There's pg_stat_ssl, and if you had an recent version of PostgreSQL
(9.6 is too old for that), you'd even have the serial number of
the certificate in there:
https://www.postgresql.org/docs/12/monitoring-stats.html#PG-STAT-SSL-VIEW

On the other hand, you could check the certificates directly,
e.g. https://github.com/matteocorti/check_ssl_cert or even
just some scripting around openssl. (That assumes that you know
where those client certificates are).

Regards,
Christoph

-- 
Spare Space





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


end of thread, other threads:[~2020-06-25 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 07:34 Log the incoming old SSL certs by pid or any way Durumdara <durumdara@gmail.com>
2020-06-25 10:24 ` Christoph Moench-Tegeder <cmt@burggraben.net>

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