-
Notifications
You must be signed in to change notification settings - Fork 927
[PM-13789] add credential manager provider for passwords #4110
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-13789] add credential manager provider for passwords #4110
Conversation
|
Thank you for your contribution! We've added this to our internal Community PR board for review. |
4aa9f5a to
5a6e528
Compare
|
I would like a check/pre-review from the code owners before starting to work on the tests. Maybe this could be split into multiple smaller PRs as it got already a lot bigger than i thought it would be - and it's also a lot to review |
|
due to a lot of changes in the types it's currently not compiling however i am not sure if i just waste my time here since i get no response or any info if this feature is planned ... |
|
Hi @Nailik Apologies for the late response. We've been busy shoring up our native releases. We are interested in consuming these changes and do appreciate you taking the time to submit them. As you stated, there has been refactoring that conflicts with the changes you submitted. There's potential for more refactoring once Google releases the next version of Credential Manager (1.5.0). I suggest holding this PR until the new CredMan library is available. As soon as time permits we will review and provide feedback. |
|
@SaintPatrck perfect thank you. |
|
androidx.credentials:credentials:1.5.0 was released on 15. Mar so i will resume working on this PR now. |
|
|
|
thx for letting me know |
|
I am currently rewriting the whole PR. Currently i am blocked because of an issue with #5101. |
…universal Credential intent and functions
…le password requests
...c/main/kotlin/com/x8bit/bitwarden/data/credentials/manager/BitwardenCredentialManagerImpl.kt
Outdated
Show resolved
Hide resolved
…ider # Conflicts: # app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/manager/BitwardenCredentialManagerImpl.kt # app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt # app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/manager/BitwardenCredentialManagerTest.kt # app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt # app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt
|
hi i just fixed the conflicts, would be nice if we can get this merged, it's really getting harder to fix the conflicts with main when there are refactorings that don't take into account that not every credential operation is about passkeys |
…in order to make more clear it's only used for fido2/passkeys
| ): List<CredentialEntry> { | ||
| if (this.isEmpty()) return emptyList() | ||
|
|
||
| val ciphers = autofillCipherProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't utilize autofillCipherProvider in its current state because it omits ciphers that we want included in the CredentialManager results. In this case, ciphers that require reprompt are being omitted. During the CredentialManager flow we can prompt for master password, so we should be including them in the results.
|
@Nailik Thanks for staying on top of the updates. In order to relieve some of your burden, I can update the failing tests and make a few other tweaks to accommodate the recent changes I introduced. My hope is to get this PR merged by end of week. 🤞 |
1de00fc to
2c3c763
Compare
…nager This commit refactors `BitwardenCredentialManagerImpl` and its tests to utilize `CipherListView` objects directly for credential retrieval and matching, instead of relying on `AutofillCipherProvider`. Key changes: - `BitwardenCredentialManagerImpl` now uses `CipherMatchingManager` to filter `CipherListViews` based on the calling app's package name. - The `getCredentialEntries` method in `BitwardenCredentialManagerImpl` has been updated to fetch and filter `CipherListViews` from `VaultRepository`. - `CredentialEntryBuilder` and its implementation now accept `List<CipherListView>` instead of `List<AutofillCipher.Login>` for building password credential entries. - The `AutofillCipherProvider` dependency has been removed from `BitwardenCredentialManagerImpl` and `CredentialProviderModule`. - Introduced `isActiveWithCopyablePassword` extension for `CipherListView`. - Tests for `BitwardenCredentialManagerImpl`, `CredentialEntryBuilderTest`, and related ViewModels have been updated to reflect these changes, including mocking `CipherMatchingManager` and providing `CipherListView` instances. - Updated `createMockProviderGetPasswordCredentialRequest` to accept a number parameter for easier test data generation. - Minor adjustments in test helpers and mock object creation to align with the refactoring. - `VaultItemListingViewModel` now checks `CipherListView.reprompt` before fetching the full `CipherView` for password credential requests. An error is now sent if the `CipherListView` is not found.
2c3c763 to
48c49a0
Compare
|
@Nailik we're ready to merge the changes, but the CLA is giving us pause. Is |
🎟️ Tracking
#4100
📔 Objective
Currently there is only an implementation to provide or save Fido2 credentials via the CredentialManager.
The objective is to add the possibility to save and create Passwords.
Credential Manager usage: https://developer.android.com/identity/sign-in/credential-manager
Credential Provider to provide Credential Manager: https://developer.android.com/identity/sign-in/credential-provider
Example Project: https://github.com/android/identity-samples/tree/main/CredentialManager
Status
Working on:
Found issues:
showFido2ErrorDialogdoesn't always show the correct reason, however to stay consistent theshowPaswordErrorDialogalso shows always the same issue📸 Screenshots
⏰ Reminders before review
🦮 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 confirmedissue 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