Waterline version: master
Node version: 9.2.0
NPM version: 5.5.1
Operating system: Ubuntu
Currently you can set different dataEncryptionKeys to encrypt/decrypt your data.
The docs suggest a key rotation, which doesn't work for some reasons.
You encrypt your data and use the default key. This string "default" is stored along with the encrypted data to decrypt the data with the default key. while rotating the keys, you change the default key. But if you change the default key, you can no longer decrypt your data because the default key has changed.
So my suggestion is to let the user set the {{encryptWith}} in the model settings to a different key name than default.
Here, we could also check for WLModel.encryptWith.
I Know, you could set meta manually when building the query, but this doesn't work if you use the sails blueprint api.
module.exports = {
dataEncryptionKeys: {
'2017': 'CoWu+nNr9a3gwB/WihMMMnsx5wvT7sQdDuIA4fATlCo=',
'2016': 'I+3RdrJePwD8tlT3aqiijqpM3tnk0ntLB1lUqQaZ2hQ='
},
encryptWith: '2016',
attributes: [
// ...
sensitiveData: {
type: 'string',
encrypt: true
}
]
}
One simple so
Hi @edy! It looks like you missed a step or two when you created your issue. Please edit your comment (use the pencil icon at the top-right corner of the comment box) and fix the following:
As soon as those items are rectified, post a new comment (e.g. “Ok, fixed!”) below and we'll take a look. Thanks!
*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]
Ok, fixed!
Sorry to be a hassle, but it looks like your issue is still missing some required info. Please double-check your initial comment and try again.
*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]
@edy,@sailsbot: Hello, I'm a repo bot-- nice to meet you!
It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message and simply close the issue if possible. On the other hand, if you are still waiting on a patch, please post a comment to keep the thread alive (with any new information you can provide).
If no further activity occurs on this thread within the next 3 days, the issue will automatically be closed.
Thanks so much for your help!