Open GoogleCodeExporter opened 9 years ago
Changed from Accepted to New
Original comment by dlee.cal...@gmail.com
on 9 May 2007 at 12:54
Hello,
Maybe there should be a priv (priveledged) context to allow some code to run. It would run slower while there
is a background check. This would work like Try block. But it would return a
runtime error instead of just an
exception if run outside the context. Inside, you can get an exception to allow
you to try other options.
priv//eledged
{
try
{
fs.write("OK");
}
catch(PriveledgedAccessException)
{
System.out.println("OK");
}
}
This way you won't have a huge priv block if you want performance. Good day.
Yemi Bedu
Original comment by yemi.b...@gmail.com
on 17 Apr 2008 at 11:08
Hello,
I am looking for such a functionality for 2 days now.
Without it, BeanShell is completly useless for scripting language allowed for
business users. I want to allow users run some scripts based on API, tested for
security and safe.
Is there a way to implement your own SecurityManager to manage only evaluated
scripts?
Or maybe there is another way to provide mentioned "allow" list?
Original comment by kami...@gmail.com
on 8 Jan 2010 at 11:19
Can't you use Java's existing SecurityManager facility and just treat the bsh
evaluation as
an untrusted operation (i.e. call System.setSecurityManager(...) before bsh
eval)?
Original comment by s...@google.com
on 25 Feb 2010 at 3:48
This feature would power up BeanShell as an embedded script engine. It's like
what ClassShutter.visibleToScripts() does for Mozilla Rhino Scriptengine
(JavaScript).
http://www.docjar.com/docs/api/org/mozilla/javascript/ClassShutter.html
It implements a blacklist as proposed by the reporter.
I appreciate to see such thing in BeanShell.
Original comment by sulai...@googlemail.com
on 4 Nov 2010 at 7:33
I agree with comment 4.
Implementing this feature could easily affect performance.
The mentioned
http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/ClassShutter.html
only limits access to specific classes.
But here a method level access filter is requested
("java.lang.System.println()" is ok but "java.lang.System.exit(int)" is not).
Original comment by pejob...@gmail.com
on 21 Feb 2011 at 12:13
Actually the blacklisting need only happen during the parsing phase. Once
completed everything that should be block is so the script can be executed.
Original comment by miroslav...@gmail.com
on 30 Jun 2011 at 9:53
Re comment #4: are there any good examples of this anywhere? I'd like to eval
untrusted scripts submitted via web form in a sandbox context (running in
something like Tomcat).
Original comment by jdesbon...@gmail.com
on 2 Oct 2011 at 12:09
Hi
any progress on this?
TIA
Leo
Original comment by shik...@gmail.com
on 3 Dec 2013 at 5:18
I don't think this is in the state of "should be done".
As already said, I would advice to use the given security features of java.
Original comment by pejob...@gmail.com
on 5 Dec 2013 at 7:48
Original issue reported on code.google.com by
dlee.cal...@gmail.com
on 9 May 2007 at 12:53