1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 08:12:40 +01:00
phorge-phorge/src/applications/files
epriestley 67084a6953 Support AES256 at-rest encryption in Files
Summary:
Ref T11140. This makes encryption actually work:

  - Provide a new configuation option, `keyring`, for specifying encryption keys.
  - One key may be marked as `default`. This activates AES256 encryption for Files.
  - Add `bin/files generate-key`. This is helps when generating valid encryption keys.
  - Add `bin/files encode`. This changes the storage encoding of a file, and helps test encodings and migrate existing data.
  - Add `bin/files cycle`. This re-encodes the block key with a new master key, if your master key leaks or you're just paraonid.
  - Document all these options and behaviors.

Test Plan:
  - Configured a bad `keyring`, hit a bunch of different errors.
  - Used `bin/files generate-key` to try to generate bad keys, got appropriate errors ("raw doesn't support keys", etc).
  - Used `bin/files generate-key` to generate an AES256 key.
  - Put the new AES256 key into the `keyring`, without `default`.
  - Uploaded a new file, verified it still uploaded as raw data (no `default` key yet).
  - Used `bin/files encode` to change a file to ROT13 and back to raw. Verified old data got deleted and new data got stored properly.
  - Used `bin/files encode --key ...` to explicitly convert a file to AES256 with my non-default key.
  - Forced a re-encode of an AES256 file, verified the old data was deleted and a new key and IV were generated.
  - Used `bin/files cycle` to try to cycle raw/rot13 files, got errors.
  - Used `bin/files cycle` to cycle AES256 files. Verified metadata changed but file data did not. Verified file data was still decryptable with metadata.
  - Ran `bin/files cycle --all`.
  - Ran `encode` and `cycle` on chunked files, saw commands fail properly. These commands operate on the underlying data blocks, not the chunk metadata.
  - Set key to `default`, uploaded a file, saw it stored as AES256.
  - Read documentation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11140

Differential Revision: https://secure.phabricator.com/D16127
2016-06-16 08:08:56 -07:00
..
action Rate limit outbound requests in Macros 2015-03-26 11:11:52 -07:00
application Allow Pholio mocks to be created and edited without drag-and-drop 2016-06-09 08:43:38 -07:00
applicationpanel Allow diffusion.filecontentquery to load data for arbitrarily large files 2016-01-21 09:52:43 -08:00
builtin Add a map marker icon for Milestones 2016-02-05 13:40:52 -08:00
capability Add default policy to Files application 2014-11-21 11:17:20 -08:00
conduit Add support for temporary files to file.allocate 2015-09-04 10:34:32 -07:00
config Add "video/quicktime" as a default Video MIME type 2016-06-14 14:44:18 -07:00
controller Add support to Files for file storage formats, to support encryption-at-rest 2016-06-15 11:17:53 -07:00
edge Modernize remaining edge types 2015-01-03 10:58:20 +11:00
editor Transactions - make implementing TYPE_XXXX_POLICY transactions optional 2015-05-19 12:58:18 -07:00
engine Add support to Files for file storage formats, to support encryption-at-rest 2016-06-15 11:17:53 -07:00
exception Give users an explicit error if they try to upload a too-large diff to Differential 2016-01-08 18:53:33 -08:00
format Support AES256 at-rest encryption in Files 2016-06-16 08:08:56 -07:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
iconset Convert all calls to 'IconFont' to just 'Icon' 2016-01-27 20:59:27 -08:00
keyring Support AES256 at-rest encryption in Files 2016-06-16 08:08:56 -07:00
lipsum Improve bin/lipsum UX 2015-12-24 09:06:35 -08:00
mail phtize all the things 2015-05-22 21:16:39 +10:00
management Support AES256 at-rest encryption in Files 2016-06-16 08:08:56 -07:00
markup Add Videos to Remarkup 2016-06-07 13:20:25 -07:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Cache user notification and message counts 2016-06-05 08:52:43 -07:00
storage Support AES256 at-rest encryption in Files 2016-06-16 08:08:56 -07:00
transform Scale up small cover images instead of surrounding them with empty space 2016-02-06 16:09:38 -08:00
uploadsource Support pushing data into Git LFS 2016-03-18 09:36:34 -07:00
view phtize all the things 2015-05-22 21:16:39 +10:00
PhabricatorImageTransformer.php Extend from Phobject 2015-06-15 18:02:27 +10:00