mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-12 09:54:49 -05:00
[PR #3990] [MERGED] Implement cipher key encryption #7007
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/3990
Author: @dani-garcia
Created: 10/21/2023
Status: ✅ Merged
Merged: 10/22/2023
Merged by: @dani-garcia
Base:
main← Head:cipher_key_encryption📝 Commits (1)
4f03794Implement cipher key encryption📊 Changes
12 files changed (+29 additions, -1 deletions)
View changed files
➕
migrations/mysql/2023-10-21-221242_add_cipher_key/down.sql(+0 -0)➕
migrations/mysql/2023-10-21-221242_add_cipher_key/up.sql(+2 -0)➕
migrations/postgresql/2023-10-21-221242_add_cipher_key/down.sql(+0 -0)➕
migrations/postgresql/2023-10-21-221242_add_cipher_key/up.sql(+2 -0)➕
migrations/sqlite/2023-10-21-221242_add_cipher_key/down.sql(+0 -0)➕
migrations/sqlite/2023-10-21-221242_add_cipher_key/up.sql(+2 -0)📝
src/api/core/ciphers.rs(+3 -0)📝
src/api/core/mod.rs(+12 -1)📝
src/db/models/cipher.rs(+5 -0)📝
src/db/schemas/mysql/schema.rs(+1 -0)📝
src/db/schemas/postgresql/schema.rs(+1 -0)📝
src/db/schemas/sqlite/schema.rs(+1 -0)📄 Description
New versions of the bitwarden clients will very soon start using separate encryption keys for each cipher, so we need to handle those.
At the same time, I've noticed that the clients have started depending on the version value of the
/configendpoint to do backwards compatibility checks, so I think the simplest solution for everyone would be for us to return the server version that most closely matches the features we support.They are doing the semver checks here:
3e495ab082/libs/common/src/platform/services/config/config.service.ts (L116-L127)For now the only check they are doing is for version 2023.9.1 for the cipher key encryption feature that this PR implements, so we report that we support that version:
3e495ab082/libs/common/src/vault/services/cipher.service.ts (L56)Also added the section for feature flags in the config, the current ones reported on the official vault are:
For now as a test I've enabled autofill-v2 as that is an entirely client side change, so it won't affect us
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.