EGA-archive / LocalEGA

A federated storage for sensitive data
http://localega.readthedocs.io
Apache License 2.0
7 stars 16 forks source link

Vault consistency #89

Closed silverdaz closed 4 years ago

silverdaz commented 4 years ago

When a file is ingested, we fetch its session key and try to decrypt the body of the file with it. Before doing the latter, we checks if the sha256 checksum of the session key is already contained in the database (for non-errored and non-cancelled files).

If so, we raise a User Error. If not, we proceed with the decryption and store the checksum of the session key in the database. (Note, we are aware of the potential data-race there, but it is not a harmful one).

Describe the pull request:

One more tests has been enabled: Not ingesting twice the same file

silverdaz commented 4 years ago

Screen Shot 2019-12-13 at 16 43 56