Browse code

auth_db(k): documented version_table parameter

Daniel-Constantin Mierla authored on 24/06/2011 18:47:21
Showing 2 changed files
... ...
@@ -24,9 +24,9 @@ Jan Janak
24 24
 
25 25
    <jan@iptel.org>
26 26
 
27
-   Copyright © 2002, 2003 FhG FOKUS
27
+   Copyright � 2002, 2003 FhG FOKUS
28 28
 
29
-   Copyright © 2005 Voice Sistem SRL
29
+   Copyright � 2005 Voice Sistem SRL
30 30
      __________________________________________________________________
31 31
 
32 32
    Table of Contents
... ...
@@ -49,6 +49,7 @@ Jan Janak
49 49
               3.6. calculate_ha1 (integer)
50 50
               3.7. use_domain (integer)
51 51
               3.8. load_credentials (string)
52
+              3.9. version_table (integer)
52 53
 
53 54
         4. Exported Functions
54 55
 
... ...
@@ -67,8 +68,9 @@ Jan Janak
67 68
    1.6. calculate_ha1 parameter usage
68 69
    1.7. use_domain parameter usage
69 70
    1.8. load_credentials parameter usage
70
-   1.9. www_authorize usage
71
-   1.10. proxy_authorize usage
71
+   1.9. version_table parameter usage
72
+   1.10. www_authorize usage
73
+   1.11. proxy_authorize usage
72 74
 
73 75
 Chapter 1. Admin Guide
74 76
 
... ...
@@ -90,6 +92,7 @@ Chapter 1. Admin Guide
90 92
         3.6. calculate_ha1 (integer)
91 93
         3.7. use_domain (integer)
92 94
         3.8. load_credentials (string)
95
+        3.9. version_table (integer)
93 96
 
94 97
    4. Exported Functions
95 98
 
... ...
@@ -135,6 +138,7 @@ Chapter 1. Admin Guide
135 138
    3.6. calculate_ha1 (integer)
136 139
    3.7. use_domain (integer)
137 140
    3.8. load_credentials (string)
141
+   3.9. version_table (integer)
138 142
 
139 143
 3.1. db_url (string)
140 144
 
... ...
@@ -144,7 +148,7 @@ Chapter 1. Admin Guide
144 148
    For dbtext module (which stores data in plaintext files) it is
145 149
    directory in which the database resides.
146 150
 
147
-   Default value is “mysql://openserro:openserro@localhost/openser”.
151
+   Default value is "mysql://openserro:openserro@localhost/openser".
148 152
 
149 153
    Example 1.1. db_url parameter usage
150 154
 ...
... ...
@@ -156,7 +160,7 @@ modparam("auth_db", "db_url", "dbdriver://username:password@dbhost/dbname")
156 160
    This is the name of the column holding usernames. Default value is fine
157 161
    for most people. Use the parameter if you really need to change it.
158 162
 
159
-   Default value is “username”.
163
+   Default value is "username".
160 164
 
161 165
    Example 1.2. user_column parameter usage
162 166
 ...
... ...
@@ -169,7 +173,7 @@ modparam("auth_db", "user_column", "user")
169 173
    is fine for most people. Use the parameter if you really need to change
170 174
    it.
171 175
 
172
-   Default value is “domain”.
176
+   Default value is "domain".
173 177
 
174 178
    Example 1.3. domain_column parameter usage
175 179
 ...
... ...
@@ -184,7 +188,7 @@ modparam("auth_db", "domain_column", "domain")
184 188
    safe because the server doesn't need to know plaintext passwords and
185 189
    they cannot be obtained from HA1 strings.
186 190
 
187
-   Default value is “ha1”.
191
+   Default value is "ha1".
188 192
 
189 193
    Example 1.4. password_column parameter usage
190 194
 ...
... ...
@@ -212,16 +216,16 @@ modparam("auth_db", "password_column_2", "ha1_2")
212 216
    HA1 string or plaintext passwords for authentification.
213 217
 
214 218
    If the parameter is set to 0 and the username parameter of credentials
215
-   contains also “@domain” (some user agents append the domain to the
219
+   contains also "@domain" (some user agents append the domain to the
216 220
    username parameter), then the server will use the HA1 values from the
217
-   column specified in the “password_column_2” parameter. If the username
221
+   column specified in the "password_column_2" parameter. If the username
218 222
    parameter doesn't contain a domain, the server will use the HA1 values
219
-   from the column given in the “password_column”parameter.
223
+   from the column given in the "password_column"parameter.
220 224
 
221 225
    If the parameter is set to 1 then the HA1 value will be calculated from
222
-   the column specified in the “password_column” parameter.
226
+   the column specified in the "password_column" parameter.
223 227
 
224
-   The “password_column_2”column contain also HA1 strings but they should
228
+   The "password_column_2"column contain also HA1 strings but they should
225 229
    be calculated including the domain in the username parameter (as
226 230
    opposed to password_column which (when containing HA1 strings) should
227 231
    always contains HA1 strings calculated without domain in username.
... ...
@@ -247,7 +251,7 @@ modparam("auth_db", "calculate_ha1", 1)
247 251
    IMPORTANT: before turning on this parameter, be sure that the domain
248 252
    column in subscriber table is properly populated.
249 253
 
250
-   Default value is “0 (false)”.
254
+   Default value is "0 (false)".
251 255
 
252 256
    Example 1.7. use_domain parameter usage
253 257
 ...
... ...
@@ -266,7 +270,7 @@ modparam("auth_db", "use_domain", 1)
266 270
      * credential = (avp_specification '=' column_name) | (column_name)
267 271
      * avp_specification = '$avp(' + 'i:'ID | 's:'NAME | alias + ')'
268 272
 
269
-   Default value of this parameter is “rpid”.
273
+   Default value of this parameter is "rpid".
270 274
 
271 275
    Example 1.8. load_credentials parameter usage
272 276
 ...
... ...
@@ -275,6 +279,18 @@ modparam("auth_db", "use_domain", 1)
275 279
 modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
276 280
 ...
277 281
 
282
+3.9. version_table (integer)
283
+
284
+   If set to 0, the module will skip checking the version for subscriber
285
+   table.
286
+
287
+   Default value is "1 (check for table version)".
288
+
289
+   Example 1.9. version_table parameter usage
290
+...
291
+modparam("auth_db", "version_table", 0)
292
+...
293
+
278 294
 4. Exported Functions
279 295
 
280 296
    4.1. www_authenticate(realm, table)
... ...
@@ -282,7 +298,7 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
282 298
    4.3. proxy_authenticate(realm, table)
283 299
    4.4. proxy_authorize(realm, table)
284 300
 
285
-4.1.  www_authenticate(realm, table)
301
+4.1. www_authenticate(realm, table)
286 302
 
287 303
    Name alias: www_authorize(realm, table)
288 304
 
... ...
@@ -303,7 +319,7 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
303 319
      * realm - Realm is a opaque string that the user agent should present
304 320
        to the user so he can decide what username and password to use.
305 321
        Usually this is domain of the host the server is running on.
306
-       It must not be empty string “”. In case of REGISTER requests To
322
+       It must not be empty string "". In case of REGISTER requests To
307 323
        header field domain (e.g., variable $td) can be used (because this
308 324
        header field represents the user being registered), for all other
309 325
        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")
313 329
 
314 330
    This function can be used from REQUEST_ROUTE.
315 331
 
316
-   Example 1.9. www_authorize usage
332
+   Example 1.10. www_authorize usage
317 333
 ...
318 334
 if (www_authorize("kamailio.org", "subscriber")) {
319 335
         www_challenge("kamailio.org", "1");
320 336
 };
321 337
 ...
322 338
 
323
-4.2.  www_authorize(realm, table)
339
+4.2. www_authorize(realm, table)
324 340
 
325 341
    It is same function as www_authenticate(realm, table). This name is
326 342
    kept for backward compatibility, since it was named this way first time
327 343
    by it actually does user authentication.
328 344
 
329
-4.3.  proxy_authenticate(realm, table)
345
+4.3. proxy_authenticate(realm, table)
330 346
 
331 347
    Name alias: proxy_authorize(realm, table)
332 348
 
... ...
@@ -343,9 +359,9 @@ if (www_authorize("kamailio.org", "subscriber")) {
343 359
      * realm - Realm is a opaque string that the user agent should present
344 360
        to the user so he can decide what username and password to use.
345 361
        Usually this is domain of the host the server is running on.
346
-       It must not be empty string “”. Apart of a static strinh, typical
362
+       It must not be empty string "". Apart of a static strinh, typical
347 363
        value is From header field domain (e.g., variable $fd).
348
-       If an empty string “” is used then the server will generate it from
364
+       If an empty string "" is used then the server will generate it from
349 365
        the request. From header field domain will be used as realm.
350 366
        The string may contain pseudo variables.
351 367
      * table - Table to be used to lookup usernames and passwords (usually
... ...
@@ -353,14 +369,14 @@ if (www_authorize("kamailio.org", "subscriber")) {
353 369
 
354 370
    This function can be used from REQUEST_ROUTE.
355 371
 
356
-   Example 1.10. proxy_authorize usage
372
+   Example 1.11. proxy_authorize usage
357 373
 ...
358 374
 if (!proxy_authorize("$fd", "subscriber)) {
359 375
         proxy_challenge("$fd", "1");  # Realm will be autogenerated
360 376
 };
361 377
 ...
362 378
 
363
-4.4.  proxy_authorize(realm, table)
379
+4.4. proxy_authorize(realm, table)
364 380
 
365 381
    It is same function as proxy_authenticate(realm, table). This name is
366 382
    kept for backward compatibility, since it was named this way first time
... ...
@@ -279,6 +279,26 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
279 279
 </programlisting>
280 280
 		</example>
281 281
 	</section>
282
+
283
+	<section>
284
+		<title><varname>version_table</varname> (integer)</title>
285
+		<para>
286
+		If set to 0, the module will skip checking the version
287
+		for subscriber table.
288
+		</para>
289
+		<para>
290
+		Default value is <quote>1 (check for table version)</quote>.
291
+		</para>
292
+		<example>
293
+		<title><varname>version_table</varname> parameter usage</title>
294
+		<programlisting format="linespecific">
295
+...
296
+modparam("auth_db", "version_table", 0)
297
+...
298
+		</programlisting>
299
+		</example>
300
+	</section>
301
+
282 302
 	</section>
283 303
 
284 304
 	<section>