Skip to content

Latest commit

 

History

History

Dotnet

Protecting Sensitive Data in Event-Sourced Systems with Crypto Shredding

This sample is showing an example of using the Crypto Shredding pattern with EventStoreDB. This can be a solution for handling e.g. European General Data Protection Regulation.

Read more in the Diego Martin article "Protecting Sensitive Data in Event-Sourced Systems with Crypto Shredding";

Prerequisities

Running

  1. Run: docker-compose up.
  2. Wait until all Docker containers are up and running.
  3. Check that you can access each started component the following URL:
  4. Open, build and run tests in CryptoShredding.sln solution.

Overview

The general flow for using Crypto Shredding patern:

  1. Identify sensitive data in an event. See:
  2. Associate sensitive data to a subject. See:
  3. Store private encryption keys. See:
  4. Get rid of the private encryption key when desired. See:
  5. Cryptographic algorithm to use when encrypting and decrypting. See:
  6. Encrypt text and other data types. See:
  7. Upstream serialization with encryption mechanism. See:
  8. Decrypt text and masking mechanism when it cannot be decrypted. See:
  9. Downstream deserialization with decryption mechanism. See:
  10. Wire up together with an EventStoreDB gRPC client. See:
  11. Test everything with an EventStoreDB. See: