(RADIATOR) Combining AuthRADIUS, Host and DefineFormattedGlobalVar
Valentin Tumarkin
valentin at fuzzycow.org
Thu Aug 30 03:35:33 CDT 2007
Hi,
Today in Radiator you can use:
<AuthBy RADIUS>
Host 192.168.1.1,192.168.1.2
</AuthBy>
and
DefineFormattedGlobalVar ONE_RADIUS_HOST 192.168.1.1
<AuthBy RADIUS>
Host %{GlobalVar:ONE_RADIUS_HOST}
</AuthBy>
or:
DefineFormattedGlobalVar ONE_RADIUS_HOST 192.168.1.1
DefineFormattedGlobalVar ANOTHEr_RADIUS_HOST 192.168.1.2
<AuthBy RADIUS>
Host %{GlobalVar:ONE_RADIUS_HOST}
Host %{GlobalVar:ANOTHER_RADIUS_HOST}
</AuthBy>
However the following will fail:
DefineFormattedGlobalVar MANY_RADIUS_HOSTS 192.168.1.1,192.168.1.2
<AuthBy RADIUS>
Host %{GlobalVar:MANY_RADIUS_HOSTS}
</AuthBy>
When the last configuration can be useful -
Imagine a scenario when there are multiple Radiator installations
(e.g: lab and production).
Configuration is split in two parts - global and site-specific
configuration files. Site-specific configuration files use GlobalVar's
to configure hosts/addresses.
Production installation has multiple remote RADIUS servers to proxy
to, while the lab has only one remote server.
Here's one possible AuthRADIUS fix to add support for this:
sub addHosts
{
my ($self, $name, $file, @args) = @_;
# Original version:
# map {$self->addHost($_, $file, @args)} (split(/\s*,\s*/, $name));
# Modified to support multiple hosts defined via GlobalVar
map {$self->addHost($_, $file, @args)}
split(/\s*,\s*/, &Radius::Util::format_special($name));
}
Regards,
Valentin
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list