Open Bug 2073416 Opened 2 months ago

Move OS re-authentication out of the credit card storage layer

Categories

(Toolkit :: Form Autofill, task, P3)

task

Tracking

()

People

(Reporter: dimi, Unassigned)

References

Details

decryptField takes a reauth option on both credit card stores, which makes showing the OS authentication prompt the storage layer's job. That only makes sense for the JSON store, where OSKeyStore.decrypt unlocks and decrypts in one call. The Rust store's key is in NSS, so it calls verifyUserOSAuth purely to honour the shared signature.

The only caller passing reauth is the fill path, FormAutofillSection.prepareFillingProfile. It should authenticate and then read, as FormAutofillPreferences already does, and reauth should come off decryptField on both stores.

Two things to handle while there. FormAutofillPreferences and FormAutofillParent re-authenticate with verifyUserOSAuth's default generateKeyIfNotAvailable, which can provision an OS key store key a Rust-served profile would never read. And a cancelled fill currently emits creditcard.os_keystore_decrypt from inside OSKeyStore.decrypt, so once the prompt moves out browser_creditCard_fill_cancel_login.js needs rewriting.

Follow-up to bug 2071247.

You need to log in before you can comment on or make changes to this bug.