Add fileKey rotation to GridFSBucketAdapter (#6768)

* add fileKey encryption to GridFSBucketStorageAdapter

* remove fileAdapter options from test spec

* ensure promise doesn't fall through in getFileData

* switch secretKey to fileKey

* add fileKey rotation for GridFSBucketAdapter

* improve catching decryption errors in testcases

* add testcase for rotating key from oldKey to noKey leaving all files decrypted

* removed fileKey from legacy test links. From the looks of the tests and the fileKey was appended to links. This key is now an encryption key

* clean up code

* make more consistant with FSAdapter

* use encryptionKey instead of fileKey

* Update ParseFile.spec.js

revert
This commit is contained in:
Corey
2020-10-26 01:17:43 -04:00
committed by GitHub
parent 1d038ee58d
commit 7f3ea3fe80
3 changed files with 476 additions and 38 deletions

View File

@@ -149,6 +149,10 @@ module.exports.ParseServerOptions = {
action: parsers.booleanParser,
default: false,
},
encryptionKey: {
env: 'PARSE_SERVER_ENCRYPTION_KEY',
help: 'Key for encrypting your files',
},
expireInactiveSessions: {
env: 'PARSE_SERVER_EXPIRE_INACTIVE_SESSIONS',
help: 'Sets wether we should expire the inactive sessions, defaults to true',