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

Specify "usb-unrestricted" policy-controlled feature #238

Merged
merged 5 commits into from
Nov 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,8 +1307,15 @@ All USB devices MUST have a <a>default control pipe</a> which is
with a {{NotFoundError}} and abort these steps.
1. If <a>this</a>.{{USBDevice/[[claimedInterface]]}}[|interfaceIndex|] is <code>true</code>,
<a>resolve</a> |promise| and abort these steps.
1. If |interfaces|[|interfaceIndex|].{{USBInterface/[[isProtectedClass]]}} is <code>true</code>,
[=reject=] |promise| with a {{SecurityError}} and abort these steps.
1. Let |unrestricted| be <code>false</code>.
reillyeon marked this conversation as resolved.
Show resolved Hide resolved
1. Let |document| be <a>this</a>'s [=relevant global object=]'s [=associated Document=], or
<code>null</code> if there is no associated {{Document}}.
1. If |document| is not <code>null</code> and |document| is [=allowed to use=] the
[=policy-controlled feature=] named <code>"usb-unrestricted"</code>, set |unrestricted| to
<code>true</code>.
1. If |interfaces|[|interfaceIndex|].{{USBInterface/[[isProtectedClass]]}} is <code>true</code>
and |unrestricted| is <code>false</code>, [=reject=] |promise| with a {{SecurityError}} and
abort these steps.
1. Perform the necessary platform-specific steps to request exclusive control
over |interfaces|[|interfaceIndex|] for the current execution context. If this fails,
<a>reject</a> |promise| with a {{NetworkError}} and abort these steps.
Expand Down Expand Up @@ -2310,6 +2317,12 @@ is exposed on the {{Navigator}} object.

The <a>default allowlist</a> for this feature is <code>["self"]</code>.

This specification defines a second <a>policy-controlled feature</a>, identified
by the token <code>"usb-unrestricted"</code>, that controls whether blocklisted
USB devices and device interfaces with protected classes can be accessed.

The <a>default allowlist</a> for this feature is <code>["self"]</code>.
nondebug marked this conversation as resolved.
Show resolved Hide resolved

## Permission API ## {#permission-api}

The [[permissions]] API provides a uniform way for websites to request
Expand Down