[OpenSIPS-Users] Question about auth_db
Juan Backson
juanbackson at gmail.com
Tue Sep 23 17:46:05 CEST 2008
Hi Gustavo,
Thanks alot for your response.
I currently use ./opensipsctl add <user> <password> to create the user in
subscriber table. I notice that ./opensipsctl add would also generate the
hal1 and hal2 column in the subscriber. If I create user in my own table,
what is the proper way of generating the hal1 and hal2 fields?
Alternatively, is it possible to confi ./opensipsctl add feature so that it
would create the hal1 and hal2 fields in my custom table?
Thanks alot for your help.
JB
On Sun, Sep 21, 2008 at 10:37 AM, Gustavo Mistrinelli <
gmistrinelli at gmail.com> wrote:
> Hi Juan,
>
> Yes, you can use another database/table to do user authorization, just you
> only need to setup auth_db parameters to map your own schema.
>
> *Change auth_db parameters**
>
> modparam("auth_db", "user_column", "username_column")
> modparam("auth_db", "password_column", "password_column")
> modparam("auth_db", "db_url", "mysql://
> database_user:password at database_host/database_name") *
>
> You need to take care about how password column and if it's plain text you
> need to set up calculate_ha1:
> *modparam("auth_db", "calculate_ha1", 0)*
> *
> Modify ****table name inside your** **authentication blocks**
> *
> *if (www_authorize("your_realm", "new_users_table**")) {
> www_challenge("your_realm, "0");
> };
> ...
> **if (proxy_authorize("your_realm", "new_users_table**")) {
> proxy_challenge("your_realm, "0");
> };*
>
>
> Regards,
>
> Gustavo
>
> On Sat, Sep 20, 2008 at 10:04 PM, Juan Backson <juanbackson at gmail.com>wrote:
>
>> Hi,
>>
>> I am maintaining an application DB and an Opensips DB. For the Opensips
>> DB, I would like to move the subscribers table to my app DB so that I don't
>> need to maintain two sip_user_name in two different places. It is do-able?
>> Can I just move that one table to my app DB or I also need the rest of the
>> Opensips tables moved as well?
>>
>> Also, is it possible to tell Opensips to check auth against the table I am
>> defining instead of the subscriber table?
>>
>> Could anyone have done that give me some suggestion on how to do it?
>>
>> Thanks,
>> JB
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> Gustavo Mistrinelli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20080923/52bb27ff/attachment.htm
More information about the Users
mailing list