Oracle Stored Procedures for AAA : your suggestinos..
Greetings, For a project I need to make freeradius utilize oracle stored procedures. These stored procedures will be used for the AAA of the radius server. The resultant radius server will be slightly different from a typical PPP-Dialup system (it will be monitering SIP(Voip) calls). This means that there would be changes beyond the SQL module (i.e. within the Authentication, Authorization and Accounting modules) What options do I have in this regard? -Can direct replacement of queries work , or a complete module has to be written for calling stored procedure?. The stored procedures are not compatible (i.e. they have completely different inputs and outputs as compared to the SQL queries already present) -A new module rlm_sql_sp can simplify things for the long run, but it is not an easy route. Any other suggestions and comments are more than welcome. -- Shahzada Hatim (Sofware Engineer) Iphonica LLC (www.iphonica.com)
Shahzada Hatim wrote:
The resultant radius server will be slightly different from a typical PPP-Dialup system (it will be monitering SIP(Voip) calls). This means that there would be changes beyond the SQL module (i.e. within the Authentication, Authorization and Accounting modules)
Why? Why not just edit the qeuries?
-Can direct replacement of queries work , or a complete module has to be written for calling stored procedure?. The stored procedures are not compatible (i.e. they have completely different inputs and outputs as compared to the SQL queries already present)
The rlm_sql code expects a certain output from the queries. You will have to ensure that the procedures (i.e. maybe new ones) return data in the appropriate format. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
Alan DeKok escreveu:
-Can direct replacement of queries work , or a complete module has to be written for calling stored procedure?. The stored procedures are not compatible (i.e. they have completely different inputs and outputs as compared to the SQL queries already present)
The rlm_sql code expects a certain output from the queries. You will have to ensure that the procedures (i.e. maybe new ones) return data in the appropriate format.
Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
It's possible to call your stored procedures from your queries using the rlm_sql module. Ex.: select my_procedure(a,b,c) from reply_table (...) Soon you will discover that you can't perform insert or update commands inside a query. As a workaround, declare the procedure as an autonomous_transaction. create or replace function() return varchar2 is (...) pragma autonomous_transaction; begin (...) end; Still, you have to follow Alan's advice about the returned data. I used that approach here without problems. Regards, Tiago
participants (3)
-
Alan DeKok -
Shahzada Hatim -
Tiago Pierezan Camargo