Homec4science

Add support to Files for file storage formats, to support encryption-at-rest

Authored by epriestley <git@epriestley.com> on Jun 15 2016, 15:50.

Description

Add support to Files for file storage formats, to support encryption-at-rest

Summary:
Ref T11140. When reading and writing files, we optionally apply a "storage format" to them.

The default format is "raw", which means we just store the raw data.

This change modularizes formats and adds a "rot13" format, which proves formatting works and is testable. In the future, I'll add real encryption formats.

Test Plan:

  • Added unit tests.
  • Viewed files in web UI.
  • Changed a file's format to rot13, saw the data get rotated on display.
  • Set default format to rot13:
    • Uploaded a small file, verified data was stored as rot13.
    • Uploaded a large file, verified metadata was stored as "raw" (just a type, no actual data) and blob data was stored as rot13.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11140

Differential Revision: https://secure.phabricator.com/D16122

Details

Committed
epriestley <git@epriestley.com>Jun 15 2016, 20:17
Pushed
aubortJan 31 2017, 17:16
Parents
rPHf9a58fafba0d: Add "video/quicktime" as a default Video MIME type
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH1049feb0ed61: Add support to Files for file storage formats, to support encryption-at-rest (authored by epriestley <git@epriestley.com>).Jun 15 2016, 20:17