4 Replies Latest reply on Apr 23, 2003 6:42 AM by chewitty

    Deploying Custom Login Module

    zampetti

      Can someone describe how I can deploy a custom login module to be used by my web application? I've gone through the docs, which are mighty vague on how this is supposed to be done.

      Thanks in advance

      Marc

        • 1. Re: Deploying Custom Login Module
          jwkaltz

          In JBoss 3,

          - deploy your custom login module in the deploy directory (as a class or inside a jar)
          - add an application policy in the file
          login-config-xml :
          <application-policy name = "mysecuritydomain_as_in_ejb_jar">

          <login-module code = "org.jboss.security.auth.spi.ProxyLoginModule" flag = "required">
          <module-option name = "moduleName">my.package.MyLoginModule</module-option>
          <module-option name = "myparameter1">bla </module-option>
          ... other parameters ...
          </login-module>

          </application-policy>

          - start JBoss and check the output for warnings
          - deploy your EJBs as usual

          I think that's all.

          • 2. Re: Deploying Custom Login Module
            chris.is

            I've done this and I am getting a ClassNotFoundException over and over again. The ProxyLoginModule can't find my class.

            ..
            <application-policy name = "MyRealm">

            <login-module code "org.jboss.security.auth.spi.ProxyLoginModule" flag = "required">
            <module-option name = "moduleName">my.logins.MyLoginModule</module-option>
            </login-module>

            </application-policy>

            and I placed the package in the deploy directory. I tried it packed in a jar and unpacked, just in maps.

            It still won't work. How come?

            • 3. Re: Deploying Custom Login Module
              chris.is

              I did this and it won't work. I get ClassNotFoundExceptions. ProxyLoginModule can't find my loginmodule. I placed it in the deploy map. I tried it packed in a jar and unpacked, the class in maps.

              So how come it won't work?

              • 4. Re: Deploying Custom Login Module
                chewitty

                You need to put the jar containing your JAAS custom LoginModule in the server/default/lib and not the deploy directory - assuming that you are using the default server.

                Hope that helps.

                Regards,
                Ferdinand