rlm_rest JSON format for multiple attributes

Werner Stucky wernerml at stucky-solutions.net
Wed Mar 26 20:32:07 CET 2014


body = "post" seems to be working fine

I'm getting the multiple Framed-Route attributes too :)

Not sure about the body = "json"

Thanks





On Wed, Mar 26, 2014 at 9:21 PM, Werner Stucky <
wernerml at stucky-solutions.net> wrote:

> Hi Arran
>
> No requests are coming through at all with this config :
>
> authorize {
>                 uri = "${..connect_uri}/authorize"
>                 method = "post"
>                 body = "json"
>         }
>
>
>
> The console output is :
>
> Ready to process requests
> rad_recv: Access-Request packet from host 192.168.118.102 port 44655,
> id=9, length=94
>     User-Name = '4448'
>     CHAP-Password = 0x4b29d9af0b3c3097abb01df83dd6bd2559
>
>     NAS-Port-Id = '2342232332'
>     NAS-IP-Address = 10.10.22.11
>     Calling-Station-Id = '337354722'
> (0) # Executing section authorize from file
> /usr/local/etc/raddb/sites-enabled/default
> (0)   authorize {
> (0)   [preprocess] = ok
> (0) chap : Setting 'Auth-Type := CHAP'
> (0)   [chap] = ok
> (0)   [mschap] = noop
> (0) eap : No EAP-Message, not doing EAP
> (0)   [eap] = noop
> rlm_rest (rest): Reserved connection (2)
> (0) rest : Expanding URI components
> (0) rest : EXPAND http://192.168.113.151:2233
> (0) rest :    --> http://192.168.113.151:2233
> (0) rest : EXPAND /authorize
> (0) rest :    --> /authorize
> (0) rest : Sending HTTP POST to "http://192.168.113.151:2233/authorize"
> (0) rest : Encoding attribute "User-Name"
> (0) rest : Encoding attribute "CHAP-Password"
> (0) rest : Encoding attribute "NAS-IP-Address"
> (0) rest : Encoding attribute "Calling-Station-Id"
> (0) rest : Encoding attribute "CHAP-Challenge"
> (0) rest : Encoding attribute "NAS-Port-Id"
> (0) rest : Processing response header
> (0) rest :     Status : 400 (Bad Request)
> (0) rest :     Type   : json (application/json)
> rlm_rest (rest): Released connection (2)
> (0)   [rest] = invalid
> (0)  } #  authorize = invalid
> (0) Using Post-Auth-Type Reject
>
>
>
> If I do a curl POST request to that URI it works.  No traffic coming from
> the server I've checked with tcpdump.
>
> Regards
>
>
> On Wed, Mar 26, 2014 at 9:29 AM, Arran Cudbard-Bell <
> a.cudbardb at freeradius.org> wrote:
>
>>
>> On 26 Mar 2014, at 07:21, Arran Cudbard-Bell <a.cudbardb at freeradius.org>
>> wrote:
>>
>> >
>> > On 26 Mar 2014, at 01:49, Werner Stucky <wernerml at stucky-solutions.net>
>> wrote:
>> >
>> >> Hi Arran
>> >>
>> >> Its not encoding the Access-Request attributes anymore.
>> >
>> > Ensure you have:
>> >
>> > authorize {
>> >       ...
>> >       body = "json"
>> > }
>> >
>> > and your method isn't GET or DELETE.
>>
>> I've added more documentation to the rest default config
>> file if you want to update your local copy.
>>
>> Arran Cudbard-Bell <a.cudbardb at 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/mailman/private/freeradius-users/attachments/20140326/9aff1b90/attachment-0001.html>


More information about the Freeradius-Users mailing list