<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I secure ScriptTask's javax.script? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196312#M149442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Several problems with this approach:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- We do not know when the script task is about to be executed. (Is there a programmatic hook provided in Activiti for us to put our custom security manager?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Are you suggesting we set a temporary system-wide security manager through System.setSecurityManager()? Wouldn't that apply the custom permissions to other threads in the same JVM? Or possibly even other asnyc tasks occurring within Activiti at the time?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there are no way to customize the ScriptTaskActivityBehavior.execute(), is it reasonable for this to be a feature request?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2015 15:24:41 GMT</pubDate>
    <dc:creator>jmseo2</dc:creator>
    <dc:date>2015-08-06T15:24:41Z</dc:date>
    <item>
      <title>How do I secure ScriptTask's javax.script?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196308#M149438</link>
      <description>I am currently working on a project which exposes the BPM workflow definition to our users as a configurable value. The users may define any valid BPM XML, register it against our service, and execute it within our application.One problem we ran into is the usage of ScriptTask. The scripts are expos</description>
      <pubDate>Tue, 04 Aug 2015 19:42:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196308#M149438</guid>
      <dc:creator>jmseo2</dc:creator>
      <dc:date>2015-08-04T19:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I secure ScriptTask's javax.script?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196309#M149439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;try google-ing for "sandboxing rhino".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't try it yet, but this should help solving the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 21:30:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196309#M149439</guid>
      <dc:creator>vasile_dirla</dc:creator>
      <dc:date>2015-08-04T21:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I secure ScriptTask's javax.script?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196310#M149440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vasile. Thanks for the response. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My question was more geared towards Activiti's usage of the ScriptManager instance, which is not exposed from the process engine for me to configure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Btw, I believe starting jdk8 javax.script does not use rhino. (I need to confirm this bit later since I am not on the PC right now)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 21:46:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196310#M149440</guid>
      <dc:creator>jmseo2</dc:creator>
      <dc:date>2015-08-04T21:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I secure ScriptTask's javax.script?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196311#M149441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;just had a look into the source code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;into the ScriptTaskActivityBehavior class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the execute method is the point of execution of the scripts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Object result = scriptingEngines.evaluate(script, language, execution, storeScriptVariables);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that setting a custom security manager which will filter the packages and after the script execution to set it back to null will solve the problem for any script type executed with the ScriptTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class PkgsSecurityManager extends SecurityManager {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; public void checkPackageAccess(String pkg) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// if the pkg should be restricted throw the exception like that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new SecurityException();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;( This should be tested it's just my opinion but didn't test it yet.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 22:28:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196311#M149441</guid>
      <dc:creator>vasile_dirla</dc:creator>
      <dc:date>2015-08-04T22:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I secure ScriptTask's javax.script?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196312#M149442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Several problems with this approach:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- We do not know when the script task is about to be executed. (Is there a programmatic hook provided in Activiti for us to put our custom security manager?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Are you suggesting we set a temporary system-wide security manager through System.setSecurityManager()? Wouldn't that apply the custom permissions to other threads in the same JVM? Or possibly even other asnyc tasks occurring within Activiti at the time?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there are no way to customize the ScriptTaskActivityBehavior.execute(), is it reasonable for this to be a feature request?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 15:24:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196312#M149442</guid>
      <dc:creator>jmseo2</dc:creator>
      <dc:date>2015-08-06T15:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I secure ScriptTask's javax.script?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196313#M149443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know if there is any hook around that execution,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I was thinking you could modify the ScriptTaskActivityBehavior.java ("execute" method)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 19:21:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196313#M149443</guid>
      <dc:creator>vasile_dirla</dc:creator>
      <dc:date>2015-08-06T19:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I secure ScriptTask's javax.script?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196314#M149444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i think you could use this: &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#_hooking_into_process_parsing" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#_hooking_into_process_parsing&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;this way you could inject some custom script around the user's script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 21:59:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-secure-scripttask-s-javax-script/m-p/196314#M149444</guid>
      <dc:creator>vasile_dirla</dc:creator>
      <dc:date>2015-08-06T21:59:32Z</dc:date>
    </item>
  </channel>
</rss>

