[PR #3658] [MERGED] [PM-10373] Fix FIDO 2 credential creation from unprivileged apps #4320

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3658
Author: @SaintPatrck
Created: 7/31/2024
Status: Merged
Merged: 8/5/2024
Merged by: @SaintPatrck

Base: mainHead: PM-10373/create-passkey-from-android-apps


📝 Commits (2)

  • d3c62d3 [PM-10373] Fix FIDO 2 credential creation from unprivileged apps
  • 6ce5f85 Apply review suggestion

📊 Changes

3 files changed (+165 additions, -57 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/manager/Fido2CredentialManagerImpl.kt (+31 -13)
📝 app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/manager/Fido2CredentialManagerTest.kt (+100 -44)
app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/PublicKeyAuthenticatorAssertionResponseUtil.kt (+34 -0)

📄 Description

🎟️ Tracking

PM-10373

📔 Objective

This pull request fixes incorrect arguments passed to Bitwarden SDK when handling passkey registration and authentication requests from unprivileged applications.

When registering a passkey from an unprivileged application, Bitwarden SDK expects ClientData.DefaultWithExtraData.androidPackageName to be the calling application package name. However, during authentication ClientData.DefaultWithExtraData.androidPackageName is the apk-key-hash.

Bitwarden SDK requires origin to be a valid HTTP URL, including the protocol preamble, when performing registration and authentication.

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/3658 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 7/31/2024 **Status:** ✅ Merged **Merged:** 8/5/2024 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-10373/create-passkey-from-android-apps` --- ### 📝 Commits (2) - [`d3c62d3`](https://github.com/bitwarden/android/commit/d3c62d3d749b08b3a1872eb99c86640664b7a972) [PM-10373] Fix FIDO 2 credential creation from unprivileged apps - [`6ce5f85`](https://github.com/bitwarden/android/commit/6ce5f851562756b624df3a0800c86ce042febabb) Apply review suggestion ### 📊 Changes **3 files changed** (+165 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/manager/Fido2CredentialManagerImpl.kt` (+31 -13) 📝 `app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/manager/Fido2CredentialManagerTest.kt` (+100 -44) ➕ `app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/PublicKeyAuthenticatorAssertionResponseUtil.kt` (+34 -0) </details> ### 📄 Description ## 🎟️ Tracking PM-10373 ## 📔 Objective This pull request fixes incorrect arguments passed to Bitwarden SDK when handling passkey registration and authentication requests from unprivileged applications. When registering a passkey from an unprivileged application, Bitwarden SDK expects `ClientData.DefaultWithExtraData.androidPackageName` to be the calling application package name. However, during authentication `ClientData.DefaultWithExtraData.androidPackageName` is the apk-key-hash. Bitwarden SDK requires `origin` to be a valid HTTP URL, including the protocol preamble, when performing registration and authentication. ## ⏰ 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:42:52 -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#4320