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: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,10 @@ callers and display identity information on the incoming call screen.
11
11
<imgalt="Overview of the Live Caller ID Lookup"src="https://github.com/apple/pir-service-example/raw/main/Sources/PIRService/PIRService.docc/Resources/overview@2x.png">
12
12
</picture>
13
13
14
-
This repository provides a functional server backend to test the Live Caller ID Lookup feature.
14
+
[NEURLFilter](https://developer.apple.com/documentation/networkextension/neurlfiltermanager) is a new feature for iOS and MacOS that allows the system
15
+
to communicate with a third party service to privately check if a requested URL should be allowed or not. This allows your app to implement URL filtering in a privacy preserving manner.
16
+
17
+
This repository provides a functional server backend to test the Live Caller ID Lookup and NEURLFilter features.
15
18
16
19
> [!WARNING]
17
20
> While functional, this is just an example service and should not be run in production.
Once the device runs out of cached tokens, it will fetch new ones. One way to speed up the process is to explicitly refresh the PIR parameters.
111
+
* For example, for Live Caller ID Lookup, call [refreshPIRParameters(forExtensionWithIdentifier:)](https://developer.apple.com/documentation/sms_and_call_reporting/livecalleridlookupmanager/4418043-refreshpirparameters).
112
+
* For NEURLFilter, see [NEURLFilter API documentation](https://developer.apple.com/documentation/networkextension/neurlfiltermanager).
107
113
108
114
#### Evaluation key not found
109
115
@@ -123,7 +129,6 @@ A real service should persist the evaluation key, but the example service only s
123
129
copy of the evaluation key is gone after you restart the example service.
124
130
125
131
**Workaround:**
126
-
The device will periodically refetch the configuration from the server and will notice the missing evaluation key. You
to let system know that it should refetch the configuration immediately.
132
+
The device will periodically refetch the configuration from the server and will notice the missing evaluation key. You can also force the system to refresh configuration by calling the appropriate refresh API.
133
+
* For Live Caller ID Lookup, you can call [refreshPIRParameters(forExtensionWithIdentifier:)](https://developer.apple.com/documentation/sms_and_call_reporting/livecalleridlookupmanager/4418043-refreshpirparameters).
134
+
* For NEURLFilter, refer to [NEURLFilter API documentation](https://developer.apple.com/documentation/networkextension/neurlfiltermanager).
Understand the data format that Network Extension URL Filter expects.
4
+
5
+
## Overview
6
+
7
+
Network Extension on-device examines all URL requests, checking each URL against a Bloom filter built from your URL data set, containing URLs you want to block.
8
+
If the Bloom filter match is negative, the URL is not in your data set and it will be allowed immediately. If the Bloom filter match is positive, the match result is not
9
+
definitive due to potential false positives. In this case, an off-device URL query will be sent to your PIR server to match against your URL data set to get a final verdict.
10
+
If your PIR server responds with a match, the system on-device will block the URL, and the URL request will fail.
11
+
12
+
## URL Data Record
13
+
14
+
The URL data record has the URL (excluding the scheme portion) as the key. For example, for URL `https://www.example.com`, the URL key should be
15
+
`www.example.com`. If an entry is found matching the URL key, it already indicates a match. So the value for the record is simply set to the integer 1 serving as place holder.
You will need to provide the URLs you would put into your feature configuration. For example, for Live Caller ID Lookup, you would provide the URLs configured in
35
+
[LiveCallerIDLookupExtensionContext](https://developer.apple.com/documentation/identitylookup/livecalleridlookupextensioncontext). For NEURLFilter, you will provide the URLs specified in [NEURLFilter API documentation](https://developer.apple.com/documentation/networkextension/neurlfiltermanager).
36
36
37
-
> Important: In addition, we strongly advice you to use subdomains instead of paths. Support for custom paths for the
37
+
> Important: In addition, we strongly advise you to use subdomains instead of paths. Support for custom paths for the
38
38
> service URL and token issuer URL will be deprecated in a future iOS version.
39
39
40
40
Good example:
@@ -50,20 +50,20 @@ http://example.net:8080/lookup - No HTTPS, non standard port, path instead of su
50
50
```
51
51
52
52
#### HTTP Bearer Token / UserToken
53
-
The `userToken` field is a of type `Data` and the system sets the "Authorization" header like this:
53
+
The `userToken` field is of type `String` and the system sets the "Authorization" header like this:
This implies that when filling out the form, you must enter a valid base64 encoding.
58
-
> Warning: For example JSON Web Tokens are not valid base64 encodings and are therefore unsupported.
59
57
60
58
#### Checklist
61
59
62
-
1. You must know the bundle identifier of your Live Caller ID Lookup extension.
60
+
1. You must know the bundle identifier of your extension for Live Caller ID Lookup, or bundle identifier of your application for NEURLFilter.
63
61
2. You need to provide expected request and response size and per continent traffic estimates that include:
64
62
* peak requests per second
65
63
* total requests per day
66
-
3. You have added a test identity (+14085551212 with name “Johnny Appleseed”) to your dataset.
64
+
3. You have added a test identity to your dataset.
65
+
* For Live Caller ID Lookup, it should be +14085551212 with name “Johnny Appleseed”.
66
+
* For NEURLFilter, it should be `www.apple.com/url-filter-test` with value as the integer `1`.
67
67
4. You have set up an Oblivious HTTP gateway.
68
68
5. You must provide your Oblivious HTTP Gateway configuration resource.
69
69
6. You must provide your Oblivious HTTP Gateway resource -- a URL used to make oblivious HTTP requests to your service.
@@ -72,16 +72,22 @@ This implies that when filling out the form, you must enter a valid base64 encod
72
72
9. You must provide an HTTP Bearer token, that allows us to validate that your deployment is set up correctly and we can
73
73
successfully fetch the test identity.
74
74
10. You must add a DNS TXT record to your service URL to prove your ownership, control, and intent to serve Live Caller
75
-
ID Lookups. More specifically you need to add the following record:
76
-
`apple-live-caller-id-lookup=<bundle_identifier>` where `<bundle_identifier>` is replaced with your extension's
77
-
bundle identifier. For example, if your Live Caller ID Lookup extension's bundle identifier is `net.example.lookup`
78
-
the DNS TXT record should be: `apple-live-caller-id-lookup=net.example.lookup`.
75
+
ID Lookups or NEURLFilter. More specifically you need to add one of the following records, depending on whether you are hosting
76
+
Live Caller ID Lookups, or NEURLFilter:
77
+
* For Live Caller ID Lookup, add `apple-live-caller-id-lookup=<app_extension_bundle_identifier>`
78
+
* For NEURLFilter, add `apple-url-filter=<app_bundle_identifier>`
79
+
80
+
Here, `<app_extension_bundle_identifier>` is replaced with your extension's bundle identifier for Live Caller ID Lookup; and `<app_bundle_identifier>` is replaced with your application bundle identifier for NEURLFilter. For example, if your Live Caller ID Lookup
81
+
extension's bundle identifier is `net.example.lookup` the DNS TXT record should be: `apple-live-caller-id-lookup=net.example.lookup`.
79
82
11. You must ensure that your deployment (including Oblivious HTTP gateway & PIR service) is running so that we can
80
83
perform the validation test.
81
84
82
-
### Onboarding form
85
+
### Onboarding forms
83
86
84
87
The onboarding form should be filled out when you have a working service, but before you start distributing your
85
-
application with the Live Caller ID Lookup extension.
88
+
application.
86
89
87
-
> Important: [Link to the onboarding form.](https://developer.apple.com/contact/request/live-caller-id-lookup/)
90
+
> Important:
91
+
> [Link to the onboarding form for Live Caller ID Lookup.](https://developer.apple.com/contact/request/live-caller-id-lookup/)
92
+
>
93
+
> [Link to onboarding form for NEURLFilter.](https://developer.apple.com/contact/request/network-extension-url-filter)
Example service for Live Caller ID Lookup and NEURLFilter
4
4
5
5
## Overview
6
6
7
+
This service is a non-scalable example that can be used to test both Live Caller ID Lookup and NEURLFilter features. Please see
8
+
<doc:TestingInstructionsLiveCallerIdLookup> and <doc:TestingInstructionsNEURLFilter> to see instructions on how to run the example service and connect your phone to the service.
is a new feature that allows the system to communicate with a third party service to privately retrieve information
14
+
is a new feature in iOS 18.0 that allows the system to communicate with a third party service to privately retrieve information
10
15
about a phone number for an incoming call. This allows the system to automatically block known spam callers and display
11
16
identity information on the incoming call screen.
12
17
13
18

14
19
15
-
This service is an non-scalable example that can be used to test the Live Caller ID Lookup feature. Please see
16
-
<doc:TestingInstructions> to see intructions on how to run the example service and connect your phone to the service.
20
+
### NEURLFilter
21
+
22
+
[NEURLFilter](https://developer.apple.com/documentation/networkextension/neurlfiltermanager) is a new feature for iOS and MacOS that allows the system
23
+
to communicate with a third party service to privately check if a requested URL should be allowed or not. This allows your app to implement URL filtering in a privacy preserving manner.
0 commit comments