Skip to content

application level SML/Lua/OpenResty sandboxing and vhosts (feature request or a pointer where to look) #18

@mnegovanovic

Description

@mnegovanovic

Hi minoki

what i want to do is have vhost like environment in openresty where each request is executed in standalone mode with restricted (filesystem, OS, ngx) access to resources. Openresty does good job of isolating requests, its about restricting the access to resources.

What i figured out so far:

  1. on lua side setfenv ... restrict access to io., os. etc. (there is a whole list of safe/unsafe Lua calls on the web)
  2. SML side ... tweak LunarML compiler and basis to restrict access to TextIO, OS, or Posix etc. (GROK supplied analysis i need to investigate properly)

Now my question ... how hard would be to implement SML part ... tweaks to LunarML needed to support sandboxing. Ideally I would just supply a flag --sandbox to compiler and it all works.

Any pointers regarding implementing this? I would not mind working on this myself.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions