trackslash
VAULT-61 P2

Restore page can't be unlocked on a device with no passcode

0
All issues

Description

Follow-up from VAULT-20 (#621).

The problem: the Restore page now asks for device authentication before it unlocks. validateAuthentication fails when the device has no passcode or biometrics set up. So on such a device, the page can't be unlocked and shows "Authentication Failed".

  • The Backup Password sheet and the Danger Zone already behave the same way.
  • Before #621, though, restoring into an empty vault worked on a device with no passcode, so this is a regression for that case.

Options:

  • Let it through when there's nothing to authenticate with. This is what the app lock does when the device has no passcode (VAULT-21 shows it as unavailable).
  • Show a "set a passcode to restore a backup" message instead of "Authentication Failed", and apply the same message to the Backup Password sheet and the Danger Zone.

Check against MANIFESTO.md C4: the lock only guards the unattended device. Whatever is chosen should be consistent across the three places.

Sub-issues

0

Linked issues

0

GitHub

0

No branches or pull requests linked.

Comments

1
Bradley

Fixed in https://github.com/badbundle/vault-app/pull/660 (merged as b477511e).

Decision: the second option. On a device with no passcode, Face ID or Touch ID, these four places now say to set up a passcode on the device instead of showing "Authentication Failed", and they don't prompt:

  • the Restore page
  • the Backup Password sheet
  • the Danger Zone
  • deleting a set-aside vault, which had the same problem

Why not let them through: the rest of the app already chose this:

  • A locked item says "Passcode Required: Set up a passcode on this device to view this item."
  • A new recovery phrase shows a "Passcode Required" screen.
  • App Lock says "Set up a passcode on this device to use App Lock."
  • The backup password sits in the keychain with .userPresence, so backups need a passcode anyway.

Letting these through would relax four gates that C4 relies on for the unattended device. The cost is the regression described above: restoring into an empty vault now needs a passcode.

How it works:

  • The Restore page checks again whenever it locks, and it locks when the app goes to the background, so a passcode set up in the Settings app is noticed on return.
  • New view-model tests, plus 12 new snapshots.

If you'd rather let these through without a passcode instead, that's a small follow-up.