Filter attributes at rest module
Hi, all! I'm using rest module to connect to my java restful service with json format request. It works good, but i get troubles with EAP-TLS - it tries to encode ALL request content. How I can skip unused attributes (EAP-Message and other specific attrs). I have tried to use attr_filter module, but it do 'noop'. How I can limit attributes, that will be encoded to json?
On Oct 23, 2017, at 11:20 PM, Mikhail Gaidamaka <mikhail.gaydamaka@eltex.nsk.ru> wrote:
I'm using rest module to connect to my java restful service with json format request.
It works good, but i get troubles with EAP-TLS - it tries to encode ALL request content. How I can skip unused attributes (EAP-Message and other specific attrs).
There's no real way to do that, sorry. Alan DeKok.
On 24-10-17 20:33, Alan DeKok wrote:
On Oct 23, 2017, at 11:20 PM, Mikhail Gaidamaka <mikhail.gaydamaka@eltex.nsk.ru> wrote:
I'm using rest module to connect to my java restful service with json format request.
It works good, but i get troubles with EAP-TLS - it tries to encode ALL request content. How I can skip unused attributes (EAP-Message and other specific attrs).
There's no real way to do that, sorry.
I guess it wouldn't be too hard to use the logic of https://github.com/FreeRADIUS/freeradius-server/blob/e4629d6922ac6b0ce0e5239... to make a filter. -- Herwin Weststrate
On Oct 25, 2017, at 1:40 AM, Herwin Weststrate <herwin@quarantainenet.nl> wrote:
I guess it wouldn't be too hard to use the logic of https://github.com/FreeRADIUS/freeradius-server/blob/e4629d6922ac6b0ce0e5239... to make a filter.
Sure, that makes sense. In v4, that kind of patch is no longer necessary. You can (today!) create a sub-request, and then control which attributes are copied to it. e.g. subrequest { update request { ... copy the attributes you need ... } rest update { &parent.reply: += &reply: } } A little more complex in Unlang, but much clearer IMHO. Alan DeKok.
participants (3)
-
Alan DeKok -
Herwin Weststrate -
Mikhail Gaidamaka