2 Replies Latest reply on Jun 28, 2011 1:52 AM by Megha Shah

    JAAS Authentication in Gatein

    Megha Shah Newbie

      Hi,

      I am working on a migration from JBoss 4.0.5 & JBoss Portal 2.4 to JBoss 6.x with Gatein portal.

      Presently all our authentication follows JAAS. So without much changes (to my code) I would like to stick to JAAS authentication only in Gatein.

      Jboss Portal 2.4 JAAS used table like JBP_USERS, JBP_ROLES, JBP_ROLE_MEMBERSHIP etc...which exactly caters to my requirements.

       

      I dont find any similarites between Jboss Portal 2.4 and Gatein in the above context (tables). Does Gatein use different set of tables for authentication?

       

      Please let me know how can I achieve this?

       

      Thanks,

      Megha

        • 1. Re: JAAS Authentication in Gatein
          Marek Posolda Apprentice

          Hi Megha,

           

          GateIn is using Picketlink IDM framework for managing users and identities. And identity tables and data model is completely different for Picketlink IDM (GateIn) and old JBoss Portal.

           

          What you can do is:

          - Investigate and compare data model and tables among JBoss Portal and GateIn (Picketlink IDM) database and create SQL script for migrate identity objects from JBoss Portal into Picketlink IDM database. I guess this may be most easy solution for you.

           

          - Use login modules from JBoss Portal and integrate them with existing login modules in GateIn (Configuration of GateIn login modules is in $GATEIN_HOME/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml) . So that you may be able to authenticate users with old JBoss Portal database. But in this case, you will need to uncomment CustomMembershipLoginModule, which is commented by default. This will cause that users will be automatically synced and added into GateIn DB into group /platform/users after successful authentication.

           

          - GateIn provides Organization API for manage users,groups and roles. All modules of GateIn (including authenticatication) are using it. Current implementation of this Organization API is based on Picketlink IDM framework and it is using identity model from this framework . You may try to provide your own implementation of Organization Service and all handler interfaces (UserHandler, GroupHandler, MembershipHandler, ...) instead of Pickeltink IDM. Look at GateIn reference guide and into source code for more details.

           

          All options are not trivial, but hope it helps you.

          Marek

          1 of 1 people found this helpful
          • 2. Re: JAAS Authentication in Gatein
            Megha Shah Newbie

            Hi Marek,

             

            Thanks for your inputs.

             

            I am opting for the second option here (as it looks to best fit my requirements here)

             

            Can you please tell me which table/s are you referring to when you say "This will cause that users will be automatically synced and added into GateIn DB into group /platform/users after successful authentication."

             

            I had earlier posted a thread http://community.jboss.org/message/611140#611140, where at the end I have mentioned the tables that got created during server startup. Are you referring to any of the tables from that list?

             

             

            Thanks in advance,

            Megha