-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor FXIOS-8297 [v124] Logins Key Retrieval Logic #18401
Refactor FXIOS-8297 [v124] Logins Key Retrieval Logic #18401
Conversation
e2c6ce0
to
311c1aa
Compare
Please add @mhammond for sync review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e41d77c
to
953c801
Compare
Build failed due to:
|
Sorry about that, @lmarceau! I need to test this and fix and then I'll run again--thanks! |
953c801
to
a5a47bb
Compare
a5a47bb
to
ece499c
Compare
Client.app: Coverage: 32.11
CredentialProvider.appex: Coverage: 19.25
NotificationService.appex: Coverage: 22.83
ShareTo.appex: Coverage: 32.66
libStorage.a: Coverage: 59.55
Generated by 🚫 Danger Swift against d12483b |
FYI to either @lmarceau or @OrlaM, I made a few commits after the initial approval: one to refactor RustSyncManager.getEnginesAndKeys for clarity, another to remove unused code from the RustLoginsTests.swift file, and the last to change the dispatch queues I added for the keychain calls from async to sync. |
📜 Tickets
Jira ticket
Github issue
💡 Description
The logic being re-introduced was backed out in PR #17954 after the logins incident and was not the logic that caused the incident. The problematic code, the verification logic introduced in #17355, is being re-worked and will be added in a later release.
Local Test Steps
Create an FxA account.
Log in to sync on Firefox desktop with the account created in step 1.
Add logins and sync.
Open Xcode.
Checkout the code in code in PR #18401.
Remove any pre-existing device data from the simulator and run the code.
Sign in to sync with the account created in step 1.
Sync logins via the settings menu and ensure that the logins from desktop appear in the Firefox iOS Passwords menu.
Stop the simulator.
Make the changes below in the
getKeychainData
function in RustLogins.swift:a. To test when the key is present but not the encrypted canary phrase, replace the
completion
call with the following:b. To test when the key is missing but the encrypted canary phrase is present, replace the
completion
call with the following:c. To test when both the key and the encrypted canary phrase are missing, replace the
completion
call with the following:Run the iOS code locally again, this time without removing the device data.
Note: You should add a breakpoint within the switch statement of the
getStoredKey
function for the case you're testing to ensure it's being hit. You may also want to add a breakpoint in theresetLoginsAndKey
function to ensure it is successfully executed.Sync logins in Firefox iOS.
The expected result is that, despite the database being wiped, all of the logins created in desktop should still be visible in the Firefox iOS Passwords menu.
a. You can ensure this is the case by checking the sync logs for the results of the passwords engine sync. The applied record count should equal the number of records you created in Firefox desktop and there should be no outgoing records.
📝 Checklist
You have to check all boxes before merging