How to use sanitize fields for json output

Enrico Polesel epol.lists at
Sun Nov 11 11:39:12 CET 2018

Hi all,

I want to use the linelog module to print logs in a machine readable format
for my ELK stack, I would like to print them in json.

I would like to have user controlled fields (like the username) sanitized,
from an old discussion[1] in this mailing list I find out that there is a
"jsonquote" xlat expansion available, so I tried to use it but with little
success since the module is unknown.

(0) linelog: ERROR: %T request [%{jsonquote:request:User-Name}] ....
> (0) linelog: ERROR:               ^ Unknown module

After a quick search in the wiki[2] I found out that the jsonquote xlat is
provided by the rlm_rest module. So I tried to enable it adding in
`mods-enabled` a symlink to the configuration file, but then the freeradius
server fails to start since the module is not configured (for example it
tries to connect to localhost but i have no web services enabled on the VM).

Is "jsonquote" the right way to achieve this? If it is, how can I use it
without configuring properly (and pointing to a real web server) the rest

Thank you,
Enrico Polesel



More information about the Freeradius-Users mailing list