New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 629223 link

Starred by 4 users

Issue metadata

Status: Archived
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature



Sign in to add a comment

Provide unrestricted USB API access for Kiosk Apps.

Project Member Reported by r...@chromium.org, Jul 18 2016

Issue description

To prevent fingerprinting a user, we require apps to declare all the device types it needs to use in its manifest.

In a kiosk-only scenario, the user is a robot account and that one app (and apps it chooses to load) are the only ones running. In this scenario, fingerprinting doesn't apply.

For apps running with the kiosk-only permission, we should allow access to any attached USB devices without requiring declaration in the manifest.

 

Comment 1 by r...@chromium.org, Jul 18 2016

Cc: xiy...@chromium.org

Comment 2 by r...@chromium.org, Jul 18 2016

Components: UI>Shell>Kiosk
Project Member

Comment 3 by chrome-privacy-bot@chromium.org, Jul 27 2016

Cc: msramek@chromium.org r...@chromium.org
Owner: vabr@chromium.org
Auto-assigning a reviewer to this review.

Comment 4 by vabr@chromium.org, Jul 28 2016

Components: Privacy
Labels: -Review-Privacy
Owner: r...@chromium.org
This does not look like a launch review bug. If you want to give privacy a heads-up, please use the Privacy component, not the Review-Privacy label. If you have concrete questions or requests, please consider sending an e-mail to the privacy team.

I'm not sure who was the previous owner of this, so sending this to rkc@ for triaging.

Comment 5 by r...@chromium.org, Jul 29 2016

Cc: vabr@chromium.org
Owner: tbarzic@chromium.org
Yep, just wanted to give privacy a heads up that we're doing this - if you have any objections, please let us know.

Assigning to Toni since he's already working on Kiosk permissions.

Cc: bartfab@chromium.org
+bartfab for heads-up
Sounds reasonable for kiosk mode. Public Sessions would be another story.
Status: Started (was: Assigned)

Comment 9 by r...@chromium.org, Aug 9 2016

This should probably look at session type. Initially let's keep it restricted to Kiosk, till we have a clearer idea of what the public_session session type will entail.

Comment 10 by vabr@chromium.org, Aug 10 2016

Cc: -vabr@chromium.org
(Privacy team noticed this, and for concrete questions please follow #4. Until then, removing myself from Cc.)

Comment 11 by st...@chromium.org, Aug 24 2016

Cc: st...@chromium.org

Comment 12 by st...@chromium.org, Aug 24 2016

Cc: -r...@chromium.org

Comment 13 by st...@chromium.org, Aug 24 2016

Labels: M-55
Cc: bkemler@chromium.org
Labels: -M-55 -M-54 M-56 Restrict-View-Google
Project Member

Comment 16 by bugdroid1@chromium.org, Oct 27 2016

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

commit 2d0dff8d82ef6b4ba129f77f542e02391b7b04fb
Author: tbarzic <tbarzic@chromium.org>
Date: Thu Oct 27 22:09:00 2016

Allow interfaceClass USB device permissions

Introduces interfaceClass parameter to usbDevice permission.
The parameter is used to match permission to all USB device that
expose an interface with the provided class.
The interfaceClass permission will be matched against all interfaces
supported by any of USB device configurations.

USB device permission with interfaceClass set will only be taken
into account when determining device availability in kiosk sessions.

To support filtering devices that specify (only) device level class
(e.g. hub class is device descriptor class), when testing
interfaceClass permission parameter, take device class into account
(in addition to all interface classes).

Since extracting set of supported interfaces or a device is not as
trivial as getting vendor/product ID, introduce helper factory methods
for UsbDevicePermisison::CheckParam that will create check param for a
USB device. Also, since usbDevice permission is used by hid API too,
add a method for creating check param for HID devices. For those,
set of interface classes will be set to HID interface class: 3.

BUG= 629223 

Review-Url: https://codereview.chromium.org/2418353002
Cr-Commit-Position: refs/heads/master@{#428154}

[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/chrome/browser/chromeos/printer_detector/printer_detector.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/chrome/browser/extensions/permission_messages_unittest.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/chrome/browser/ui/webui/print_preview/extension_printer_handler.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/chrome/common/extensions/permissions/chrome_permission_message_provider_unittest.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/device/usb/mock_usb_device.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/device/usb/mock_usb_device.h
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/browser/api/hid/hid_device_manager.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/browser/api/usb/usb_api.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/browser/api/usb/usb_event_router.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/BUILD.gn
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/api/_behavior_features.json
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/extension_messages.h
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/features/behavior_feature.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/features/behavior_feature.h
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/permissions/usb_device_permission.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/permissions/usb_device_permission.h
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/permissions/usb_device_permission_data.cc
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/permissions/usb_device_permission_data.h
[modify] https://crrev.com/2d0dff8d82ef6b4ba129f77f542e02391b7b04fb/extensions/common/permissions/usb_device_permission_unittest.cc

This should work now, but has yet to be enabled for stable channel.

One unexpected issue is that Web Store rejects apps with USB devices permissions with no vendorId property set - this should be fixed, but until then a workaround would be to simply set vendorId to -1
Project Member

Comment 18 by bugdroid1@chromium.org, Nov 24 2016

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

commit 438efe78ab6e2caa5d5a63967aea4b6544831dc8
Author: lof84 <lof84@yandex-team.ru>
Date: Thu Nov 24 12:05:10 2016

Fix USB device permissions tests

BUG= 629223 
R=tbarzic, reillyg@chromium.org, meacer@chromium.org

Review-Url: https://codereview.chromium.org/2515353006
Cr-Commit-Position: refs/heads/master@{#434312}

[modify] https://crrev.com/438efe78ab6e2caa5d5a63967aea4b6544831dc8/extensions/common/permissions/usb_device_permission_unittest.cc

Have we tested this and what about  issue #17  (seems like the workaround is very simple)
Status: Fixed (was: Started)
the issue in comment #17 has been handled.
Super! Thank you!
How can someone outside of Google test this?
Status: Unconfirmed (was: Fixed)
Labels: -Restrict-View-Google
Status: Assigned (was: Unconfirmed)
I ran tests of this feature on 57.0.2951.0 / 9086.0.0 dev branch, and results look good to me.

I added multiple manifest permission lines (one at a time) containing { 'interfaceClass': X } where X was (1, 3, 14), and verified that the webstore accepted the manifest, and that chrome.usb.getDevices and chrome.hid.getDevices worked as expected, returning just the right subset of devices that were targeted by the union of the present lines.
Status: Fixed (was: Assigned)
Labels: -M-56 M-57
Cc: r...@chromium.org
Cc: -st...@chromium.org
Labels: VerifyIn-61

Comment 32 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment