Implement cipher key encryption (#3990)

This commit is contained in:
Daniel García
2023-10-23 00:18:14 +02:00
committed by GitHub
parent 6eaf131922
commit cb4b683dcd
12 changed files with 29 additions and 1 deletions

View File

@@ -23,6 +23,8 @@ db_object! {
pub user_uuid: Option<String>,
pub organization_uuid: Option<String>,
pub key: Option<String>,
/*
Login = 1,
SecureNote = 2,
@@ -62,6 +64,8 @@ impl Cipher {
user_uuid: None,
organization_uuid: None,
key: None,
atype,
name,
@@ -203,6 +207,7 @@ impl Cipher {
"DeletedDate": self.deleted_at.map_or(Value::Null, |d| Value::String(format_date(&d))),
"Reprompt": self.reprompt.unwrap_or(RepromptType::None as i32),
"OrganizationId": self.organization_uuid,
"Key": self.key,
"Attachments": attachments_json,
// We have UseTotp set to true by default within the Organization model.
// This variable together with UsersGetPremium is used to show or hide the TOTP counter.