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

Enable Web Serial by default #38791

Closed
4 of 6 tasks
ShivanKaul opened this issue Jun 4, 2024 · 7 comments · Fixed by brave/brave-core#24258
Closed
4 of 6 tasks

Enable Web Serial by default #38791

ShivanKaul opened this issue Jun 4, 2024 · 7 comments · Fixed by brave/brave-core#24258

Comments

@ShivanKaul
Copy link
Collaborator

Description

We currently disable Web Serial by default, and allow enabling via flag. On looking at the user flow now, I don't see a reason to keep this disabled. Users get a permission popup and the API doesn't increase fingerprinting surface by default. Mozilla also changed their position recently; in Chromium Web Serial use requires a permission popup.

image

Steps to reproduce

Check status of brave://flags/#brave-web-serial-api

Actual result

Is off by default

Expected result

Should be on by default

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.68.40 Chromium: 125.0.6422.76 (Official Build) nightly (arm64) (I'm on Nightly but this is on all versions)

Channel information

  • release (stable)
  • beta
  • nightly

Reproducibility

  • with Brave Shields disabled
  • with Brave Rewards disabled
  • in the latest version of Chrome

Miscellaneous information

No response

@mkarolin
Copy link
Contributor

Test plan:

  1. Start Brave and navigate to permissions.site
  2. Click on Serial button

Observe:
Permission prompt shows up.

  1. Cancel from the permission prompt
  2. Navigate to brave://settings/content
  3. Click Additional permissions
  4. Verify that Serial ports is listed

@mkarolin
Copy link
Contributor

Note on deviation from the original description. Instead of making the flag enabled by default, the flag was removed entirely.

@stephendonner
Copy link

Verified PASSED using

Brave | 1.69.53 Chromium: 127.0.6533.17 (Official Build) nightly (x86_64)
-- | --
Revision | bedcc2e74ce45bd641d2946e0d870d68ba08b8e9
OS | macOS Version 11.7.10 (Build 20G1427)

Steps:

  1. installed 1.69.53
  2. launched Brave
  3. opened brave://flags
  4. searched for serial
  5. confirmed no matching flags
  6. loaded permission.site
  7. clicked on Serial
  8. confirmed permissions prompt
  9. clicked on Connect for the first highlighted entry
  10. confirmed the Serial button on the page turned green (enabled)
  11. clicked again on Serial

Confirmed Web Serial was enabled by default, has no flag, and I could successfully pair

example example example example
Screen Shot 2024-06-26 at 12 05 51 PM Screen Shot 2024-06-26 at 12 05 59 PM Screen Shot 2024-06-26 at 12 06 08 PM Screen Shot 2024-06-26 at 12 06 14 PM

@MadhaviSeelam
Copy link

MadhaviSeelam commented Jul 24, 2024

Verification PASSED using

Brave | 1.69.122 Chromium: 127.0.6533.57 (Official Build) beta (64-bit)
-- | --
Revision | bd77e9b76a8e67ff2bf9f62f1df7d60378ca811f
OS | Windows 11 Version 23H2 (Build 22631.3880)
Case 1: New install - PASSED
  1. installed 1.69.122
  2. launched Brave
  3. opened brave://flags and searched for #brave-web-serial-api
  4. confirmed No matching experiments message shown
  5. loaded permission.site
  6. clicked on Serial
  7. confirmed permissions prompt
  8. clicked on Connect for the first highlighted entry
  9. confirmed the Serial button on the page turned green (enabled)
  10. clicked again on Serial to confirm the device is paired
  11. cancel from the permission prompt
  12. navigated to brave://settings/content
  13. clicked Additional permissions
  14. confirmed Serials ports entry is shown
  15. opened Serial ports page
  16. confirmed pages shows the entry for the site https://permissions.site/
step 3 step 7 step 8 step 9 step 10 step 13 step 14 step 16
image image image image image image image image
Case 2: Reset Permissions - PASSED
  1. Continue from Case 1
  2. clicked the tune icon in the URL bar
  3. clicked Reset Permission button
  4. navigated brave://settings/content and clicked Additional permissions
  5. clicked Serial ports
  6. confirmed no entry is shown in the No serial ports found
step 3a step 3b step 5 step 6
image image image image
Case 3: Upgrade - PASSED
  1. installed 1.68.128
  2. launched Brave
  3. opened brave://flags and searched for #brave-web-serial-api
  4. confirmed Web Serial API flag is disabled by default
  5. opened brave://settings/content
  6. confirmed Serial ports entry is not listed in Additional permissions
  7. closed Brave
  8. renamed Brave profile to Brave-Manager-Beta
  9. installed 1.69.122
  10. relaunched Brave
  11. opened brave://flags and searched for #brave-web-serial-api
  12. confirmed No matching experiments message shown
  13. loaded https://permission.site
  14. clicked on Serial
  15. confirmed permissions prompt
  16. clicked on Connect for the first highlighted entry
  17. confirmed the Serial button on the page turned green (enabled)
  18. clicked again Serial button to confirm the device is paired
  19. navigated to brave://settings/content
  20. clicked Additional permissions
  21. confirmed Serials ports entry is shown
  22. opened Serial ports page
  23. confirmed pages shows the entry for the site https://permission.site/
step 4 step 6 step 12 step 16-17 step 18 step 21 step 23
image image image 2024-07-24_16h24_31 2024-07-24_16h30_05 image image

@MadhaviSeelam
Copy link

MadhaviSeelam commented Jul 25, 2024

Verification PASSED using

Brave | 1.69.124 Chromium: 127.0.6533.73 (Official Build) beta (arm64)
-- | --
Revision | dbc9035349f74e493f3293d93f4cbf35c597dfec
OS | macOS Version 13.5 (Build 22G74)
Case 1: New install - PASSED
  1. installed 1.69.124
  2. launched Brave
  3. opened brave://flags and searched for #brave-web-serial-api
  4. confirmed No matching experiments message shown
  5. loaded permission.site
  6. clicked on Serial
  7. clicked Allow
  8. confirmed permissions prompt shown
  9. clicked on Connect for the first highlighted entry
  10. confirmed the Serial button on the page turned green (enabled)
  11. clicked again on Serial to confirm the device is paired
  12. cancel from the permission prompt
  13. navigated to brave://settings/content
  14. clicked Additional permissions
  15. confirmed Serials ports entry is shown
  16. opened Serial ports page
  17. confirmed page shows the entry for the site https://permissions.site/
step 4 step 7 step 8-9 step 10-11 step 13 -15 step 17
image image Screenshot 2024-07-25 at 9 29 56 AM Screenshot 2024-07-25 at 9 30 13 AM Screenshot 2024-07-25 at 9 30 48 AM Screenshot 2024-07-25 at 9 30 55 AM
Case 2: Reset Permissions - PASSED
  1. Continue from Case 1
  2. clicked the tune icon in the URL bar for the permission.site
  3. clicked Reset Permission button
  4. navigated brave://settings/content and clicked Additional permissions
  5. clicked Serial ports
  6. confirmed no entry is shown in the No serial ports found
step 3a step 3b step 5 step 6
Screenshot 2024-07-25 at 9 56 36 AM Screenshot 2024-07-25 at 9 56 41 AM Screenshot 2024-07-25 at 9 58 20 AM Screenshot 2024-07-25 at 9 57 08 AM
Case 3: Upgrade - PASSED
  1. installed 1.68.128
  2. launched Brave
  3. opened brave://flags and searched for #brave-web-serial-api
  4. confirmed Web Serial API flag is disabled by default
  5. opened brave://settings/content
  6. confirmed Serial ports entry is not listed in Additional permissions
  7. closed Brave
  8. renamed Brave profile to Brave-Manager-Beta
  9. installed 1.69.122
  10. relaunched Brave
  11. opened brave://flags and searched for #brave-web-serial-api
  12. confirmed No matching experiments message shown
  13. loaded https://permission.site
  14. clicked on Serial
  15. confirmed permissions prompt shown
  16. clicked on Connect for the first highlighted entry
  17. confirmed the Serial button on the page turned green (enabled)
  18. clicked again Serial button to confirm the device is paired
  19. cancel from the permission prompt
  20. navigated to brave://settings/content
  21. clicked Additional permissions
  22. confirmed Serials ports entry is shown
  23. opened Serial ports page
  24. confirmed pages shows the entry for the site https://permission.site/
step 4 step 6 step 12 step 15-17 step 18 step 20-22 step 24
Screenshot 2024-07-25 at 10 02 50 AM Screenshot 2024-07-25 at 10 41 38 AM Screenshot 2024-07-25 at 10 39 22 AM Screenshot 2024-07-25 at 10 44 53 AM Screenshot 2024-07-25 at 10 44 53 AM Screenshot 2024-07-25 at 10 49 32 AM Screenshot 2024-07-25 at 10 49 39 AM

@MadhaviSeelam
Copy link

MadhaviSeelam commented Jul 30, 2024

Verification PASSED using

Brave	1.69.128 Chromium: 127.0.6533.73 (Official Build) beta (64-bit) 
Revision	715445841b1da480bcc24c12077a6dc926951996
OS	Linux
Case 1: New install - PASSED
  1. installed 1.69.124
  2. launched Brave
  3. opened brave://flags and searched for #brave-web-serial-api
  4. confirmed No matching experiments message shown
  5. loaded permission.site
  6. clicked on Serial
  7. confirmed permissions prompt shown
  8. clicked on Connect for the first highlighted entry
  9. confirmed the Serial button on the page turned green (enabled)
  10. clicked again on Serial to confirm the device is paired
  11. cancel from the permission prompt
  12. navigated to brave://settings/content
  13. clicked Additional permissions
  14. confirmed Serials ports entry is shown
  15. opened Serial ports page
  16. confirmed page shows the entry for the site https://permissions.site/
step 4 step 7-8 step 9-10 step 12 -14 step 16
image image image image image
Case 2: Reset Permissions - PASSED
  1. Continue from Case 1
  2. clicked the tune icon in the URL bar for the permission.site
  3. clicked Reset Permission button
  4. clicked Reload button
  5. navigated brave://settings/content and clicked Additional permissions
  6. clicked Serial ports
  7. confirmed no entry is shown in the No serial ports found
step 3a step 3b step 4 step 5 step 6
image image image image image
Case 3: Upgrade - PASSED
  1. installed 1.68.128
  2. launched Brave
  3. opened brave://flags and searched for #brave-web-serial-api
  4. confirmed Web Serial API flag is disabled by default
  5. opened brave://settings/content
  6. confirmed Serial ports entry is not listed in Additional permissions
  7. closed Brave
  8. renamed Brave profile to Brave-Manager-Beta
  9. installed 1.69.128
  10. relaunched Brave
  11. opened brave://flags and searched for #brave-web-serial-api
  12. confirmed No matching experiments message shown
  13. loaded https://permission.site
  14. clicked on Serial
  15. confirmed permissions prompt shown
  16. clicked on Connect for the first highlighted entry
  17. confirmed the Serial button on the page turned green (enabled)
  18. clicked again Serial button to confirm the device is paired
  19. cancel from the permission prompt
  20. navigated to brave://settings/content
  21. clicked Additional permissions
  22. confirmed Serials ports entry is shown
  23. opened Serial ports page
  24. confirmed pages shows the entry for the site https://permission.site/
step 4 step 6 step 13 step 15-17 step 18-19 step 21-22 step 25
image image image image image image image

@Dinth
Copy link

Dinth commented Aug 16, 2024

Many thanks! Sorry for throwing my couple of pence here, but this is a great decision! Im not a dev, but i am an IT Security expert who done fair bit of threat modelling and risk assessments, and i have never seen the point of removing that feature from the browser.

Mozilla also mozilla/standards-positions#720 (comment);

Looking at what Mozilla does is not the best thing, their market share is constantly getting smaller and not without a reason. Not implementing WebSerial in FF was one of those reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment