2 Replies Latest reply on May 21, 2003 4:05 PM by sebesp

    log a user into the the container

    Donald Newbie

      Hello,
      I am looking on how I can log a user into the container after I add a user like in a member registration. Afte I add the roles, I need to programmatically log the user into the container.

      Here is one I posted and got no reply as to the specifics.

      I don't think that getting a handle to JAAS is the way to go since I think The container uses JACC and has a relationship with JAAS, but you are shielded from the implementation details.
      Thanks for any help.
      http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/

        • 1. Re: log a user into the the container
          Donald Newbie

          FOLLOWUP:
          What I have done in the web.xml is set up a security constraint
          <security-constraint>
          <web-resource-collection>
          <web-resource-name>collection2</web-resource-name>
          <url-pattern>/store/admin/*</url-pattern>
          </web-resource-collection>
          <auth-constraint>
          <role-name>adminrole</role-name>
          <role-name>csrrole</role-name>
          </auth-constraint>
          <user-data-constraint>
          <transport-guarantee>NONE</transport-guarantee>
          </user-data-constraint>
          </security-constraint>

          Now, when a user registers, I add the user to the correct tables and then I need to log the user intot he container so he can then access the URL that is in the constraint without getting the form based logon screen.

          What is the method to log into the container in Jboss that will propagate this to Tomcat. Do I need to work at the Tomcat level and not Jboss? Since Tomcat is integrated into JBOSS am I right to assume that I need to use a Jboss module that has wrapped JAAS? Or, do I need to make straight JAAS calls?

          I can't believe that there is no one trying to do this out there. This seems like a common pratice that occurs in many applications.

          • 2. Re: log a user into the the container
            sebesp Newbie

            Hi,

            I'm having the same problem... did you find a solution? just point me in the right direction.

            Thanks a lot !

            Regards,

            > FOLLOWUP:
            > What I have done in the web.xml is set up a security
            > constraint
            > <security-constraint>
            > <web-resource-collection>
            > <web-resource-name>collection2</web-resource
            > name>
            > <url-pattern>/store/admin/*</url-pattern>
            >
            > </web-resource-collection>
            > <auth-constraint>
            > <role-name>adminrole</role-name>
            > <role-name>csrrole</role-name>
            > </auth-constraint>
            > <user-data-constraint>
            >
            >
            >
            >
            >
            >
            > <transport-guarantee>NONE</transport-guarant
            > e>
            > </user-data-constraint>
            > </security-constraint>
            >
            > Now, when a user registers, I add the user to the
            > correct tables and then I need to log the user intot
            > he container so he can then access the URL that is in
            > the constraint without getting the form based logon
            > screen.
            >
            > What is the method to log into the container in Jboss
            > that will propagate this to Tomcat. Do I need to
            > work at the Tomcat level and not Jboss? Since Tomcat
            > is integrated into JBOSS am I right to assume that I
            > need to use a Jboss module that has wrapped JAAS?
            > Or, do I need to make straight JAAS calls?
            >
            > I can't believe that there is no one trying to do
            > this out there. This seems like a common pratice
            > that occurs in many applications.