Browse code

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

Kamailio Dev authored on 17/11/2020 09:31:17
Showing 1 changed files
... ...
@@ -34,7 +34,8 @@ Daniel-Constantin Mierla
34 34
         4. Functions
35 35
 
36 36
               4.1. secsipid_check_identity(keyPath)
37
-              4.2. secsipid_add_identity(origTN, destTN, attest, origID,
37
+              4.2. secsipid_check_identity(pubkeyVal)
38
+              4.3. secsipid_add_identity(origTN, destTN, attest, origID,
38 39
                       x5u, keyPath)
39 40
 
40 41
         5. Installation
... ...
@@ -46,8 +47,9 @@ Daniel-Constantin Mierla
46 47
    1.3. Set cache_dir parameter
47 48
    1.4. Set cache_expire parameter
48 49
    1.5. secsipid_check_identity usage
49
-   1.6. secsipid_add_identity usage
50
-   1.7. Libsecsipid usage
50
+   1.6. secsipid_check_identity_pubkey usage
51
+   1.7. secsipid_add_identity usage
52
+   1.8. Libsecsipid usage
51 53
 
52 54
 Chapter 1. Admin Guide
53 55
 
... ...
@@ -69,7 +71,8 @@ Chapter 1. Admin Guide
69 71
    4. Functions
70 72
 
71 73
         4.1. secsipid_check_identity(keyPath)
72
-        4.2. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
74
+        4.2. secsipid_check_identity(pubkeyVal)
75
+        4.3. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
73 76
                 keyPath)
74 77
 
75 78
    5. Installation
... ...
@@ -155,7 +158,8 @@ modparam("secsipid", "cache_expire", 7200)
155 158
 4. Functions
156 159
 
157 160
    4.1. secsipid_check_identity(keyPath)
158
-   4.2. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
161
+   4.2. secsipid_check_identity(pubkeyVal)
162
+   4.3. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
159 163
           keyPath)
160 164
 
161 165
 4.1.  secsipid_check_identity(keyPath)
... ...
@@ -186,7 +190,32 @@ request_route {
186 190
    header and payload using {s.select} and {s.decode.base64t}
187 191
    transformations together with jansson module.
188 192
 
189
-4.2.  secsipid_add_identity(origTN, destTN, attest, origID, x5u, keyPath)
193
+4.2.  secsipid_check_identity(pubkeyVal)
194
+
195
+   Similar to secsipid_check_identity() with the public key value provided
196
+   in the parameter.
197
+
198
+   The parameters can contain pseudo-variables.
199
+
200
+   This function can be used from ANY_ROUTE.
201
+
202
+   Example 1.6. secsipid_check_identity_pubkey usage
203
+...
204
+request_route {
205
+  ...
206
+  http_client_query("https://provider.com/stir-shaken/cert.pem", "$var(pubkey)")
207
+;
208
+  ...
209
+  if(secsipid_check_identity_pubkey("$var(pubkey)")) { ... }
210
+  ...
211
+}
212
+...
213
+
214
+   Further checks can be done with config operations, decoding the JWT
215
+   header and payload using {s.select} and {s.decode.base64t}
216
+   transformations together with jansson module.
217
+
218
+4.3.  secsipid_add_identity(origTN, destTN, attest, origID, x5u, keyPath)
190 219
 
191 220
    Add Identity header using the key specified by "keyPath" to sign the
192 221
    JWT body. If origID is empty, a UUID string is generated to fill the
... ...
@@ -200,7 +229,7 @@ request_route {
200 229
 
201 230
    This function can be used from ANY_ROUTE.
202 231
 
203
-   Example 1.6. secsipid_add_identity usage
232
+   Example 1.7. secsipid_add_identity usage
204 233
 ...
205 234
 request_route {
206 235
     ...
... ...
@@ -224,7 +253,7 @@ request_route {
224 253
    installed and its environment configured, then run the following
225 254
    commands:
226 255
 
227
-   Example 1.7. Libsecsipid usage
256
+   Example 1.8. Libsecsipid usage
228 257
 ...
229 258
 go get https://github.com/asipto/secsipidx
230 259
 cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/