WICG / direct-sockets

Direct Sockets API for the web platform
Other
364 stars 14 forks source link

Suggestion: condition this on a web permission + CSP + CORS + explicit permissions request to provide a strong layer of security #45

Open dead-claudia opened 2 years ago

dead-claudia commented 2 years ago

I was reading through #1 and https://github.com/w3ctag/design-reviews/issues/548, and I feel that the security concerns could be mostly addressed by doing the following in concert:

I won't say it would address the social engineering concerns from the design review in full (virtually anything can be socially engineered around at least in theory - just ask your average scam boss or physical pentester), but I do feel this would at least be a step in the right direction.

robertsdotpm commented 2 years ago

Will just say that it should also be worth considering the convenience of using this API. Often centralization occurs on websites because its more convenient than downloading a bunch of software and editing config files. If the user has to setup permission policies and approve a bunch of dialogs - that just adds even more of a barrier to using the APIs.

I personally think these new networking APIs have the potential to transform the web - but only if they are as convenient as the web itself. Any friction makes that less effective.

dead-claudia commented 1 year ago

Little late, but:

Will just say that it should also be worth considering the convenience of using this API. Often centralization occurs on websites because its more convenient than downloading a bunch of software and editing config files. If the user has to setup permission policies and approve a bunch of dialogs - that just adds even more of a barrier to using the APIs.

The only user-level friction I'm suggesting to have enabled by default is having a permissions prompt. This already has precedent with geolocation and push notifications, so they aren't unfamiliar with it.

And for developers, many other sensitive APIs are already restricted to secure contexts, like service workers and web crypto.

Everything else just integrates with the existing opt-in security measures.

And there are some very notable and relevant precedents for both requiring user opt-in and secure context: Web Bluetooth, which requires user opt-in for discovery, and protocol handler registration, which requires users to individually accept each registration request.


This reply is also a bit of a bump for this particular concern in general.