sandboxing of plugins and config #324
-
Orginially from #129 but moved to a discussion. The config architecture of inlang is similar to Figma's plugin system. Figma allows developers to write plugins in JavaScript that are executed in the browser, similar to inlang's desire to execute config code in the browser. This article on Figma's blog goes into great length on different sandboxing approaches and trade-offs. Figma initially chose the Realms shim developed by Agoric. The Agoric Realms approach was eventually compromised and Figma switched to a WebAssembly-based JavaScript runtime. The design requirement for inlang are as follows:
Comparison
ESM consumption refers importing and accessing code as if the code would not be sandboxed: const module = await import('sandboxed-code')
const result = module.exampleFunction() Third party code refers to the ability to import external code within the config: // inlang.config.js
import { x } from "https://some.module/x.js" OverviewDynamic import is not suited due to zero security. SES seems suitable but third party code is not supported. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Not required anymore after the #1142 refactoring.
|
Beta Was this translation helpful? Give feedback.
Not required anymore after the #1142 refactoring.