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

Swap to using cipher list view #1124

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Swap to using cipher list view #1124

wants to merge 3 commits into from

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented Nov 11, 2024

🎟️ Tracking

📔 Objective

We should default to using CipherListView instead of CipherView for vault lists, and only decrypt CipherView when we need to display the full items.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

searchResults: searchText != nil ? ciphers : nil
) {
sections.append(fido2Section)
if #available(iOSApplicationExtension 17.0, *) {
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: Need to figure out how the fido2 flow would work. @coroiu do we need to fully decrypt items, or could we expose the needed details in CipherListView?

Copy link

@coroiu coroiu Nov 11, 2024

Choose a reason for hiding this comment

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

Fido2 credentials are stored as encrypted inside CipherView so you don't need to decrypt those. But you need some Cipher data to be able to create the Fido2AutofillCredentialView, like cipher.login.username and cipher.name

https://github.com/bitwarden/sdk-internal/blob/eba5023e2895ab6744aac3bf5f7959547a75dd0c/crates/bitwarden-fido/src/client_fido.rs#L46

https://github.com/bitwarden/sdk-internal/blob/eba5023e2895ab6744aac3bf5f7959547a75dd0c/crates/bitwarden-fido/src/types.rs#L66

})
}
}
// // Add any additional actions for the type of cipher selected.
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: We probably need to adjust this to be lazy vs eager, and ad-hoc decrypt items when clicking on items.

Copy link
Contributor

github-actions bot commented Nov 11, 2024

Logo
Checkmarx One – Scan Summary & Details26121033-ecac-447e-97e3-4fdb8f984db1

No New Or Fixed Issues Found

// let decryptedFido2Credentials = try await clientService
// .platform()
// .fido2()
// .decryptFido2AutofillCredentials(cipherView: cipher)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Hinton it looks like we'll need to have decryptFido2AutofillCredentials(cipherView:) updated to accept a CipherListView here unless I am missing something.

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