0 Replies Latest reply on Nov 27, 2013 3:43 PM by blakecmartin

    Module not available for use in host.xml (domain mode); works fine in standalone mode

    blakecmartin

      Hello,

       

      I'm currently attempting to migrate an application from JBoss 4.2.3. The business logic of the application heavily depended upon an unauthenticated "principal" that was passed to the server with every remote EJB invocation. In reality, what was passed was a string of metadata... something to the effect of:

      <user>--<role>--<random number>--<favorite color>--<blood type>--<mother's maiden name>


      We need to be able to pass user-specific metadata with every call.


      In the past, this was achieved with ClientLoginModule. Our application built the "principal" and JBoss provided magic ways to attach the principal to each EJB invocation and retrieve it on the server-side.


      To get around this, I wrote a plug-in provider that accepts any principal passed to it. I bundled it as a module, installed it on my host and configured it in my host.xml file like so:

       

       

      <security-realm name="ApplicationRealm">

        <plug-ins>

          <plug-in module="com.mycompany" />

        </plug-ins>

        <authentication>

          <plug-in name="AcceptAny" />

        </authentication>

      </security-realm>

       

       

      Unfortunately, it doesn't work. I get the following error:

      [Server:server-one] 15:03:13,163 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([

      [Server:server-one]     ("core-service" => "management"),

      [Server:server-one]     ("security-realm" => "ApplicationRealm")

       

      When I copy that configuration to my security realm in standalone.xml, it's able to look up the com.mycompany module and load the plug-in provider with no problem.

       

      I can only imagine that the reason for this is that modules have to be specifically configured to deploy to individual server groups or hosts. Is there a way in domain.xml or host.xml to make my "com.mycompany" module available to server-one? I tried using a global module in the ee subsystem, but I'm guessing that only makes the module available to deployments; I'm trying to make it available to the host itself.

       

      Thank you for your help!

       

      -Blake