security - How do you monitor, manage, and run untrusted third-party code in a hosted service? -


Assume that I'm running a hosted service that wants to allow plugins written by third-party clients .

Perhaps a gaming service provider that provides infrastructure but allows the client to develop their own game referee or, a coding competition site that runs the codeer as a solution to some coding problems Allows to present the code for.

How do you tighten / lock-down / sandbox this user code with possible damage to the server? Is that intent to run it?

How would you monitor and restrict resource usage (CPU, memory mostly) for Python?

For Python, but I'm thinking that if anyone has a more specific experience here, then they can share regardless (Python, Luya, Ruby, etc.).

(Provided link you have shown in) looks promising. I can not say that I have actually tried to do this, though.

Another option that can work is making extremely at least Linux distributions, then it will allow virtualized environment resources for each user to a certain level Use the Virtual Machine Monitoring Mechanism to prevent CPU and memory usage by suspending VM after reaching. If you have made distro too small, VM will have little effect on resources, but I think you still need a lot of solution in RAM (just being in the safe side).

Just my 2 cents I'm not a Python expert, though.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -