3 Replies Latest reply on Nov 7, 2011 3:07 PM by anil.saldhana

    How to migrate custom security configuration from JBoss 4.x to AS 7

    arakasi69

      Hello,

       

      i've to migrate our custom security configuration with our custom login modules to AS 7.

       

      In JBoss 4.0.3 SP1 we have deployed our login modules in a SAR archive with following structure

      META-INF/jboss-service.xml

      META-INF/login-config.xml

       

      In login-config.xml we configure our security domain and login-modules

       

       

      <policy>

          <application-policy name = "lisa">

             <authentication>

                <login-module flag="required" code="de.ebcot.bsctool.secure.jboss.LISALoginModule">

      ...

       

            </authentication>

         </application-policy>

      </policy>

       

      In jboss-service.xml we configure a mbean which is responsible for loading the login-config.xml from the META-INF directory in the SAR archive. It uses the XMLLoginConfigMBean

       

        <mbean code="xxx.mbean.jboss.CustomSecurityConfig"

            name="xxx.secure:service=LoginConfig-Lisa">

            <attribute name="AuthConfig">META-INF/login-config.xml</attribute>

            <attribute name="SecurityConfigName">jboss.security:service=XMLLoginConfig</attribute>

         </mbean>

       

       

      One question is, how  can i reuse the XMLLoginConfigMBean ( it seems it is now XMLLoginConfigImpl) and how can i reuse my CustomSecurityConfig which is extended from ServiceMBeanSupport, which is not provided in AS 7 ?

       

      Second question: is the approach deploying the login.config.xml within a SAR archive supported by AS 7 or have i to configure the security subsystem for my security domain and my custom login modules, and must i deploy my custom login modules as a AS7 module ?

       

      Kind regards, Thomas