8000 [PM-8829] Password/Fido2 credentials autofill on prepare credential list by fedemkr · Pull Request #759 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[PM-8829] Password/Fido2 credentials autofill on prepare credential list #759

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

Merged
merged 8 commits into from
Jul 26, 2024

Conversation

fedemkr
Copy link
Member
@fedemkr fedemkr commented Jul 23, 2024

🎟️ Tracking

PM-8829

📔 Objective

Handle prepare credential list for autofilling passwords/Fido2 credentials from the iOS Autofill extension.

📸 Screenshots

Combined.passwords.and.Fido2.credentials.autofill.mov

⏰ 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

@fedemkr fedemkr requested review from matt-livefront and a team July 23, 2024 20:10
Copy link
codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 96.23824% with 12 lines in your changes missing coverage. Please review.

Project coverage is 88.12%. Comparing base (3ba69ac) to head (677bacd).

Files Patch % Lines
...ared/Core/Vault/Repositories/VaultRepository.swift 97.14% 3 Missing ⚠️
...ault/AutofillList/VaultAutofillListProcessor.swift 95.45% 3 Missing ⚠️
...ult/Vault/AutofillList/VaultAutofillListView.swift 91.89% 3 Missing ⚠️
...llExtension/CredentialProviderViewController.swift 0.00% 2 Missing ⚠️
...tofill/Application/Fido2AppExtensionDelegate.swift 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #759      +/-   ##
==========================================
+ Coverage   88.06%   88.12%   +0.05%     
==========================================
  Files         577      577              
  Lines       28874    29104     +230     
==========================================
+ Hits        25428    25648     +220     
- Misses       3446     3456      +10     

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

Copy link
Contributor
github-actions bot commented Jul 23, 2024

Logo
Checkmarx One – Scan Summary & Details1680b8c4-99c5-467e-a4a3-7ae64e8ef51e

No New Or Fixed Issues Found

fedemkr added 3 commits July 24, 2024 12:48
…al with passkey request parameters to be in AutofillCredentialService to reuse the logic in there with the SDK.
…ocessor to the VaultRepository and fix race condition issue with available credentials for authentication.
@fedemkr fedemkr requested a review from matt-livefront July 25, 2024 13:49
Comment on lines +213 to +219
let sections = try XCTUnwrap(sectionsResult)

XCTAssertEqual(
sections[0],
VaultListSection(
id: Localizations.passkeysForX(expectedRpID),
items: expectedCiphersInFido2Section.map { cipherView in
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎨 One alternative to writing out these section assertions is to use an inline snapshot test. This uses a helper to dump a textual description of the sections. There's pros/cons to this vs writing out the full assertions, but I find it helpful to visualize the test output (and it's much less tedious to write). But up to you on what you prefer.

It would end up looking like this:

try assertInlineSnapshot(of: dumpVaultListSections(XCTUnwrap(sections)), as: .lines) {
    """
    Section: Passkeys for myApp.com
      - Cipher: Bitwarden
      - Cipher: Café
      - Cipher: Bitwarden
    Section: Passwords for myApp.com
      - Cipher: Example
    """
}

The result is generated by the snapshot testing framework so you can just write try assertInlineSnapshot(of: dumpVaultListSections(XCTUnwrap(sections)), as: .lines) and run the tests to have it populate the output initially.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh you're right, I totally missed inline snapshots! 🎉 I'll make a tech-debt task for this so I can tackle it properly on another PR given that I'd need some update in the dump so it shows something about the inner Fido2 credentials in order to see that the item section is complete with all the information it needs.

@fedemkr fedemkr merged commit 4712b00 into main Jul 26, 2024
9 checks passed
@fedemkr fedemkr deleted the mobiletf/pm-8829/fido2-autofill-list branch July 26, 2024 18:10
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.

2 participants
0