New issue
Advanced search Search tips

Issue 598763 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Add --disable-webusb-security flag for testing existing devices.

Project Member Reported by reillyg@chromium.org, Mar 29 2016

Issue description

Until a public device registry* or more advanced settings page can be developed we should add a --disable-webusb-security flag that will disable the CORS-like checks normally performed when verifying in that an origin has permission to access a USB device.

This flag will still require the site to call navigator.usb.requestDevice so that the full UI flow can be exercised.

* http://wicg.github.io/webusb/#public-device-registry

 
 Issue 598766  tracks implementing a more fine-grained approach to testing and development.

Comment 2 by lar...@gmail.com, Mar 30 2016

It would be practical if something similar could be done for the android version (I assume it's a bit tricky to add the flag on the command line on mobile devices)
larsgk, you can simply open a tab to about:flags, toggle the flag and restart chrome android app.

Comment 4 by lar...@gmail.com, Mar 30 2016

fbeaufort, ok cool - didn't think that flag would be exposed there, thanks
The current patch I'm working on doesn't expose it in about://flags but also WebUSB doesn't work yet on Android so I'm not worried about it. I'm working on Android support but it will not land until at least M-52 because it requires changes to the core USB code as the version of libusb we use doesn't work there.
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/344e0fd8d4c91ca9244055b27b521c24a08020cb

commit 344e0fd8d4c91ca9244055b27b521c24a08020cb
Author: reillyg <reillyg@chromium.org>
Date: Wed Mar 30 21:36:05 2016

Add --disable-webusb-security flag for testing existing devices.

This flag disables checking of the WebUSB allowed origins descriptors
that implement a CORS-like mechanism to secure origin to device
communications. This is intended for early adopters testing their
existing devices with WebUSB before they can update their firmware or
the public device registry ( issue 598765 ) is implemented.

BUG= 598763 

Review URL: https://codereview.chromium.org/1842643004

Cr-Commit-Position: refs/heads/master@{#384098}

[modify] https://crrev.com/344e0fd8d4c91ca9244055b27b521c24a08020cb/chrome/browser/ui/startup/bad_flags_prompt.cc
[modify] https://crrev.com/344e0fd8d4c91ca9244055b27b521c24a08020cb/chrome/browser/usb/usb_chooser_bubble_controller.cc
[modify] https://crrev.com/344e0fd8d4c91ca9244055b27b521c24a08020cb/chrome/browser/usb/usb_chooser_bubble_controller.h
[modify] https://crrev.com/344e0fd8d4c91ca9244055b27b521c24a08020cb/chrome/browser/usb/web_usb_permission_provider.cc
[modify] https://crrev.com/344e0fd8d4c91ca9244055b27b521c24a08020cb/chrome/common/chrome_switches.cc
[modify] https://crrev.com/344e0fd8d4c91ca9244055b27b521c24a08020cb/chrome/common/chrome_switches.h

Status: Fixed (was: Assigned)

Sign in to add a comment