Re: Periodic authorization expiration checks using GoAway message

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Cc: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Hannu Krosing <hannuk(at)google(dot)com>, Ajit Awekar <ajitpostgres(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dave Cramer <davecramer(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: Periodic authorization expiration checks using GoAway message
Date: 2025-12-16 20:19:51
Message-ID: CAOYmi+nG-+5gMu+GMHuSwRPAaqwstVnBfcXEqxyuC6m3jqjVhw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 16, 2025 at 12:05 AM Zsolt Parragi
<zsolt(dot)parragi(at)percona(dot)com> wrote:
> a. The user presses the "logout everywhere" button
> b. The users permissions change
> c. The user is deactivated (e.g. employee termination)
> d. A security check invalidates the user's session
>
> From these four, I think graceful logout/continuing the current query
> is only an option for (a), maybe (b), for (c) and (d) we should log
> out the user from everywhere as soon as possible.

To me that seems like a matter of policy and not protocol. (As long as
we come to some agreement on the semantics of what a client is and is
not allowed to do before reauthenticating.)

Said another way: it seems very useful to let a DBA choose between
graceful reauthentication and hard connection loss for different
situations. But I don't think those decisions should be assumed in the
protocol design or hardcoded in our server. Even for case (d), a DBA
might choose to bound clients via transaction_timeout for a particular
application; since we've never had this feature before, I don't want
to make proclamations about how people are going to want to deploy it.

--Jacob

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-12-16 20:22:11 Re: Periodic authorization expiration checks using GoAway message
Previous Message Jeff Davis 2025-12-16 20:04:54 Re: Remaining dependency on setlocale()