Closed Bug 2089931 Opened 18 days ago Closed 6 days ago

Drop cards that cannot be decrypted when migrating to the Rust store, instead of failing the migration

Categories

(Toolkit :: Form Autofill, defect, P2)

defect

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: dimi, Assigned: dimi)

References

Details

(Whiteboard: [fxcm-backlog])

Attachments

(1 external file, 6 obsolete files)

A card whose number cannot be decrypted fails the whole migration run. The profile retries at every launch, fails identically, exhausts its retry budget and never migrates.

Proposal: skip records that cannot be decrypted, migrate the rest and complete the run. Their data is already unrecoverable.

A card whose number does not decrypt fails every migration attempt the same
way, so the profile spends its retry budget and stays on JSON for good. Such
failures almost never clear: of the profiles that had already failed three
attempts and failed to decrypt again, about 0.2% later migrated. Once
DROP_UNDECRYPTABLE_AFTER_ATTEMPTS (3) attempts have failed, cards whose
number fails to decrypt with NS_ERROR_FAILURE or NS_ERROR_INVALID_ARG are
left out and the rest migrate; a cancelled unlock or a shutdown still fails
the attempt.

migrate_to_rust gains undecryptable, dropped and drop_reason, so the
threshold can be tuned by whether a decryption failure ever clears on a later
attempt.

When other cards still decrypt and a card fails again on a second try, the key
store works and that card's number is encrypted under a key it no longer holds,
so there is no point spending the retry budget on it. Any attempt now leaves
such cards out. A card that decrypts on the second try, or a run where no card
decrypts, still fails the attempt.

Depends on D343048

The attempt threshold counts failures of any kind, so it waits out errors
that clear on their own before giving up on a card. Two attempts in a row that
both fail to decrypt a card are evidence enough on their own: of the profiles
that failed to decrypt twice in a row, about 0.7% later migrated. A failure of
another kind restarts the count.

Depends on D343049

A card whose number does not decrypt fails every migration attempt the same
way, so the profile spends its retry budget and stays on JSON for good. Such
failures almost never clear: of the profiles that had already failed three
attempts and failed to decrypt again, about 0.2% later migrated. Once
DROP_UNDECRYPTABLE_AFTER_ATTEMPTS (3) attempts have failed, cards whose
number fails to decrypt with NS_ERROR_FAILURE or NS_ERROR_INVALID_ARG are
left out and the rest migrate; a cancelled unlock or a shutdown still fails
the attempt.

When another card's number decrypts in the same attempt, the key store works
and the cards that fail are encrypted under a key it no longer holds, so there
is no point spending the retry budget on them. Any attempt now leaves such
cards out. A run where no card decrypts still fails the attempt.

Depends on D343057

The attempt threshold counts failures of any kind, so it waits out errors
that clear on their own before giving up on a card. Two attempts in a row that
both fail to decrypt a card are evidence enough on their own: of the profiles
that failed to decrypt twice in a row, about 0.7% later migrated. A failure of
another kind clears the record of the last one.

A key store that cannot be reached at all fails every decrypt the same way,
so a profile whose key store stays unreachable for two launches migrates
without its cards.

Depends on D343058

Attachment #9683285 - Attachment is obsolete: true
Attachment #9683286 - Attachment is obsolete: true
Attachment #9683287 - Attachment is obsolete: true
Attachment #9683303 - Attachment description: WIP: Bug 2089931 - P1. Drop credit cards that cannot be decrypted once enough attempts to migrate to the Rust store have failed. r?theidkamp,#credential-management-reviewers → WIP: Bug 2089931 - P1. Drop credit cards that cannot be decrypted when migrating to the Rust store, instead of failing the migration. r?theidkamp,#credential-management-reviewers
Attachment #9683304 - Attachment is obsolete: true

How many cards a migration left out already follows from migrate_to_rust
(source_total minus migrated minus failed), but not which of the three rules
allowed it, since the thresholds are prefs and the rules can hold together.
drop_reason names it, giving the strongest evidence when more than one holds.
It is left off dry runs so that every drop_reason reported is a real migration.

Depends on D343057

Attachment #9683305 - Attachment is obsolete: true
Attachment #9683344 - Attachment is obsolete: true
Attachment #9683303 - Attachment description: WIP: Bug 2089931 - P1. Drop credit cards that cannot be decrypted when migrating to the Rust store, instead of failing the migration. r?theidkamp,#credential-management-reviewers → Bug 2089931 - Drop credit cards that cannot be decrypted when migrating to the Rust store, instead of failing the migration. r?theidkamp,#credential-management-reviewers
Attachment #9683303 - Attachment description: Bug 2089931 - Drop credit cards that cannot be decrypted when migrating to the Rust store, instead of failing the migration. r?theidkamp,#credential-management-reviewers → Bug 2089931 - Drop credit cards that cannot be decrypted when migrating to the Rust store, instead of failing the migration. r?theidkamp,#credential-management-reviewers,#nimbus-reviewers
Whiteboard: [fxcm-backlog]
Pushed by dlee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/67e885fc3acd https://hg.mozilla.org/integration/autoland/rev/0f2d3b1c91b3 Drop credit cards that cannot be decrypted when migrating to the Rust store, instead of failing the migration. r=theidkamp,credential-management-reviewers,joschmidt
See Also: → 2094564
Status: ASSIGNED → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: