In this tutorial you will learn how to use fidesctl to solve a real-world data privacy problem. These steps closely follow the example found in the
ethyca/fidesdemo repository here.
You will run a local instance of a basic web app to demonstrate the use of Fidesctl as part of a "real" project that uses:
- Flask to run a web server simulating a basic e-commerce application
- PostgreSQL as the application's database
- SQLAlchemy to connect to the database
fidesctlto declare privacy manifests and evaluate policies
The app itself is the Flask tutorial app, but modified to simulate an e-commerce marketplace. This helps to highlight some basic examples of data categories that might be stored in a "real" user-facing application.
Before beginning, ensure you have the following software installed and configured to your liking:
- Docker (v12+)
- Python (v3.7+)
pg_config(required for the Python project. Installed via Homebrew with
brew install libpqor
brew install postgres.)
- Clone the
ethyca/fidesdemorepository to your machine.
Checkout the repository's
git checkout tutorial-start
Each step in this tutorial will explain the changes made in each commit of the fidesdemo repository. You can follow along by checking out each one, or by building everything yourself and comparing your work to each commit's changeset.
Navigate to the repository directory in your command line, and run:
This will create the project's virtual environment, and set up all required containers, databases, and dependencies.
If you prefer, you may execute the project's test suite by running:
About the Example Application ("Flaskr")
This example application is meant to simulate a basic e-commerce marketplace where users can create accounts and purchase products from one another. Using the web app you can:
- Register a new user
- Login as a user
- Post a "product" for sale
- Delete/update products you've posted
- Purchase a product (no products are actually for sale)
The schema itself is designed to highlight a few very simple examples of how identifiable data might get stored in a web application like this one. The sample data below shows what this looks like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Check Your Progress
Next: Add Fidesctl to the App
Work within the sample app prior to the installation and configuration of the Fides developer tools to add fidesctl.