sending multiple Class attributes in Rest POST

Mark Grayson (mgrayson) mgrayson at cisco.com
Wed Sep 30 14:47:44 CEST 2020


Thanks Alan!

I can now see those being POSTed using the accounting section showing attributes being returned by the NAS, but I can't seem to see them in the post-auth section being returned in the access-accept.

post-auth {
                uri = "${..connect_uri}/rest/radius"
                method = 'post'
                body = 'json'
                data = '{"class1":"%{Class[0]}","class2":"%{Class[1]"}'
                tls = ${..tls}
        }

What am I doing wrong to enable POSTing of access-accept attributes?

Cheers,
Mark

On 29/09/2020, 13:17, "Alan DeKok" <aland at deployingradius.com> wrote:

    On Sep 29, 2020, at 8:08 AM, Mark Grayson (mgrayson) via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
    > Is there a way to be able to POST multiple Class attributes using Rest?
    > 
    > I am currently testing returning multiple class attributes and can see they are being sent in the accounting-request trace:
    > 
    > 
    > (10)   Framed-IP-Address = 10.192.230.1
    > 
    > (10)   Class = 0x31323334353637383957424149443d64756d6d792e6d656d6265723a5553
    > 
    > (10)   Class = 0x37334a773b51793453716c44264e5548405929
    > 
    > Is there a way I can pass both received class attributes in a rest POST?
    > 
    > It looks like the Rest %{Class} simply picks the first one.

      Yes.

    $ man unlang

    %{Class[0]} picks the first one
    %{Class[1]} picked the second one
    etc.

      Alan DeKok.





More information about the Freeradius-Users mailing list