2 Replies Latest reply on Jan 2, 2009 9:51 PM by Phillip Haines

    JAAS, SeamLoginModule and Third Party Servlets

    Phillip Haines Newbie


      I'm working on an seam application that has embedded within in it a WebDav Servlet. The webdav directory will be served from a database and each users directory will be populated according to login. I would like to be able to use the seam login security model for both the seam website and the webdav servlet (take advantage of SeamLoginModule if I can).

      This is what I have been able to achieve so far...

      I've added the following to my WEB-INF/web.xml so that my application http://myapp/ will be a seam website; http://myapp/webdav can be used by any webdav client. This step is working fine.

          <!-- web dav support -->

      To activate security i've added the following to my WEB-INF/web.xml

              <!-- web resources that are protected -->
                  <web-resource-name>Webdav Drive</web-resource-name>
                  <!-- role-name indicates roles that are allowed
                      to access the web resource specified above -->
              <realm-name>Document WebDav</realm-name>

      Added a WEB-INF/jboss-web.xml


      and added the following to the end of jboss/server/default/conf/login-config.xml

          <!-- # added for calgary -->
          <application-policy name="calgary">
               <login-module code="org.jboss.seam.security.spi.SeamLoginModule" flag="required">
                      <module-option name="authMethod">#{authenticator.authenticate}</module-option> 

      When I attempt to connect to the webdav directory I get a basic username/password challenge dialogue, entering a username and password then fails. No messages are displayed in the JBoss logs - we are loggin SQL in our development environment so this is normally logged so execution does not appear to be reaching the authenticate method.

      Any assistance would be greatly appreciated.

      BTW using JBoss 4.2.2 and Seam 2.0.1.


        • 1. Re: JAAS, SeamLoginModule and Third Party Servlets
          rama y Newbie

          Hi Phillip,

            I am wondering, are you able to proceed to further?

          I am very new to seam and in general to frame works.

          On the similar lines of you, I am trying to workout to integrate WEBDAV Servlet from net.sf.webdav.WebdavServlet in Seam for Login.

          Do please let know any inputs.

          Note: I am facing an obstacle in WEBDAV servlet itself w.r.t to the Webdev's implementation of ResourceHandlerImplementation part where one is supposed to implement the interface. Do you have any sample code on this?

              Does any one has come across the with the implementation of  WEBDAV  plus Seam's Loginmodule plus JAAS.

          Do please post if any information available related on this or any general guidelines?

          BTW I am using Seam 2.1.1 and JBoss 4.2.3 G.A.


          • 2. Re: JAAS, SeamLoginModule and Third Party Servlets
            Phillip Haines Newbie

            Hi Rama,

            I've put this on the back burner; I did make some progress in the end by changing the (net.sf) classes to call the authenticator bean object rather than using the container. Sorry I don't have any more useful information - best of luck.