How does Google App Engine sandbox work?

前端 未结 3 957
旧时难觅i
旧时难觅i 2021-02-13 00:42

How does Google App Engine sandbox work?

What would I have to do to create my own such sandbox (to safely allow my clients to run their apps on my engine without giving

相关标签:
3条回答
  • 2021-02-13 01:11

    to safely allow my clients to run their apps on my engine without giving them the ability to format my disk drive

    This can be easily achieved using the Java Security Manager. Refer this answer for an example.

    0 讨论(0)
  • 2021-02-13 01:14

    In the Java case, I think it's mostly done by restricting the available libraries. Since Java doesn't have pointer concept, and you can't upload natively compiled code (only JVM bytecode), you can't break out of the sandbox. Add some tight process scheduling, and you're done!

    I guess The hardest part is to pick the libraries, to make it useful while staying safe.

    In the Python case, they had to modify the VM itself, because it wasn't designed with safety in mind. Fortunately, they have Guido himself to do it.

    0 讨论(0)
  • 2021-02-13 01:19

    You would probably need a combination of a restrictive classloader and a thorough understanding of the Java Security Architecture. You would probably run your JVM with a very strict SecurityManager specified.

    0 讨论(0)
提交回复
热议问题