[OpenSER-Users] UAC module parameters

Andreas Heise aheise at gmx.de
Sun Oct 14 10:49:53 CEST 2007


Hi Cameron,

with auth avp parameters you are able to use different user names / 
passwords for the same realm.
You can define the AVP's in the failure route before calling the 
uac_auth() function.
By this way you could load the values for the credential from a database 
for each user or
define manual for different situations.

example:

modparam("uac","auth_realm_avp","$avp(s:auth_realm)")
modparam("uac","auth_username_avp","$avp(s:auth_username)")
modparam("uac","auth_password_avp","$avp(s:auth_password)")

failure_route[3]
{

# authentication reply received?
if ( t_check_status("401|407") )
{
xlog("L_INFO", "authentication reply (401|407) received");

if(expr) # define your different situations here
{
avp_printf("$avp(s:auth_realm)", "realm");
avp_printf("$avp(s:auth_username)", "user_a");
avp_printf("$avp(s:auth_password)", "password_a");
avp_print();
}
else {
avp_printf("$avp(s:auth_realm)", "realm");
avp_printf("$avp(s:auth_username)", "user_b");
avp_printf("$avp(s:auth_password)", "password_b");
avp_print();
};

regards,
Andreas
|
|

CB schrieb:
>
> |I am trying to understand the relationship between the various module 
> parameters for the uac module. |
>
> Imagine I want to authenticate on a proxy user different credentials 
> in different situations. The credential module parameter allows 
> specification of the username, realm and password. I think (correct me 
> if I’m wrong) that I can have multiple of these specified for various 
> realms:
>
> modparam("uac","credential","user1:realm1:pw1")
>
> modparam("uac","credential","user2:realm2:pw2")
>
> According to the documentation, “This parameter is required if UAC 
> authentication is used.” What then is the purpose of the 
> |auth_realm_avp, ||auth_username_avp| and |auth_password_avp module 
> parameters? Do they replace the credential parameter or are they for 
> something different?|
>
> | |
>
> |Any help appreciated.|
>
> | |
>
> |Regards|
>
> | |
>
> |Cameron|
>
> | |
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>   





More information about the Users mailing list