Giter Club home page Giter Club logo

privacy-observatory's Introduction

Privacy Obsercatory Orchestrator

This repository contains the source code of the privacy observatory platform.

It consits of the following components:

  • PostgreSQL
  • RESTful API
  • Worker

Initial Configuration

To setup the privacy observatory, the git repository shall be cloned and the combined docker-compose.yaml should be build and started:

docker compose up -d --build

Afterwards, as long as no user is existent in the database, all requests can be made unauthenticated. To define the first user account, use the following account:

docker exec -it prvobs-orchestrator-db-1 psql -U postgres -d postgres -c "INSERT INTO Users (name, email, timestamp, password_hash) VALUES('test','[email protected]', '2023-11-01 09:00', 'hashed_password');"

The hashed passwort can be generated using the following commands inside the /webapp folder (needed to get the application context for the password generation):

$ python3
from passlib.apps import custom_app_context as pwd_context
print(pwd_context.encrypt('password_of_the_user').replace("$", "\$"))

Afterwards, the host of the RestAPI server needs to be defined in the /webapp/js/app/api.js file:

api_prototype.api_host = 'https://example.com/api';

Component Documentation

RESTful API

This document presents the specifications for the API interface of the privacy observatory platform.

The following routes will be available.

Studies

Individual studies are performed on a regular basis and are performed with a specific domainset.

  • GET /studies Retrieve a list of all avaiable studies

  • PUT /studies, { 'name': , 'author': , 'composefile': , 'output_format': , 'domainset_id': , 'limit_domains': , 'cron_schedule': } Create a new study

  • POST /studies/{study_id} Update a study

  • DELETE /studies/{study_id}

Domains

Domains for collected measurements of the studies.

  • GET /domains List all domains

  • GET /domains/{domain_id} Get all measurement series for a particular domain.

  • PUT /domains, { 'domain': }

Domainsets

Domainsets deliver the list of domains dynaimcally generated by a custom python3 code to reach run of a study.

  • GET /domainsets Retrieve all available domainsets

  • PUT /domainsets, { 'name': , 'generator', } Create a new domainset

  • POST /domainsets/{domainset_id}, { 'name': , 'generator', } Update a domainset

  • DELETE /domainsets/{domainset_id} Delete a domainset object

Measurements

Measurements gathered from studies

  • GET /measurements/{study_id} Retrieve all measurments from a particular study.

  • PUT /measurements/{study_id}, { 'date': , 'key': , 'value': , 'domain_id': / } Store a new measurement for a study, in case no domain_id is supplied, it is a global aggregated statistic.

  • DELETE /measurements/{study_id}/{measurement_id} Delete a specific measurement of a specific study.

privacy-observatory's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.