[rlm_rest] do not translate attribute values

Arran Cudbard-Bell a.cudbardb at freeradius.org
Fri Dec 18 04:23:38 CET 2020



> On Dec 17, 2020, at 5:42 PM, Michael Schneider <michael.schneider at onway.ch> wrote:
> 
> Hi Matthew
> 
>> On 18 Dec 2020, at 00:03, Matthew Newton <mcn at freeradius.org> wrote:
>> 
>> On 17/12/2020 20:47, Alan DeKok wrote:
>>> On Dec 17, 2020, at 3:11 PM, Michael Schneider <michael.schneider at onway.ch> wrote:
>>>> 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.
>>>  I've pushed a fix for v3.0.x.  It always prints the integer value, and does not print the name.

I've reverted it.  Breaking changes in point releases are not appropriate.  This would break the majority of the users of rlm_rest who inspect the values of enumeration attributes.

>> The problem at the moment with no config option is that not everyone's going to be happy. Personally I'd think that the original behaviour here was most useful for most people, who wouldn't have an immediate clue what Tunnel-Type 13 is - but "VLAN" makes a lot more sense.
>> 
>> Hopefully changing it won't break any existing deployments...
> 
> I fully agree that "VLAN" is much more readable than 13, but in my opinion rlm_rest is a technical interface

Following that logic we should just send across attribute numbers instead of providing the dictionary names?

> and therefore must be technically correct and not human readable. I think a configuration option is needed, otherwise this is a breaking change. If desired, I can try to create an appropriate PR.

Feel free.  It should be a relatively simple change.

-Arran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20201217/09c9540a/attachment-0001.sig>


More information about the Freeradius-Users mailing list