Skip to content

PM-40154: Create a new Shared Preferences that encrypts data via the AndroidKeystore#7158

Draft
david-livefront wants to merge 1 commit into
mainfrom
PM-40154-keystore-encrypted-shared-prefs
Draft

PM-40154: Create a new Shared Preferences that encrypts data via the AndroidKeystore#7158
david-livefront wants to merge 1 commit into
mainfrom
PM-40154-keystore-encrypted-shared-prefs

Conversation

@david-livefront

@david-livefront david-livefront commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

🎟️ Tracking

PM-40154

📔 Objective

This PR creates a new KeystoreEncryptedSharedPreferences that utilizes the AndroidKeystore to encrtypt the data stored.

Notable changes:

  • This migrates us away from EncryptedSharedPreferences which is deprecated and is not FIPS compliant.
  • This does not encrypt the shared preference keys when storing data, which is different from how EncryptedSharedPreferences functioned.
  • We currently only support the storing of Strings (this is the only type we need at the moment).

@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context labels Jul 10, 2026
@david-livefront david-livefront force-pushed the PM-40154-keystore-encrypted-shared-prefs branch from d7c24bb to aa9e67c Compare July 10, 2026 20:48
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.66667% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 5.06%. Comparing base (36c892e) to head (aa9e67c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...en/data/auth/datasource/disk/AuthDiskSourceImpl.kt 0.00% 12 Missing ⚠️
...en/data/datasource/disk/BaseEncryptedDiskSource.kt 0.00% 12 Missing ⚠️
...asource/disk/KeystoreEncryptedSharedPreferences.kt 73.33% 7 Missing and 5 partials ⚠️
...or/data/auth/datasource/disk/AuthDiskSourceImpl.kt 0.00% 6 Missing ⚠️
...a/platform/datasource/disk/CookieDiskSourceImpl.kt 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #7158       +/-   ##
==========================================
- Coverage   85.89%   5.06%   -80.84%     
==========================================
  Files         927    1031      +104     
  Lines       66232   65486      -746     
  Branches     9640    9502      -138     
==========================================
- Hits        56892    3316    -53576     
- Misses       5887   61815    +55928     
+ Partials     3453     355     -3098     
Flag Coverage Δ
app-data 0.00% <0.00%> (-17.31%) ⬇️
app-ui-auth-tools 0.00% <0.00%> (-18.67%) ⬇️
app-ui-platform 0.00% <0.00%> (-16.84%) ⬇️
app-ui-vault 0.00% <0.00%> (-28.07%) ⬇️
authenticator 0.00% <0.00%> (-6.15%) ⬇️
lib-core-network-bridge 4.05% <0.00%> (+<0.01%) ⬆️
lib-data-ui 1.26% <61.66%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant