Browse code

modules: readme files regenerated - secsipid ... [skip ci]

Kamailio Dev authored on 18/06/2021 12:16:22
Showing 1 changed files
... ...
@@ -37,11 +37,12 @@ Daniel-Constantin Mierla
37 37
 
38 38
               4.1. secsipid_check_identity(keyPath)
39 39
               4.2. secsipid_check_identity(pubkeyVal)
40
-              4.3. secsipid_get_url(url, ovar)
41
-              4.4. secsipid_add_identity(origTN, destTN, attest, origID,
40
+              4.3. secsipid_check(sIdentity, keyPath)
41
+              4.4. secsipid_get_url(url, ovar)
42
+              4.5. secsipid_add_identity(origTN, destTN, attest, origID,
42 43
                       x5u, keyPath)
43 44
 
44
-              4.5. secsipid_build_identity(origTN, destTN, attest, origID,
45
+              4.6. secsipid_build_identity(origTN, destTN, attest, origID,
45 46
                       x5u, keyPath)
46 47
 
47 48
         5. Installation
... ...
@@ -56,10 +57,11 @@ Daniel-Constantin Mierla
56 57
    1.6. Set libopt parameter
57 58
    1.7. secsipid_check_identity usage
58 59
    1.8. secsipid_check_identity_pubkey usage
59
-   1.9. secsipid_get_url usage
60
-   1.10. secsipid_add_identity usage
61
-   1.11. secsipid_build_identity usage
62
-   1.12. Libsecsipid Usage
60
+   1.9. secsipid_check usage
61
+   1.10. secsipid_get_url usage
62
+   1.11. secsipid_add_identity usage
63
+   1.12. secsipid_build_identity usage
64
+   1.13. Libsecsipid Usage
63 65
 
64 66
 Chapter 1. Admin Guide
65 67
 
... ...
@@ -84,11 +86,12 @@ Chapter 1. Admin Guide
84 86
 
85 87
         4.1. secsipid_check_identity(keyPath)
86 88
         4.2. secsipid_check_identity(pubkeyVal)
87
-        4.3. secsipid_get_url(url, ovar)
88
-        4.4. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
89
+        4.3. secsipid_check(sIdentity, keyPath)
90
+        4.4. secsipid_get_url(url, ovar)
91
+        4.5. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
89 92
                 keyPath)
90 93
 
91
-        4.5. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
94
+        4.6. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
92 95
                 keyPath)
93 96
 
94 97
    5. Installation
... ...
@@ -216,11 +219,12 @@ modparam("secsipid", "libopt", "CacheExpires=0")
216 219
 
217 220
    4.1. secsipid_check_identity(keyPath)
218 221
    4.2. secsipid_check_identity(pubkeyVal)
219
-   4.3. secsipid_get_url(url, ovar)
220
-   4.4. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
222
+   4.3. secsipid_check(sIdentity, keyPath)
223
+   4.4. secsipid_get_url(url, ovar)
224
+   4.5. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
221 225
           keyPath)
222 226
 
223
-   4.5. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
227
+   4.6. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
224 228
           keyPath)
225 229
 
226 230
 4.1.  secsipid_check_identity(keyPath)
... ...
@@ -272,7 +276,35 @@ request_route {
272 276
 }
273 277
 ...
274 278
 
275
-4.3.  secsipid_get_url(url, ovar)
279
+4.3.  secsipid_check(sIdentity, keyPath)
280
+
281
+   Check the validity of the "sIdentity" parameter using the keys stored
282
+   in the file specified by "keyPath". If the keyPath parameter is empty,
283
+   the function is downloading the key using the URL from "info" parameter
284
+   of the sIdentity, using the value of "timeout" parameter to limit the
285
+   download time. The validity of the JWT in the sIdentity value is also
286
+   checked against the "expire" parameter.
287
+
288
+   The parameters can contain pseudo-variables.
289
+
290
+   This function can be used from ANY_ROUTE.
291
+
292
+   Example 1.9. secsipid_check usage
293
+...
294
+request_route {
295
+    ...
296
+        if(secsipid_check_identity("...", "/secsipid/$si/cert.pem")) { ... }
297
+    ...
298
+        if(secsipid_check_identity("...", "")) { ... }
299
+    ...
300
+}
301
+...
302
+
303
+   Further checks can be done with config operations, decoding the JWT
304
+   header and payload using {s.select} and {s.decode.base64t}
305
+   transformations together with jansson module.
306
+
307
+4.4.  secsipid_get_url(url, ovar)
276 308
 
277 309
    Get the content of a URL and store the result in a variable.
278 310
 
... ...
@@ -281,7 +313,7 @@ request_route {
281 313
 
282 314
    This function can be used from ANY_ROUTE.
283 315
 
284
-   Example 1.9. secsipid_get_url usage
316
+   Example 1.10. secsipid_get_url usage
285 317
 ...
286 318
 request_route {
287 319
   ...
... ...
@@ -291,7 +323,7 @@ request_route {
291 323
 }
292 324
 ...
293 325
 
294
-4.4.  secsipid_add_identity(origTN, destTN, attest, origID, x5u, keyPath)
326
+4.5.  secsipid_add_identity(origTN, destTN, attest, origID, x5u, keyPath)
295 327
 
296 328
    Add Identity header using the key specified by "keyPath" to sign the
297 329
    JWT body. If origID is empty, a UUID string is generated to fill the
... ...
@@ -305,7 +337,7 @@ request_route {
305 337
 
306 338
    This function can be used from ANY_ROUTE.
307 339
 
308
-   Example 1.10. secsipid_add_identity usage
340
+   Example 1.11. secsipid_add_identity usage
309 341
 ...
310 342
 request_route {
311 343
     ...
... ...
@@ -315,7 +347,7 @@ request_route {
315 347
 }
316 348
 ...
317 349
 
318
-4.5.  secsipid_build_identity(origTN, destTN, attest, origID, x5u, keyPath)
350
+4.6.  secsipid_build_identity(origTN, destTN, attest, origID, x5u, keyPath)
319 351
 
320 352
    Build Identity value using the key specified by "keyPath" to sign the
321 353
    JWT body. If origID is empty, a UUID string is generated to fill the
... ...
@@ -331,7 +363,7 @@ request_route {
331 363
 
332 364
    This function can be used from ANY_ROUTE.
333 365
 
334
-   Example 1.11. secsipid_build_identity usage
366
+   Example 1.12. secsipid_build_identity usage
335 367
 ...
336 368
 request_route {
337 369
     ...
... ...
@@ -358,7 +390,7 @@ request_route {
358 390
    installed and its environment configured, then run the following
359 391
    commands:
360 392
 
361
-   Example 1.12. Libsecsipid Usage
393
+   Example 1.13. Libsecsipid Usage
362 394
 ...
363 395
 export GO111MODULE=off
364 396
 go get https://github.com/asipto/secsipidx