Re: Using python for writing models: How to run models in restrictedpython mode?

Discussion in 'Python' started by Jean-Paul Calderone, Nov 7, 2005.

  1. On 7 Nov 2005 12:54:40 -0800, vinjvinj <> wrote:
    >I have an application which allows multiple users to write models.
    >These models get distributed on a grid of compute engines. users submit
    >their models through a web interface. I want to
    >
    >1. restrict the user from doing any file io, exec, import, eval, etc. I
    >was thinking of writing a plugin for pylint to do all the checks? Is
    >this is a good way given that there is no restricted python. What are
    >the things I should serach for in python code
    >
    >2. restrict the amount of memory a module uses as well. For instance
    >how can I restrict a user from doing a = range(10000000000) or similar
    >tasks so that my whole compute farm does not come down.


    There is currently no way to do either of these things. The most realistic approach at this time seems to be to rely on your operating system's capabilities to limit resource access and usage on a per-process. That is, run each piece of submitted code in a separate, unprivileged process, with the appropriate limits in place.

    Jean-Paul
    Jean-Paul Calderone, Nov 7, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rasjid Wilcox

    Using RestrictedPython

    Rasjid Wilcox, Oct 6, 2003, in forum: Python
    Replies:
    1
    Views:
    300
    Evan Simpson
    Oct 6, 2003
  2. vinjvinj
    Replies:
    15
    Views:
    564
    Jeremy Sanders
    Nov 10, 2005
  3. John J Lee
    Replies:
    3
    Views:
    462
    bruno at modulix
    Dec 1, 2005
  4. Edward Loper
    Replies:
    0
    Views:
    451
    Edward Loper
    Aug 7, 2007
  5. David Heinemeier Hansson
    Replies:
    0
    Views:
    222
    David Heinemeier Hansson
    Dec 23, 2004
Loading...

Share This Page