feat: store source credentials in secure storage - #3181
Conversation
|
Hi, this looks really neat and a beneficial feature! I had two further questions for you:
And a general question:
Thaanks for the dev work!! Good luck! 👍
|
|
Could you confirm that this doesn't break background update checks? I tried something like this once before, and at least with my method it wouldn't work in the background. |
c253eda to
b8b2b48
Compare
|
Thanks both for the feedback. Quick context: we audit infrastructure and apps that interact with BULL Wallet. Since some users install and track BULL Wallet through Obtainium, we also ran a Kimi K3-assisted review of Obtainium.
References: v11 changelog, Android backup, Android crypto, Android Keystore, OWASP MASWE-0006, NIST GCM, NIST RSA. |
|
Nice work with the backups! I was curious about the 'flutter_test' changes in the |
Source credentials (
github-creds,gitlab-creds— personal accesstokens) are stored in cleartext in SharedPreferences
(
/data/data/<pkg>/shared_prefs/*.xml), readable by anything with root orbackup access to the device.
What this PR changes
-creds) now live influtter_secure_storage(Android Keystore-backed) instead ofSharedPreferences.
-credskeys runs at settings initialization, andgetCredentialalsomigrates lazily on first read as a fallback. No user action needed;
tokens keep working.
getSettingStringOrCredential/setSettingStringOrCredential, which route-credskeys to securestorage and everything else to SharedPreferences as before (settings
page form and source config resolution updated accordingly).
left in SharedPreferences.
Side effect on exports: since credentials no longer live in
SharedPreferences, "include settings: all" exports no longer contain them
at all. After a restore, credentials need to be re-entered — which is the
safer behavior anyway (backups shouldn't carry tokens).
What it deliberately does NOT change
requests. No new permissions.
flutter_secure_storage10.x requiresminSdk 23; Obtainium already requires 26, so no manifest change.