Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
BIRT Scripting - restricting certain Java functionality to fix security vunerability
Migrateduser
About a year ago I integrated BIRT 2.6.0 into a web app project. The project has a reports section, whereby the idea is that users with certain privileges can upload their own report design files to the project. Other users can then view these generated reports.<br />
<br />
A user of this project has just pointed out that it is possible for those report 'authors' to upload reports with scripts that are potentially harmful to the server hosting the project web application. <br />
<br />
How can I lock down what report scripts can actually do?<br />
<br />
I've just tried running a report in Eclipse that had a single line of script:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>java.lang.Runtime.getRuntime().exec("C:/Program Files/Notepad++/notepad++.exe");</pre>
<br />
Switching to the preview tab in Eclipse and sure enough, my installation of Notepadd++ is opened. I uploaded this report to my webapp and the same thing happened. I guess I'm surprised that this kind of script isn't locked down already, but regardless, how do I do that?<br />
<br />
My initial thoughts are the Report Engine's <span style='font-family: Courier New'>config.ini</span> file and it's <span style='font-family: Courier New'>eclipse.security</span> property would be handy...point it to a security manager that has a strict policy on permissions. Is there an easier way?<br />
<br />
Would there be any extra setup in the APIs? My project uses the <span style='font-family: Courier New'>ReportEngine</span> instance to create a <span style='font-family: Courier New'>IRunAndRenderTask</span>, I can't find any 'set security ...' methods.<br />
<br />
Thanks
Find more posts tagged with
Comments
There are no comments yet