A system for gathering meaningful insights in a privacy-friendly way.
For more background, see the wiki.
This project is licensed under the terms of the GNU General Public License version 3, see COPYING.
Privact consists of two separate components, which are - for the time being - in the same repository, this one.
Testing the whole system is currently only semi automated, but we plan to add fully automated integration tests over time. For now, you'll need to follow these steps:
The easiest way to do that is via Docker Compose:
docker compose up
This will build and spawn the server, and a sufficient amount of clients. If you
want to launch a fresh demo, add the --force-recreate
option.
Note: The amount of clients needs to be at least Group size * Group count
,
at the time of writing that's 4. If the number is now higher, you might need
to adjust it in docker-compose.yaml.
This part is already automated:
./demo server-init
But in case you want to do it manually:
- Go to http://localhost:8080/admin/.
- Log in as admin with password admin - at least these are the credentials set at the time of writing.
- Add a new Survey.
- Set Name to Test.
- Add a new Commissioner called KDE.
- Set both Group size and Group count to
2
. - Add a new Data point called Test with Key test and Type Integer.
- Set the query's Cohorts to
["1", "2", "3"]
. Leave Discrete checked. - Save it.
This part is already automated:
./demo client-init
It should set the datapoint test for each client, with values 1
, 2
, 2
and 3
respectively, at least at the time of writing.
Wait a few minutes for the clients to subscribe to the survey, finish and submit the aggregation.
Then, in the admin interface, check Survey responses and verify that one has
been created. The value should be: {"1": 1, "2": 2, "3": 1}
.
If the expected results don't show up on the server, you can check each step of the protocol on the server (in addition to watching the client for error messages). The steps are, roughly:
- Each client does a Survey signup, which should show up in the admin as soon as they do.
- Aggregation groups are formed once enough clients have signed up, and a delegate (the aggregating client) will be chosen. In the admin, you can see the ID of the delegate.
- The non-delegate clients send messages intended for the delegate through the server. You should see these (albeit encrypted) under Client to delegate messages.
- Once the delegate has received all messages, it should send a Survey response.
Please note that the actual naming and some of the details of the protocol may have changed since this was written.
In addition to discrete queries, we can also do continuous queries, using interval notation. A test case for this is not documented yet.