[RADIATOR] MySQL Authentication from two possible fields

Hugh Irvine hugh at open.com.au
Mon Jun 7 11:36:38 CDT 2010


Hello Adam, Hello Dominic -

I tend to prefer multiple AuthBy clauses just for clarity and ease of comprehension.

regards

Hugh


On 7 Jun 2010, at 12:16, Adam Gerson wrote:

> I considered something like this. However, don't I also need an 
> AuthColumnDef line to tell Radiator to take the result of the query and 
> match it to something?
> 
> In your proposed query if they are using their wireless card, it will 
> return the wired MAC in column 0, which will not match the wireless MAC 
> that was passed in against
> 
> AuthColumnDef 0, User-Name, check
> 
> 
> -- 
> Adam Gerson
> Assistant Director of Technology
> Columbia Grammar and Prep School
> phone. 212-749-6200 ex. 321
> fax.  212-428-6806
> agerson at cgps.org
> http://www.cgps.org
> 
> On 6/7/10 10:57 AM, Dominic J. Eidson wrote:
>> If you want, you can make the SQL query as complex as you want, and do
>> it all in one SELECT statement:
>> 
>> An attempt at yours:
>> AuthSelect SELECT REPLACE(mac_address,'.','') from computers where
>> REPLACE(mac_address,'.','') = '%{User-Name}' OR
>> REPLACE(alt_mac_address,'.','') = '%{User-Name}'
>> 
>> Here is our AuthSelect:
>> AuthSelect SELECT %0 AS "Password" FROM inv_node t1 WHERE t1.node_mac =
>> replace(%0, ':', '') AND t1.node_wireless = 1 AND t1.node_enable = 1 AND
>> now() BETWEEN t1.date_active AND t1.date_expire AND (t1.date_purged
>> ISNULL OR t1.date_purged > now());
>> 
>> 
>> - d.
>> 
> 
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator



NB: 

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets), 
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
Includes support for reliable RADIUS transport (RadSec),
and DIAMETER translation agent.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.





More information about the radiator mailing list