Skip to content

Add note on remembering previously allowed ports (#107)#226

Open
gregstoll wants to merge 1 commit intoWICG:mainfrom
gregstoll:remembering-ports
Open

Add note on remembering previously allowed ports (#107)#226
gregstoll wants to merge 1 commit intoWICG:mainfrom
gregstoll:remembering-ports

Conversation

@gregstoll
Copy link
Copy Markdown

Add a note that user agents may remember previously allowed ports with a warnings that devices won't always have the same port.

Fixed #107.

Add a note that user agents may remember previously allowed ports with
a warnings that devices won't always have the same port.

Fixed WICG#107.
@reillyeon
Copy link
Copy Markdown
Collaborator

Make sure you've joined the WICG to satisfy the IPR bot.

Comment on lines +407 to +412
visited the same site. Implementations should take caution that
a device will not always have the same port name, as this is up
to the operating system, and thus there is a danger that
allowing access to a previously allowed port may grant access
to a different device than the user intended. As such,
implementations should communicate this risk to the user.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From our implementation experience in Chromium we've found that on Windows the situation is actually pretty good and we use the "device instance ID" to identify ports. Internally Windows generates this ID using a combination of device identifiers and bus topology information. On other platforms we make the more conservative assumption that device names (e.g. /dev/ttyUSB0 or /dev/tty.usbserial0) are not stable and only persist permissions for USB devices where we have a USB vendor ID, product ID and serial number to match.

I would probably rephrase this as,

Implementations should take caution that OS-provided device names may or may not allow accurate reidentification of a device between sessions and should only use properties which are highly likely to identify a specific device when remembering a user's permission decision. When no such identifier is present the permission should be time or session-limited.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define permission storage mechanism

2 participants