beakerbrowser / beaker

An experimental peer-to-peer Web browser
https://beakerbrowser.com/
MIT License
6.75k stars 544 forks source link

Secure Environment Variable Storage #1727

Open AramZS opened 4 years ago

AramZS commented 4 years ago

Is Your Feature Request Related to a Problem? Please Describe

One of the thing that new projects might look to have, especially those looking to create data portability with data previously stored on other platforms, is the ability to submit data simultaneously to a hyperdrive site and an external site via the external site's API key. However, since all files in all hyperdrives appear to be visible there is no way to securely store a key with write permissions that would make this straightforward without a server backend.

Solution You'd Like

A .env file at the drive or profile level that is only readable by the current user. (Glitch has a good example of this behavior.)

Alternatives You've Considered

Obviously any server-based application would not have this need, but I'm interested in enhancing those applications running entirely in the browser.

The user could potentially store this info in localStorage, but that doesn't have the level of full persistence that would be preferred for such projects.

The user could authenticate with the remote service with each page load or after each localStorage clear, but that is non-optimal and time consuming when there are more persistent options available.

Additional Context

This is non-urgent, a nice-to-have, but would be useful for mirroring the type of project support available on other platforms.

pfrazee commented 4 years ago

Might make sense to give apps write access to a folder inside of the system drive for this, for instance hyper://system/apps/{domain}/.