0 Replies Latest reply on Jun 15, 2012 10:15 PM by Bernd Eckenfels

    Providing JAAS Modules to WARs automatically

    Bernd Eckenfels Novice

      Hello,

       

      I have a JBoss Module which is a JAAS LoginModule implementation. This module is registered in domain.xml as a security-domain (together with the ClientLoginModule) under the urn:jboss:domain:security:1.1 subsystem. I have then deployed a WAR, which is using a ServletFilter to use request.login(String,String). I get a classloader Exception that the JAAS provider cannot be loaded. When I add a Dependency: in the WAR Manifest to the module it works.

       

      I now wonder what the correct way would be to set this up. I could add my custom JAAS provider to the global modules, but I somewhat think it would be better if one can actually export it to all deployments which depend on the actual jboss:security-domain (jboss-web.xml).

       

      With the current dependencies configuration in my WAR I violate the encapsulation of the implementation of the loginmodule, and with the global module I would polute the global class repository.

       

      This is BTW Jboss 7.1.1, the attached file shows an exception when no dependency is set.

       

      Gruss

      Bernd