[sr-dev] git:master: auth_db(k): documented version_table parameter

Daniel-Constantin Mierla miconda at gmail.com
Fri Jun 24 20:48:11 CEST 2011


Module: sip-router
Branch: master
Commit: 24ba6c21ef86a9f4a2b82ff9f8c2853d9b84bdc2
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=24ba6c21ef86a9f4a2b82ff9f8c2853d9b84bdc2

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Jun 24 20:47:21 2011 +0200

auth_db(k): documented version_table parameter

---

 modules_k/auth_db/README                |   64 +++++++++++++++++++-----------
 modules_k/auth_db/doc/auth_db_admin.xml |   20 ++++++++++
 2 files changed, 60 insertions(+), 24 deletions(-)

diff --git a/modules_k/auth_db/README b/modules_k/auth_db/README
index df612bc..bc43604 100644
--- a/modules_k/auth_db/README
+++ b/modules_k/auth_db/README
@@ -24,9 +24,9 @@ Jan Janak
 
    <jan at iptel.org>
 
-   Copyright © 2002, 2003 FhG FOKUS
+   Copyright © 2002, 2003 FhG FOKUS
 
-   Copyright © 2005 Voice Sistem SRL
+   Copyright © 2005 Voice Sistem SRL
      __________________________________________________________________
 
    Table of Contents
@@ -49,6 +49,7 @@ Jan Janak
               3.6. calculate_ha1 (integer)
               3.7. use_domain (integer)
               3.8. load_credentials (string)
+              3.9. version_table (integer)
 
         4. Exported Functions
 
@@ -67,8 +68,9 @@ Jan Janak
    1.6. calculate_ha1 parameter usage
    1.7. use_domain parameter usage
    1.8. load_credentials parameter usage
-   1.9. www_authorize usage
-   1.10. proxy_authorize usage
+   1.9. version_table parameter usage
+   1.10. www_authorize usage
+   1.11. proxy_authorize usage
 
 Chapter 1. Admin Guide
 
@@ -90,6 +92,7 @@ Chapter 1. Admin Guide
         3.6. calculate_ha1 (integer)
         3.7. use_domain (integer)
         3.8. load_credentials (string)
+        3.9. version_table (integer)
 
    4. Exported Functions
 
@@ -135,6 +138,7 @@ Chapter 1. Admin Guide
    3.6. calculate_ha1 (integer)
    3.7. use_domain (integer)
    3.8. load_credentials (string)
+   3.9. version_table (integer)
 
 3.1. db_url (string)
 
@@ -144,7 +148,7 @@ Chapter 1. Admin Guide
    For dbtext module (which stores data in plaintext files) it is
    directory in which the database resides.
 
-   Default value is “mysql://openserro:openserro@localhost/openser”.
+   Default value is "mysql://openserro:openserro@localhost/openser".
 
    Example 1.1. db_url parameter usage
 ...
@@ -156,7 +160,7 @@ modparam("auth_db", "db_url", "dbdriver://username:password@dbhost/dbname")
    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.
 
-   Default value is “username”.
+   Default value is "username".
 
    Example 1.2. user_column parameter usage
 ...
@@ -169,7 +173,7 @@ modparam("auth_db", "user_column", "user")
    is fine for most people. Use the parameter if you really need to change
    it.
 
-   Default value is “domain”.
+   Default value is "domain".
 
    Example 1.3. domain_column parameter usage
 ...
@@ -184,7 +188,7 @@ modparam("auth_db", "domain_column", "domain")
    safe because the server doesn't need to know plaintext passwords and
    they cannot be obtained from HA1 strings.
 
-   Default value is “ha1”.
+   Default value is "ha1".
 
    Example 1.4. password_column parameter usage
 ...
@@ -212,16 +216,16 @@ modparam("auth_db", "password_column_2", "ha1_2")
    HA1 string or plaintext passwords for authentification.
 
    If the parameter is set to 0 and the username parameter of credentials
-   contains also “@domain” (some user agents append the domain to the
+   contains also "@domain" (some user agents append the domain to the
    username parameter), then the server will use the HA1 values from the
-   column specified in the “password_column_2” parameter. If the username
+   column specified in the "password_column_2" parameter. If the username
    parameter doesn't contain a domain, the server will use the HA1 values
-   from the column given in the “password_column”parameter.
+   from the column given in the "password_column"parameter.
 
    If the parameter is set to 1 then the HA1 value will be calculated from
-   the column specified in the “password_column” parameter.
+   the column specified in the "password_column" parameter.
 
-   The “password_column_2”column contain also HA1 strings but they should
+   The "password_column_2"column contain also HA1 strings but they should
    be calculated including the domain in the username parameter (as
    opposed to password_column which (when containing HA1 strings) should
    always contains HA1 strings calculated without domain in username.
@@ -247,7 +251,7 @@ modparam("auth_db", "calculate_ha1", 1)
    IMPORTANT: before turning on this parameter, be sure that the domain
    column in subscriber table is properly populated.
 
-   Default value is “0 (false)”.
+   Default value is "0 (false)".
 
    Example 1.7. use_domain parameter usage
 ...
@@ -266,7 +270,7 @@ modparam("auth_db", "use_domain", 1)
      * credential = (avp_specification '=' column_name) | (column_name)
      * avp_specification = '$avp(' + 'i:'ID | 's:'NAME | alias + ')'
 
-   Default value of this parameter is “rpid”.
+   Default value of this parameter is "rpid".
 
    Example 1.8. load_credentials parameter usage
 ...
@@ -275,6 +279,18 @@ modparam("auth_db", "use_domain", 1)
 modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
 ...
 
+3.9. version_table (integer)
+
+   If set to 0, the module will skip checking the version for subscriber
+   table.
+
+   Default value is "1 (check for table version)".
+
+   Example 1.9. version_table parameter usage
+...
+modparam("auth_db", "version_table", 0)
+...
+
 4. Exported Functions
 
    4.1. www_authenticate(realm, table)
@@ -282,7 +298,7 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
    4.3. proxy_authenticate(realm, table)
    4.4. proxy_authorize(realm, table)
 
-4.1.  www_authenticate(realm, table)
+4.1. www_authenticate(realm, table)
 
    Name alias: www_authorize(realm, table)
 
@@ -303,7 +319,7 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
      * realm - Realm is a opaque string that the user agent should present
        to the user so he can decide what username and password to use.
        Usually this is domain of the host the server is running on.
-       It must not be empty string “”. In case of REGISTER requests To
+       It must not be empty string "". In case of REGISTER requests To
        header field domain (e.g., variable $td) can be used (because this
        header field represents the user being registered), for all other
        messages From header field domain can be used (e.g., variable $fd).
@@ -313,20 +329,20 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 1.9. www_authorize usage
+   Example 1.10. www_authorize usage
 ...
 if (www_authorize("kamailio.org", "subscriber")) {
         www_challenge("kamailio.org", "1");
 };
 ...
 
-4.2.  www_authorize(realm, table)
+4.2. 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.
 
-4.3.  proxy_authenticate(realm, table)
+4.3. proxy_authenticate(realm, table)
 
    Name alias: proxy_authorize(realm, table)
 
@@ -343,9 +359,9 @@ if (www_authorize("kamailio.org", "subscriber")) {
      * realm - Realm is a opaque string that the user agent should present
        to the user so he can decide what username and password to use.
        Usually this is domain of the host the server is running on.
-       It must not be empty string “”. Apart of a static strinh, typical
+       It must not be empty string "". Apart of a static strinh, typical
        value is From header field domain (e.g., variable $fd).
-       If an empty string “” is used then the server will generate it from
+       If an empty string "" is used then the server will generate it from
        the request. From header field domain will be used as realm.
        The string may contain pseudo variables.
      * table - Table to be used to lookup usernames and passwords (usually
@@ -353,14 +369,14 @@ if (www_authorize("kamailio.org", "subscriber")) {
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 1.10. proxy_authorize usage
+   Example 1.11. proxy_authorize usage
 ...
 if (!proxy_authorize("$fd", "subscriber)) {
         proxy_challenge("$fd", "1");  # Realm will be autogenerated
 };
 ...
 
-4.4.  proxy_authorize(realm, table)
+4.4. 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
diff --git a/modules_k/auth_db/doc/auth_db_admin.xml b/modules_k/auth_db/doc/auth_db_admin.xml
index f00e5ca..9bfe61d 100644
--- a/modules_k/auth_db/doc/auth_db_admin.xml
+++ b/modules_k/auth_db/doc/auth_db_admin.xml
@@ -279,6 +279,26 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
 </programlisting>
 		</example>
 	</section>
+
+	<section>
+		<title><varname>version_table</varname> (integer)</title>
+		<para>
+		If set to 0, the module will skip checking the version
+		for subscriber table.
+		</para>
+		<para>
+		Default value is <quote>1 (check for table version)</quote>.
+		</para>
+		<example>
+		<title><varname>version_table</varname> parameter usage</title>
+		<programlisting format="linespecific">
+...
+modparam("auth_db", "version_table", 0)
+...
+		</programlisting>
+		</example>
+	</section>
+
 	</section>
 
 	<section>




More information about the sr-dev mailing list