[OpenSIPS-Users] Change Authentication Digest URI

AndreaM marinelli.andrea at gmail.com
Mon May 7 15:39:30 CEST 2012


Hello Bogdan,
thank you for the patch ! We'll apply it as soon as possible.
By the way, we have found a workaround for this issue. Before calling 
aaa_www_authorize function, we modify the RURI by "use_ruri_flag" parameter:


modparam("auth_aaa", "use_ruri_flag", 20)       # <-- Workaround for 
Digest-URI


if ( is_method("REGISTER") ) {
       $ru="sip:10.10.10.10";       # <-- Workaround for Digest-URI
       setflag(20);                           # <-- Workaround for 
Digest-URI

      if ( !aaa_www_authorize("1.2.3.4") ) {
           www_challenge("1.2.3.4", "1");
           exit;
};


It works, but we'd like not to change the RURI.
We'll try with your patch. Thank you.

Andrea Marinelli


Il 07/05/2012 13.13, Bogdan-Andrei Iancu ha scritto:
> Hi Andrea,
>
> Seems to be an inconsistency in the code, as the aaa_proxy function 
> accepts as second optional param a custom auth username. But the 
> aaa_www does not :(
>
> Try the attached patch and you should be able to pass a second param 
> as a variable containing the auth username.
>
> Regards,
> Bogdan
>
> On 04/27/2012 05:58 PM, AndreaM wrote:
>> Hi to all,
>> I have to change the authentication Digest-URI value 
>> (http://www.opensips.org/Resources/DocsCoreVar18#toc5) before sending 
>> the AAA RADIUS request.
>> For example:
>>
>> if (is_method("REGISTER"))
>> {
>>     # Change here Digest-URI (before sending RADIUS request)
>>
>>     if (!aaa_www_authorize("1.2.3.4")) {
>>         www_challenge("1.2.3.4", "1");
>>     exit;
>> };
>>
>> I tried to:
>> 1) set $adu pseudo-variable (no way, it's a read-only PV...)
>> 2) parse the SIP message and change Digest-URI, using "subst()" 
>> function from TEXTOPS module. It didn't work.
>> 3) use "radius_send_auth()" from AAA_RADIUS module, but I'd rather 
>> not use it (too much complex !).
>>
>> Anyone can suggest a way to change authentication Digest-URI value ?
>> Thank you.
>>
>> AndreaM
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>



More information about the Users mailing list