[PR #4848] [MERGED] [PM-19107] Introduce user-trusted privileged apps for Credential Manager #5255

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4848
Author: @SaintPatrck
Created: 3/11/2025
Status: Merged
Merged: 6/6/2025
Merged by: @SaintPatrck

Base: mainHead: innovation-sprint/privileged-apps/trust-dialog


📝 Commits (1)

  • 1f201b0 [PM-19107] Introduce user-trusted privileged apps for Credential Manager

📊 Changes

22 files changed (+1674 additions, -363 deletions)

View changed files

app/schemas/com.x8bit.bitwarden.data.credentials.datasource.disk.database.PrivilegedAppDatabase/1.json (+38 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/PrivilegedAppDiskSource.kt (+36 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/PrivilegedAppDiskSourceImpl.kt (+51 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/dao/PrivilegedAppDao.kt (+48 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/database/PrivilegedAppDatabase.kt (+21 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/di/CredentialsDiskModule.kt (+50 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/entity/PrivilegedAppEntity.kt (+19 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/di/CredentialProviderModule.kt (+15 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/manager/OriginManagerImpl.kt (+18 -22)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/model/PrivilegedAppAllowListJson.kt (+50 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/repository/PrivilegedAppRepository.kt (+40 -0)
app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/repository/PrivilegedAppRepositoryImpl.kt (+84 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/util/CallingAppInfoExtensions.kt (+1 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingScreen.kt (+37 -3)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt (+171 -9)
📝 app/src/main/res/values/strings.xml (+3 -0)
app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/PrivilegedAppDiskSourceTest.kt (+116 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/manager/OriginManagerTest.kt (+35 -20)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/model/Fido2CredentialAssertionRequestUtil.kt (+2 -1)
app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/repository/PrivilegedAppRepositoryTest.kt (+226 -0)

...and 2 more files

📄 Description

🎟️ Tracking

PM-19107

📔 Objective

This change introduces the ability for users to trust specific privileged apps (browsers) for Credential Manager operations. When an operation originates from an untrusted browser, the user will be prompted to either trust the browser or cancel the operation.

Key changes include:

  • Added a PrivilegedAppDatabase to store user-trusted apps.
  • Implemented PrivilegedAppRepository and related classes for managing
    trusted apps.
  • Updated OriginManagerImpl to check the user's trusted list in
    addition to Google and community allow lists.
  • Modified VaultItemListingViewModel to handle the trust prompt and
    subsequent actions.
  • Added new UI elements (TrustPrivilegedAddPrompt dialog) and string
    resources for the trust flow.
  • Updated CallingAppInfoExtensions to correctly validate against allow
    lists.

📸 Screenshots

https://github.com/user-attachments/assets/95019ea5-dfa2-46b4-9f50-bf1f7d0edb5e

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

🔄 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/4848 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 3/11/2025 **Status:** ✅ Merged **Merged:** 6/6/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `innovation-sprint/privileged-apps/trust-dialog` --- ### 📝 Commits (1) - [`1f201b0`](https://github.com/bitwarden/android/commit/1f201b0d2efb46c2a08956c6910ef556c18832da) [PM-19107] Introduce user-trusted privileged apps for Credential Manager ### 📊 Changes **22 files changed** (+1674 additions, -363 deletions) <details> <summary>View changed files</summary> ➕ `app/schemas/com.x8bit.bitwarden.data.credentials.datasource.disk.database.PrivilegedAppDatabase/1.json` (+38 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/PrivilegedAppDiskSource.kt` (+36 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/PrivilegedAppDiskSourceImpl.kt` (+51 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/dao/PrivilegedAppDao.kt` (+48 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/database/PrivilegedAppDatabase.kt` (+21 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/di/CredentialsDiskModule.kt` (+50 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/entity/PrivilegedAppEntity.kt` (+19 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/di/CredentialProviderModule.kt` (+15 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/manager/OriginManagerImpl.kt` (+18 -22) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/model/PrivilegedAppAllowListJson.kt` (+50 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/repository/PrivilegedAppRepository.kt` (+40 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/credentials/repository/PrivilegedAppRepositoryImpl.kt` (+84 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/util/CallingAppInfoExtensions.kt` (+1 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingScreen.kt` (+37 -3) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt` (+171 -9) 📝 `app/src/main/res/values/strings.xml` (+3 -0) ➕ `app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/datasource/disk/PrivilegedAppDiskSourceTest.kt` (+116 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/manager/OriginManagerTest.kt` (+35 -20) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/model/Fido2CredentialAssertionRequestUtil.kt` (+2 -1) ➕ `app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/repository/PrivilegedAppRepositoryTest.kt` (+226 -0) _...and 2 more files_ </details> ### 📄 Description ## 🎟️ Tracking PM-19107 ## 📔 Objective This change introduces the ability for users to trust specific privileged apps (browsers) for Credential Manager operations. When an operation originates from an untrusted browser, the user will be prompted to either trust the browser or cancel the operation. Key changes include: - Added a `PrivilegedAppDatabase` to store user-trusted apps. - Implemented `PrivilegedAppRepository` and related classes for managing trusted apps. - Updated `OriginManagerImpl` to check the user's trusted list in addition to Google and community allow lists. - Modified `VaultItemListingViewModel` to handle the trust prompt and subsequent actions. - Added new UI elements (`TrustPrivilegedAddPrompt` dialog) and string resources for the trust flow. - Updated `CallingAppInfoExtensions` to correctly validate against allow lists. ## 📸 Screenshots https://github.com/user-attachments/assets/95019ea5-dfa2-46b4-9f50-bf1f7d0edb5e ## ⏰ 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 <!-- 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:56: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#5255