[PR #4110] [MERGED] [PM-13789] add credential manager provider for passwords #4692

Closed
opened 2025-11-26 23:48:29 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4110
Author: @Nailik
Created: 10/17/2024
Status: Merged
Merged: 7/24/2025
Merged by: @SaintPatrck

Base: mainHead: feature/add-password-credential-manager-provider


📝 Commits (10+)

  • c461136 add capability TYPE_PASSWORD_CREDENTIAL
  • 2b54d9d handle BeginCreatePasswordCredentialRequest in CredentialProvider
  • e45a839 rename CredentialProvider Passkey/Fido2 intent and functions to more universal Credential intent and functions
  • 22b9a59 remove filter BeginGetPublicKeyCredentialOption in order to also handle password requests
  • efb4ef7 add feature flag SingleTapPasswordAuthentication
  • b1e86cd split intent manager between fido2 credential and password credential intent
  • 0e572fc create CredentialEntry list for CredentialManager request for Passwords
  • c74047b wip
  • 2e22b59 wip
  • 5de7f53 build password credential entry list

📊 Changes

46 files changed (+2108 additions, -136 deletions)

View changed files

app/src/debug/res/xml/provider.xml (+7 -0)
📝 app/src/main/AndroidManifest.xml (+1 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/MainViewModel.kt (+15 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/util/CipherListViewExtensions.kt (+7 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/util/CipherViewExtensions.kt (+6 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/builder/CredentialEntryBuilder.kt (+13 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/builder/CredentialEntryBuilderImpl.kt (+61 -5)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/di/CredentialProviderModule.kt (+3 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/manager/BitwardenCredentialManagerImpl.kt (+56 -5)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/model/GetCredentialsRequest.kt (+2 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/model/ProviderGetPasswordCredentialRequest.kt (+38 -9)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/processor/CredentialProviderProcessorImpl.kt (+1 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/util/CredentialEntryBuilderExtensions.kt (+15 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/util/CredentialProviderIntentUtils.kt (+33 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/model/SpecialCircumstance.kt (+11 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/util/SpecialCircumstanceExtensions.kt (+10 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockScreen.kt (+1 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockViewModel.kt (+4 -4)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/credentials/manager/CredentialProviderCompletionManager.kt (+6 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/credentials/manager/CredentialProviderCompletionManagerImpl.kt (+42 -0)

...and 26 more files

📄 Description

🎟️ Tracking

https://github.com/bitwarden/android/issues/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

  • new BitwardenCredentialProviderService to handle incoming credential requests
  • new CredentialCompletionManager (from Fido2CompletionManager) to handle both passkeys and passwords
  • Overwrite Password/Username combination confirmation dialogs.

Working on:

  • Cleanup (formatting, comments etc)
  • fixing tests / adding tests

Found issues:

  • showFido2ErrorDialog doesn't always show the correct reason, however to stay consistent the showPaswordErrorDialog also shows always the same issue

📸 Screenshots

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation 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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/4110 **Author:** [@Nailik](https://github.com/Nailik) **Created:** 10/17/2024 **Status:** ✅ Merged **Merged:** 7/24/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `feature/add-password-credential-manager-provider` --- ### 📝 Commits (10+) - [`c461136`](https://github.com/bitwarden/android/commit/c461136bb1da773516f97cc6af6cbb47a89d0f83) add capability TYPE_PASSWORD_CREDENTIAL - [`2b54d9d`](https://github.com/bitwarden/android/commit/2b54d9de77e6c466e37bba28969485da1d3b813f) handle BeginCreatePasswordCredentialRequest in CredentialProvider - [`e45a839`](https://github.com/bitwarden/android/commit/e45a839c5b5d4e5d972ccbd52358946b7dffb18b) rename CredentialProvider Passkey/Fido2 intent and functions to more universal Credential intent and functions - [`22b9a59`](https://github.com/bitwarden/android/commit/22b9a592e5279c7ccb14824f44bcb0be2360ee39) remove filter BeginGetPublicKeyCredentialOption in order to also handle password requests - [`efb4ef7`](https://github.com/bitwarden/android/commit/efb4ef7668655f7d85cafeb177591c0145fd386c) add feature flag SingleTapPasswordAuthentication - [`b1e86cd`](https://github.com/bitwarden/android/commit/b1e86cdcc1a5f97042f5f933040a86548a215240) split intent manager between fido2 credential and password credential intent - [`0e572fc`](https://github.com/bitwarden/android/commit/0e572fc534903f0ca26093d61143fa5ca82d4404) create CredentialEntry list for CredentialManager request for Passwords - [`c74047b`](https://github.com/bitwarden/android/commit/c74047b72c49b12099fb1ed5ae41297e3bb339cc) wip - [`2e22b59`](https://github.com/bitwarden/android/commit/2e22b59e5a71e77b63cab0b1e092f984cc8ffdb9) wip - [`5de7f53`](https://github.com/bitwarden/android/commit/5de7f5384da9c9d3a44c86dcef46d97f22148b80) build password credential entry list ### 📊 Changes **46 files changed** (+2108 additions, -136 deletions) <details> <summary>View changed files</summary> ➕ `app/src/debug/res/xml/provider.xml` (+7 -0) 📝 `app/src/main/AndroidManifest.xml` (+1 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/MainViewModel.kt` (+15 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/util/CipherListViewExtensions.kt` (+7 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/util/CipherViewExtensions.kt` (+6 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/builder/CredentialEntryBuilder.kt` (+13 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/builder/CredentialEntryBuilderImpl.kt` (+61 -5) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/di/CredentialProviderModule.kt` (+3 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/manager/BitwardenCredentialManagerImpl.kt` (+56 -5) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/model/GetCredentialsRequest.kt` (+2 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/model/ProviderGetPasswordCredentialRequest.kt` (+38 -9) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/processor/CredentialProviderProcessorImpl.kt` (+1 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/util/CredentialEntryBuilderExtensions.kt` (+15 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/util/CredentialProviderIntentUtils.kt` (+33 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/model/SpecialCircumstance.kt` (+11 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/util/SpecialCircumstanceExtensions.kt` (+10 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockScreen.kt` (+1 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockViewModel.kt` (+4 -4) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/credentials/manager/CredentialProviderCompletionManager.kt` (+6 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/credentials/manager/CredentialProviderCompletionManagerImpl.kt` (+42 -0) _...and 26 more files_ </details> ### 📄 Description ## 🎟️ Tracking https://github.com/bitwarden/android/issues/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 - new BitwardenCredentialProviderService to handle incoming credential requests - new CredentialCompletionManager (from Fido2CompletionManager) to handle both passkeys and passwords - Overwrite Password/Username combination confirmation dialogs. Working on: - Cleanup (formatting, comments etc) - fixing tests / adding tests Found issues: - `showFido2ErrorDialog` doesn't always show the correct reason, however to stay consistent the `showPaswordErrorDialog` also shows always the same issue ## 📸 Screenshots <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:48:29 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#4692