Skip to content
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

[Sync] Warn if OS Keychain is locked or impossible to decrypt sync code words #24121

Closed
AlexeyBarabash opened this issue Jul 19, 2022 · 2 comments · Fixed by brave/brave-core#14224

Comments

@AlexeyBarabash
Copy link
Contributor

If OS Keychain is locked and/or impossible to decrypt sync code words, then sync doesn't work.
Also there is a crash when trying to display QR code.

Steps to reproduce:

  1. Setup sync chain
  2. Exit browser
  3. Lock the keychain
  4. Launch browser and deny keychain access
  5. Show sync code words.
    Actual - there is one word.
    Expected not to have any words.
  6. Show QR code
    Actual - crash happens
    Expected not to crash at least.

Required:

  • display no words in such case;
  • do not have a crash;
  • provide additional info about Keychain state and code words decryption result in sync-internals.

Reproduced on Ubuntu and macOS.

@kjozwiak
Copy link
Member

The above will require 1.43.83 or higher for 1.43.x verification 👍

@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Aug 30, 2022
@stephendonner
Copy link

stephendonner commented Aug 30, 2022

Verification PASSED using

Brave 1.43.84 Chromium: 105.0.5195.68 (Official Build) (x86_64)
Revision ad13e82529051bac6a0e65f455e6d7a1e5fd7938-refs/branch-heads/5195@{#903}
OS macOS Version 11.6.8 (Build 20G730)

Followed Kamil's modified testplan: brave/brave-core#14224 (comment)

Steps:

  1. installed 1.43.84
  2. launched Brave
  3. loaded brave://sync-internals
  4. ensured Passphrase is set was set to false
  5. ensured OS encryption available was set to true
  6. loaded brave://sync/
  7. clicked on Start using sync
  8. clicked on Start a new Sync Chain
  9. click on Computer
  10. click OK
  11. loaded brave://sync-internals/
  12. confirmed Passphrase is set is true
  13. confirmed OS encryption available is true
  14. shut down Brave
  15. removed Brave Browser access to the Brave Safe Storage using Keychain Access
  16. launched Brave
  17. loaded brave://sync-internals
  18. ensured Passphrase is set is true
  19. ensured Passphrase decryption failed is true
  20. ensured OS encryption available is false
  21. confirmed I got the Sync service could not be started, Sync is not running notification
  22. confirmed clicking on Check details takes me to brave://settings/braveSync/setup
  23. confirmed clicking on the troubleshooting link loads https://support.brave.com/hc/en-us/articles/360047642371-Sync-FAQ correctly
  24. ensured that the Sync service could not be started, Sync is not running notification re-appears when re-launching the browser after dismissing the notification via X
  25. ensured that the Sync service could not be started, Sync is not running notification re-appears when re-launching the browser after dismissing the notification by clicking on Check details
  26. ensured that the Sync service could not be started, Sync is not running notification doesn't re-appear when re-launching the browser after the user has dismissed the notification via Don't show again.
  27. shut down Brave
  28. granted Brave Browser access to the Brave Safe Storage via Keychain Access
  29. launched Brave
  30. clicked on Deny on the Brave Safe Storage dialog
  31. load brave://sync-internals
  32. confirmed Passphrase is set -> true
  33. confirmed Passphrase decryption failed -> true
  34. confirmed OS encryption available -> false
  35. shut down Brave
  36. launched Brave
  37. entered my password for Keychain Access and clicked on Always Allow on the dialog
  38. added my iPhone via brave://sync/ and confirmed it's working
  39. loaded brave://sync-internals
  40. noted Passphrase is set is true and OS encryption available is true
steps 4-5 steps 12-13 step 15 steps 17-20 steps 21-22 step 23 step 28 step 30 steps 31-34 step 38 steps 39-40
Screen Shot 2022-08-30 at 1 36 28 PM Screen Shot 2022-08-30 at 1 46 50 PM Screen Shot 2022-08-30 at 1 58 37 PM Screen Shot 2022-08-30 at 1 57 34 PM Screen Shot 2022-08-30 at 2 02 55 PM 187544126-6c4a4c8e-0329-4d95-b4dc-402e68a80fe1 Screen Shot 2022-08-30 at 4 39 54 PM Screen Shot 2022-08-30 at 4 48 01 PM Screen Shot 2022-08-30 at 4 20 32 PM Screen Shot 2022-08-30 at 5 07 52 PM Screen Shot 2022-08-30 at 5 08 19 PM

Verification passed on

Brave 1.43.85 Chromium: 105.0.5195.68 (Official Build) (64-bit)
Revision ad13e82529051bac6a0e65f455e6d7a1e5fd7938-refs/branch-heads/5195@{#903}
OS Ubuntu 18.04 LTS

Followed Kamil's modified testplan: brave/brave-core#14224 (comment)

Steps:

  1. installed 1.43.85
  2. launched Brave
  3. loaded brave://sync-internals
  4. ensured Passphrase is set was set to false
  5. ensured OS encryption available was set to true
  6. loaded brave://sync/
  7. clicked on Start using sync
  8. clicked on Start a new Sync Chain
  9. click on Computer
  10. click OK
  11. loaded brave://sync-internals/
  12. confirmed Passphrase is set is true
  13. confirmed OS encryption available is true
  14. shut down Brave
  15. removed Brave Browser access to the Brave Safe Storage using Keychain Access
  16. launched Brave
  17. loaded brave://sync-internals
  18. ensured Passphrase is set is true
  19. ensured Passphrase decryption failed is true
  20. ensured OS encryption available is false
  21. confirmed I got the Sync service could not be started, Sync is not running notification
  22. confirmed clicking on Check details takes me to brave://settings/braveSync/setup
  23. confirmed clicking on the troubleshooting link loads https://support.brave.com/hc/en-us/articles/360047642371-Sync-FAQ correctly
  24. ensured that the Sync service could not be started, Sync is not running notification re-appears when re-launching the browser after dismissing the notification via X
  25. ensured that the Sync service could not be started, Sync is not running notification re-appears when re-launching the browser after dismissing the notification by clicking on Check details
  26. ensured that the Sync service could not be started, Sync is not running notification doesn't re-appear when re-launching the browser after the user has dismissed the notification via Don't show again.
  27. shut down Brave
  28. granted Brave Browser access to the Brave Safe Storage via Keychain Access
  29. launched Brave
  30. clicked on Deny on the Brave Safe Storage dialog
  31. load brave://sync-internals
  32. confirmed Passphrase is set -> true
  33. confirmed Passphrase decryption failed -> true
  34. confirmed OS encryption available -> false
  35. shut down Brave
  36. launched Brave
  37. entered my password for Keychain Access and clicked on Always Allow on the dialog
  38. added another device via brave://sync/ and confirmed it's working
  39. loaded brave://sync-internals
  40. noted Passphrase is set is true and OS encryption available is true
steps 4-5 steps 12-13 step 15 steps 17-20 steps 21-22 step 23 step 30 steps 31-34 step 38 steps 39-40
image image image image image image image image image image

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment