[rlm_rest] do not translate attribute values

Michael Schneider michael.schneider at onway.ch
Thu Dec 17 21:11:41 CET 2020


Hi Jorge

> On 17 Dec 2020, at 17:57, Jorge Pereira <jpereira at freeradius.org> wrote:
> 
>> 
>> On 17 Dec 2020, at 09:25, Michael Schneider <michael.schneider at onway.ch> wrote:
>> 
>> ...
> 
> 
> Which version are you running? Where is the debug output? Please, keep in mind https://wiki.freeradius.org/guide/Users-Mailing-List <https://wiki.freeradius.org/guide/Users-Mailing-List>

Sorry, my question was a bit unclear.

I am using FreeRADIUS version 3.0.21. The server works as expected, but the generated REST request is weird in my opinion. The two attributes "Tunnel-Type (64)" and "Tunnel-Medium-Type (65)" are particularly special. The value type of them is an integer and this is also signaled via REST, but the value provided is the string representation of the integer.


Currently signaled via REST (FreeRADIUS 3.0.21):
Debug: (10) rest: Encoding attribute "Tunnel-Type"
Debug: (10) rest:   Type   : integer
Debug: (10) rest:   Length : 3
Debug: (10) rest:   Value  : "VLAN"
Debug: (10) rest: Encoding attribute "Tunnel-Medium-Type"
Debug: (10) rest:   Type   : integer
Debug: (10) rest:   Length : 8
Debug: (10) rest:   Value  : "IEEE-802"
...
Debug: (32) rest: JSON Data: {"Tunnel-Type":{"type":"integer","value":["VLAN"]},"Tunnel-Medium-Type":{"type":"integer","value":["IEEE-802"]}}


What I would expect:
Debug: (10) rest: Encoding attribute "Tunnel-Type"
Debug: (10) rest:   Type   : integer
Debug: (10) rest:   Length : 3
Debug: (10) rest:   Value  : "13"
Debug: (10) rest: Encoding attribute "Tunnel-Medium-Type"
Debug: (10) rest:   Type   : integer
Debug: (10) rest:   Length : 8
Debug: (10) rest:   Value  : "6"
...
Debug: (32) rest: JSON Data: {"Tunnel-Type":{"type":"integer","value":[13]},"Tunnel-Medium-Type":{"type":"integer","value":[6]}}


I am not sure if this behavior was intended by Arran Cudbard-Bell.

- Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3887 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20201217/a0435b29/attachment.bin>


More information about the Freeradius-Users mailing list