Customization of RADIUS reply
Václav Pernica
vpl at email.cz
Mon Sep 17 16:51:42 CEST 2012
Hello
I’m configuring the FreeRADIUS together with the Oracle DB. I need to get the user authenticated and in the reply provide the parameter "mailbox_fullname" from the DB.
The Oracle DB has for my purpose only one view which contains the following columns.
mailbox_id,mailbox_email,mailbox_fullname,mailbox_password
I created new attribute in dictionary:
ATTRIBUTE Full-Mailbox-Name 3000 string
And customized the SQL queries as following (dialup.conf):
authorize_check_query = "SELECT mailbox_id,mailbox_email,'Cleartext-Password',mailbox_password,':=' FROM ${authcheck_table} WHERE mailbox_email = '%{SQL-User-Name}' ORDER BY mailbox_id"
authorize_reply_query = "SELECT mailbox_id,mailbox_email,'Full-Mailbox-Name',mailbox_fullname,':=' FROM ${authreply_table} WHERE mailbox_email = '%{SQL-User-Name}' ORDER BY mailbox_id"
The user authentication works, however I need to have in the reply the value of “mailbox_fullname” from DB query. Instead of it, there is nothing. Could you please advise how to get in the reply “mailbox_fullname” for the corresponding mailbox_email?
Here is the sample radtest output and in attachment full output from debug mode.
radtest -x a00000012 password localhost 0 testing123
Sending Access-Request of id 26 to 127.0.0.1 port 1812
User-Name = "a00000012"
User-Password = "password"
NAS-IP-Address = 10.7.96.25
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=26, length=20
Thanks a lot!
Vaclav
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: debug_output.txt
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120917/f7a7e245/attachment-0001.txt>
More information about the Freeradius-Users
mailing list