aboutsummaryrefslogtreecommitdiff
path: root/src/db/schemas
diff options
context:
space:
mode:
authorBlackDex <[email protected]>2021-07-04 23:02:56 +0200
committerBlackDex <[email protected]>2021-07-04 23:02:56 +0200
commit403f35b571ae2abb8e1df118bfa543e35805a52f (patch)
treeb54281e7216266d15953d65a74f454864a6fdd48 /src/db/schemas
parent3968bc8016611cdf9a84db68990f27624ab17889 (diff)
downloadvaultwarden-403f35b571ae2abb8e1df118bfa543e35805a52f.tar.gz
vaultwarden-403f35b571ae2abb8e1df118bfa543e35805a52f.zip
Added web-vault v2.21.x support + some misc fixes
- The new web-vault v2.21.0+ has support for Master Password Reset. For this to work it generates a public/private key-pair which needs to be stored in the database. Currently the Master Password Reset is not fixed, but there are endpoints which are needed even if we do not support this feature (yet). This PR fixes those endpoints, and stores the keys already in the database. - There was an issue when you want to do a key-rotate when you change your password, it also called an Emergency Access endpoint, which we do not yet support. Because this endpoint failed to reply correctly produced some errors, and also prevent the user from being forced to logout. This resolves #1826 by adding at least that endpoint. Because of that extra endpoint check to Emergency Access is done using an old user stamp, i also modified the stamp exception to allow multiple rocket routes to be called, and added an expiration timestamp to it. During these tests i stumbled upon an issue that after my key-change was done, it triggered the websockets to try and reload my ciphers, because they were updated. This shouldn't happen when rotating they keys, since all access should be invalided. Now there will be no websocket notification for this, which also prevents error toasts. - Increased Send Size limit to 500MB (with a litle overhead) As a side note, i tested these changes on both v2.20.4 and v2.21.1 web-vault versions, all keeps working.
Diffstat (limited to 'src/db/schemas')
-rw-r--r--src/db/schemas/mysql/schema.rs2
-rw-r--r--src/db/schemas/postgresql/schema.rs2
-rw-r--r--src/db/schemas/sqlite/schema.rs2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/db/schemas/mysql/schema.rs b/src/db/schemas/mysql/schema.rs
index ad1ddbc1..149d2267 100644
--- a/src/db/schemas/mysql/schema.rs
+++ b/src/db/schemas/mysql/schema.rs
@@ -100,6 +100,8 @@ table! {
uuid -> Text,
name -> Text,
billing_email -> Text,
+ private_key -> Nullable<Text>,
+ public_key -> Nullable<Text>,
}
}
diff --git a/src/db/schemas/postgresql/schema.rs b/src/db/schemas/postgresql/schema.rs
index 8964da89..8feb2eb2 100644
--- a/src/db/schemas/postgresql/schema.rs
+++ b/src/db/schemas/postgresql/schema.rs
@@ -100,6 +100,8 @@ table! {
uuid -> Text,
name -> Text,
billing_email -> Text,
+ private_key -> Nullable<Text>,
+ public_key -> Nullable<Text>,
}
}
diff --git a/src/db/schemas/sqlite/schema.rs b/src/db/schemas/sqlite/schema.rs
index 8964da89..8feb2eb2 100644
--- a/src/db/schemas/sqlite/schema.rs
+++ b/src/db/schemas/sqlite/schema.rs
@@ -100,6 +100,8 @@ table! {
uuid -> Text,
name -> Text,
billing_email -> Text,
+ private_key -> Nullable<Text>,
+ public_key -> Nullable<Text>,
}
}