mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 03:18:23 +00:00
Merge pull request #480 from greenart7c3/claude/inspiring-ramanujan-jh263q
Document biometric/PIN lock as UI-only, not a signing gate
This commit is contained in:
@@ -64,6 +64,17 @@ Permissions are stored in `ApplicationEntity` + `ApplicationPermissionsEntity` (
|
||||
|
||||
Before showing the approval UI, all three ingestion paths query the database; if a matching auto-accept rule exists, signing proceeds silently.
|
||||
|
||||
### Biometric / PIN lock is UI-only
|
||||
|
||||
The biometric/PIN prompt (`useAuth` / `usePin` in `AmberSettings`, configured in `SecurityScreen`) is **only an app-launch UI gate**, not a signing gate. It is rendered by `BiometricAuthScreen`, which is invoked exclusively from the two UI entry points — `MainActivity` and `SignerActivity` — to unlock the app's screens before any approval bottom sheet is shown.
|
||||
|
||||
It does **not** protect the signing operations themselves:
|
||||
|
||||
- **ContentProvider IPC** (`SignerProvider`) and **NIP-46 relay events** (`EventNotificationConsumer` → `BunkerRequestUtils`) never touch `BiometricAuthScreen`, `Biometrics`, `useAuth`, or `usePin`. They sign in the background based purely on the permission database.
|
||||
- When an auto-accept rule matches, all three paths sign silently **without** triggering the biometric/PIN prompt — including `nostrsigner://` intents, which auto-finish before the UI is interacted with.
|
||||
|
||||
In other words, the lock controls who can open and navigate the app UI; it does not stand between a request and `Account.sign()`. Authorization for automatic signing is governed solely by the permission system (`rememberType` / `acceptUntil` / `kind`).
|
||||
|
||||
### Key files
|
||||
|
||||
| File | Purpose |
|
||||
@@ -74,4 +85,7 @@ Before showing the approval UI, all three ingestion paths query the database; if
|
||||
| `SignerProvider.kt` | ContentProvider IPC signing |
|
||||
| `BunkerRequestUtils.kt` | NIP-46 protocol handling, relay responses |
|
||||
| `AccountStateViewModel.kt` | Auth state, account switching, toast notifications |
|
||||
| `ConnectivityService.kt` | Foreground service, network monitoring, relay reconnection |
|
||||
| `ConnectivityService.kt` | Foreground service, network monitoring, relay reconnection |
|
||||
| `BiometricAuthScreen.kt` | UI-only app-launch lock (biometric/PIN); not a signing gate |
|
||||
| `Biometrics.kt` | Wraps `BiometricPrompt` / keyguard credential prompt |
|
||||
| `SecurityScreen.kt` | Toggles `useAuth` / `usePin` and the re-prompt interval |
|
||||
Reference in New Issue
Block a user