Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-4270] Individual cipher key encryption #278

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

dani-garcia
Copy link
Member

@dani-garcia dani-garcia commented Oct 11, 2023

Type of change

- [ ] Bug fix
- [x] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Implement individual vault item encryption and encryption. Note that at the moment it will not migrate items that don't have a key when encrypting.

@dani-garcia dani-garcia force-pushed the ps/pm-4270-cipher-key-encryption branch from 96cb9a4 to dd33b1e Compare November 2, 2023 13:48
@bitwarden-bot
Copy link

Logo
Checkmarx One – Scan Summary & Detailsa35d7002-7c27-4923-897d-67418cfb4bdc

No New Or Fixed Issues Found

@dani-garcia dani-garcia requested a review from Hinton November 2, 2023 13:54
crates/bitwarden/src/vault/cipher/cipher.rs Show resolved Hide resolved
@@ -77,6 +79,8 @@ pub struct CipherView {
pub folder_id: Option<Uuid>,
pub collection_ids: Vec<Uuid>,

pub key: Option<EncString>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to expose the key in a view?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to encrypt it back with the same Key, yeah. Though I guess we can generate a new key each time we encrypt a CipherView into a Cipher, if we wanted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, once the SDK has state we don't have to expose it though and can just look it up internally.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a TODO or open a ticket for the future?

crates/bitwarden/src/vault/cipher/cipher.rs Outdated Show resolved Hide resolved
crates/bitwarden/src/vault/cipher/cipher.rs Outdated Show resolved Hide resolved
@dani-garcia dani-garcia merged commit a0bfa3c into master Nov 2, 2023
45 checks passed
@dani-garcia dani-garcia deleted the ps/pm-4270-cipher-key-encryption branch November 2, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants