← Volver al índice de módulos

auth_db

This module contains all authentication related functions that need the access to the database. This module should be used together with auth module, it cannot be used independently because it depends
🔒 Autenticación y Seguridad Kamailio 6.1 20 parámetros 12 funciones

Descripción general

This module contains all authentication related functions that need the access to the database. This module should be used together with auth module, it cannot be used independently because it depends on the module. Select this module if you want to use database to store authentication information like subscriber usernames and passwords. If you want to use radius authentication, then use auth_radius instead.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/auth_db.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/auth_db

Parámetros de configuración

ParámetroTipoDescripción
db_url string 3.2. user_column (string) 3.3. domain_column (string) 3.4. password_column (string) 3.5. password_column_2 (string) 3.6. calculate_ha1 (integer) 3.7. use_domain (integer) 3.8. load_credentials (string
user_column string 3.3. domain_column (string) 3.4. password_column (string) 3.5. password_column_2 (string) 3.6. calculate_ha1 (integer) 3.7. use_domain (integer) 3.8. load_credentials (string) 3.9. version_table (inte
domain_column string 3.4. password_column (string) 3.5. password_column_2 (string) 3.6. calculate_ha1 (integer) 3.7. use_domain (integer) 3.8. load_credentials (string) 3.9. version_table (integer) 3.10. force_generate_av
password_column string 3.5. password_column_2 (string) 3.6. calculate_ha1 (integer) 3.7. use_domain (integer) 3.8. load_credentials (string) 3.9. version_table (integer) 3.10. force_generate_avps (integer)
password_column_2 string 3.6. calculate_ha1 (integer) 3.7. use_domain (integer) 3.8. load_credentials (string) 3.9. version_table (integer) 3.10. force_generate_avps (integer)
calculate_ha1 integer 3.7. use_domain (integer) 3.8. load_credentials (string) 3.9. version_table (integer) 3.10. force_generate_avps (integer)
use_domain integer 3.8. load_credentials (string) 3.9. version_table (integer) 3.10. force_generate_avps (integer)
load_credentials string 3.9. version_table (integer) 3.10. force_generate_avps (integer)
version_table integer 3.10. force_generate_avps (integer)
force_generate_avps integer 3.1. db_url (string)
db_url string This is URL of the database to be used. Value of the parameter depends on the database module used. For example for mysql and postgres modules this is something like mysql://username:password@host:por
user_column string This is the name of the column holding usernames. Default value is fine for most people. Use the parameter if you really need to change it.
domain_column string This is the name of the column holding domains of users. Default value is fine for most people. Use the parameter if you really need to change it.
password_column string This is the name of the column holding passwords. Passwords can be either stored as plain text or pre-calculated HA1 strings. HA1 strings are MD5 hashes of username, password, and realm. HA1 strings a
password_column_2 string As described in the previous section this parameter contains name of column holding pre-calculated HA1 string that were calculated including the domain in the username. This parameter is used only whe
calculate_ha1 integer This parameter tells the server whether it should use a pre-calculated HA1 string or plaintext passwords for authentication.
use_domain integer If true (not 0), domain will be also used when looking up in the subscriber table. If you have a multi-domain setup, it is strongly recommended to turn on this parameter to avoid username overlapping
load_credentials string This parameter specifies of credentials to be fetch from database when the authentication is performed. The loaded credentials will be stored in AVPs. If the AVP name is not specifically given, it wil
version_table integer If set to 0, the module will skip checking the version for subscriber table.
force_generate_avps integer If set to different than 0, the module will fetch user DB attributes even if authentication failed.

Funciones exportadas

www_authenticate(realm, table [, method])

4.2. www_authorize(realm, table) 4.3. proxy_authenticate(realm, table) 4.4. proxy_authorize(realm, table) 4.5. auth_check(realm, table, flags) 4.6. is_subscriber(uri, dbtable, flags)

www_authorize(realm, table)

4.3. proxy_authenticate(realm, table) 4.4. proxy_authorize(realm, table) 4.5. auth_check(realm, table, flags) 4.6. is_subscriber(uri, dbtable, flags)

proxy_authenticate(realm, table)

4.4. proxy_authorize(realm, table) 4.5. auth_check(realm, table, flags) 4.6. is_subscriber(uri, dbtable, flags)

proxy_authorize(realm, table)

4.5. auth_check(realm, table, flags) 4.6. is_subscriber(uri, dbtable, flags)

auth_check(realm, table, flags)

4.6. is_subscriber(uri, dbtable, flags)

is_subscriber(uri, dbtable, flags)

4.1. www_authenticate(realm, table [, method])

www_authenticate(realm, table [, method])

Name alias: www_authorize(realm, table)

www_authorize(realm, table)

It is same function as www_authenticate(realm, table). This name is kept for backward compatibility, since it was named this way first time by it actually does user authentication.

proxy_authenticate(realm, table)

Name alias: proxy_authorize(realm, table)

proxy_authorize(realm, table)

It is same function as proxy_authenticate(realm, table). This name is kept for backward compatibility, since it was named this way first time but it actually does user authentication.

auth_check(realm, table, flags)

The function combines the functionalities of www_authenticate and proxy_authenticate, first being executed if the SIP request is a REGISTER, the second for the rest.

is_subscriber(uri, dbtable, flags)

The function checks if there is a subscriber corresponding to the AoR in uri parameter. It uses same database connection as for authentication functions.

Autores y contribuidores

Jan JanakFhG Fokus <jan@iptel.org>Jakob Schlyter <jakob@schlyter.se>Bogdan-Andrei IancuVoice Sistem SRL <bogdan@voice-system.ro>Daniel-Constantin Mierla <miconda@gmail.com>Jan Janak <jan@iptel.org>

Copyright © 2002, 2003 FhG FOKUS
Copyright © 2005 Voice Sistem SRL

Módulos relacionados

auth auth_arnacon auth_diameter auth_ephemeral auth_radius crypto htable ipops