feat(server): UserAgent seal/unseal

This commit is contained in:
hdbg
2026-02-15 14:26:48 +01:00
parent a55221573b
commit 281fbcb31d
19 changed files with 1735 additions and 442 deletions

View File

@@ -3,10 +3,11 @@
diesel::table! {
aead_encrypted (id) {
id -> Integer,
current_nonce -> Integer,
current_nonce -> Binary,
ciphertext -> Binary,
tag -> Binary,
schema_version -> Integer,
created_at -> Integer,
}
}
@@ -29,6 +30,18 @@ diesel::table! {
}
}
diesel::table! {
root_key_history (id) {
id -> Integer,
root_key_encryption_nonce -> Binary,
data_encryption_nonce -> Binary,
ciphertext -> Binary,
tag -> Binary,
schema_version -> Integer,
salt -> Binary,
}
}
diesel::table! {
useragent_client (id) {
id -> Integer,
@@ -39,11 +52,12 @@ diesel::table! {
}
}
diesel::joinable!(arbiter_settings -> aead_encrypted (root_key_id));
diesel::joinable!(arbiter_settings -> root_key_history (root_key_id));
diesel::allow_tables_to_appear_in_same_query!(
aead_encrypted,
arbiter_settings,
program_client,
root_key_history,
useragent_client,
);