Re: metadata and decorators are coming your way

Éric Piel <[email protected]> Thu, 10 Jul 2014 00:02:42 +0200
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
Hi Irmen,

On 09-07-14 20:32, Irmen de Jong wrote:
> On 9-7-2014 15:54, Éric Piel wrote:
:>
>> Definitely, by default it should not be needed to add @exposed attribute
>> to any method/attribute to have it shared. But it feels strange that if
>> you just add one @expose, suddenly all the other things are hidden.
>> Maybe a @noremote decorator to hide a specific method would be easier to
>> use?
>
> Mhmhmmm nah, I really prefer going the way that would be "secure by default" eventually.
> That means that unless you tell Pyro otherwise, stuff is not exposed to remote calls.
> I'm not entirely sure on how to do it but a possibility is to do the following:
>
> - for now, leave the current mode unchanged: everything exposed.
> - add @export decorator and new config item to switch to new mode (REQUIRE_EXPOSE?)
> - in the backwards compatible mode @export won't do anything, because everything is
> already exposed anyway
> - in new mode you'll have to add @expose to the methods otherwise they're unexposed.
>
> What do you think of this scheme?
I use Pyro only locally in a secure environment, to avoid the 
limitations of Python parallel code (ie, no GIL) and improve reliability 
(ie, each node can run/restart independently). So I'm not personally 
interested in making anything more secure ;-) I guess having @expose 
working also on a class, or being able to select the expose mode via an 
argument of Daemon.register() would both work fine for me.


> PS
> I notice you're affiliated with the TU Delft? Can I ask what you are using Pyro for?
Actually, I'm now working in a spin-off from TUDelft: Delmic. We make 
microscopes: https://github.com/delmic

Best,
Éric


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core