0

I'm trying to understand function of the landing page. According to specification:

The iLandingPage field, when non-zero, indicates a landing page which the device manufacturer would like the user to visit in order to control their device. The UA MAY suggest the user navigate to this URL when the device is connected.

As far as I do understand the main purpose of landing page to provide notification to the user which page is recommended to be used with WebUSB complaint device. So I have a couple of questions:

  1. is landing page also preventing user from accessing the other websites? Is Chrome (Chromium) blocking access to the sites that are not matching landing page?
  2. is landing page mandatory? Can we avoid using at all by simply setting iLandingPage to 0?
  3. if URL for landing page is mandatory - what would be preferred way of making it configurable (i.e. like after uploading firmware to the device)?
  4. I saw in one of the thread information about blacklist for WebUSB devices . How can I access WebUSB blacklist in Chrome/Chromium?

1 Answers1

3
  1. is landing page also preventing user from accessing the other websites? Is Chrome (Chromium) blocking access to the sites that are not matching landing page?

No, the landing page is not used to limit which websites can access the device. In an earlier version of the WebUSB API draft, there were custom descriptors that defined filters for which domains could access which interfaces. Those descriptors are no longer used, so any site served over HTTPS can request access to your device.

The landing page is only used to prompt the user that there is a companion web page for the USB device that was just detected. The user is not obliged to click on it and on some platforms (Windows, Android), the notification is not shown at all due to technical limitations.

  1. is landing page mandatory? Can we avoid using at all by simply setting iLandingPage to 0?

It is not mandatory - you can simply set it to zero. In fact, if you do not want a landing page, you do not even need to supply the WebUSB Platform Capability Descriptor. Chrome will still allow you to manually select your device from the device picker even without the descriptor.

  1. if URL for landing page is mandatory - what would be preferred way of making it configurable (i.e. like after uploading firmware to the device)?

As above, it is not mandatory, but since the GET_URL request is separate from the request for the platform capability descriptor, you can easily generate the descriptor in RAM and fill in whatever URL you wish at runtime.

  1. I saw in one of the thread information about blacklist for WebUSB devices . How can I access WebUSB blacklist in Chrome/Chromium?

There are two different blacklists for Chrome:

  1. The WebUSB Interface Class Filter restricts access to certain classes of USB interfaces: Audio, Video, HID, Mass Storage, Smart Card, Wireless Controller (Bluetooth and Wireless USB).
  2. The USB blocklist restricts access to USB devices based on their vendor ID / product ID pair. This mostly applies to U2F devices.
Devan
  • 106
  • 2