[OpenSIPS-Users] Database Authentication Problem

ram talk2ram at gmail.com
Wed Jul 8 07:59:14 CEST 2009


On Wed, Jul 8, 2009 at 7:16 AM, Nathaniel L Keeling
<keeling at akan-tech.com>wrote:

> I am having a problem with database authentication and would like some
> help. I have everything setup for the database and have added a user.
> The user was added using opensipsctl. The setting for the database is to
> not use plain text passwords. If I add the password to the database
> entry, the user will authenticate. I feel that there is a configuration
> problem but don't know where. Here is the extract from my config file
>
> /* uncomment the following lines if you want to enable the DB based
>  authentication */
>
> modparam("auth_db", "calculate_ha1", yes)
> modparam("auth_db", "password_column", "password")
> modparam("auth_db", "db_url",
>       "postgres://opensips:opensipsrw@localhost/opensips")
> modparam("auth_db", "load_credentials", "")
>
> /* uncomment the following line if you want to enable multi-domain support
>  in the modules (dafault off) */
>
> modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)
>
>
>  From opensipsctlrc and osipsconsolerc
>
> ## do (1) or don't (0) store plaintext passwords
> ## in the subscriber table - default '1'
> STORE_PLAINTEXT_PW=0
>

Hi

apart from that you need to edit some more information like

# ----- usrloc params -----
#modparam("usrloc", "db_mode",   0)
/* uncomment the following lines if you want to enable DB persistency
   for location entries */
modparam("usrloc", "db_mode",   2)
modparam("usrloc", "db_url",
        "mysql://opensips:opensipsrw@localhost/opensips")

# ----- uri_db params -----
/* by default we disable the DB support in the module as we do not need it
   in this configuration */
modparam("uri_db", "use_uri_table", 0)
modparam("uri_db", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")

and

# generated by local subscriber (domain from FROM URI is local)
       if (!(method=="REGISTER") && from_uri==myself) /*no multidomain
version*/
       if (!(method=="REGISTER") && is_from_local())  /*multidomain
version*/
       {
               if (!proxy_authorize("", "subscriber")) {
                       proxy_challenge("", "0");
                       exit;
               }
               if (!check_from()) {
                       sl_send_reply("403","Forbidden auth ID");
                       exit;
               }
               consume_credentials();
               # caller authenticated
       }

Or else post full config to suggest better

Ram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090708/b9967759/attachment-0001.htm 


More information about the Users mailing list