The data privacy vault is built based on the concept of tokenization service.
Data persistence: Redis
Data encryption: Fernet symmetric key encryption
Programming Language: Python
Framework: Flask
Auth: Basic Auth
-
Install and setup redis with data persistence enabled.
Follow installation guide
OR
Use docker:
mkdir redis-data docker run -d --name my-redis -p 6379:6379 -v $(pwd)/redis-data:/data redis:latest --appendonly yesOR
Use free redis database in the cloud. Create a free account.
Note: Authentication in redis is not supported as of now. However, it can be considered for implementation as a potential enhancement in the future.
Optionally, install Redis Insight.
-
Configure your redis connection in
config.py -
Configure the key used for Fernet encryption and decryption in the
config.py. The key must be 32 url-safe base64-encoded bytes.To generate a key run the following in your Python interactive shell:
from cryptography.fernet import Fernet Fernet.generate_key()
-
Create a virtual environment and install dependencies.
Run
pip install poetryif required.python -m venv venv . venv/bin/activate poetry install -
Run the application:
cd data_privacy_vault python app.py -
Run unit tests:
cd tests python -m unittest
docker pull sesmi/data-privacy-vault:latest
docker pull redis:latest
docker network create private_vault_network
docker volume create redis_data
docker run -p 9000:6379 -d --name my_redis -v redis_data:/data --network private_vault_network redis redis-server --appendonly yes
docker run -p 7000:80 -d --name my_vault -e DB_HOST=my_redis --network private_vault_network sesmi/data-privacy-vault:latestdocker stop my_redis my_vault
docker rm my_redis my_vault
docker volume rm redis_data
docker network rm private_vault_networkTODO
-
Integrate with a key management system like Azure Keyvault to keep the cryptographic keys secure.
-
Extend the authentication to integrate with common identity and access management solutions.
