JAAS authorization with JBoss Fuse

The customer I was working with had a need for JAAS Authorization for the ActiveMQ broker in his JBoss Fuse install. I thought I did it by the book. But it was at the end not enough. I had done this configuration for a FuseSource installation version 7.1.x but it didn’t work for a 7.2.x (JBoss Fuse 6.0.0.redhat-024). For the current, at this writing, version of JBoss Fuse you have to do it like this:

Add or change the plugins settings of etc/activemq.xml into:

<plugins>
<jaasAuthenticationPlugin configuration=”karaf”/>
<authorizationPlugin>
<map>
<authorizationMap groupClass=”org.apache.karaf.jaas.boot.principal.RolePrincipal”><authorizationEntries><authorizationEntry queue=”>” read=”admin,broker” write=”admin,broker” admin=”admin,broker”/>

<authorizationEntry topic=”>” read=”admin,broker” write=”admin,broker” admin=”admin,broker”/>
<authorizationEntry topic=”ActiveMQ.Advisory.>” read=”admin,broker” write=”admin,broker” admin=”admin,broker”/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>
It is all about the ‘groupClass’ attribute inside the ‘authorizationMap’ element.
You can read more about this at https://community.jboss.org/thread/233546.

Creating a osgi jdbc driver

For work I have to work with different datasource connections. Not only in a JEE environment but also in a OSGI environment. A datasource needs also a jdbc connection. And a jdbc driver jar bundled in osgi format is not always available. I normally try to find a osgi jdbc jar in the servicemix repository but that will work only for OSS drivers.

For a closed source jdbc driver to be converted to a bundle version of the jar you could use a maven plugin. But that is more work then the following:

Fire up a Fusesource or JBoss Fuse instance and have the jdbc driver available on the disk. Inside the fuse console execute the command ‘osgi:install wrap:file:///tmp/ojdbc6.jar’.  When the command finished it will return a number.

Use this number to go to the cache directory with this number (data/cache/bundlexxx/version0.0). Inside the directory you will find the ojdbc6.jar named as bundle.jar. Take the bundle.jar and rename it (back) to ojdbc6-osgi.jar. The -osgi addition is just a naming convention I adopted. Place ojdbc6-osgi.jar in your package manager.

Visit to Red Hat Summit 2013

Just returned from an inspiring Red Hat Summit 2013 which was combined with CamelOne 2013 and JUDCon 2013. I have tried as hard as possible to attend as much as I could. A hard thing to do as CamelOne and JUDCon are on the same days.

JBoss 7 version 7.2.0.Final

Just found the time to take the source of WildFly and compile myself a version of JBoss 7 as version 7.2.0.Final.  I have put it on this box so you can grab it. But no warrenty what so ever. It is just a compile with openjdk 1.7 on this box. It is only there to fulfill my wish to have a version.

So just “AS IS” not warrenty and / or support. Grab it http://it-speeltuin.nl/files/jboss-as-7.2.0.Final.zip