Hi Arran

Its not encoding the Access-Request attributes anymore.
I don't get any encoded attributes in the HTTP request to my REST service.
The service responds with a 401 because it does not receive any data in the query.

Ready to process requests
rad_recv: Access-Request packet from host 192.168.118.102 port 40369, id=129, length=94
    User-Name = '4448'
    CHAP-Password = 0x9b9573452e490326d7fc9cf65853d81472
    NAS-Port-Id = '2342232332'
    NAS-IP-Address = 10.10.22.11
    Calling-Station-Id = '337354722'
(6) # Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default
(6)   authorize {
(6)   [preprocess] = ok
(6) chap : Setting 'Auth-Type := CHAP'
(6)   [chap] = ok
(6)   [mschap] = noop
(6) eap : No EAP-Message, not doing EAP
(6)   [eap] = noop
rlm_rest (rest): Reserved connection (5)
(6) rest : Expanding URI components
(6) rest : EXPAND http://192.168.113.151:2233
(6) rest :    --> http://192.168.113.151:2233
(6) rest : EXPAND /authorize
(6) rest :    --> /authorize
(6) rest : Sending HTTP POST to "http://192.168.113.151:2233/authorize"
(6) rest : Processing response header
(6) rest :     Status : 401 (Unauthorized)
(6) rest :     Type   : json (application/json)

This is how it used to show :

(35) rest :     expand: "http://192.168.113.151:2233" -> 'http://192.168.113.151:2233'
(35) rest :     expand: "/authorize" -> '/authorize'
(35) rest : Sending HTTP POST to "http://192.168.113.151:2233/authorize"
(35) rest : Encoding attribute "User-Name"
(35) rest : Encoding attribute "CHAP-Password"
(35) rest : Encoding attribute "NAS-Port-Id"
(35) rest : Encoding attribute "NAS-IP-Address"
(35) rest : Encoding attribute "Calling-Station-Id"
(35) rest : Encoding attribute "CHAP-Challenge"

Thanks

Werner Stucky

On 24 Mar 2014 23:19, "Arran Cudbard-Bell" <a.cudbardb@freeradius.org> wrote:

On 24 Mar 2014, at 18:44, Werner Stucky <wernerml@stucky-solutions.net> wrote:

> Hi Guys
>
> I've ran into a problem with rlm_rest and specifying VPs with JSON.
> I need to return multiple Framed-Route attributes.
>
> So now I have :
>
> {'Framed-Route':'1.2.3.4/32'}
>
>
> I can't add any additional Framed-Route attributes because the JSON format is a set of key value pairs and the key is unique.
>
> From RFC4627:
> ---------------
> An object structure is represented as a pair of curly brackets surrounding zero or more name/value pairs (or members). A name is a string. A single colon comes after each name, separating the name from the value.  A single comma separates a value from a following name. The names within an object SHOULD be unique.
> ---------------
>
> Is there a way to support an array of values?
>
> eg.
>
> {'Framed-Route':['1.2.3.4/32','5.6.7.8/32']}

git pull

Arran Cudbard-Bell <a.cudbardb@freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html