How to log Access-Accept reply attributes/values in radpostauth sql

Herwin Weststrate freeradius at herwinw.nl
Sat Aug 26 11:28:24 CEST 2017


Arran Cudbard-Bell wrote:

>>> When a user authenticates, I would like to log any Access-Accept reply
>>> attributes we've set to sql (radpostauth).
> 
> %{pairs:&reply:}
> 
> It’ll expand to <attribute> = <value>, for each pair in the list.
> 
> We might be able to do something with %{reply:[*]} in v4.0.x but there’s nothing like that in 3.0.x.


In 4.0 there's a function fr_json_afrom_pair_list (used in rlm_rest). We 
could expose that via xlat so you could log the JSON representation in 
the database. Postgresql has a JSON(B) datatype these days.

-- 
Herwin Weststrate


More information about the Freeradius-Users mailing list