5 Replies Latest reply on Mar 17, 2010 4:44 AM by Boleslaw Dawidowicz

    Is JBoss IDM(Picketlink) is right solution for my case?

    Dhruv Patel Newbie

      Hi Team,

       

       

      I am trying to evaluate complete solution for

       

      Central Management for User,Groups,Roles & SSO.

       

      I would like to test scenario for multiple web application (all apps are multi-tenant) having single Identity management and SSO.

       

      lets have example

       

      There are three applications APP1, APP2, &  APP3

       

      lets say CLIENT1 having access to APP1, APP3.

      lets say CLIENT2 having access to APP1, APP2.

      lets say CLIENT3 having access to APP3.

       

       

      each client have their own users and groups & roles.

      each user and groups have different roles in application.

       

       

      Is JBoss IDM(Picketlink) is right solution for my case?

       

       

      Correct me if i am wrong !

      -----------------------------------------------------------

      IDM is core API.

       

      I need to create Web Application according to my need which will use IDM and IDM will store identity in DB.

       

      so i need DB to maintain identity.

       

      i need to use LDAP or DB for authentication in SSO.

       

      so if i use LDAP i need to keep updating LDAP based on user creation/activation/deactivation.

       

      -----------------------------------------------------------

       

       

       

       

      i have gone through the fundamentals of IDM concept.

       

      I would like to test the IDM using embedded mode.

       

      how do i start?

       

      concerns

       

      1>  DB SCRIPT is required or DB will be created automatically from hbm file. or need to use some tool?

       

      2>  i need to setup idm-config.xml & hibernate.cfg.xml as described.

       

      3> How do i initiate IDM from main() and create some sample entry of user,roles and groups ??

       

      if any code snippet.

       

       

       

      i also have other questions to ask but let me first have clear idea of possibility.

       

      any suggestion and thoughts are welcome

       

      i really appreciate core framework and initiative taken by members of Picketlink

       

       

      Dhruv Patel

        • 1. Re: Is JBoss IDM(Picketlink) is right solution for my case?
          Boleslaw Dawidowicz Master
          -----------------------------------------------------------

          IDM is core API.

           

          I need to create Web Application according to my need which will use IDM and IDM will store identity in DB.

           

          so i need DB to maintain identity.

           

          i need to use LDAP or DB for authentication in SSO.

           

          so if i use LDAP i need to keep updating LDAP based on user creation/activation/deactivation.

           

          ----------------------------------------------------------

           

          IDM is mainly a framework that expose API to manage identities such as users, groups or roles that can be stored in different stores. You can create stores federation like with LDAP and DB - store part of groups and users in LDAP and other groups and roles in DB. IDM doesn't provide SSO but it is fairly easy to use it for authentication using standard JAAS mechanism (LoginModule - look at this example that can be deployed into JBoss AS 5.1: http://anonsvn.jboss.org/repos/picketlink/idm/tags/1.1.1.GA/example/auth/)

          1>  DB SCRIPT is required or DB will be created automatically from hbm file. or need to use some tool?

           

          2>  i need to setup idm-config.xml & hibernate.cfg.xml as described.

           

          3> How do i initiate IDM from main() and create some sample entry of user,roles and groups ??

           

          if any code snippet.

           

           

           

          i also have other questions to ask but let me first have clear idea of possibility.

           

          any suggestion and thoughts are welcome

           

          i really appreciate core framework and initiative taken by members of Picketlink

           

           

          Dhruv Patel

          1) DB schema can be created by hibernate. Mapping xml files are bundled inside picketlink-idm-hibernate jar.

          2) Yes, those two files are enough to start

          3) Please look at this example maven project: http://anonsvn.jboss.org/repos/picketlink/idm/tags/1.1.1.GA/example/simple/ This is the best place to start and experiment with the API. For example this test case provides quite rich example of how IDM API can be used: http://anonsvn.jboss.org/repos/picketlink/idm/tags/1.1.1.GA/example/simple/src/test/java/org/picketlink/idm/example/DBTestCase.java

           

          I will try to come with more tutorials and better documented examples soon.

          • 2. Re: Is JBoss IDM(Picketlink) is right solution for my case?
            Dhruv Patel Newbie

            Hi Boleslaw,

             

            i have started with sample u have given but i found error.

             

            i am using MYSQL DB

             

            Caused by: org.hibernate.MappingException: Could not determine type for: org.hibernate.type.PrimitiveByteArrayBlobType, at table: jbid_attr_bin_value, for columns: [org.hibernate.mapping.Column(VALUE)]

            at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)

            at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:276)

            at org.hibernate.mapping.Property.isValid(Property.java:207)

            at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:458)

            at org.hibernate.mapping.RootClass.validate(RootClass.java:215)

            at org.hibernate.cfg.Configuration.validate(Configuration.java:1149)

            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334)

            at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.bootstrapHibernateSessionFactory(HibernateIdentityStoreImpl.java:404)

            ... 4 more

             

             

            Dhruv Patel

            • 3. Re: Is JBoss IDM(Picketlink) is right solution for my case?
              Boleslaw Dawidowicz Master
              Could you share which version of mysql are you using and what kind of changes did you make to configuration in samples?
              • 4. Re: Is JBoss IDM(Picketlink) is right solution for my case?
                Dhruv Patel Newbie

                i found hibernate annotation jar was not preset and

                i have change it to MySQL5Dialect and its working fine now.

                 

                thnx once again.

                 

                here is a Question if u can help.

                 

                when i add user in IDM i need some id to be generated along with it

                 

                actually i need to maintain userid(LONG)  in many of application for entity association.

                 

                but i found there is no such facility so may be i need to use some sequence to get and add as attribute?

                • 5. Re: Is JBoss IDM(Picketlink) is right solution for my case?
                  Boleslaw Dawidowicz Master
                  You will have two separate unique user ids - one String and one Long then... Maybe try to come up with some String<->Long encoding to be able to recreate IDM user name to avoid keeping those in sync?