Execute a Privacy Request
See a Privacy Request in Action
To summarize so far, we have:
- Created a client for authentication
- Created a connection from fidesops to our Flask App's Postgres Database
- Uploaded an annotated Dataset to fidesops so it knows how to traverse through the Flask App's tables
- Defined where to upload our user data after we've retrieved it from the Flask App
- Defined Policies describing what data we're looking for and what to do with that data.
For our last step, we'll write a method that will let us create a Privacy Request. We need to specify the Policy we want applied to that Privacy Request, as well as the starting identity of the user we'll need to locate the remaining user information.
For more detailed information, see the Privacy Request Guide.
Define a helper method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Call the helper method to run the Privacy Request
This will create a request to fetch for all user data with category user
associated
with email user@example.com
and save it to our local Storage destination, by specifying the email and the Policy.
1 2 3 4 5 6 7 8 9 |
|
Execute the Privacy Request
In your terminal, within the fidesdemo
directory, we'll run our script to execute the Privacy Request:
1 |
|
Success statuses | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Check your fidesdemo/fides_uploads
directory for your data package (you may have to wait a few
moments for the file to appear):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
Issues?
- Is
nox -s dev
running? - Reference the full script here for pieces you may be missing.
- This script has more detailed logging and error handling.
- Make sure your dataset is annotated properly
- Add breakpoints by inserting
import pdb; pdb.set_trace()
into the line where you want the breakpoint to set, then run your script.- Many of the endpoints used here are Bulk endpoints that return a 200 and then a mixture of a succeeded/failed resources.
- Check the docker logs:
1
docker ps
1 2 3 4 5 6
Name Command State Ports ------------------------------------------------------------------------------------------------------------------ fidesdemo_db_1 docker-entrypoint.sh postgres Up 0.0.0.0:5432->5432/tcp,:::5432->5432/tcp fidesdemo_fidesctl_1 fidesctl webserver Up 0.0.0.0:8080->8080/tcp,:::8080->8080/tcp fidesdemo_fidesops_1 fidesops webserver Up 8000/tcp, 0.0.0.0:8000->8080/tcp,:::8000->8080/tcp fidesdemo_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp,:::6379->6379/tcp
1
docker logs fidesdemo_fidesops_1