[RADIATOR] Authby REST: ACCEPT/REJECT

C R publist.cr at gmail.com
Sat Dec 18 14:05:16 UTC 2021


Hi,

After reading the Radiator documentation and code, it's not completely
clear to me how Radiator determines if a request should is accepted or
rejected by a "AuthBy REST".

This is the relevant Radiator configuration:
RestAuthRequestDef mac, %{Calling-Station-Id}
RestAuthRequestDef ip, %{NAS-IP-Address}
RestAuthRequestDef endpoints, /v2/mac/iotdr:/v2/mac/iodtd-u, literal
RestAuthReplyDef reply,Reply,reply

This is the (stripped down) response of my REST service (used for MAB
and iPSK for now):
{
  "authorized": true,
  "reply": "Reply-Message=accepted by
rest,Tunnel-Type=VLAN,Tunnel-Medium-Type=802,Tunnel-Private-Group-ID=vlan1,cisco-avpair=psk-mode=ascii,cisco-avpair=psk=foo123"
}
or
{
  "authorized": false,
  "reply": "Reply-Message=rejected by rest"
}

I thought of using the "authorized" key in the response to make the
decision, but I only see a way to add this to the reply, not as the
result. Does Radiator expect an specific HTTP Statuscode (401, 404?)
to identify a REJECT? I can adapt the REST service to what's needed,
so pointers in that direction are also appreciated.

Thank you,

CR


More information about the radiator mailing list