Re: [pypy-dev] Zope2-RPython implementation help wanted..

Hey Chris, all, On Thu, Jul 17, 2008 at 08:43 +0100, Chris Withers wrote:
"some special", aha :) i just added a FAQ entry: http://codespeak.net/pypy/dist/pypy/doc/faq.html#does-rpython-have-anything-...
this is basically about storing user-provided scripts in the zodb, right?
- prevents people stripping security proxies from objects that are passed in to the function
hum, pypy-sandbox currently virtualizes at a low level (access to the Operating Systems files, io, etc.) and provides a *very* trustable way of running untrusted code. For providing higher and python level virtualization more work is needed so it might indeed not directly fit some use cases that RestrictedPython tries to satisfy. I am interested in this as are others, i think. Could you or someone else point to some concrete usages and use cases of the current RestrictedPython?
the rest, i think, is quite doable, particularly limiting RAM/CPU resources.
I'm sure others will pitch in if I've forgotten anything...
best, holger -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org

holger krekel wrote:
...or relational database, or, etc ;-)
Right, which is exactly what we want ;-) The security proxying is handled by a different method entirely. (The proxy objects are c extensions and prevent accessing attributes based on a pluggable set of rules) However, with access to unrestricted imports, all you'd need to do is import the unwrap method from the proxy wrapping module and you'd be fre of the jail ;-)
- Download and install Zope 2.11.1. - Add a "Script (Python)" using the Zope management interface. - Write some python code or look at the default python code that starts off in the python script. The use case is basically threefold: - general distrust of code authored through a web browser (what if someone managed to break in somehow and insert source code for a PythonSript (the things Zope calls "Script (Python)" in its management interface), etc) - provide an environment where objects that shouldn't be accessible by a particular user are filtered by the environment and where objects can also prevent their attributes from being written to or read. (the user here doesn't write code, they are running other code... as a programmer, rather than having to write security checks all the time yourself, the environment does it for you) - allow customers to write scripts where they do so in an environment where they can't access things that they shouldn't be able to, be it data, or functions like os.system, etc. There's also a "nice to have" rather than a requirement of providing an environment where code can be safely run without it accidentally consuming all memory or processing resources on a machine.
cool :-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

holger krekel wrote:
...or relational database, or, etc ;-)
Right, which is exactly what we want ;-) The security proxying is handled by a different method entirely. (The proxy objects are c extensions and prevent accessing attributes based on a pluggable set of rules) However, with access to unrestricted imports, all you'd need to do is import the unwrap method from the proxy wrapping module and you'd be fre of the jail ;-)
- Download and install Zope 2.11.1. - Add a "Script (Python)" using the Zope management interface. - Write some python code or look at the default python code that starts off in the python script. The use case is basically threefold: - general distrust of code authored through a web browser (what if someone managed to break in somehow and insert source code for a PythonSript (the things Zope calls "Script (Python)" in its management interface), etc) - provide an environment where objects that shouldn't be accessible by a particular user are filtered by the environment and where objects can also prevent their attributes from being written to or read. (the user here doesn't write code, they are running other code... as a programmer, rather than having to write security checks all the time yourself, the environment does it for you) - allow customers to write scripts where they do so in an environment where they can't access things that they shouldn't be able to, be it data, or functions like os.system, etc. There's also a "nice to have" rather than a requirement of providing an environment where code can be safely run without it accidentally consuming all memory or processing resources on a machine.
cool :-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers
-
holger krekel