Interpret sensitive data access rights and handle Privacy Requests.
Documentation
•
Submit an Issue
•
Online Chat
The blindnet devkit Privacy Computation Engine (PCE) is the core of your "privacy stack".
It is a service delivering Restful APIs to manage the two core features of the DevKit by:
- interpreting your rights to hold and treat a particular Data Capture at a particular point in time
- calculating a response to Data Subjects' Privacy Requests.
You'll find its full documentation in the Computation section of blindnet.dev.
🚀 Check out our introductory tutorial to familiarize yourself with the blindnet devkit components and understand how they play together.
See /swagger for complete and up-to-date OpenAPI references and documentation.
To run the Privacy Computation Engine locally, make sure you have installed the latest versions of the following tools:
Warning
Following instructions extensively use Docker.
Make sure the Docker daemon is running and accessible to your current user before anything.
When using Systemd, you can run
sudo systemctl status docker
to check the status of the Docker daemon, andsudo systemctl start docker
to start it.
The scripts/start.sh
script includes every required step to build and run the Privacy Configuration Engine locally:
- build the application and create a docker image with
sbt
- start a Postgres instance
- execute database migrations
- run the Privacy Computation Engine
You only need to run it from the root directory:
./scripts/start.sh
After this script has been executed successfully, you can verify the service is running and available by calling:
curl -v localhost:9000/v0/health
From there, you only need to configure your PCE instance.
When you're done, make sure to stop and clean up all associated docker containers with:
./scripts/stop.sh
Note
Environment variables for the containerized instance are defined in the
.env
file.
Configuration of the PCE can be achieved using its Configuration API. Refer to the associated section of the documentation for more information.
A default configuration with example values can be found in the init-config.sh
script.
Change the values in this example to fit your specific needs, then run it:
./scripts/init-config.sh
First, start a Postgres instance and populate it with test data:
./scripts/start-dev.sh
Then, define the required environment variables in your local environment with default values:
source ./scripts/dev-env.sh
Finally, in the same terminal session, start the Privacy Computation Engine with:
sbt "~core/reStart"
When you're done, make sure to stop and clean up the database docker container with:
./scripts/stop-dev.sh
Note
When run in development mode, the PCE database is automatically populated with a default configuration. See ./scripts/insert-dev.sql for details.
Name | Description | Example | Default |
---|---|---|---|
BN_APP_ENV | App environment | {development, staging, production} | development |
BN_API_HOST | HTTP host | localhost | 0.0.0.0 |
BN_API_PORT | HTTP port | 80 | 9000 |
BN_DB_URI | jdbc connection string | jdbc:postgresql://localhost:5432/pce | |
BN_DB_USER | database user | postgres | |
BN_DB_PASS | database user's password | mysecretpassword | |
BN_REDIS_URI | redis connection string | redis://localhost | |
BN_APP_CALLBACK_URI | callback api prefix | localhost:9000/v0 | |
BN_TOKEN_IDENTITY | identity api token | token | |
BN_IDENTITY_URL | identity api url | https://stage.identity.devkit.blindnet.io | |
BN_IDENTITY_KEY | identity api public url | key |
Contributions of all kinds are always welcome!
If you see a bug or room for improvement in this project in particular, please open an issue or directly fork this repository to submit a Pull Request.
If you have any broader questions or suggestions, just open a simple informal DevRel Request, and we'll make sure to quickly find the best solution for you.
All community participation is subject to blindnet’s Code of Conduct.
Stay up to date with new releases and projects, learn more about how to protect your privacy and that of our users, and share projects and feedback with our team.
- Join our Slack Workspace to chat with the blindnet community and team
- Follow us on Twitter to stay up to date with the latest news
- Check out our Openness Framework and Product Management on Github to see how we operate and give us feedback.
The blindnet devkit privacy-computation-engine is available under MIT (and here is why).