(RADIATOR) Combining AuthRADIUS, Host and DefineFormattedGlobalVar

Mike McCauley mikem at open.com.au
Sun Sep 2 06:36:07 CDT 2007


Hello Valentin,

thanks for this patch.
It has now been added to the mainline and the latest patch set.

Thanks again,

Cheers.

On Thursday 30 August 2007 18:35, Valentin Tumarkin wrote:
> 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.

-- 
Mike McCauley                               mikem at open.com.au
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
9 Bulbul Place Currumbin Waters QLD 4223 Australia   http://www.open.com.au
Phone +61 7 5598-7474                       Fax   +61 7 5598-7070

Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, 
TTLS, PEAP etc on Unix, Windows, MacOS, NetWare etc.

--
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