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-6761] Add fido credentials to data model #657

Merged
merged 3 commits into from
Mar 14, 2024
Merged

[PM-6761] Add fido credentials to data model #657

merged 3 commits into from
Mar 14, 2024

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented Mar 12, 2024

Type of change

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

Objective

Add Fido2Credentials to the Login struct to support storing passkeys. Currently we don't decrypt passkeys but rather pass them along encrypted to ensure we can re-encrypt the login without data loss.

Before you submit

  • Please add unit tests where it makes sense to do so

@bitwarden-bot
Copy link

bitwarden-bot commented Mar 12, 2024

Logo
Checkmarx One – Scan Summary & Details9d0d22cd-c91f-462e-b557-1f91f66a69b2

No New Or Fixed Issues Found

@Hinton Hinton marked this pull request as ready for review March 12, 2024 12:51
@Hinton Hinton requested review from dani-garcia and coroiu March 12, 2024 12:51
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 13.33333% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 60.39%. Comparing base (ec54a89) to head (9de626c).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/bitwarden/src/vault/cipher/login.rs 7.14% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #657      +/-   ##
==========================================
- Coverage   60.53%   60.39%   -0.15%     
==========================================
  Files         172      172              
  Lines       10527    10553      +26     
==========================================
  Hits         6373     6373              
- Misses       4154     4180      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coroiu coroiu left a comment

Choose a reason for hiding this comment

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

Looks good from my perspective, but I'll let Dani make the final approval

Comment on lines +87 to +88
// TODO: Remove this once the SDK supports state
pub fido2_credentials: Option<Vec<Fido2Credential>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ question: I'm curious why? Would it move somewhere else?

Copy link
Member Author

Choose a reason for hiding this comment

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

Most likely you wouldn't expose this in the view. Instead you fetch the old entry from state and update values on it. That way you don't have to expose encrypted passkeys in the view.

@Hinton Hinton changed the title Add fido credentials to data model [PM-6761] Add fido credentials to data model Mar 12, 2024
dani-garcia
dani-garcia previously approved these changes Mar 13, 2024
crates/bitwarden/src/vault/cipher/login.rs Show resolved Hide resolved
crates/bitwarden/src/vault/cipher/login.rs Outdated Show resolved Hide resolved
@Hinton Hinton merged commit aaa6466 into main Mar 14, 2024
67 checks passed
@Hinton Hinton deleted the ps/fido-storage branch March 14, 2024 11:31
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.

4 participants