| From: | Ajit Awekar <ajitpostgres(at)gmail(dot)com> |
|---|---|
| To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
| Cc: | Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Subject: | Re: Continuous re-validation of session credentials |
| Date: | 2026-11-24 11:52:08 |
| Message-ID: | CAER375P+eZNgkrNA5LjJRe8cKmoR5ws0F-B+_v8PGES9tZj-=w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Jakub, Daniel,
Thanks for the reviews. Attached is v4, a two-patch series on the
current master. It addresses your latest comments.
The changes by patch are below
0001
1. Fixes the build failure Jakub reported: auth-validate-methods.c used
SetCredentialValidationFailureDetail() and MyProcPort->user_name without
including libpq/auth-validate.h and libpq/libpq-be.h.
2. Docs: the description of credential_validation_enabled said validation
happens "at command boundaries". It is also performed while a session is
idle, so I corrected that.
3. Tests: 008_continuous_validation.pl now shares a single validation window
between all the scenarios On my machine it went from about 29 s
to about 7 s.
0002
005_cert_continuous_validation.pl is reworked along the lines of Jakub's
and Daniel's review comments
1. Revocation no longer uses a runtime CA or CRL. It uses a new committed
client certificate, client-mid session, and a CRL that revokes it, with
their config in conf/ and rules in sslfiles.mk, so they are regenerated in
the same pass as everything else.
2. Keys come from the shared sslkey() helper.
3. The tests wait for the expected log lines instead of sleeping fixed
times. On my machine 005 went from about 30 s to about 11 s.
Not addressed in this version: PAM (Jakub's point 10 from the earlier review),
which I'd still like to handle as a follow-up patch.
Thanks & Best Regards,
Ajit
On Thu, 22 Oct 2026 at 15:22, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 14 Oct 2026, at 13:28, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com> wrote:
>
> > I think the whole 005_cert_continuous_validation.pl test should be somehow
> > refactored: the other ssl tests simply rely on already generated/existing CA
> > and mostly nothing is generated in the tests runtime (see ../sslfiles.mk and
> > somehow use sslconfig.conf (that's ncluded from postgresql.conf).
>
>
> +1, any CA/cert/key/CRL used in testing should be defined in src/test/ssl/conf
> and be added to sslfiles.mk such that they can be regenerated in a single pass.
>
> --
> Daniel Gustafsson
>
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-Add-continuous-credential-validation-framework.patch | application/octet-stream | 58.1 KB |
| v4-0004-Add-GSS-credential-expiry-to-credential-validatio.patch | application/octet-stream | 36.1 KB |
| v4-0003-Add-OAuth-token-expiry-to-credential-validation.patch | application/octet-stream | 11.0 KB |
| v4-0005-Add-LDAP-account-existence-check-to-credential-va.patch | application/octet-stream | 25.9 KB |
| v4-0002-Add-TLS-client-certificate-expiry-and-revocation-.patch | application/octet-stream | 37.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Aleksander Alekseev | 2026-11-24 12:15:02 | Re: Two fixes for parallel query cleanup: DSM detach order and a stray statement timeout |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-11-24 11:51:36 | RE: Hash index: stop registering pin-only bucket pages in WAL (remove REGBUF_NO_CHANGE) |