[Python-Dev] new security doc using object-capabilities (original) (raw)

Brett Cannon brett at python.org
Thu Jul 20 19:30:03 CEST 2006


On 7/20/06, Lawrence Oluyede <l.oluyede at gmail.com> wrote:

That's great. I just read your draft but I have little comments to do but before let me say that I liked the idea to borrow concepts from E. I've crossed the E's path in the beginning of this year and I found it a pot of really nice ideas (for promises and capabilities). Here are my comments about the draft: - it's not really clear to me what the "powerbox" is. I think I got the concept of "super process" but maybe it's to be clarified, isn't it? It become clear in the "threat model" paragraph

The powerbox is the thing that gives your security domains their initial abilities. The OS gives the process its abilities, but it does not directly work with the interpreter. Since the process does, though, it is considered the powerbox and farms out abilities that it has been given by the OS.

I have tried to clarify the definition at the start of the doc.

Maybe. As I said in the doc, any changes must be Pythonic and adding private namespaces right now wouldn't be without much more thought and work.

And if Ruby ends up with this security model but more thoroughly, more power to them. Their language is different in the right ways to support it.

As for coding in C, thems the breaks. I plan in adding stuff to the stdlib for the common case. I might eventually think of a good, generic proxy object that could be used, but as of right now I am not worrying about that since it would be icing on the cake.

Done.

Should be faster than an IBAC model since certain calls will not need to check the identity of the caller every time.

But I am not worrying about performance, I am worrying about correctness, so I did not try to make any performance claims.

Being "pythonic" is a fuzzy term in itself and Guido is the only person who can make definitive claims over what is and is not Pythonic. As I have said, this doc was mostly written with python-dev in mind since they are the ones I have to convince to let this into the core and they all know the term.

But I have tacked in a sentence on what the term means.

Nope. Have not started worrying about that yet. Just trying to get the basic model laid out.

It will be ignored. But I am hoping that through rewriting the import machinery more control over generating .pyc files can be had (see Skip Montanaro's PEP on this; forget the number). This is why exact details were left out of the implementation details. I just wanted people understand the approach to everything, not the concrete details of how it will be coded up.

That is the point. It is not that the sandbox needs to know it, its that it needs to be hidden from the sandbox.

OK.

I have not looked at it. I am also not trying to build an RPC system and a security model for Python. That is just too much work right now.

Basically. It just keeps a size_t on the memory cap and another on memory usage, and when memory is requested it makes sure that it won't go over the cap. And when memory is freed the usage goes down. It's very rough (hard to account for padding bits, etc. in C structs), but it should be good enough to prevent a program from hitting 800 MB when you really just wanted it to have 5 MB.

I think that's all for the draft. I wrote these comments during the

reading of the document.

Hope some of these help

Thanks, Lawrence.

-Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060720/77ae9261/attachment.html



More information about the Python-Dev mailing list