Skip to content

[PM-40519] feat: Add SDK-backed passkey foundation services to TestHarness - #2945

Draft
morganzellers-bw wants to merge 1 commit into
mainfrom
pm-40519-testharness-passkeys-sdk-foundation
Draft

[PM-40519] feat: Add SDK-backed passkey foundation services to TestHarness#2945
morganzellers-bw wants to merge 1 commit into
mainfrom
pm-40519-testharness-passkeys-sdk-foundation

Conversation

@morganzellers-bw

@morganzellers-bw morganzellers-bw commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

PM-40519

📔 Objective

Adds SDK-backed passkey test scenarios to TestHarness.

  • Adds the Core/Autofill/SDK+ layer, which drives BitwardenSdk's Fido2 client directly (makeCredential/getAssertion) the same way the main app and AutoFill extension do, instead of delegating to the OS passkey UI.
  • SDKPasskeyService lazily bootstraps a BitwardenSdk.Client backed by a synthetic identity persisted in the Keychain, so registered credentials survive relaunches.
  • SDKFido2CredentialStore/SDKFido2UserInterface satisfy the SDK's Fido2CredentialStore/Fido2UserInterface protocols; SDKCipherStorageService persists registered credentials across app launches.
  • No UI wiring yet — this PR lands the service layer standalone, fully covered by its own test suite. The next PR in the stack adds the "Register Passkey (SDK)" screen that consumes it.

Stack: #2945#2946#2947#2948

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Re-reviewed the full TestHarnessShared/Core/Autofill/Passkey layer at 8ed6220, covering DefaultPasskeyService, DefaultFido2CredentialStore, DefaultFido2UserInterface, DefaultCipherStorageService, StoredCipher, the keychain-backed SyntheticIdentity, and the XcodeGen/Sourcery wiring. All previously raised findings are addressed: session() now caches the bootstrap as a Task, saveCredential replaces by cipher ID instead of appending duplicates, findCredentials honors the SDK-supplied ids/userHandle filters, and loadOrCreateIdentity() clears persisted ciphers when a new identity is minted (with a regression test simulating a lost keychain identity). Secret material stays in the Keychain and only SDK ciphertext lands in UserDefaults, consistent with the zero-knowledge rules; the new code is confined to the test harness target and adds no production surface.

Code Review Details

No findings at or above the reporting threshold.

@morganzellers-bw
morganzellers-bw force-pushed the pm-40519-testharness-passkeys-sdk-foundation branch from 3b9bd33 to 35f3fab Compare August 7, 2026 21:56
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.46%. Comparing base (7d9c4a7) to head (8ed6220).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2945       +/-   ##
===========================================
+ Coverage   39.58%   79.46%   +39.87%     
===========================================
  Files         363     1172      +809     
  Lines       17106    75144    +58038     
===========================================
+ Hits         6772    59710    +52938     
- Misses      10334    15434     +5100     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread TestHarnessShared/Core/Autofill/SDK+/SDKPasskeyService.swift Outdated
Comment thread project-bwth.yml Outdated
@morganzellers-bw
morganzellers-bw force-pushed the pm-40519-testharness-passkeys-sdk-foundation branch 2 times, most recently from 7997cbe to 18947e9 Compare August 7, 2026 22:38
@morganzellers-bw
morganzellers-bw force-pushed the pm-40519-testharness-passkeys-sdk-foundation branch 3 times, most recently from fa0cea4 to 725a98c Compare August 10, 2026 14:55
Comment thread TestHarnessShared/Core/Autofill/Passkey/PasskeyService.swift
@morganzellers-bw morganzellers-bw changed the title [PM-40519] feat: Add SDK-backed passkey foundation services [PM-40519] feat: Add SDK-backed passkey foundation services to TestHarness Aug 10, 2026
@morganzellers-bw
morganzellers-bw force-pushed the pm-40519-testharness-passkeys-sdk-foundation branch from 725a98c to 93583b7 Compare August 10, 2026 16:57
Adds the Core/Autofill/Passkey layer that drives BitwardenSdk's Fido2
client directly (makeCredential/getAssertion) the same way the main
app and AutoFill extension do: PasskeyService orchestrates a
lazily-bootstrapped BitwardenSdk.Client backed by a synthetic identity
persisted in the Keychain, DefaultFido2CredentialStore/DefaultFido2UserInterface
satisfy the SDK's Fido2CredentialStore/Fido2UserInterface protocols, and
CipherStorageService persists registered credentials across app
launches. No UI wiring yet — this lands the service layer standalone,
fully covered by its own test suite.
@morganzellers-bw
morganzellers-bw force-pushed the pm-40519-testharness-passkeys-sdk-foundation branch from 93583b7 to 8ed6220 Compare August 10, 2026 18:46
@morganzellers-bw morganzellers-bw self-assigned this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review app:password-manager Bitwarden Password Manager app context t:feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant