endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
788 stars 70 forks source link

refactor(daemon,cli): Serve one weblet per fixed HTTP port. #2148

Closed kriskowal closed 4 months ago

kriskowal commented 4 months ago

closes: #1921

Description

This stack of individually reviewable commits fully decouples the platform-specific weblet implementation from the platform-agnostic daemon, turning it into a Node.js-specific unconfined worklet.

Removing the allegëd type from formula identifiers entirely increased the urgency of fixing #1921. The new weblet architecture does not require a special web bundle type or any of the other weird coupling issues they have with wildcard subdomains. That refactor is bundled with this fix.

Also motivated by weblets, eval formulas now receive both $cancelled and $id endowments. The $id endowment is necessary for weblets to recognize their own access token, a path constructed from a prefix of their own formula identifier. I’ve renamed the cancelled endowment because I could not in good conscience claim the global id, and this made the two names consistent.

Security Considerations

Scaling Considerations

Documentation Considerations

Testing Considerations

Compatibility Considerations

Upgrade Considerations