2 Replies Latest reply on Oct 29, 2007 10:51 AM by piotr.koper

    Where the customized login module should be deployed

    jdsignature

      How you deploy the customized loginmodule?

      I placed to jboss_home\server\default\deploy, it didn't work?

        • 1. Re: Where the customized login module should be deployed
          wolfgangknauf

          I think you have place it in a SAR file in the delploy directory. The SAR must contain a file "jboss-service.xml" in the "META-INF" directory.

          Hope this helps

          Wolfgang

          • 2. Re: Where the customized login module should be deployed
            piotr.koper

            If you have JAR with your own LoginModule you can put it in $JBOSS_HOME/server/default/lib and modify login-config.xml from $JBOSS_HOME/server/default/conf. This is first method i know. Ofcourse each modyfications requires server restart.

            You can also in EAR file.

            EAR
             |
             +-- [lib]
             +-- [META-INF]
             | |
             | +-- application.xml
             | +-- jboss-app.xml
             |
             +-- login-config.xml
             +-- login-service.xml
            


            application.xml
            <?xml version="1.0" encoding="UTF-8"?>
            <application version="1.5">
             <!-- put jar with your own LoginModule in this directory -->
             <library-directory>lib</library-directory>
            
             <!-- do some other stuff -->
            </application>
            


            jboss-app.xml:
            <jboss-app>
             <module>
             <service>login-service.xml</service>
             </module>
            </jboss-app>
            


            login-config.xml
            <?xml version="1.0" encoding="UTF-8"?>
            <policy>
             <!-- Your domain -->
             <application-policy name="my-domain">
             <authentication>
             <login-module code="my.domain.com.LM" flag="required">
             </login-module>
             </authentication>
             </application-policy>
            </policy>
            


            login-service.xml
            <?xml version="1.0" encoding="UTF-8"?>
            <server>
             <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
             name="MyLogin:service=ExampleREOLoginConfigService">
             <attribute name="AuthConfig">login-config.xml</attribute>
             <depends optional-attribute-name="LoginConfigService">
             jboss.security:service=XMLLoginConfig
             </depends>
             <depends optional-attribute-name="SecurityManagerService">
             jboss.security:service=JaasSecurityManager
             </depends>
             </mbean>
            </server>
            


            I hope this helps :-)

            piotr.koper