A
A
Alexander2021-04-07 23:44:48
JavaScript
Alexander, 2021-04-07 23:44:48

How to make a sandbox for two js applications?

There are 2 applications, they lie side by side in folders A and B. "Application" is html + js code, everything is open. Applications communicate with the local server independently of each other. Each uses its own key for identification. But since the code is open, and the applications are nearby, it's not difficult to "peep" someone else's code and impersonate another application. The key is set after the application is installed and is not known in advance. You can peep someone else's code at the stage of writing an application, at the execution stage it will no longer work, unless you include its files. In the dynamic connection of other people's files, there is a main security problem and I don't know how best to close it.
Question - what is the best way to isolate applications so that their settings are inaccessible to each other? Or how to store settings in this case? I must say right away that options with different rights to application folders, etc. are not considered.

So far, it only occurs to me to make a subfolder with a random name, then another application will not be able to connect to the neighboring one, since it will not know the exact path. But it's somehow not very elegant. Maybe there is an easier way?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question