Hi Nathan, Take a look at the option “data” as described in https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/raddb/mods-avail... <https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/raddb/mods-available/rest#L78> e.g: post-auth { uri = “/path?foo=postauth-whatever” method = “post” data = “{ control_tmp_string_0 = \”%{control:Tmp-String-0}\” }” body = 'json' force_to = 'plain' } You mean something like that? -- Jorge Pereira jpereira@freeradius.org
Em 11 de jan de 2021, à(s) 18:21, Nathan Ward <lists+freeradius@daork.net> escreveu:
Hi all,
I’d like to get control and reply attributes in to rlm_rest requests - we use control attributes for results of various bits of logic which we then translate in to reply attributes in post-auth if relevant - and it’d be useful to get those control attributes in to rest. Reply attributes in there would be useful as well, so we can “log" to a rest endpoint and include the request and reply (and control!) - a slightly different use case but same “tool”.
From what I can see, there doesn’t seem to be a way to have rlm_rest send attributes in the body (in JSON, let’s say) other than request attributes - the code I can see (rest_encode_json etc.) seems to be always looking at the request (request_t->packet->vps).
Is there a clever way I haven’t thought of to get control and reply attributes in to rest requests?
-- Nathan Ward
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html