Skip to content

FXCM-2281: Integrate EncryptorDecryptor into the autofill database - #7573

Draft
theidkamp wants to merge 1 commit into
mozilla:mainfrom
theidkamp:fxcm-2281-integrate-encryptor
Draft

FXCM-2281: Integrate EncryptorDecryptor into the autofill database#7573
theidkamp wants to merge 1 commit into
mozilla:mainfrom
theidkamp:fxcm-2281-integrate-encryptor

Conversation

@theidkamp

@theidkamp theidkamp commented Sep 2, 2026

Copy link
Copy Markdown

Move autofill's credit-card encryption onto the shared db-crypto crate and let AutofillDb own the encryptor, as logins' LoginDb does. The consumer supplies it when building the store, so no key is passed into individual calls or down through the sync layers.

Blocked on #7542 this branch does not build until the shared crate lands,
so CI here will be red. Verified locally against #7542's current head
(cc7212f7d): cargo fmt --check clean, cargo clippy --all-targets clean,
91 tests passing.

Open Questions

  • Shared encrypt_str / decrypt_str helpers: Decide whether to keep the helpers in autofill for now or move the duplicated string ↔ encrypted-bytes conversion into a shared crate used by both autofill and logins.
  • Android localEncryptionKeys migration: Update the Android credit-card consumer to stop passing a local encryption key before removing set_local_encryption_key; otherwise Sync can hit the default unimplemented!() and panic at runtime.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

Move autofill's credit-card encryption onto the shared db-crypto crate and let
AutofillDb own the encryptor, as logins' LoginDb does. The consumer supplies it
when building the store, so no key is passed into individual calls or down
through the sync layers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant