Script tag extension for secure local computing #6541
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
Context
Developers and users need ways to securely and transparently do local computing and interact with local resources from within the browser, as indicated by the popularity of frameworks like Electron, NW.js, Chromium Embedded Framework and other webview runtimes.
Proposal
In the context of a web application, in the body of
index.html
hosted at:https://application.com
, we could have a script tag extension for local computing via a secure javascript runtime, based on a "user-granted permissions" model such as the one enforced in Deno:In the app manifest, permissions are explicitely declared so that the browser can request them to the user:
During the installation of the web application, the browser requests the user to grant the permissions explicitely present into the application manifest. In this case, it uses two permissions in order for the deno process to be able to write to a local folder and to allow network requests to a particular domain.
In the case the permissions are not granted by the user, the script would not run. In the case the user grants the necessary permissions, the script tag can then launch a local deno process in its own context, which would translate into the following command:
deno --allow-write=path/to/mydocumentfolder --allow-net=https://application.com https://application.com/index.js
If deno is not installed the script would just fail. If it is installed, the Deno process would launch and could then possibly communicate with the webpage through websockets, webtransport, etc.. effectively allowing a secure way (controlled by the end-user) to do local computing and to interact with local resources from within a web application.
The text was updated successfully, but these errors were encountered: