Friday, May 2, 2014

HowTo: Stand a kie-drools-workbench server

Here are my notes on how to setup kie-drools-wb-distribution for version 6.0.1.Final.

Download Drools Workbench from http://drools.jboss.org/downloads
Download Tomcat7 from http://tomcat.apache.org/download-70.cgi

A ReadMe is kind of burred, but it states the following...

ReadMe:
Installation notes

Configure JEE security for kie-wb on tomcat (with default realm backed by tomcat-users.xml)

1. Copy kie-tomcat-integration jar into TOMCAT_HOME/lib
2. Copy jacc lib into TOMCAT_HOME/lib (javax.security.jacc-api in jboss maven repository)
3. Add valve configuration into TOMCAT_HOME/conf/server.xml inside Host element as last valve definition
<Valve className="org.kie.integration.tomcat.JACCValve" />
4. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and users, make sure there will be 'analyst' or 'admin' roles defined as it's required to be authorized to use kie-wb
5. Edit web.xml and uncomment all entries that are marked with TOMCAT-JEE-SECURITY
6. Rename org.uberfire.security.auth.AuthenticationSource to org.uberfire.security.auth.AuthenticationSource-ORIGIN and
rename  org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY to org.uberfire.security.auth.AuthenticationSource
inside WEB-INF/classes/META-INF/services
These instructions are accurate, except for the part about uncommenting the TOMCAT-JEE-SECURITY sections in the web.xml, because they don't exist in the file.

So in order to find those sections, hop over to the below url and copy/paste them into the web.xml
https://github.com/droolsjbpm/kie-wb-distributions/blob/5255111cb52460e7c9da47c07ce84f4f0dc36055/kie-drools-wb/kie-drools-wb-distribution-wars/src/main/tomcat7/WEB-INF/web.xml

At this point, you should be able to get the application to stand and be able to authenticate in.