Variable expansion for SQL attributes
Javier Matos Odut
javiermatos at vozplus.com
Fri Dec 9 15:24:35 CET 2016
Hello,
I have FreeRADIUS running with a sql database in production. I am using the
sql database to set user's check and reply attributes. The problem I have
is that there are some attributes that I need to set them at runtime
depending on the NAS identity (or any other FreeRADIUS variable), so I have
to edit the configuration file and add something like this:
if (...) {
update control {
Pool-Name := "%{NAS-Identifier}"
}
}
Please, ignore the fact that I am updating the Pool-Name attribute. It is
just an example but it has sense in my case to let users switch between NAS
and IP pools automatically.
I want to be able to use variables in attributes column (for radcheck,
radreply, radgroupcheck, and radgroupreply tables). Then FreeRADIUS will
get those values for attributes and expand or evaluate them replacing
variable placeholders for concrete values. I don't want to modify the
configuration file to store any user's configuration as I am currently
doing.
Will that feature make sense? I can help in programming it or even make a
donation to have someone help me in doing this.
I post a request on Github:
https://github.com/FreeRADIUS/freeradius-server/issues/1870
I was suggested to use SQL xlat expansion %{sql:SELECT ...} but that is not
useful in my case because I don't want to customize requests.
Regards,
Javier
More information about the Freeradius-Users
mailing list