You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Deployment/STIR-SHAKEN/index.md
+25-18Lines changed: 25 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The earlier version was only partially functional and not interoperable with oth
9
9
10
10
There are 2 services associated with STIR-SHAKEN call processing implementations...
11
11
12
-
### Attest
12
+
### Attestation
13
13
On an outbound call, attestation is basically you swearing in court what level of responsibility you have over the accuracy of the caller id you're presenting in the outgoing INVITE message, where the level can be one of the following:
14
14
15
15
***A**: Full Attestation
@@ -32,7 +32,7 @@ Attestation is accomplished by adding a SIP "Identity" header to the outgoing IN
32
32
* A URL to the certificate whose private key was used to sign this header.
33
33
* The signature that resulted from signing the header with the associated private key.
34
34
35
-
### Verify
35
+
### Verification
36
36
This is the hard part... When you receive an incoming INVITE containing an Identity header, you can't just automatically trust it. There are a very specific set of tests that must be executed to determine if the information in that Identity header is valid. Most of these tests are described in [ATIS-1000074v003](https://access.atis.org/higherlogic/ws/public/download/67436/ATIS-1000074.v003.pdf)
37
37
* The certificate URL included in the Identity header must use the https scheme, must not have any query parameters, user/password components, or path parameters. The hostname part of the URL must also NOT resolve to any of the Special-Purpose IP Addresses described in [RFC-6890](https://datatracker.ietf.org/doc/html/rfc6890) which includes the local interface 127.0.0.x and the private networks like 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Don't worry, for testing purposes you can relax these restrictions. :)
38
38
@@ -51,6 +51,13 @@ If any of the checks fail, the specifications say you MUST... *do absolutely not
51
51
* Accept the call but return some data back to the sender with some error information that may be useful to them. What they do with it is their business.
52
52
* Reject the call with very specific 4XX response codes.
53
53
54
+
/// warning | Deviations from Specifications
55
+
* At the present time, Asterisk does not validate the destination TN in the SIP "To:" and the "dest" TN in the Identity header. The rules for doing so are fairly complex with regard to emergency services numbers and call diversion (forwarding, transfer, etc).
56
+
* Although [RFC-8225 section 7](https://www.rfc-editor.org/rfc/rfc8225#section-7) allows the use of the compact form of the PASSporT, [ATIS-1000074](https://access.atis.org/higherlogic/ws/public/download/67436/ATIS-1000074.v003.pdf/latest) section 5.3.3 states that only the full form shall be used. Asterisk therefore supports only the full form of the PASSporT.
57
+
* Asterisk currently performs only basic validation of certificates retrieved during the verification process. Certificate authority, certificate revocation, validity date and TNAuthList extension presence are validated but neither validation of the TNAuthList content nor validation of the Common Name content are performed. At the present time, we could find no examples of certificates with either of those extensions that could be tested with. This means that there's effectively no verification that the certificate retrieved actually has the authority over the originating TN.
58
+
59
+
60
+
///
54
61
## Asterisk Implementation
55
62
56
63
### Configuration
@@ -95,7 +102,7 @@ will create the table. Since there can be only one "verification"
95
102
or "attestation" object, and will probably be only a few "profile"
96
103
objects, those objects aren't realtime enabled.
97
104
98
-
#### Attestation
105
+
#### Attestation Object
99
106
100
107
The "attestation" object sets the parameters for creating an Identity
101
108
header which attests to the ownership of the caller id on outgoing
@@ -171,7 +178,7 @@ attest_level = C
171
178
```
172
179
173
180
174
-
#### TN
181
+
#### TN Object
175
182
176
183
Each "tn" object contains the parameters needed to create the Identity
177
184
header used to attest to the ownership of the caller-id on outgoing
@@ -188,7 +195,7 @@ The "id" of this object MUST be a canonicalized telephone nmumber which
188
195
starts with a country code. The only valid characters are the numbers
189
196
0-9, '#' and '*'.
190
197
191
-
The default values for all of the "tn" parameters come from the "[attestation](#attestation)" and "[profile](#profile)" objects.
198
+
The default values for all of the "tn" parameters come from the "[attestation](#attestation-object)" and "[profile](#profile-object)" objects.
192
199
193
200
Parameters:
194
201
@@ -199,15 +206,15 @@ Default: none
199
206
200
207
##### private_key_file
201
208
202
-
See the description under [attestation](#attestation)
209
+
See the description under [attestation](#attestation-object)
203
210
204
211
##### public_cert_url
205
212
206
-
See the description and WARNING under [attestation](#attestation)
213
+
See the description and WARNING under [attestation](#attestation-object)
207
214
208
215
##### attest_level
209
216
210
-
See the description under [attestation](#attestation)
217
+
See the description under [attestation](#attestation-object)
211
218
212
219
##### Example "tn" object:
213
220
@@ -225,7 +232,7 @@ Using all the attestation and profile defaults:
225
232
type = tn
226
233
```
227
234
228
-
#### Verification
235
+
#### Verification Object
229
236
230
237
The "verification" object sets the parameters for verification
231
238
of the Identity header on incoming INVITE requests.
A "profile" object can be associated to channel driver endpoint
440
447
(currently only chan_pjsip) and can set verification and attestation
@@ -510,19 +517,19 @@ We perform verification on incoming calls.
510
517
1. If the endpoint receiving the call doesn't have `stir_shaken_profile` set, skip verification and continue the call.
511
518
1. If the profile name set in `stir_shaken_profile` doesn't exist, return an error and terminate the call.
512
519
1. If the [verification](#verification)`global_disable` flag is true, skip verification and continue the call.
513
-
1. If the [profile](#profile)`endpoint_behavior` parameter isn't `verify` or `on`, skip verification and continue the call.
520
+
1. If the [profile](#profile-object)`endpoint_behavior` parameter isn't `verify` or `on`, skip verification and continue the call.
514
521
515
-
From now on, the action taken on failure is controlled by the `failure_action` parameter in the [profile](#profile) or [verification](#verification) objects.
522
+
From now on, the action taken on failure is controlled by the `failure_action` parameter in the [profile](#profile-object) or [verification](#verification-object) objects.
516
523
517
524
1. If there's no Identity header in the SIP request, fail per `failure_action`
518
525
1. Parse the Identity header.
519
-
1. Check the URL in the "x5u" header parameter against the rules described in [Verify](#verify).
520
-
1. Check the "iat" header is within `max_iat_age` from the [profile](#profile) or [verification](#verification).
521
-
1. Check the SIP "Date" header is within the `max_date_header_age` from the [profile](#profile) or [verification](#verif
526
+
1. Check the URL in the "x5u" header parameter against the rules described in [Verification](#verification).
527
+
1. Check the "iat" header is within `max_iat_age` from the [profile](#profile-object) or [verification](#verification).
528
+
1. Check the SIP "Date" header is within the `max_date_header_age` from the [profile](#profile-object) or [verification](#verif
522
529
1. Check the local cache to see if we have the certificate already and it's cache expiration isn't in the past. If we have a good one, skip to the next step. Otherwise...
523
530
* Retrieve the certificate from the URL.
524
531
* Parse the certificate and public key.
525
-
* Validate the certificate using the CA certificates and certificate revocation lists provided by the `ca_file`, `ca_path`, `crl_file` and `crl_path` parameters provided in the [profile](#profile) or [verification](#verification) objects and against the other rules mentioned in [Verify](#verify).
532
+
* Validate the certificate using the CA certificates and certificate revocation lists provided by the `ca_file`, `ca_path`, `crl_file` and `crl_path` parameters provided in the [profile](#profile-object) or [verification](#verification-object) objects and against the other rules mentioned in [Verification](#verification).
526
533
1. Decode the Identity header using the public key from the certificate.
527
534
ication).
528
535
1. Retrieve the rest of the parameters from the decoded Identity header.
@@ -544,9 +551,9 @@ Compared to verification, attestation is simple.
544
551
1. If the endpoint sending the call doesn't have `stir_shaken_profile` set, skip attestation and continue the call.
545
552
1. If the profile name set in `stir_shaken_profile` doesn't exist, skip attestation and continue the call.
546
553
1. If the [attestation](#attestation)`global_disable` flag is true, skip attestation and continue the call.
547
-
1. If the [profile](#profile)`endpoint_behavior` parameter isn't `attest` or `on`, skip attestation and continue the call.
554
+
1. If the [profile](#profile-object)`endpoint_behavior` parameter isn't `attest` or `on`, skip attestation and continue the call.
548
555
1. If there's no "tn" object matching the caller-id, skip attestation and continue the call.
549
-
1. Finally create and sign the Identity header using the `private_key_file`, `public_cert_url`, `attest_level` and `send_mky` parameters from [tn](#tn), [profile](#profile) or [attestation](#attestation). If this fails, the call will be terminated.
556
+
1. Finally create and sign the Identity header using the `private_key_file`, `public_cert_url`, `attest_level` and `send_mky` parameters from [tn](#tn-object), [profile](#profile-object) or [attestation](#attestation-object). If this fails, the call will be terminated.
0 commit comments