Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Biometric authentication for GUI Authentication Key #5390

Merged
merged 3 commits into from
Oct 9, 2023

Conversation

pAkalpa
Copy link
Contributor

@pAkalpa pAkalpa commented Oct 6, 2023

Fixes # 4236

Description of the Change

To ensure secure access and editing, implement biometric authentication for the Authentication Key field.

Alternate Designs

Release Notes

Add protection to the Authentication Key field with biometric authentication.

Copy link
Member

@AenBleidd AenBleidd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine. Some testing required (should be done next 2-3 days)

@AenBleidd
Copy link
Member

@pAkalpa
Tested on 3 devices. All three fail with the next exception when clicking on the checkbox 'Enable Remote Control':

FATAL EXCEPTION: main
Process: edu.berkeley.boinc, PID: 27572
java.lang.ClassCastException: androidx.preference.Preference cannot be cast to androidx.preference.EditTextPreference
at t2.k0.onSharedPreferenceChanged(Unknown Source:640)
at android.app.SharedPreferencesImpl$EditorImpl.notifyListeners(SharedPreferencesImpl.java:693)
at android.app.SharedPreferencesImpl$EditorImpl.apply(SharedPreferencesImpl.java:559)
at androidx.preference.Preference.A0(Unknown Source:8)
at androidx.preference.Preference.c0(Unknown Source:32)
at androidx.preference.TwoStatePreference.E0(Unknown Source:18)
at androidx.preference.TwoStatePreference.Q(Unknown Source:19)
at androidx.preference.Preference.a0(Unknown Source:13)
at androidx.preference.Preference.b0(Unknown Source:0)
at androidx.preference.CheckBoxPreference.b0(Unknown Source:0)
at androidx.preference.Preference$a.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:7892)
at android.view.View.performClickInternal(View.java:7869)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:30891)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

@AenBleidd AenBleidd marked this pull request as draft October 8, 2023 23:03
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #5390 (0cc14ed) into master (44295c1) will decrease coverage by 0.02%.
Report is 21 commits behind head on master.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5390      +/-   ##
============================================
- Coverage     10.87%   10.85%   -0.02%     
  Complexity     1068     1068              
============================================
  Files           279      279              
  Lines         36061    36114      +53     
  Branches       8335     8344       +9     
============================================
  Hits           3920     3920              
- Misses        31747    31800      +53     
  Partials        394      394              
Files Coverage Δ
...c/main/java/edu/berkeley/boinc/SettingsFragment.kt 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

@AenBleidd AenBleidd marked this pull request as ready for review October 9, 2023 12:12
@AenBleidd
Copy link
Member

This has been tested with the next configuration:
✔️ device with biometric present and enabled
✔️ device with biometric present but disabled
✔️ device without biometric present

@pAkalpa, thank you for the implementation of this feature!

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