Re: Periodic authorization expiration checks using GoAway message - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: Periodic authorization expiration checks using GoAway message
Date
Msg-id CAN4CZFNPNm6XWa8QtoYuGatARMddSUDHReW6o8Y5k4kTHm4sDQ@mail.gmail.com
Whole thread Raw
In response to Re: Periodic authorization expiration checks using GoAway message  (Ajit Awekar <ajitpostgres@gmail.com>)
Responses Re: Periodic authorization expiration checks using GoAway message
List pgsql-hackers
Hello!

> Done. I have modified the condition check so as it will not impact users
> having rolvaliduntil to NULL.

Thanks! After one more look at this, shouldn't we refresh the cache if
AuthCheckNeeded, regardless of the valid until timestamp value? (for
example by moving the >0 condition to the inner if)

Consider the following scenario:

1. user logs in, without a valid until date set
2. valid until is set to something
3. existing session started in 1 will never be terminated


postgres.c:5368 - I missed this in my previos review, the error
message should start with a lowercase character.


> This patch introduces a mechanism to address the security issue of stale,
> authorized connections persisting beyond their validity period. .

postgres.c:5326 - if the user was dropped, but the connection is still
active, the patch silently ignores it. That matches the current
behavior of postgres, but is that the expected behavior in the context
of this patch?



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Add WALRCV_CONNECTING state to walreceiver
Next
From: Bertrand Drouvot
Date:
Subject: Re: Flush some statistics within running transactions