Using the authenticate function on rlm_python

Francis Augusto Medeiros-Logeay r_f at med-lo.eu
Sat Nov 16 09:53:00 UTC 2024



> On 15 Nov 2024, at 21:36, Alan DeKok <aland at deployingradius.com> wrote:
> 
> On Nov 15, 2024, at 3:12 PM, Francis Augusto Medeiros-Logeay <r_f at med-lo.eu> wrote:
>> 
>> It could be, but when I tested concurrency, all I did was a 
>> 
>> 
>> print («Will block now»)
>> While True:
>>  time.sleep(5)
>>  print («waiting»)
>> 
>> Just to check if another request would print «Will block now», which it never did. The only way I got that to happen was to fork into another thread before the print.
> 
>  If your'e running in debug mode, it's single threaded.  That explains it.

I was, but I also tested with running radiusd as a service. Got the same results. Somehow the python module is blocking other threads.
> 
>> Maybe this isn’t the only way - it’s just the easiest way for me to do it as I’m not so familiar with other approaches. I need basically to:
>> 
>> - send a request to the RestAPI to ask if the user will have a push notification or if he’ll use TOTP - That info comes on a json
> 
>  The server has a REST module which can do some json work...

I took a look at it. The thing about it is that I had the feeling it requires too much predefined data. I didn’t see a lot of conditionals there, but I’ll read more.

>> I’ll see if I find out what could be blocking my threads.
> 
>  Check if the server is running single-threaded.

Is there a special way to do it? What I do is that I send two authenticate requests, and see at the second never gets processed until the first one returns something to the client.

Best,

Francis


More information about the Freeradius-Users mailing list