DesignAndDeploy / dnd

Design and Deploy is a framework for developing applications for intelligent environments
Apache License 2.0
3 stars 0 forks source link

Find a better way to discern code executed by function Blocks #30

Closed schnabeltrei closed 11 years ago

schnabeltrei commented 11 years ago

The security manager by now relies on the stacktrace containing a specific BlockRunner, class to notice, if code stems from a block or is part of the main Module. There should be a better way.

Patagonicus commented 11 years ago

There's also the problem that the FunctionBlock will call Output.setValue() which eventually will call Application to send the value. We shouldn't enforce any security restrictions for these classes.

schnabeltrei commented 11 years ago

It is easy to remove restrictions, when a certain Method in a certain class is called somewhere in the stack. Should however be done very carefully to avoid security risks.

This will likely be less easy, when we implement another way of detecting the user supplied code.

schnabeltrei commented 11 years ago

SecurityManager is now more precise in which methods it will restrict and whether it grants an exception (Whitelist basis). Point probably still stands. Stacktraces are not a great way to discern valid from invalid code.