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
*[ATIS-1000074v003: Signature-based Handling of Asserted information using toKENs (SHAKEN)](https://access.atis.org/higherlogic/ws/public/download/67436/ATIS-1000074.v003.pdf)
12
-
13
-
A more detailed list can be found in the [References](#references) section below.
5
+
This document refers to the Stir/Shaken Refactor of 1Q2024.
6
+
The earlier version was only partially functional and not interoperable with other implementations.
14
7
15
8
## STIR-SHAKEN Services
16
9
@@ -31,6 +24,7 @@ On an outbound call, attestation is basically you swearing in court what level o
31
24
* You're clueless. You're just passing the call along.
32
25
33
26
Attestation is accomplished by adding a SIP "Identity" header to the outgoing INVITE whose contents are signed with a specific private key/certificate which can be traced back to the actual caller id's owning service provider. For most Asterisk installation scenarios, you'd receive such a key/certificate from your upstream service provider when they issue you DID telephone numbers. Parameters that must be placed in the header include...
27
+
34
28
* The caller-id, even though it's probably already in the P-Asserted-Identity or From SIP headers.
35
29
* The attestation level.
36
30
* The date.
@@ -41,6 +35,7 @@ Attestation is accomplished by adding a SIP "Identity" header to the outgoing IN
41
35
### Verify
42
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)
43
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
+
44
39
* The verifier must retrieve the certificate using the URL referenced in the Identity header.
45
40
* The certificate's valid times must encompass the current time.
46
41
* The certificate must be traceable back to a certificate authority that is trusted to issue certificates for the telephone number in question.
@@ -51,6 +46,7 @@ This is the hard part... When you receive an incoming INVITE containing an Iden
51
46
* The caller-id in the Identity header must match the caller-id in the P-Asserted-Identity or From SIP headers.
52
47
53
48
If any of the checks fail, the specifications say you MUST... *do absolutely nothing*. You *may* however do one of the following:
49
+
54
50
* Accept the call and continue as if nothing happened.
55
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.
56
52
* Reject the call with very specific 4XX response codes.
@@ -337,6 +333,7 @@ Default: 15
337
333
##### failure_action
338
334
Indicates what will happen to requests that have failed verification.
339
335
Must be one of:
336
+
340
337
-**continue**:
341
338
Continue processing the request. You can use the STIR_SHAKEN
342
339
dialplan function to determine whether the request passed or failed
@@ -458,6 +455,7 @@ Default: none
458
455
##### endpoint_behhavior
459
456
Actions to be performed for endpoints referencing this profile.
460
457
Must be one of:
458
+
461
459
-**off**:
462
460
Don't do any STIR/SHAKEN processing.
463
461
-**attest**:
@@ -524,7 +522,7 @@ From now on, the action taken on failure is controlled by the `failure_action` p
524
522
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...
525
523
* Retrieve the certificate from the URL.
526
524
* Parse the certificate and public key.
527
-
* Validate the certificate using the CA certificates and certificate revocation lists provided by the `ca_file, ``ca_path`, `crl_file` and `crl_path`parametersprovided in the [profile](#profile) or [verification](#verification) objects and against the other rules mentioned in [Verify](#verify).
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).
528
526
1. Decode the Identity header using the public key from the certificate.
529
527
ication).
530
528
1. Retrieve the rest of the parameters from the decoded Identity header.
@@ -545,9 +543,18 @@ Compared to verification, attestation is simple.
545
543
1. If there's no caller-id present, skip attestation and continue the call.
546
544
1. If the endpoint sending the call doesn't have `stir_shaken_profile` set, skip attestation and continue the call.
547
545
1. If the profile name set in `stir_shaken_profile` doesn't exist, skip attestation and continue the call.
548
-
1. If the [attestation](#attestation)`global_disable` flag is true, skip verification and continue the call.
549
-
1. If the [profile](#profile)`endpoint_behavior` parameter isn't `attest` or `on`, skip verification and continue the call.
546
+
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.
550
548
1. If there's no "tn" object matching the caller-id, skip attestation and continue the call.
551
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.
552
550
553
551
## References
552
+
553
+
The best places to become familiar with STIR/SHAKEN itself are:
554
+
555
+
*[RFC7340 Secure Telephone Identity Problem Statement and Requirements](https://www.rfc-editor.org/rfc/rfc7340.html)
*[ATIS-1000074v003: Signature-based Handling of Asserted information using toKENs (SHAKEN)](https://access.atis.org/higherlogic/ws/public/download/67436/ATIS-1000074.v003.pdf)
0 commit comments