Begin migration script for re-encryption

This commit is contained in:
Tuan Dang
2023-05-29 23:46:16 +03:00
parent 2ae3c48b88
commit 37251ed607
7 changed files with 839 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
var mongoose = require('mongoose');
var secretBlindIndexDataSchema = new mongoose.Schema(
{
workspace: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Workspace',
required: true
},
encryptedSaltCiphertext:{
type: String,
required: true
},
saltIV: {
type: String,
required: true
},
saltTag: {
type: String,
required: true
},
algorithm: {
type: String,
enum: ['aes-256-gcm'],
required: true,
select: false
},
keyEncoding: {
type: String,
enum: [
'utf8',
'base64'
],
required: true,
select: false
}
}
);
var SecretBlindIndexData = mongoose.model('SecretBlindIndexData', secretBlindIndexDataSchema);
module.exports = SecretBlindIndexData;