feat(mobile): protect sensitive identity transfers - #4988
Closed
tellaho wants to merge 2 commits into
Closed
Conversation
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Contributor
Author
|
Closing at the operator’s request. This pull request was opened prematurely without explicit authorization. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category: new-feature
User Impact: Mobile users can require Face ID, biometrics, or their device passcode before Buzz sends their identity to a desktop.
Problem: SAS verification confirms that both pairing devices share the same encrypted session, but a phone holding an identity could still release it without fresh local user verification. Existing identities also had no per-identity control for requiring that additional ceremony.
Solution: Add an OS-backed sensitive-action authorizer and persisted per-identity policy, gate protected mobile-to-desktop recovery before payload construction, and expose checked-by-default onboarding plus Mobile security controls. Routine signing and startup remain prompt-free, while protected exports fail closed on cancellation, lockout, failure, or unavailable device authentication.
File changes
mobile/pubspec.yaml / mobile/pubspec.lock
Add
local_authfor OS biometric and device-credential prompts.mobile/android/app/src/main/kotlin/xyz/block/buzz/mobile/MainActivity.kt
Use
FlutterFragmentActivity, as required by Android biometric prompts.mobile/ios/Runner/Info.plist
Explain why Buzz requests Face ID access.
mobile/lib/shared/security/sensitive_action_authorizer.dart
Centralize OS authentication and map platform failures into coarse control-flow outcomes.
mobile/lib/shared/community/community.dart
Persist
notConfigured,enabled, ordisabledByUserindependently for each identity, with legacy records migrating tonotConfigured.mobile/lib/shared/auth/auth_provider.dart
Persist policy changes for the active identity and refresh dependent providers.
mobile/lib/features/pairing/pairing_provider.dart
Require successful OS authentication before protected recovery payload construction, keep unprotected recovery on the existing SAS path, and persist the onboarding choice for imported identities.
mobile/lib/features/pairing/pairing_page.dart
Add checked-by-default import protection copy and surface authorization failures without treating cancellation as opt-out.
mobile/lib/features/settings/settings_page.dart / mobile/lib/features/settings/settings_page/mobile_security_section.dart
Add per-identity Mobile security controls and live device-authentication availability.
mobile/test/features/pairing/pairing_provider_test.dart
Cover protected success, cancellation, and the no-payload-before-auth invariant.
mobile/test/features/pairing/pairing_page_test.dart
Cover checked-by-default import UI and its exclusion from desktop recovery UI.
mobile/test/shared/community/community_test.dart
Cover legacy policy migration and serialization round trips.
Reproduction steps
Validation
cd mobile && flutter analyzecd mobile && flutter test(1,254 tests)Screenshots / demos
Not included: the final states depend on a real mobile OS authentication sheet and should be captured during device validation rather than mocked.
Stack
Draft stacked on #4845 (
bd74b7d467d42e3dde4b2a26c9103e2797c44488).