Closed Bug 2080074 Opened 1 month ago Closed 1 month ago

Prompt for the primary password when the store's key needs it

Categories

(Toolkit :: Form Autofill, task, P2)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: dimi, Assigned: dimi)

References

Details

Attachments

(1 external file)

No description provided.

The store's key lives in NSS, so with a primary password set it cannot be read
until the user unlocks the token. The authenticator follows passwordmgr's
RustLoginStorageAuthenticator, since both stores share key4.db: it notifies the
same topics and declines while LoginHelper.requestReauth holds the token logged
out.

The store decrypts every card it reads and fails the whole read on a number it
cannot decrypt, so with the token locked even listing the cards needs the key.
Reads the user asked for -- the dropdown, the preferences list, filling, saving
and editing -- run inside RustAutofillStore.allowingPrompt() and prompt; the
saved-field-name scan and the migration never do. A locked token is reported as
NS_ERROR_ABORT, as crypto-SDR and the JSON store do. A declined prompt shows no
cards in the dropdown, which then holds off prompting as passwordmgr's
autocomplete does, and no save doorhanger for a submitted card.

A read that fails with the token unlocked is a number another key wrote. The
store's CryptoError is passed on and the stored numbers are left as they are,
as passwordmgr leaves logins it cannot decrypt.

CreditCardStorageMigrator unlocks the key before copying, as
LoginStorageMigrator does, so a declined prompt defers the migration instead of
using up one of its attempts.

Pushed by dlee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f7763ffe8664 https://hg.mozilla.org/integration/autoland/rev/ea30057cc197 Prompt for the primary password when the store's key needs it r=joschmidt,credential-management-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
Regressions: 2081084
QA Whiteboard: [qa-triage-done-c161/b160]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: