<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hi,<br>
<br>
I am not an expert in JSR 223. However, some JSR 223 implementations
include a mechanism for restricting access to Java classes, for
example Nashorn [1] and Rhino [2], which might be sufficient for
your needs. (Note, Nashorn was deprecated and removed from JDK 15
[3]). I think most of the permissions you list below can be mapped
to a small list of Java classes that check those permissions. Also,
with strong encapsulation of JDK internals enforced by default in
JDK 17 [4], you get additional protection that is not dependent on
the Security Manager.<br>
<br>
What JSR 223 implementation do you use?<br>
<br>
--Sean<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html#classfilter_introduction">https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html#classfilter_introduction</a><br>
[2]
<a class="moz-txt-link-freetext" href="https://mozilla.github.io/rhino/javadoc/org/mozilla/javascript/ClassShutter.html">https://mozilla.github.io/rhino/javadoc/org/mozilla/javascript/ClassShutter.html</a><br>
[3] <a class="moz-txt-link-freetext" href="https://openjdk.java.net/jeps/372">https://openjdk.java.net/jeps/372</a><br>
[4] <a class="moz-txt-link-freetext" href="https://openjdk.java.net/jeps/403">https://openjdk.java.net/jeps/403</a><br>
<br>
<div class="moz-cite-prefix">On 7/21/21 12:35 PM, Alexey Shponarsky
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAAwknq+gf9Q2b51kwzdWeYxW4YfdzqHdkPAz-mE7tLB_erwM5w@mail.gmail.com">
<div dir="ltr">Hello,
<div><br>
</div>
<div><span id="gmail-docs-internal-guid-a0cacd73-7fff-ad6e-8866-1c6a3889248a">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">At Jelastic PaaS, we are using SecurityManager within Java Scripting (JSR 223). Specifically, Java Scripting allows us and our customers to easily extend the core platform functionality with custom logic. The developers can execute their custom scriptlets inside a Java Scripting runtime environment with pre-injected core platform API methods. For example, </span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,128,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">//@req(pathFrom, pathTo)</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,255);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">var</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> mountFrom = </span><span style="font-size:9pt;font-family:"Courier New";color:rgb(163,21,21);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"${</span><a href="http://nodes.build.first.id/" style="text-decoration-line:none" moz-do-not-send="true"><span style="font-size:9pt;font-family:"Courier New";background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">nodes.build.first.id</span></a><span style="font-size:9pt;font-family:"Courier New";color:rgb(163,21,21);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">}"</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">envName = </span><span style="font-size:9pt;font-family:"Courier New";color:rgb(163,21,21);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"${settings.targetEnv}"</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">,</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">mountTo = </span><span style="font-size:9pt;font-family:"Courier New";color:rgb(163,21,21);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"cp"</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">;</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,255);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">var</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> resp = jelastic.env.file.RemoveMountPointByGroup(envName, session, mountTo, pathTo);</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,255);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">if</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> (resp.result != 0) </span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,255);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> resp;</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,255);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> jelastic.env.file.AddMountPointByGroup(envName, session, mountTo, pathTo, </span><span style="font-size:9pt;font-family:"Courier New";color:rgb(163,21,21);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">'nfs'</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, </span><span style="font-size:9pt;font-family:"Courier New";color:rgb(163,21,21);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">null</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, pathFrom, mountFrom, </span><span style="font-size:9pt;font-family:"Courier New";color:rgb(163,21,21);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">''</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, </span><span style="font-size:9pt;font-family:"Courier New";color:rgb(163,21,21);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">false</span><span style="font-size:9pt;font-family:"Courier New";color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">As Java Scripting engine / technology provides quite powerful runtimes, we have to restrict certains actions such as execution of any reflection methods, change of any system environment variables, exit, calling some dangerous static methods, reading files outside of the sandbox folder, etc. The SecurityManager mechanism provided an ability to configure permissions easily.</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">To achieve this we create an instance of AccessControlContext with required permissions and pass it to </span><a href="https://docs.oracle.com/javase/8/docs/api/java/security/AccessController.html#doPrivileged-java.security.PrivilegedAction-java.security.AccessControlContext-" style="text-decoration-line:none" moz-do-not-send="true"><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-style:italic;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">AccessController.doPrivileged</span></a><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-style:italic;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">method:</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">//Create list of </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Permission</span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">:</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Collection</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Permission</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">= </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">LinkedList<</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Permission</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">>();</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.add(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">RuntimePermission(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"createClassLoader"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">));</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.add(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">RuntimePermission(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"getClassLoader"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">));</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.add(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">RuntimePermission(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"accessDeclaredMembers"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">));</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.add(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">RuntimePermission(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"getProtectionDomain"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">));</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.add(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">PropertyPermission(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"*"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"read"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">));</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.add(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">SocketPermission(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"*"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"connect,accept,resolve"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">));</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.add(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">SocketPermission(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"localhost:0-"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"connect,accept,resolve,listen"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">));</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">//Create </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">AccessControlContext</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ProtectionDomain domain </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">= </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ProtectionDomain(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">CodeSource(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">null</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, (</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Certificate</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">[]) </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">null</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">), </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">perms</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">AccessControlContext </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(133,22,145);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">acc</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">= </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">AccessControlContext(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ProtectionDomain[]{</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">domain</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">});</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">//Run untrusted code using created </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">AccessControlContext</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(158,136,13);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">@Override</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">public </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ScriptEvalResponse </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,98,122);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">call</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">() </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">throws </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Exception </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">{</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Object obj </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">= </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">AccessController</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-style:italic;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">doPrivileged</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">PrivilegedAction</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Object</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">>() {</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(158,136,13);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">@Override</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(158,136,13);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">public </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Object </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,98,122);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">run</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">() {</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">try </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">{</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Object response </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">= </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(133,22,145);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">compiledScript</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.eval(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(133,22,145);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ctx</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ScriptEvalResponse evalResponse </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">= </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">new </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ScriptEvalResponse(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Response</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(135,16,148);font-style:italic;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">OK</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">evalResponse</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.setResponse(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">response</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">evalResponse</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">;</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> } </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">catch </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Exception </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ex) {</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(135,16,148);font-style:italic;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">logger</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.debug(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(6,125,23);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">"Error occurred during eval script:"</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, ex);</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ex;</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> }</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> }</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> }, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(133,22,145);font-weight:700;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">acc</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">);</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">if </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">obj </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">instanceof </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Exception</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">) {</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">throw </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Exception</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">) </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">obj</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">;</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> }</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,51,179);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">return </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">ScriptEvalResponse</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">) </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(0,0,0);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">obj</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">;</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:"Courier New";color:rgb(8,8,8);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">}</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.5pt;font-family:Roboto,sans-serif;color:rgb(60,64,67);font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">How can we implement a similar solution after the removal of SecurityManager? Could you help us to find an alternative?</span></p>
</span><br class="gmail-Apple-interchange-newline">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div style="color:rgb(0,0,0);font-size:12.8px"><span style="background-color:transparent;font-size:11pt;font-family:Arial;color:rgb(60,120,216);font-weight:700;vertical-align:baseline;white-space:pre-wrap"><span></span><span></span><img src="https://docs.google.com/uc?export=download&id=1rbId4Ev8etW7ZPYa-_DWvYfkUQGM9_Q0&revid=0B29Q0t2ZHLjgaW5ZVEtFSTlyRjRzVkwwd3dQNXJSUFdKb1VBPQ" moz-do-not-send="true" width="420" height="84">
</span></div>
<div style="color:rgb(0,0,0);font-size:12.8px"><span style="background-color:transparent;font-size:11pt;font-family:Arial;color:rgb(60,120,216);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Alexey Shponarsky </span><span style="background-color:transparent;font-family:Arial;color:rgb(60,120,216);font-weight:700;vertical-align:baseline;white-space:pre-wrap;font-size:14.6667px">Director of R&D</span><br>
</div>
<div style="color:rgb(0,0,0)"><a href="https://twitter.com/Jelastic" style="color:rgb(17,85,204)" target="_blank" moz-do-not-send="true"><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Twitter</span></a><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> </span><a href="https://www.facebook.com/Jelastic/" style="color:rgb(17,85,204)" target="_blank" moz-do-not-send="true"><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Facebook</span></a><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> </span><a href="http://www.youtube.com/user/JelasticCloud" style="color:rgb(17,85,204)" target="_blank" moz-do-not-send="true"><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">YouTube</span></a><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> </span><a href="https://www.linkedin.com/company/2426564/" style="color:rgb(17,85,204)" target="_blank" moz-do-not-send="true"><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">LinkedIn</span></a><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> </span><a href="https://plus.google.com/+JelasticInc" style="color:rgb(17,85,204)" target="_blank" moz-do-not-send="true"><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Google+</span></a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>