Re: RADIUS tests and improvements

2023-07-10 Thread Daniel Gustafsson
Hi Thomas, Have you have a chance to look at and address the feedback given in this thread? -- Daniel Gustafsson

Re: RADIUS tests and improvements

2023-03-19 Thread Michael Paquier
On Sat, Mar 04, 2023 at 02:23:10PM +1300, Thomas Munro wrote: > I don't exactly love the PG_TRY()/PG_CATCH() around the > CHECK_FOR_INTERRUPTS(). > In fact this kind of CFI-with-cleanup problem > has been haunting me across several projects. For cases that memory > contexts and resource owners can

Re: RADIUS tests and improvements

2023-03-03 Thread Thomas Munro
New improved version: * fixed stupid misuse of PG_FINALLY() (oops, must have been thinking of another language) * realised that it was strange to have a GUC for the timeout, and made a new HBA parameter instead * added documentation for that * used TimestampDifferenceMilliseconds() instead of open

Re: RADIUS tests and improvements

2023-01-03 Thread Andreas Karlsson
On 1/3/23 22:16, Thomas Munro wrote: On Wed, Jan 4, 2023 at 10:07 AM Andreas Karlsson wrote: Another thing: shouldn't we set some wait event to indicate that we are waiting the RADIUS server or is that pointless during authentication since there are no queries running anyway? I initially adde

Re: RADIUS tests and improvements

2023-01-03 Thread Thomas Munro
On Wed, Jan 4, 2023 at 10:03 AM Andreas Karlsson wrote: > On 1/3/23 04:11, Thomas Munro wrote: > > [...] While adding > > the GUC I couldn't help wondering why RADIUS even needs a timeout > > separate from authentication_timeout; another way to go here would be > > to remove it completely, but tha

Re: RADIUS tests and improvements

2023-01-03 Thread Thomas Munro
On Wed, Jan 4, 2023 at 10:07 AM Andreas Karlsson wrote: > Another thing: shouldn't we set some wait event to indicate that we are > waiting the RADIUS server or is that pointless during authentication > since there are no queries running anyway? I initially added a wait_event value, but I couldn'

Re: RADIUS tests and improvements

2023-01-03 Thread Andreas Karlsson
On 1/3/23 22:03, Andreas Karlsson wrote: On 1/3/23 04:11, Thomas Munro wrote: Here's a draft patch to tackle a couple of TODOs in the RADIUS code in auth.c. Nice to see someone working on this!. Another thing: shouldn't we set some wait event to indicate that we are waiting the RADIUS serve

Re: RADIUS tests and improvements

2023-01-03 Thread Andreas Karlsson
On 1/3/23 04:11, Thomas Munro wrote: Here's a draft patch to tackle a couple of TODOs in the RADIUS code in auth.c. Nice to see someone working on this! I know of one company which could have used the configurable timeout for radius because the 3 second timeout is too short for 2FA. I think t

RADIUS tests and improvements

2023-01-02 Thread Thomas Munro
Hi, Here's a draft patch to tackle a couple of TODOs in the RADIUS code in auth.c. The first change is to replace select() with a standard latch loop that responds to interrupts, postmaster death etc promptly. It's not really too much of a big deal because the timeout was only 3 seconds (hardcod