Skip to content

Interpret sensitive data access rights and handle Privacy Requests

License

Notifications You must be signed in to change notification settings

blindnet-io/privacy-computation-engine

Repository files navigation

blindnet devkit
Privacy Computation Engine

Interpret sensitive data access rights and handle Privacy Requests.

blindnet.dev

Documentation  •  Submit an Issue  •  Online Chat

About

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:

  1. interpreting your rights to hold and treat a particular Data Capture at a particular point in time
  2. calculating a response to Data Subjects' Privacy Requests.

You'll find its full documentation in the Computation section of blindnet.dev.

Get Started

🚀 Check out our introductory tutorial to familiarize yourself with the blindnet devkit components and understand how they play together.

Usage

See /swagger for complete and up-to-date OpenAPI references and documentation.

Requirements

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, and sudo systemctl start docker to start it.

Run Locally

The scripts/start.sh script includes every required step to build and run the Privacy Configuration Engine locally:

  1. build the application and create a docker image with sbt
  2. start a Postgres instance
  3. execute database migrations
  4. 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

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

Development

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.

Environment Variables

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

Contributing

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.

Community

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.

License

The blindnet devkit privacy-computation-engine is available under MIT (and here is why).

About

Interpret sensitive data access rights and handle Privacy Requests

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages