Dear Rules Users,<div><br></div><div><br></div><div>Previously, I use guvnor with no security.</div><div>Now, my boss wants me to apply security on guvnor.</div><div><br></div><div>The way I implement is use this link</div>
<div><a href="http://ngjweb.wordpress.com/2011/12/07/drools-guvnor-manage-access-part-2/">http://ngjweb.wordpress.com/2011/12/07/drools-guvnor-manage-access-part-2/</a> <br><div><br></div><div>which is using realm of tomcat and create a table is the system for guvnor user.</div>
<div>I tested from browser, the security is working fine even more than 10 users access concurrently.</div><div><br></div><div>But when my application access the guvnor and try to create the knowledge base. It&#39;s becoming intermittent. </div>
<div>After several time access the guvnor, the guvnor is hang/can not access even from browser.</div><div><br></div><div>Here is the exception I got</div><div><br></div><div><div>java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 401 for URL: <a href="http://localhost:9090/guvnor/org.drools.guvnor.Guvnor/package/com.rbtsb.tm.meter/meter-internet/Dro">http://localhost:9090/guvnor/org.drools.guvnor.Guvnor/package/com.rbtsb.tm.meter/meter-internet/Dro</a></div>
<div>pCDR-LocalcallWithBRemarks.drl</div></div><div><div>....</div></div><div><div>at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:692)</div><div>        at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37</div>
</div><div><br></div><div>The way our app access the guvnor after apply security is as below.</div><div>Snipped Code</div><div><br></div><div><div>                UrlResource urlResource = (UrlResource) ResourceFactory.newUrlResource(ruleUrl);</div>
<div>                urlResource.setBasicAuthentication(&quot;enabled&quot;);</div><div>                urlResource.setUsername(&quot;admin&quot;);</div><div>                urlResource.setPassword(&quot;admin&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>builder.add(urlResource,ResourceType.DRL);</div></div><div><br></div><div>-- <br>Mujoko<br><a href="http://www.linkedin.com/in/mujoko" target="_blank">http://www.linkedin.com/in/mujoko</a><br>
<br>
</div></div>