rlm_rest: Adding additional parameters

Alan DeKok aland at deployingradius.com
Wed Mar 2 13:20:06 UTC 2022


On Mar 2, 2022, at 8:11 AM, Rens Houben <rhouben at systemec.nl> wrote:
> >  %{client:vendor}
> 
> >  There's no "vendor" field in the "client" definition?  Meh.  Just add one:
> 
> >client foo {
>  >       ipaddr = 1.2.3.4
>  >      secret = woo
>  >       vendor = juniper
> >}
> 
> >  You can put pretty much anything you want into the "client" definition, so long as it doesn't conflict with an existing config item.
> 
> Unfortunately, this doesn't seem to have worked like I assumed it would. I'm attaching the full freeradius -X debug log below, but the short of it is that for some reason freeRADIUS didn't seem to expand the vendor variable into the request.
> 
> Adding
> 
> update request {
>    Vendor := 'ERX'
> }

  That is absolutely not what I said to do.  I didn't say to use an "update" section.  I said to add a "Local-Vendor-Name" in raddb/dictionary.  I didn't say to use "Vendor".

  Add the "vendor" line to the *client* definition, in the "clients.conf" file.  Then, you can dynamically expand it via a %{client:vendor}.  i.e.

	update request {
		Local-Vendor-Name := "%{client:vendor}"
	}

> to the authorize stanza worked fine, but {%client:vendor} didn't get expanded.

   Since you didn't actually put the %{client:vendor} text anywhere, there's no surprise that it doesn't get expanded.

  Alan DeKok.



More information about the Freeradius-Users mailing list